Closed Bug 1446258 Opened 4 years ago Closed 4 years ago

Expose `MessageChannel` to `System`

Categories

(Core :: DOM: Workers, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: lina, Assigned: lina)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

It would be handy to expose `MessageChannel` to chrome code, so that JS on the main thread could talk to a chrome worker without managing its own message queue.
Attachment #8959440 - Flags: review?(amarchesini)
Comment on attachment 8959440 [details] [diff] [review]
0001-Bug-XXX-Expose-MessageChannel-to-System-.-r-baku.patch

Review of attachment 8959440 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/messagechannel/tests/unit/test_messageChannel.js
@@ +24,5 @@
> +    pongEvt.ports[0].postMessage("hello", [port1]);
> +  };
> +  chromeWorker.postMessage("ping", [port1]);
> +});
> +

no extra line at the end of the file.
Attachment #8959440 - Flags: review?(amarchesini) → review+
Pushed by kcambridge@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/014e386dcdd9
Expose `MessageChannel` to `System`. r=baku
Backed out changeset 014e386dcdd9 (bug 1446258) for Android failures on dom/messagechannel/tests/unit/test_messageChannel.js

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=014e386dcdd948d2b1527362abd0eff53105e3fc

Log link: https://treeherder.mozilla.org/logviewer.html#?job_id=168422994&repo=mozilla-inbound&lineNumber=1569

Log snippet:
[task 2018-03-16T08:05:57.562Z] 08:05:57     INFO -  TEST-START | dom/messagechannel/tests/unit/test_messageChannel.js
[task 2018-03-16T08:05:59.952Z] 08:05:59  WARNING -  TEST-UNEXPECTED-FAIL | dom/messagechannel/tests/unit/test_messageChannel.js | xpcshell return code: 0
[task 2018-03-16T08:05:59.953Z] 08:05:59     INFO -  TEST-INFO took 2391ms
[task 2018-03-16T08:05:59.953Z] 08:05:59     INFO -  >>>>>>>
[task 2018-03-16T08:05:59.954Z] 08:05:59     INFO -  dom/messagechannel/tests/unit/test_messageChannel.js | xpcw: cd /storage/sdcard/tests/xpc/dom/messagechannel/tests/unit
[task 2018-03-16T08:05:59.955Z] 08:05:59     INFO -  dom/messagechannel/tests/unit/test_messageChannel.js | xpcw: xpcshell -r /storage/sdcard/tests/xpc/c/httpd.manifest --greomni /data/local/xpcb/target.apk -m -s -e const _HEAD_JS_PATH = "/storage/sdcard/tests/xpc/head.js"; -e const _MOZINFO_JS_PATH = "/storage/sdcard/tests/xpc/p/mozinfo.json"; -e const _TESTING_MODULES_DIR = "/storage/sdcard/tests/xpc/m"; -f /storage/sdcard/tests/xpc/head.js -e const _SERVER_ADDR = "localhost" -e const _HEAD_FILES = []; -e const _JSDEBUGGER_PORT = 0; -e const _TEST_FILE = ["test_messageChannel.js"]; -e const _TEST_NAME = "dom/messagechannel/tests/unit/test_messageChannel.js" -e _execute_test(); quit(0);
[task 2018-03-16T08:05:59.955Z] 08:05:59     INFO -  (xpcshell/head.js) | test MAIN run_test pending (1)
[task 2018-03-16T08:05:59.956Z] 08:05:59     INFO -  TEST-PASS | dom/messagechannel/tests/unit/test_messageChannel.js | run_test - [run_test : 5] true == true
[task 2018-03-16T08:05:59.957Z] 08:05:59     INFO -  (xpcshell/head.js) | test run_next_test 0 pending (2)
[task 2018-03-16T08:05:59.957Z] 08:05:59     INFO -  (xpcshell/head.js) | test MAIN run_test finished (2)
[task 2018-03-16T08:05:59.958Z] 08:05:59     INFO -  running event loop
[task 2018-03-16T08:05:59.958Z] 08:05:59     INFO -  dom/messagechannel/tests/unit/test_messageChannel.js | Starting test_messageChannel
[task 2018-03-16T08:05:59.958Z] 08:05:59     INFO -  (xpcshell/head.js) | test test_messageChannel pending (2)
[task 2018-03-16T08:05:59.958Z] 08:05:59     INFO -  (xpcshell/head.js) | test pending (3)
Flags: needinfo?(kit)
Backout by rgurzau@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b45dc4809d57
Backed out changeset 014e386dcdd9 for Android failures on dom/messagechannel/tests/unit/test_messageChannel.js
Pushed by kcambridge@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/26ab6b737a6d
Expose `MessageChannel` to `System`. r=baku
https://hg.mozilla.org/mozilla-central/rev/26ab6b737a6d
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.