Eager Evaluation on about:config freezes devtools
Categories
(DevTools :: Console, defect, P2)
Tracking
(firefox74 verified)
Tracking | Status | |
---|---|---|
firefox74 | --- | verified |
People
(Reporter: nchevobbe, Assigned: bhackett1024)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Steps to reproduce
- Make sure you have the eager evaluation pref turned on
- Go to about:config
- Open the console
- Try to type
1 + 1
Expected results
I get 2
in the result
Actual results
DevTools freezes.
I see the following error in the terminal:
DBG-SERVER threw an exception: ReferenceError: isEvalSource is not defined
Stack: createSourceActor@resource://devtools/server/actors/utils/TabSources.js:299:17
_addSource@resource://devtools/server/actors/thread.js:2121:34
onNewScript@resource://devtools/server/actors/thread.js:2076:10
getEvalResult@resource://devtools/server/actors/webconsole/eval-with-debugger.js:173:28
exports.evalWithDebugger@resource://devtools/server/actors/webconsole/eval-with-debugger.js:140:31
evaluateJS@resource://devtools/server/actors/webconsole.js:1157:38
evaluateJSAsync/<@resource://devtools/server/actors/webconsole.js:1054:29
exports.makeInfallible/<@resource://devtools/shared/ThreadSafeDevToolsUtils.js:111:22
Line: 299, column: 17
JavaScript warning: resource://devtools/shared/ThreadSafeDevToolsUtils.js, line 89: DebuggeeWouldRun: debuggee `resource://devtools/shared/base-loader.js:172' would run
DBG-SERVER threw an exception: ReferenceError: isEvalSource is not defined
Stack: createSourceActor@resource://devtools/server/actors/utils/TabSources.js:299:17
_addSource@resource://devtools/server/actors/thread.js:2121:34
onNewScript@resource://devtools/server/actors/thread.js:2076:10
getEvalResult@resource://devtools/server/actors/webconsole/eval-with-debugger.js:173:28
exports.evalWithDebugger@resource://devtools/server/actors/webconsole/eval-with-debugger.js:140:31
evaluateJS@resource://devtools/server/actors/webconsole.js:1157:38
evaluateJSAsync/<@resource://devtools/server/actors/webconsole.js:1054:29
exports.makeInfallible/<@resource://devtools/shared/ThreadSafeDevToolsUtils.js:111:22
Line: 299, column: 17
JavaScript warning: resource://devtools/shared/ThreadSafeDevToolsUtils.js, line 89: DebuggeeWouldRun: debuggee `resource://devtools/shared/base-loader.js:172' would run
DBG-SERVER threw an exception: ReferenceError: isEvalSource is not defined
Stack: createSourceActor@resource://devtools/server/actors/utils/TabSources.js:299:17
_addSource@resource://devtools/server/actors/thread.js:2121:34
onNewScript@resource://devtools/server/actors/thread.js:2076:10
getEvalResult@resource://devtools/server/actors/webconsole/eval-with-debugger.js:173:28
exports.evalWithDebugger@resource://devtools/server/actors/webconsole/eval-with-debugger.js:140:31
evaluateJS@resource://devtools/server/actors/webconsole.js:1157:38
evaluateJSAsync/<@resource://devtools/server/actors/webconsole.js:1054:29
exports.makeInfallible/<@resource://devtools/shared/ThreadSafeDevToolsUtils.js:111:22
Line: 299, column: 17
JavaScript warning: resource://devtools/shared/ThreadSafeDevToolsUtils.js, line 89: DebuggeeWouldRun: debuggee `resource://devtools/shared/base-loader.js:172' would run
DBG-SERVER threw an exception: ReferenceError: isEvalSource is not defined
Stack: createSourceActor@resource://devtools/server/actors/utils/TabSources.js:299:17
_addSource@resource://devtools/server/actors/thread.js:2121:34
onNewScript@resource://devtools/server/actors/thread.js:2076:10
Line: 299, column: 17
JavaScript warning: resource://devtools/shared/ThreadSafeDevToolsUtils.js, line 89: DebuggeeWouldRun: debuggee `resource://devtools/shared/base-loader.js:172' would run
console.error: (new ReferenceError("isEvalSource is not defined", "resource://devtools/server/actors/utils/TabSources.js", 299))
DBG-SERVER threw an exception: ReferenceError: isEvalSource is not defined
Stack: createSourceActor@resource://devtools/server/actors/utils/TabSources.js:299:17
_addSource@resource://devtools/server/actors/thread.js:2121:34
onNewScript@resource://devtools/server/actors/thread.js:2076:10
Line: 299, column: 17
JavaScript warning: resource://devtools/shared/ThreadSafeDevToolsUtils.js, line 89: DebuggeeWouldRun: debuggee `resource://devtools/shared/base-loader.js:172' would run
console.error: (new ReferenceError("isEvalSource is not defined", "resource://devtools/server/actors/utils/TabSources.js", 299))
Reporter | ||
Comment 1•4 years ago
|
||
Brian, would you have a hint of what's going on?
Assignee | ||
Comment 2•4 years ago
|
||
The problem here is that while we prevent side effects when doing the evaluation, side effects are still not allowed during the parseErrorOutput call in getEvalResult, which we'll end up in when the eager input is "1 +". That parseErrorOutput() call has side effects in the devtools loader (trying to load reflect.jsm) and we end up force terminating JS execution during the load and the loader's state gets totally messed up. I don't know why this doesn't affect other pages, but the attached patch fixes about:config for me.
Assignee | ||
Comment 3•4 years ago
|
||
Updated•4 years ago
|
Pushed by bhackett@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fb7d64101b6a Avoid parsing error output while side effects are not allowed, r=nchevobbe.
Pushed by malexandru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/545510ffaab4 Fix lint issue in eval-with-debugger.js a=lint-fix
Comment 6•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/fb7d64101b6a
https://hg.mozilla.org/mozilla-central/rev/545510ffaab4
Updated•4 years ago
|
Comment 7•4 years ago
|
||
Reproduced this issue on a Nightly 74.0a1 build from the 10th of January 2020 on Ubuntu 18.04 and Windows 10x64.
I can confirm this issue is fixed on Ubuntu 18.04, Windows 10 x64 and Mac OS X 10 .15 using the latest Firefox 74 beta 2 and the latest Nightly 75.0a1.
Description
•