Closed Bug 1763943 Opened 2 years ago Closed 2 years ago

Run `new Function("a", "b", "a+b")` in Browser Console causes an Error in Nightly build

Categories

(DevTools :: Console, defect)

Desktop
Windows 10
defect

Tracking

(firefox-esr91 unaffected, firefox99 disabled, firefox100 disabled, firefox101 disabled, firefox102 verified, firefox103 verified)

VERIFIED FIXED
102 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox99 --- disabled
firefox100 --- disabled
firefox101 --- disabled
firefox102 --- verified
firefox103 --- verified

People

(Reporter: alice0775, Assigned: tjr)

References

(Regression)

Details

(Keywords: nightly-community, regression)

Attachments

(1 file)

Steps to reproduce:

  1. Open Browser Console
  2. Run new Function("a", "b", "a+b") in the console

Actual Results:
Fails to create the new function due to the following Error.

Uncaught InternalError: unsafe filename: debugger eval code line 1 > Function
    <anonymous> debugger eval code:1
    getEvalResult resource://devtools/server/actors/webconsole/eval-with-debugger.js:243
    evalWithDebugger resource://devtools/server/actors/webconsole/eval-with-debugger.js:167
    evaluateJS resource://devtools/server/actors/webconsole.js:1115
    evaluateJSAsync resource://devtools/server/actors/webconsole.js:1007
    makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
debugger eval code:1:1
    <anonymous> debugger eval code:1

Expected Results:
Successfully created.

Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?&tochange=ecd05de39436&fromchange=322e753a4898

:tjr, since you are the author of the regressor, bug 1742645, could you take a look?
For more information, please visit auto_nag documentation.

Flags: needinfo?(tom)

FWIW worksforme Windows 7 (nightly)

This can also be reproduced on Nightly101.0a1 Ubuntu 20.04.

Has Regression Range: --- → yes

I can reproduce on the latest m-c Fx101 build (Win10)
Works for me in Fx99 (Win10)

The regressionwindow, See comment#0

FWIW, setting security.allow_parent_unrestricted_js_loads to true solves this.

Depends on: 1688800
Assignee: nobody → tom
Status: NEW → ASSIGNED
Pushed by tritter@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/94ee875dee20
Do not bust on the debugger filename in the Browser Console r=ckerschb
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
Flags: needinfo?(tom)
Flags: qe-verify+

Verified as fixed on Windows 10 x64, Ubuntu 20.04 x64 and on macOS 11.6 on Firefox 102.0b3 and Nightly 103.0a1.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: