I think this has happened to me a couple of times and seems related to using facebook. Shark gives a call stack of: 98.3% 98.3% nsHtml5TreeBuilder::startTag(nsHtml5ElementName*, nsHtml5HtmlAttributes*, int) 0.0% 98.3% nsHtml5Tokenizer::emitCurrentTagToken(int, int) 0.0% 98.3% nsHtml5Tokenizer::stateLoop(int, unsigned short, int, unsigned short*, int, int, int) 0.0% 98.3% nsHtml5Tokenizer::tokenizeBuffer(nsHtml5UTF16Buffer*) 0.0% 98.3% nsHtml5StreamParser::ParseAvailableData() 0.0% 98.3% nsHtml5StreamParserContinuation::Run() 0.0% 98.3% nsThread::ProcessNextEvent(int, int*) 0.0% 98.3% NS_ProcessNextEvent_P(nsIThread*, int)
Do you mean spinning as in infinite loop or spinning that eventually stops?
10 years ago
Priority: -- → P1
I've never seen it stop, but I haven't waited more than a couple minutes.
For now, I'll assume this is an infinite loop, because finite but long spinning in that method makes no sense.
10 years ago
Happened again when logging out of facebook. Same stack.
Here's a reproducible, though not minimal, test case: http://people.mozilla.org/~jmuizelaar/html5/600.html The test case comes from an ad iframe on facebook.
9 years ago
Oops sorry about the keyword. Great to have a test case already!
The test case doesn't appear to spin in startTag but instead it returns to the event loop without completing the load.
It still spins in startTag for me and Joe Drew with trunk. I can try to reduce the test case further if it doesn't work for you.
I've reduced the test case at http://people.mozilla.org/~jmuizelaar/html5/600.html further. The problem seems related to document.write()
The problem here is that the tokenizer emits a start tag token for iframe when the tree builder is in the NS_HTML5TREE_BUILDER_TEXT mode. It should be impossible for the tokenizer to emit a start tag token in that case. The document.write()-related state choreography must be faulty somehow.
Assignee: nobody → hsivonen
Status: NEW → ASSIGNED
Thanks for catching this!
Attachment #431866 - Flags: review?(jmuizelaar)
9 years ago
Summary: [HTML5] spinning in nsHtml5TreeBuilder::startTag()? → [HTML5][Patch] spinning in nsHtml5TreeBuilder::startTag()?
Attachment #431866 - Flags: review?(jmuizelaar) → review+
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Flags: in-testsuite? → in-testsuite+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.