Closed Bug 1500836 Opened 6 years ago Closed 5 years ago

[BinAST] delete operator on an argument cannot find binding

Categories

(Core :: JavaScript Engine, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox64 --- disabled
firefox65 --- ?
firefox66 --- fixed

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(2 files)

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
Attached file del-arg.binjs
delete with name operand should call setBindingsAccessedDynamically
Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED
in order to throw the same error as regular parser on "delete name" in strict mode,
depends bug 1502280.
Depends on: 1502280
Depends on: 1502792
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+
https://hg.mozilla.org/integration/mozilla-inbound/rev/a9f1fba8641a368ffdbea3b7daf62c3a1a6a4152
Bug 1500836 - Call setBindingsAccessedDynamically if delete with name operand appears in BinAST. r=Yoric
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: