Unreviewed, rolling out r225656.
authorjlewis3@apple.com <jlewis3@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Dec 2017 02:38:00 +0000 (02:38 +0000)
committerjlewis3@apple.com <jlewis3@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Dec 2017 02:38:00 +0000 (02:38 +0000)
The test has been a flaky timout since being added.

Reverted changeset:

"WebAssembly: sending module to iframe fails"
https://bugs.webkit.org/show_bug.cgi?id=179263
https://trac.webkit.org/changeset/225656

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226210 268f45cc-cd09-0410-ab3c-d52691b4dbfc

18 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/ios-simulator/TestExpectations
LayoutTests/platform/win/TestExpectations
LayoutTests/wasm/iframe-parent-postmessage-expected.txt [deleted file]
LayoutTests/wasm/iframe-parent-postmessage.html [deleted file]
LayoutTests/wasm/iframe-postmessage-expected.txt [deleted file]
LayoutTests/wasm/iframe-postmessage.html [deleted file]
LayoutTests/wasm/resources/frame-parent.html [deleted file]
LayoutTests/wasm/resources/frame.html [deleted file]
LayoutTests/wasm/resources/load_wasm.js [deleted file]
LayoutTests/wasm/window-postmessage-expected.txt [deleted file]
LayoutTests/wasm/window-postmessage.html [deleted file]
LayoutTests/workers/wasm-mem-post-message.html
LayoutTests/workers/wasm-resources/builder.js [moved from LayoutTests/resources/wasm-builder.js with 100% similarity]
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/SerializedScriptValue.cpp
Source/WebCore/bindings/js/SerializedScriptValue.h
Source/WebCore/page/DOMWindow.cpp

index 915a0c2..914b34d 100644 (file)
@@ -1,5 +1,17 @@
 2017-12-20  Matt Lewis  <jlewis3@apple.com>
 
+        Unreviewed, rolling out r225656.
+
+        The test has been a flaky timout since being added.
+
+        Reverted changeset:
+
+        "WebAssembly: sending module to iframe fails"
+        https://bugs.webkit.org/show_bug.cgi?id=179263
+        https://trac.webkit.org/changeset/225656
+
+2017-12-20  Matt Lewis  <jlewis3@apple.com>
+
         Unreviewed, rolling out r226155.
 
         This caused test failures.
index 3d30b34..1c011f2 100644 (file)
@@ -52,9 +52,6 @@ http/tests/security/contentSecurityPolicy/WebAssembly-blocked-in-about-blank-ifr
 http/tests/security/contentSecurityPolicy/WebAssembly-blocked-in-external-script.html [ Failure ]
 http/tests/security/contentSecurityPolicy/WebAssembly-blocked-in-subframe.html [ Failure ]
 http/tests/security/contentSecurityPolicy/WebAssembly-blocked.html [ Failure ]
-wasm/iframe-postmessage.html [ Skip ]
-wasm/iframe-parent-postmessage.html [ Skip ]
-wasm/window-postmessage.html [ Skip ]
 
 # WebGL tests which need triaging https://bugs.webkit.org/b/174100
 webgl/1.0.2/conformance/uniforms/uniform-default-values.html [ Failure ]
index 8a25534..d92be7e 100644 (file)
@@ -3673,9 +3673,6 @@ workers/wasm-hashset.html [ Skip ]
 workers/wasm-long-compile-many.html [ Skip ]
 workers/wasm-long-compile.html [ Skip ]
 workers/wasm-mem-post-message.html [ Skip ]
-wasm/iframe-postmessage.html [ Skip ]
-wasm/iframe-parent-postmessage.html [ Skip ]
-wasm/window-postmessage.html [ Skip ]
 
 # Animated image throttling behaves differently on WK1.
 svg/animations/animated-svg-image-outside-viewport-paused.html [ Skip ]
