Closed Bug 766792 Opened 13 years ago Closed 13 years ago

"ASSERTION: Somehow there's stuff in the op queue" in nsHtml5TreeOpExecutor::~nsHtml5TreeOpExecutor

Categories

(Core :: DOM: HTML Parser, defect)

x86_64
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jruderman, Assigned: smaug)

Details

(Keywords: assertion, testcase)

Attachments

(3 files, 1 obsolete file)

Attached file testcase
With: user_pref("browser.tabs.loadDivertedInBackground", true); user_pref("dom.disable_open_during_load", false); user_pref("nglayout.debug.disable_xul_cache", true); user_pref("security.fileuri.strict_origin_policy", false); The testcase triggers: ###!!! ASSERTION: Somehow there's stuff in the op queue.: 'mOpQueue.IsEmpty()', file parser/html/nsHtml5TreeOpExecutor.cpp, line 80 Related to bug 734015?
Attached file stack trace
(In reply to Jesse Ruderman from comment #0) > Related to bug 734015? Quite likely, actually. Either we could just delete the assertion, which could mask other bugs or we could explicitly clear the queue before the assertion if the executor has been backgrounded.
I can understand that bug 734015 ca make such assertion easier to fire, but how could it cause it?
Assignee: nobody → bugs
I'll investigate this.
My expectation is that what happens is this: previously, the parser thread probably scheduled to rambles on the main thread: first a runnable that caused a flush and then a runnable that caused the executor to be released. Now the flash gets deferred, so the queue won't be empty by the time the executor is released. This is harmless, if this only happens when the parser has been terminated anyway, which I expect to be the case.
Attached patch patch (obsolete) — Splinter Review
Could we do this. Other option is to flush in nsHtml5ExecutorFlusher dtor which ends up to if (!mParser) { mOpQueue.Clear(); }
Attachment #635265 - Flags: review?(hsivonen)
Attached patch patchSplinter Review
Attachment #635265 - Attachment is obsolete: true
Attachment #635265 - Flags: review?(hsivonen)
Attachment #635275 - Flags: review?(hsivonen)
Comment on attachment 635275 [details] [diff] [review] patch Thanks.
Attachment #635275 - Flags: review?(hsivonen) → review+
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: