Console freezes when inspecting deeply nested proxy
Categories
(DevTools :: Console, defect, P2)
Tracking
(firefox57 wontfix, firefox68 fixed)
People
(Reporter: Oriol, Assigned: Oriol)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Enter this code to the console: var proxy = {}; for (var i=0; i<100; ++i) proxy = new Proxy(proxy, proxy); proxy; The console stops working (or the browser freezes in non-e10s). That's because a proxy grip always contains a grip of the target and the handler.
Comment 1•7 years ago
|
||
When I do: var proxy = {}; for (var i=0; i<50; ++i) proxy = new Proxy(proxy, proxy); proxy; I see a freeze, but when I do: var proxy = {}; for (var i=0; i<100; ++i) proxy = new Proxy(proxy, proxy); proxy; I see broken behavior where the chrome doesn't freeze but no evaluation result returns and it breaks future input into the console
Updated•7 years ago
|
Updated•7 years ago
|
Assignee | ||
Comment 2•7 years ago
|
||
Related with https://github.com/devtools-html/devtools-core/issues/602, I think the solution should be: - Proxy grips stop exposing a grip of the target and the handler - A preview of the target is created and exposed as the preview of the proxy - A new protocol request is added to ask for the target and the handler when the proxy is inspected This will require some changes in object inspector, and maybe reps. And VariablesView should also be adapted (unless it's going to be removed soon). So for the moment it may be easier to just stop exposing a grip of the target and the handler when hooks.getGripDepth() > 1
Comment 3•7 years ago
|
||
(In reply to Oriol Brufau [:Oriol] from comment #2) > This will require some changes in object inspector, and maybe reps. And > VariablesView should also be adapted (unless it's going to be removed soon). Let's not add any specific fixes to the Variables View. It still needs to work at least until the Browser Console is migrated to the new frontend and we figure something out what do do Scratchpad, but we're planning to remove it at that point.
Updated•7 years ago
|
Updated•6 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 5•5 years ago
|
||
Assignee | ||
Comment 6•5 years ago
|
||
(In reply to Brian Grinstead [:bgrins] from comment #3)
Let's not add any specific fixes to the Variables View. It still needs to
work at least until the Browser Console is migrated to the new frontend and
we figure something out what do do Scratchpad, but we're planning to remove
it at that point.
Any news about removing VariablesView? I had to include a fix for it to avoid breaking Scratchpad. Why not switch Scratchpad to use reps?
Comment 7•5 years ago
|
||
(In reply to Oriol Brufau [:Oriol] from comment #6)
(In reply to Brian Grinstead [:bgrins] from comment #3)
Let's not add any specific fixes to the Variables View. It still needs to
work at least until the Browser Console is migrated to the new frontend and
we figure something out what do do Scratchpad, but we're planning to remove
it at that point.Any news about removing VariablesView? I had to include a fix for it to avoid breaking Scratchpad. Why not switch Scratchpad to use reps?
The general plan is to add true multiline support to the webconsole and then remove Scratchpad (since the Browser Console + editor mode would cover most of the same ground), rather than modifying Scratchpad to support reps.
Assignee | ||
Updated•5 years ago
|
Pushed by csabou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a0a023dac829
Avoid exponential behavior when inspecting nested proxies. r=nchevobbe
Backout by dvarga@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/57f669c6fab1 Backed out changeset a0a023dac829 for debugger failure at object-inspector/types
Assignee | ||
Comment 10•5 years ago
|
||
Try is green: https://treeherder.mozilla.org/#/jobs?repo=try&revision=198ebf1443d81040d744e02129b4bf4fe7d07a2a
Comment 11•5 years ago
|
||
Pushed by cbrindusan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1b3234069aba
Avoid exponential behavior when inspecting nested proxies. r=nchevobbe
Comment 12•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Description
•