Closed Bug 1621603 Opened 4 years ago Closed 10 months ago

Remove ContextOptions::strictMode / options("strict_mode")

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: evilpie, Assigned: arai)

References

Details

Attachments

(3 files)

As far as I can tell this is actually not necessary for "use strict" and only used by 5 tests. Maybe I am overlooking some brower usage.

Summary: Remove ContextOptions::strictMode → Remove ContextOptions::strictMode / options("strict_mode")
Priority: -- → P3
Severity: normal → S3
Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED

Depends on D182648

It looks like this was added in 2012 (bug 736792) for some kind of embedder usage. I guess we don't care about that and/or hope it doesn't matter any more?

the patch was before introducing JS::CompileOptions.

It's still possible to force strict mode by calling setForceStrictMode() on JS::CompileOptions when compiling the top-level script.

https://searchfox.org/mozilla-central/rev/9a4666e63199bd1bcfc9095f6efec3488c358458/js/public/CompileOptions.h#613-616

CompileOptions& setForceStrictMode() {
  forceStrictMode_ = true;
  return *this;
}

(fixed the reference)

Pushed by arai_a@mac.com:
https://hg.mozilla.org/integration/autoland/rev/708e0b4c936f
Part 1: Remove options("strict_mode") in JS shell and xpcshell. r=bthrall
https://hg.mozilla.org/integration/autoland/rev/07449789a809
Part 2: Remove Cu.strict_mode. r=mccr8
https://hg.mozilla.org/integration/autoland/rev/fb973c543eaa
Part 3: Remove JS::ContextOptions::forceStrictMode_. r=bthrall

Backed out for causing build bustages in XPCShellImpl.cpp

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: /builds/worker/checkouts/gecko/js/xpconnect/src/XPCShellImpl.cpp(474,43): error: loop will run at most once (loop increment never executed) [-Werror,-Wunreachable-code-loop-increment]
Flags: needinfo?(arai.unmht)
Flags: needinfo?(arai.unmht)
Pushed by arai_a@mac.com:
https://hg.mozilla.org/integration/autoland/rev/3a03afd785b6
Part 1: Remove options("strict_mode") in JS shell and xpcshell. r=bthrall
https://hg.mozilla.org/integration/autoland/rev/0bd3788c6a65
Part 2: Remove Cu.strict_mode. r=mccr8
https://hg.mozilla.org/integration/autoland/rev/54775b90665e
Part 3: Remove JS::ContextOptions::forceStrictMode_. r=bthrall
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: