Fix subtle dehydration bug with function parameters.
The dehydrator assumed that the parameters for a function declaration
would always be in the symbol table before the function declaration
itself was added to the symbol table. If this assumption didn't hold,
the function's parameter list would contain nulls.
Surprisingly, these nulls did not prevent us from running and passing
tests! Getting the description of the declaration would crash, but in
practice we weren't doing this.
We now write a `Symbol` into the dehydrated data instead of a
`SymbolId`. In the typical case, where the parameter does exist,
this bloats the dehydrated data by 1 byte per parameter, but the
rehydrated data will be exactly the same as before.
Change-Id: Ic5a445a85bcc81edb941bd334b4249f8a5bf4629
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/563121
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
15 files changed