WebAssembly: sending module to iframe fails
authorgskachkov@gmail.com <gskachkov@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Jan 2018 15:38:39 +0000 (15:38 +0000)
committergskachkov@gmail.com <gskachkov@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Jan 2018 15:38:39 +0000 (15:38 +0000)
commit5c615514f891adb161785dfa18b7a3e8fbc63e70
tree5758ab3a8fa8cf9d0cdafcd7189fae1c326fd144
parent27a9869934df154cd4884a88fce52c44beb8ce97
WebAssembly: sending module to iframe fails
https://bugs.webkit.org/show_bug.cgi?id=179263

Reviewed by JF Bastien.

Source/WebCore:

Allow use WebAssembly.Module as input parameters for postMessage
in window and iframe object. To prevent sending message to iframe
that is not ready, in iframe-* test we are waiting message from
iframe only after that we send message to it.

Tests: wasm/iframe-parent-postmessage.html
       wasm/iframe-postmessage.html
       wasm/window-postmessage.html

* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::dumpIfTerminal):
* bindings/js/SerializedScriptValue.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::postMessage):

LayoutTests:

* platform/ios-simulator/TestExpectations:
* platform/win/TestExpectations:
* resources/wasm-builder.js: Renamed from LayoutTests/workers/wasm-resources/builder.js.
* wasm/iframe-parent-postmessage-expected.txt: Added.
* wasm/iframe-parent-postmessage.html: Added.
* wasm/iframe-postmessage-expected.txt: Added.
* wasm/iframe-postmessage.html: Added.
* wasm/resources/frame-parent.html: Added.
* wasm/resources/frame.html: Added.
* wasm/resources/load_wasm.js: Added.
(createWasmModule):
* wasm/window-postmessage-expected.txt: Added.
* wasm/window-postmessage.html: Added.
* workers/wasm-mem-post-message.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226322 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/ios-simulator/TestExpectations
LayoutTests/platform/win/TestExpectations
LayoutTests/resources/wasm-builder.js [moved from LayoutTests/workers/wasm-resources/builder.js with 100% similarity]
LayoutTests/wasm/iframe-parent-postmessage-expected.txt [new file with mode: 0644]
LayoutTests/wasm/iframe-parent-postmessage.html [new file with mode: 0644]
LayoutTests/wasm/iframe-postmessage-expected.txt [new file with mode: 0644]
LayoutTests/wasm/iframe-postmessage.html [new file with mode: 0644]
LayoutTests/wasm/resources/frame-parent.html [new file with mode: 0644]
LayoutTests/wasm/resources/frame.html [new file with mode: 0644]
LayoutTests/wasm/resources/load_wasm.js [new file with mode: 0644]
LayoutTests/wasm/window-postmessage-expected.txt [new file with mode: 0644]
LayoutTests/wasm/window-postmessage.html [new file with mode: 0644]
LayoutTests/workers/wasm-mem-post-message.html
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/SerializedScriptValue.cpp
Source/WebCore/bindings/js/SerializedScriptValue.h
Source/WebCore/page/DOMWindow.cpp