Closed Bug 1742541 Opened 2 years ago Closed 2 years ago

Don't show paused debugger overlay if the document isn't ready

Categories

(DevTools :: Framework, task)

task

Tracking

(firefox96 fixed)

RESOLVED FIXED
96 Branch
Tracking Status
firefox96 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

Details

(Whiteboard: dt-perf-stability-mvp)

Attachments

(1 file)

Since the paused debugger overlay isn't visible if we pause while the page is loading (see https://bugzilla.mozilla.org/show_bug.cgi?id=1580394#c11), let's simply bail out to prevent any weird situation where we would wait for the dom to be loaded but the page wouldn't be paused anymore

At the moment, the overlay can't be displayed if the DOM isn't loaded,
and we were waiting for that state before trying to show the overlay.
But we can't move forward in the document loading process until we resume,
which mean we could end up in weird state with the overlay, where the
page wasn't paused anymore, but we'd display it.
In this patch, we simply bail out if the document isn't ready.

See Also: → 1580394
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bd54eacb2d7c
[devtools] Don't try to show PausedDebuggerOverlay if document isn't ready. r=ochameau.
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch

Backed out for causing damp failures.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 96 Branch → ---
Flags: needinfo?(nchevobbe)
Flags: needinfo?(nchevobbe)
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/762649eb6709
[devtools] Don't try to show PausedDebuggerOverlay if document isn't ready. r=ochameau.

Backed out for causing assertion failures on htmlparser/nsExpatDriver.cpp.

Push with failures: https://treeherder.mozilla.org/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception%2Cusercancel&revision=333fa37b4df2d773f8a44b9b487079b14404d4cb&selectedTaskRun=dQzfNHa4TdK0j2n7iwJ44Q.0

Failure logs: https://treeherder.mozilla.org/logviewer?job_id=359201967&repo=autoland
https://treeherder.mozilla.org/logviewer?job_id=359201731&repo=autoland

Backout link: https://hg.mozilla.org/integration/autoland/rev/bcf905a8678c3f272ef72d0ec395adb51cc98b84

[task 2021-11-25T08:57:20.120Z] 08:57:20     INFO - GECKO(8684) | [Parent 7016, Main Thread] WARNING: '!inner', file /builds/worker/checkouts/gecko/dom/ipc/jsactor/JSWindowActorProtocol.cpp:184
[task 2021-11-25T08:57:20.121Z] 08:57:20     INFO - GECKO(8684) | [Parent 7016, Main Thread] WARNING: '!inner', file /builds/worker/checkouts/gecko/dom/ipc/jsactor/JSWindowActorProtocol.cpp:184
[task 2021-11-25T08:57:20.121Z] 08:57:20     INFO - GECKO(8684) | [Parent 7016, Main Thread] WARNING: '!inner', file /builds/worker/checkouts/gecko/dom/ipc/jsactor/JSWindowActorProtocol.cpp:184
[task 2021-11-25T08:57:20.122Z] 08:57:20     INFO - GECKO(8684) | [Parent 7016, Main Thread] ###!!! ASSERTION: Inconsistent expat suspension state.: 'status != XML_STATUS_SUSPENDED || BlockedOrInterrupted()', file /builds/worker/checkouts/gecko/parser/htmlparser/nsExpatDriver.cpp:1184
[task 2021-11-25T08:57:20.261Z] 08:57:20     INFO -  Initializing stack-fixing for the first stack frame, this may take a while...
[task 2021-11-25T08:57:30.651Z] 08:57:30     INFO - GECKO(8684) | #01: NS_DebugBreak(unsigned int, char const*, char const*, char const*, int) [xpcom/base/nsDebugImpl.cpp:429]
[task 2021-11-25T08:57:30.659Z] 08:57:30     INFO - GECKO(8684) | #02: nsExpatDriver::ParseBuffer(char16_t const*, unsigned int, bool, unsigned int*) [parser/htmlparser/nsExpatDriver.cpp:1183]
[task 2021-11-25T08:57:30.660Z] 08:57:30     INFO - GECKO(8684) | #03: nsExpatDriver::ConsumeToken(nsScanner&, bool&) [parser/htmlparser/nsExpatDriver.cpp:1262]
[task 2021-11-25T08:57:30.660Z] 08:57:30     INFO - GECKO(8684) | #04: nsParser::Tokenize(bool) [parser/htmlparser/nsParser.cpp:1392]
[task 2021-11-25T08:57:30.661Z] 08:57:30     INFO - GECKO(8684) | #05: nsParser::ResumeParse(bool, bool, bool) [parser/htmlparser/nsParser.cpp:954]
[task 2021-11-25T08:57:30.661Z] 08:57:30     INFO - GECKO(8684) | #06: nsParser::OnDataAvailable(nsIRequest*, nsIInputStream*, unsigned long long, unsigned int) [parser/htmlparser/nsParser.cpp:1306]
[task 2021-11-25T08:57:30.662Z] 08:57:30     INFO - GECKO(8684) | #07: mozilla::net::nsHttpChannel::OnDataAvailable(nsIRequest*, nsIInputStream*, unsigned long long, unsigned int) [netwerk/protocol/http/nsHttpChannel.cpp:7683]
[task 2021-11-25T08:57:30.662Z] 08:57:30     INFO - GECKO(8684) | #08: nsInputStreamPump::OnStateTransfer() [netwerk/base/nsInputStreamPump.cpp:532]
[task 2021-11-25T08:57:30.663Z] 08:57:30     INFO - GECKO(8684) | #09: nsInputStreamPump::OnInputStreamReady(nsIAsyncInputStream*) [netwerk/base/nsInputStreamPump.cpp:389]
[task 2021-11-25T08:57:30.663Z] 08:57:30     INFO - GECKO(8684) | #10: nsInputStreamReadyEvent::Run() [xpcom/io/nsStreamUtils.cpp:96]
[task 2021-11-25T08:57:30.664Z] 08:57:30     INFO - GECKO(8684) | #11: mozilla::RunnableTask::Run() [xpcom/threads/TaskController.cpp:469]
[task 2021-11-25T08:57:30.664Z] 08:57:30     INFO - GECKO(8684) | #12: mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex &> const&) [xpcom/threads/TaskController.cpp:771]
[task 2021-11-25T08:57:30.665Z] 08:57:30     INFO - GECKO(8684) | #13: mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex &> const&) [xpcom/threads/TaskController.cpp:607]
[task 2021-11-25T08:57:30.665Z] 08:57:30     INFO - GECKO(8684) | #14: mozilla::TaskController::ProcessPendingMTTask(bool) [xpcom/threads/TaskController.cpp:391]
[task 2021-11-25T08:57:30.666Z] 08:57:30     INFO - GECKO(8684) | #15: mozilla::detail::RunnableFunction<`lambda at /builds/worker/checkouts/gecko/xpcom/threads/TaskController.cpp:124:7'>::Run() [xpcom/threads/nsThreadUtils.h:532]
[task 2021-11-25T08:57:30.667Z] 08:57:30     INFO - GECKO(8684) | #16: nsThread::ProcessNextEvent(bool, bool*) [xpcom/threads/nsThread.cpp:1187]
[task 2021-11-25T08:57:30.667Z] 08:57:30     INFO - GECKO(8684) | #17: NS_ProcessNextEvent(nsIThread*, bool) [xpcom/threads/nsThreadUtils.cpp:467]
[task 2021-11-25T08:57:30.668Z] 08:57:30     INFO - GECKO(8684) | #18: mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) [ipc/glue/MessagePump.cpp:85]
[task 2021-11-25T08:57:30.668Z] 08:57:30     INFO - GECKO(8684) | #19: MessageLoop::RunHandler() [ipc/chromium/src/base/message_loop.cc:325]
[task 2021-11-25T08:57:30.669Z] 08:57:30     INFO - GECKO(8684) | #20: MessageLoop::Run() [ipc/chromium/src/base/message_loop.cc:307]
[task 2021-11-25T08:57:30.669Z] 08:57:30     INFO - GECKO(8684) | #21: nsBaseAppShell::Run() [widget/nsBaseAppShell.cpp:139]
[task 2021-11-25T08:57:30.670Z] 08:57:30     INFO - GECKO(8684) | #22: nsAppShell::Run() [widget/windows/nsAppShell.cpp:603]
[task 2021-11-25T08:57:30.670Z] 08:57:30     INFO - GECKO(8684) | #23: nsAppStartup::Run() [toolkit/components/startup/nsAppStartup.cpp:296]
[task 2021-11-25T08:57:30.670Z] 08:57:30     INFO - GECKO(8684) | #24: XREMain::XRE_mainRun() [toolkit/xre/nsAppRunner.cpp:5310]
[task 2021-11-25T08:57:30.671Z] 08:57:30     INFO - GECKO(8684) | #25: XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) [toolkit/xre/nsAppRunner.cpp:5495]
[task 2021-11-25T08:57:30.671Z] 08:57:30     INFO - GECKO(8684) | #26: XRE_main(int, char**, mozilla::BootstrapConfig const&) [toolkit/xre/nsAppRunner.cpp:5554]
[task 2021-11-25T08:57:30.716Z] 08:57:30     INFO - GECKO(8684) | #27: NS_internal_main(int, char**, char**) [browser/app/nsBrowserApp.cpp:395]
[task 2021-11-25T08:57:30.729Z] 08:57:30     INFO - GECKO(8684) | #28: wmain(int, wchar_t**) [toolkit/xre/nsWindowsWMain.cpp:147]
[task 2021-11-25T08:57:30.730Z] 08:57:30     INFO - GECKO(8684) | #29: __scrt_common_main_seh() [/builds/worker/workspace/obj-build/browser/app/d:/agent/_work/1/s/src/vctools/crt/vcstartup/src/startup/exe_common.inl:288]
[task 2021-11-25T08:57:30.733Z] 08:57:30     INFO -  fix-stacks: error: failed to read debug info file `wkernel32.pdb` for `C:\Windows\System32\KERNEL32.DLL`
[task 2021-11-25T08:57:30.733Z] 08:57:30     INFO -  fix-stacks: note: this is expected and harmless for all PDB files on opt automation runs
[task 2021-11-25T08:57:30.734Z] 08:57:30     INFO -  fix-stacks: The system cannot find the file specified. (os error 2)
[task 2021-11-25T08:57:30.734Z] 08:57:30     INFO - GECKO(8684) | #30: BaseThreadInitThunk [C:\Windows\System32\KERNEL32.DLL + 0x17034]
[task 2021-11-25T08:57:30.746Z] 08:57:30     INFO -  fix-stacks: error: failed to read debug info file `wntdll.pdb` for `C:\Windows\SYSTEM32\ntdll.dll`
[task 2021-11-25T08:57:30.746Z] 08:57:30     INFO -  fix-stacks: note: this is expected and harmless for all PDB files on opt automation runs
[task 2021-11-25T08:57:30.747Z] 08:57:30     INFO -  fix-stacks: The system cannot find the file specified. (os error 2)
[task 2021-11-25T08:57:30.747Z] 08:57:30     INFO - GECKO(8684) | #31: RtlUserThreadStart [C:\Windows\SYSTEM32\ntdll.dll + 0x52651]
[task 2021-11-25T08:57:30.748Z] 08:57:30     INFO - GECKO(8684) | MEMORY STAT | vsize 2112852MB | vsizeMaxContiguous 65250467MB | residentFast 469MB | heapAllocated 166MB
[task 2021-11-25T08:57:30.748Z] 08:57:30     INFO - TEST-OK | dom/base/test/test_blockParsing.html | took 3093ms
Flags: needinfo?(nchevobbe)
Pushed by csabou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c88308a20322
[devtools] Don't try to show PausedDebuggerOverlay if document isn't ready. r=ochameau.

(In reply to Pulsebot from comment #7)

Pushed by csabou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c88308a20322
[devtools] Don't try to show PausedDebuggerOverlay if document isn't ready.
r=ochameau.

Relanded this, sorry for the trouble here.

Flags: needinfo?(nchevobbe)
Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: