[BinAST] delete operator on an argument cannot find binding

RESOLVED FIXED in Firefox 66

Status

()

defect
P3
normal
RESOLVED FIXED
6 months ago
4 months ago

People

(Reporter: arai, Assigned: arai)

Tracking

Trunk
mozilla66
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox64 disabled, firefox65 ?, firefox66 fixed)

Details

Attachments

(2 attachments)

(Assignee)

Description

6 months ago
encoded from
https://searchfox.org/mozilla-central/source/js/src/jit-test/tests/parser/bug-888002-2.js

tested on m-i 716178d41d26

Configure flags: --enable-warnings-as-errors --disable-optimize --enable-debug

Runtime flag: -B del-arg.binjs

Actual result: Error: Assertion failed: got true, expected false


the problematic part is

  (function (x) {
  ...
      assertEq(delete x, false);
  }());

that `delete x` fails because it cannot find the binding name in js::DeleteNameOperation
(Assignee)

Comment 1

6 months ago
Posted file del-arg.binjs
(Assignee)

Comment 2

6 months ago
delete with name operand should call setBindingsAccessedDynamically
Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED
(Assignee)

Comment 3

6 months ago
in order to throw the same error as regular parser on "delete name" in strict mode,
depends bug 1502280.
Depends on: 1502280
(Assignee)

Updated

6 months ago
Depends on: 1502792
(Assignee)

Updated

6 months ago
No longer depends on: 1502280
Comment on attachment 9023160 [details] [diff] [review]
Call setBindingsAccessedDynamically if delete with name operand appears in BinAST.

Review of attachment 9023160 [details] [diff] [review]:
-----------------------------------------------------------------

Ouch, I had entirely forgotten that we can do that.

JS has a few scary corners :)
Attachment #9023160 - Flags: review?(dteller) → review+
(Assignee)

Comment 6

4 months ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/a9f1fba8641a368ffdbea3b7daf62c3a1a6a4152
Bug 1500836 - Call setBindingsAccessedDynamically if delete with name operand appears in BinAST. r=Yoric

Comment 7

4 months ago
bugherder
Status: ASSIGNED → RESOLVED
Last Resolved: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.