Structured cloning a Symbol should throw
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Feb 2018 17:22:35 +0000 (17:22 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Feb 2018 17:22:35 +0000 (17:22 +0000)
commitde0729ef8edc405b4bee42bef80464916824de1a
tree50588b3c45ccfac0301cc71e2b7e83cbf818db36
parentf3ff93b231b71fa9be422bf5c049f82719098c44
Structured cloning a Symbol should throw
https://bugs.webkit.org/show_bug.cgi?id=182380

Reviewed by Darin Adler.

Source/WebCore:

Test: js/dom/post-message-symbol.html

* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::dumpIfTerminal):
Structured cloning should throw "DataCloneError" DOMException if it finds Symbol.
Remove unused `isNumber()` case. It is done in dumpImmediate.
(WebCore::CloneSerializer::serializeUndefined): Deleted.
(WebCore::CloneSerializer::serializeBoolean): Deleted.
(WebCore::CloneSerializer::serializeNumber): Deleted.
Remove unused functions.

LayoutTests:

* js/dom/post-message-symbol-expected.txt: Added.
* js/dom/post-message-symbol.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227969 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/js/dom/post-message-symbol-expected.txt [new file with mode: 0644]
LayoutTests/js/dom/post-message-symbol.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/SerializedScriptValue.cpp