Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MessageChannel is not defined in encodeInto.any.js #28851

Closed
AtticusYang opened this issue Jul 25, 2019 · 2 comments
Closed

MessageChannel is not defined in encodeInto.any.js #28851

AtticusYang opened this issue Jul 25, 2019 · 2 comments

Comments

@AtticusYang
Copy link

AtticusYang commented Jul 25, 2019

  • Version: v13.0.0-pre
  • Platform:Mac
  • Subsystem:

I try to finish the feature Add TextEncoder.prototype.encodeInto , after finish the feature , i test with command
python tools/test.py wpt/test-encoding

I meet the failure as followed

[FAILURE] encodeInto() and a detached output buffer
MessageChannel is not defined
ReferenceError: MessageChannel is not defined
at Test. (node/test/fixtures/wpt/encoding/encodeInto.any.js:142:3)

encodeInto.any.js

142   new MessageChannel().port1.postMessage(buffer, [buffer]);
143   ({ read, written } = new TextEncoder().encodeInto("", view));
@AtticusYang
Copy link
Author

@joyeecheung , thanks.

AtticusYang added a commit to AtticusYang/node that referenced this issue Jul 26, 2019
wpt runner import MessageChannel, fix MessageChannel is not defined in encodeInto.any.js.

Fixes: nodejs#28851
@AtticusYang
Copy link
Author

AtticusYang commented Jul 26, 2019

add below code in test/wpt/test-encoding.js and fix the bug.

const { MessageChannel } = require('worker_threads');

runner.defineGlobal('MessageChannel', {
  get() {
    return MessageChannel;
  }
});

AtticusYang pushed a commit to AtticusYang/node that referenced this issue Jul 26, 2019
Add function encodeInto to TextEncoder, fix bug MessageChannel is not defined
in encodeInto.any.js.

Fixes: nodejs#28851
Refs: nodejs#26904
AtticusYang pushed a commit to AtticusYang/node that referenced this issue Sep 4, 2019
Add function encodeInto to TextEncoder, fix bug MessageChannel is not
defined in encodeInto.any.js.

Fixes: nodejs#28851
Refs: nodejs#26904
addaleax added a commit to addaleax/node that referenced this issue Sep 10, 2019
Add function encodeInto to TextEncoder, and add MessageChannel
to the encodeInto.any.js test.

Fixes: nodejs#28851
Fixes: nodejs#26904
Refs: nodejs#28862
Co-authored-by: AtticusYang <[email protected]>
addaleax added a commit that referenced this issue Sep 13, 2019
Add function encodeInto to TextEncoder, and add MessageChannel
to the encodeInto.any.js test.

Fixes: #28851
Fixes: #26904
Refs: #28862
Co-authored-by: AtticusYang <[email protected]>

PR-URL: #29524
Reviewed-By: David Carlier <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this issue Sep 20, 2019
Add function encodeInto to TextEncoder, and add MessageChannel
to the encodeInto.any.js test.

Fixes: #28851
Fixes: #26904
Refs: #28862
Co-authored-by: AtticusYang <[email protected]>

PR-URL: #29524
Reviewed-By: David Carlier <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: James M Snell <[email protected]>
BridgeAR pushed a commit that referenced this issue Sep 25, 2019
Add function encodeInto to TextEncoder, and add MessageChannel
to the encodeInto.any.js test.

Fixes: #28851
Fixes: #26904
Refs: #28862
Co-authored-by: AtticusYang <[email protected]>

PR-URL: #29524
Reviewed-By: David Carlier <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant