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

annexB/B.2.1.js fails in test262-harness with -r node, >= 0.11 #34

Closed
smikes opened this issue Feb 17, 2015 · 2 comments
Closed

annexB/B.2.1.js fails in test262-harness with -r node, >= 0.11 #34

smikes opened this issue Feb 17, 2015 · 2 comments

Comments

@smikes
Copy link
Contributor

smikes commented Feb 17, 2015

Here's the failure on >= 0.11. It only happens with -r node, -r node-ip

Again, test262 and test262-harness are siblings:

for x in 0.10 0.11 0.12 1.0 1.1 1.2 ; do nvm use $x; ../test262-harness/bin/run.js test/annexB/B.2.1.js -r node-ip ; done

Output is:

Now using node v0.10.35
Ran 1 tests
1 passed
0 failed
Took 0.027 seconds
Now using node v0.11.15
FAIL test/annexB/B.2.1.js
     Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.escape)
     Exp: no error
     Got: Error: not enumerable

Ran 1 tests
0 passed
1 failed
Took 0.044 seconds
Now using node v0.12.0
FAIL test/annexB/B.2.1.js
     Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.escape)
     Exp: no error
     Got: Error: not enumerable

Ran 1 tests
0 passed
1 failed
Took 0.044 seconds
Now using io.js v1.0.4
FAIL test/annexB/B.2.1.js
     Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.escape)
     Exp: no error
     Got: Error: not enumerable

Ran 1 tests
0 passed
1 failed
Took 0.046 seconds
Now using io.js v1.1.0
FAIL test/annexB/B.2.1.js
     Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.escape)
     Exp: no error
     Got: Error: not enumerable

Ran 1 tests
0 passed
1 failed
Took 0.046 seconds
Now using io.js v1.2.0
FAIL test/annexB/B.2.1.js
     Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.escape)
     Exp: no error
     Got: Error: not enumerable

Ran 1 tests
0 passed
1 failed
Took 0.047 seconds

I suspect the problem is that when the global object is set up inside test262-harness code, the enumerable: false descriptor property is not preserved.

@smikes
Copy link
Contributor Author

smikes commented Feb 17, 2015

Some context around the API changes: http://strongloop.com/strongblog/node-js-v0-12-apis-breaking/#vm_vm_runinnewcontext_code_sandbox_options

vm.runInThisContext() compiles code, runs it and returns the result. Running code does not have access to local scope, but does have access to the current global object.

vs

vm.runInNewContext compiles code, contextifies sandbox if passed or creates a new contextified sandbox if it’s omitted, and then runs the code with the sandbox as the global object and returns the result.

see also nodejs/node#864

@bterlson
Copy link
Member

Node v.0.12 will continue to not work properly. This is ok because it's fixed in later versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants