Open
Bug 1515302
Opened 6 years ago
Updated 2 years ago
Opened windows can run events while the debugger is paused
Categories
(DevTools :: Debugger, defect, P3)
DevTools
Debugger
Tracking
(Not tracked)
NEW
People
(Reporter: bhackett1024, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
222 bytes,
text/html
|
Details |
When a window is opened from within a page (window.open() and so forth), that new window can access/change state in the original page, but event handling for it is not suppressed if the debugger pauses in the original page. This breaks run to completion in the original page, as illustrated by the attached testcase --- load the page in the debugger so it pauses, then resize the opened window to trigger console logs in the debugged page.
I don't know how important this is to fix. One problem that would arise from fixing it would be that if the new window is opened in a new tab, it would become unusable if the debugger was paused in the original tab.
Comment 1•6 years ago
|
||
Yeah, good point.
To be clear, this sort of cross-window access is only permitted when the two windows have the same origin, right?
It's a little odd when a single JavaScript "world" is part-debuggee, part-non-debuggee. It means that we could be paused at one breakpoint, and then hit another breakpoint, which the protocol forbids, and I doubt our UI is prepared to handle helpfully.
In the long run, when our intra-window R2C problems are under control, we could turn on DebuggeeWouldRun exceptions, and that would block the other window from calling into the debuggee (but not from munging its objects).
Reporter | ||
Comment 2•6 years ago
|
||
(In reply to Jim Blandy :jimb from comment #1)
> Yeah, good point.
>
> To be clear, this sort of cross-window access is only permitted when the two
> windows have the same origin, right?
I believe so, yeah. If I change the test so that it opens up a page from another domain, the resize events do not fire and update the original page's console.
Updated•6 years ago
|
Priority: -- → P2
Updated•6 years ago
|
Priority: P2 → P3
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•