DescriptionScriptValueSerializer should throw, not crash, when handling unknown types
JavaScript Symbols are a new (in ES2015) primitive type. This caused
ScriptValueSerializer to go off the rails when it had exhausted its known
list of primitives and then assumed anything else might be an object.
Now the code checks for Object-ness before assuming it. Also refactored
the if/else-if cascade to group all Object handling together, and prune
dead branches.
BUG=522227
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=200874
Patch Set 1 #
Total comments: 14
Patch Set 2 : Fix returns and tests #Patch Set 3 : Fix build #Patch Set 4 : Use nullptr #
Messages
Total messages: 14 (5 generated)
|