summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/web/13_message_port.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/ext/web/13_message_port.js b/ext/web/13_message_port.js
index 34f86f80c..2a0d864ba 100644
--- a/ext/web/13_message_port.js
+++ b/ext/web/13_message_port.js
@@ -26,7 +26,6 @@ const {
ArrayPrototypeIncludes,
ArrayPrototypePush,
ObjectPrototypeIsPrototypeOf,
- ObjectSetPrototypeOf,
Symbol,
SymbolFor,
SymbolIterator,
@@ -84,9 +83,8 @@ const _enabled = Symbol("enabled");
* @returns {MessagePort}
*/
function createMessagePort(id) {
- const port = core.createHostObject();
- ObjectSetPrototypeOf(port, MessagePortPrototype);
- port[webidl.brand] = webidl.brand;
+ const port = webidl.createBranded(MessagePort);
+ port[core.hostObjectBrand] = core.hostObjectBrand;
setEventTargetData(port);
port[_id] = id;
return port;