WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
247493
Order between initializing x and this.x in strict mode
https://bugs.webkit.org/show_bug.cgi?id=247493
Summary
Order between initializing x and this.x in strict mode
Kanguk Lee
Reported
2022-11-04 09:59:29 PDT
Created
attachment 463411
[details]
I captured ECMAScript 2022 section 13.15.2. // input.js "use strict"; x = this.x = 0; ________________________________ Hello, Executing the input.js using JSC terminates normally, but it is expected to throw ReferenceError. According to ECMAScript 2022 section 13.15.2: Evaluation of `*AssignmentExpression* : *LeftHandSideExpression* = *AssignmentExpression*`, (link:
https://tc39.es/ecma262/2022/multipage/ecmascript-language-expressions.html#sec-assignment-operators-runtime-semantics-evaluation
) in line 1-a, *LeftHandSideExpression*, i.e. `x` should be evaluated first and the evaluation result is an unresolvable reference. Therefore PutValue() in line 1-e throws ReferenceError because strict mode is turned on. WebKit version: 615.1.10
Attachments
I captured ECMAScript 2022 section 13.15.2.
(1.28 MB, image/png)
2022-11-04 09:59 PDT
,
Kanguk Lee
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-11-07 16:24:45 PST
<
rdar://problem/102064848
>
Yijia Huang
Comment 2
2022-11-13 00:15:36 PST
Pull request:
https://github.com/WebKit/WebKit/pull/6438
Yusuke Suzuki
Comment 3
2022-11-14 11:03:47 PST
Ross pointed out that this is spec issue actually.
https://github.com/WebKit/WebKit/pull/6438#issuecomment-1312694884
https://github.com/WebKit/WebKit/pull/6438#issuecomment-1312922522
We close this since the spec will be upgraded.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug