[Webkit-unassigned] [Bug 247493] New: Order between initializing x and this.x in strict mode
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Nov 4 09:59:29 PDT 2022
https://bugs.webkit.org/show_bug.cgi?id=247493
Bug ID: 247493
Summary: Order between initializing x and this.x in strict mode
Product: WebKit
Version: WebKit Local Build
Hardware: Mac (Apple Silicon)
OS: macOS 12
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: p51lee at kaist.ac.kr
Created attachment 463411
--> https://bugs.webkit.org/attachment.cgi?id=463411&action=review
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
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20221104/148908f3/attachment.htm>
More information about the webkit-unassigned
mailing list