diff --git a/LayoutTests/wasm/iframe-parent-postmessage-expected.txt b/LayoutTests/wasm/iframe-parent-postmessage-expected.txt
deleted file mode 100644 (file)
index 2f87a5e..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-Test that expected Wasm Module can be sent over window.parent.postMessage from iframe.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-PASS () => value is 35010
-
diff --git a/LayoutTests/wasm/iframe-parent-postmessage.html b/LayoutTests/wasm/iframe-parent-postmessage.html
deleted file mode 100644 (file)
index dfa1c9d..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-<iframe src="./resources/frame-parent.html" id="iframe"></iframe>
-<script src="../resources/js-test.js"></script>
-<script src="../resources/wasm-builder.js"></script>
-<script src="./resources/load_wasm.js"></script>
-<script>
-description("Test that expected Wasm Module can be sent over window.parent.postMessage from iframe.");
-if (window.testRunner)
-    testRunner.waitUntilDone();
-
-function finish(value) {
-    shouldBe(() => value, () => 35010);
-
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var run = async function () {
-    try {
-        window.addEventListener("message", (answer) => finish(answer.data), false);
-        var mod = await createWasmModule();
-        var iframe = document.getElementById("iframe").contentWindow;
-        iframe.postMessage(mod, '*');
-    } catch (e) {
-        console.log('error:', e);
-    }
-};
-
-setTimeout(run);
-</script>
\ No newline at end of file
diff --git a/LayoutTests/wasm/iframe-postmessage-expected.txt b/LayoutTests/wasm/iframe-postmessage-expected.txt
deleted file mode 100644 (file)
index 861ec7f..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-Test that expected Wasm Module can be sent over iframe.postMessage.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-PASS () => value is 35010
-
diff --git a/LayoutTests/wasm/iframe-postmessage.html b/LayoutTests/wasm/iframe-postmessage.html
deleted file mode 100644 (file)
index 3176c2d..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-<iframe src="./resources/frame.html" id="iframe"></iframe>
-<script src="../resources/js-test.js"></script>
-<script src="../resources/wasm-builder.js"></script>
-<script src="./resources/load_wasm.js"></script>
-<script>
-description("Test that expected Wasm Module can be sent over iframe.postMessage.");
-if (window.testRunner)
-    testRunner.waitUntilDone();
-
-function finish(value) {
-    shouldBe(() => value, () => 35010);
-
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var run = async function () {
-    try {
-        window.addEventListener("message", (answer) => finish(answer.data), false);
-        var mod = await createWasmModule();
-        var iframe = document.getElementById("iframe").contentWindow;
-        iframe.postMessage(mod, '*');
-    } catch (e) {
-        console.log('error:', e);
-    }
-};
-
-setTimeout(run);
-</script>
\ No newline at end of file
diff --git a/LayoutTests/wasm/resources/frame-parent.html b/LayoutTests/wasm/resources/frame-parent.html
deleted file mode 100644 (file)
index a4135a2..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<script>
-function listener(event) {
-  var mod = event.data;
-  try {
-    var i = new WebAssembly.Instance(mod);
-    var ans = i.exports.calc(5);
-    window.parent.postMessage(ans, event.origin);
-  } catch (e) {
-    window.parent.postMessage(e, event.origin);
-  }
-}
-
-addEventListener("message", listener, false)
-</script>
diff --git a/LayoutTests/wasm/resources/frame.html b/LayoutTests/wasm/resources/frame.html
deleted file mode 100644 (file)
index 2d24d92..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<script>
-function listener(event) {
-  var mod = event.data;
-  try {
-    var i = new WebAssembly.Instance(mod);
-    var ans = i.exports.calc(5);
-    event.source.postMessage(ans, event.origin);
-  } catch (e) {
-    event.source.postMessage(e, event.origin);
-  }
-}
-
-addEventListener("message", listener, false)
-</script>
diff --git a/LayoutTests/wasm/resources/load_wasm.js b/LayoutTests/wasm/resources/load_wasm.js
deleted file mode 100644 (file)
index b6286de..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-function createWasmModule() {
-    let builder = new Builder();
-    builder = builder.Type().End()
-        .Function().End()
-        .Export().Function("calc").End()
-        .Code()
-            .Function("calc", { params: ["i32"], ret: "i32" })
-                .GetLocal(0)
-                .GetLocal(0)
-                .I32Add();
-
-    const count = 7000;
-    for (let i = 0; i < count; i++) {
-        builder = builder.GetLocal(0).I32Add();
-    }
-    builder = builder.Return().End().End();
-
-    return new WebAssembly.Module(builder.WebAssembly().get());
-}
\ No newline at end of file
diff --git a/LayoutTests/wasm/window-postmessage-expected.txt b/LayoutTests/wasm/window-postmessage-expected.txt
deleted file mode 100644 (file)
index 40f7715..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-Test that expected Wasm Module can be sent over window.postMessage.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-PASS () => value is 7002
-
diff --git a/LayoutTests/wasm/window-postmessage.html b/LayoutTests/wasm/window-postmessage.html
deleted file mode 100644 (file)
index 8e12ca6..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE html>
-<script src="../resources/js-test.js"></script>
-<script src="../resources/wasm-builder.js"></script>
-<script src="./resources/load_wasm.js"></script>
-<script>
-description("Test that expected Wasm Module can be sent over window.postMessage.");
-if (window.testRunner)
-    testRunner.waitUntilDone();
-
-window.addEventListener("message", (answer) => finish(answer.data), false);
-
-function finish(module) {
-    var i = new WebAssembly.Instance(module);
-    var value = i.exports.calc(1);
-    shouldBe(() => value, () => 7002);
-
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var run = async function () {
-    try {
-        var mod = await createWasmModule();
-        window.postMessage(mod, '*');
-    } catch (e) {
-        console.log('error:', e);
-    }
-};
-
-setTimeout(run);
-</script>
\ No newline at end of file
index c173b81..90fe161 100644 (file)
@@ -1,6 +1,6 @@
 <html>
   <head>
-    <script src="../resources/wasm-builder.js"></script>
+    <script src="./wasm-resources/builder.js"></script>
     <script src="../resources/js-test-pre.js"></script>
 </head>
 <body>
index 9902c7c..270adcf 100644 (file)
@@ -1,3 +1,15 @@
+2017-12-20  Matt Lewis  <jlewis3@apple.com>
+
+        Unreviewed, rolling out r225656.
+
+        The test has been a flaky timout since being added.
+
+        Reverted changeset:
+
+        "WebAssembly: sending module to iframe fails"
+        https://bugs.webkit.org/show_bug.cgi?id=179263
+        https://trac.webkit.org/changeset/225656
+
 2017-12-20  Don Olmstead  <don.olmstead@sony.com>
 
         [Win] Use WCharStringExtras functions in WebCore
index a9adf99..1a886dd 100644 (file)
@@ -1066,7 +1066,7 @@ private:
 
 #if ENABLE(WEBASSEMBLY)
             if (JSWebAssemblyModule* module = jsDynamicDowncast<JSWebAssemblyModule*>(vm, obj)) {
-                if (m_context != SerializationContext::WorkerPostMessage && m_context != SerializationContext::WindowPostMessage)
+                if (m_context != SerializationContext::WorkerPostMessage)
                     return false;
 
                 uint32_t index = m_wasmModules.size(); 
index 9dbd565..2eb1ddc 100644 (file)
@@ -51,7 +51,7 @@ class SharedBuffer;
 enum class SerializationReturnCode;
 
 enum class SerializationErrorMode { NonThrowing, Throwing };
-enum class SerializationContext { Default, WorkerPostMessage, WindowPostMessage };
+enum class SerializationContext { Default, WorkerPostMessage };
 
 using ArrayBufferContentsArray = Vector<JSC::ArrayBufferContents>;
 #if ENABLE(WEBASSEMBLY)
index 5b4b711..9a9fe5c 100644 (file)
@@ -927,7 +927,7 @@ ExceptionOr<void> DOMWindow::postMessage(JSC::ExecState& state, DOMWindow& incum
     }
 
     Vector<RefPtr<MessagePort>> ports;
-    auto message = SerializedScriptValue::create(state, messageValue, WTFMove(transfer), ports, SerializationContext::WindowPostMessage);
+    auto message = SerializedScriptValue::create(state, messageValue, WTFMove(transfer), ports);
     if (message.hasException())
         return message.releaseException();