The default bug view has changed. See this FAQ.

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

RESOLVED FIXED

Status

()

Core
HTML: Parser
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Jesse Ruderman, Assigned: smaug)

Tracking

(Blocks: 1 bug, {assertion, testcase})

Trunk
x86_64
Mac OS X
assertion, testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments, 1 obsolete attachment)

(Reporter)

Description

5 years ago
Created attachment 635139 [details]
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?
(Reporter)

Comment 1

5 years ago
Created attachment 635140 [details]
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.
(Assignee)

Comment 3

5 years ago
I can understand that bug 734015 ca make such assertion easier to fire, but how could it cause it?
(Assignee)

Updated

5 years ago
Assignee: nobody → bugs
(Assignee)

Comment 4

5 years ago
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.
(Assignee)

Comment 6

5 years ago
Created attachment 635265 [details] [diff] [review]
patch

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)
(Assignee)

Comment 7

5 years ago
Created attachment 635275 [details] [diff] [review]
patch
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+
(Assignee)

Comment 9

5 years ago
https://hg.mozilla.org/mozilla-central/rev/c83282305cb9
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.