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

A possible bug about this in strict mode. #639

Closed
YiWen-y opened this issue Jan 3, 2020 · 1 comment
Closed

A possible bug about this in strict mode. #639

YiWen-y opened this issue Jan 3, 2020 · 1 comment
Labels
Strict Mode Issues related to non-compliance with the ES5 Strict Mode spec

Comments

@YiWen-y
Copy link

YiWen-y commented Jan 3, 2020

Revision

rhino-1.7.11

Test case
var NISLFuzzingFunc = function() {
    "use strict";
    print(this);
};
NISLFuzzingFunc();
Execution steps
java -jar rhino-1.7.11.jar -debug -version 200 testcase.js
Output
[object global]
Expected behavior
undefined
Description

According to ES standard, this is not converted to the global object in strict mode, the initial value of this should be undefined. However, when running this test case blow, the output of rhino is [object global].
The references are as follows:
http://www.ecma-international.org/ecma-262/5.1/index.html#sec-C

@rbri
Copy link
Collaborator

rbri commented Jul 5, 2020

Duplicates #940

@p-bakker p-bakker added the Strict Mode Issues related to non-compliance with the ES5 Strict Mode spec label Jun 29, 2021
@p-bakker p-bakker closed this as not planned Won't fix, can't repro, duplicate, stale Jul 15, 2024
@github-project-automation github-project-automation bot moved this to Done in v2.0.0 Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Strict Mode Issues related to non-compliance with the ES5 Strict Mode spec
Projects
Status: Done
Development

No branches or pull requests

3 participants