Last Comment Bug 663752 - Remove load-event-listening code from DOMParser
: Remove load-event-listening code from DOMParser
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Jonas Sicking (:sicking)
:
Mentors:
Depends on:
Blocks: 661297
  Show dependency treegraph
 
Reported: 2011-06-12 23:13 PDT by Jonas Sicking (:sicking)
Modified: 2011-06-14 11:22 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch to fix (6.41 KB, patch)
2011-06-12 23:13 PDT, Jonas Sicking (:sicking)
bugs: review+
Details | Diff | Review

Description Jonas Sicking (:sicking) 2011-06-12 23:13:24 PDT
Created attachment 538817 [details] [diff] [review]
Patch to fix

The DOMParser code currently spins the event loop while waiting for the "load" event to fire on the newly parsed document. However spinning the event loop is evil and there doesn't seem to be a need to do so here.

It appears this code was added in bug 78622 due to xml-stylesheets blocking the parser. However those should no longer be enabled for DOMParser created docs, so I don't think it's needed any more.
Comment 1 Olli Pettay [:smaug] 2011-06-13 03:12:51 PDT
Comment on attachment 538817 [details] [diff] [review]
Patch to fix

(In reply to comment #0)
> those should no longer be enabled for DOMParser created
> docs, so I don't think it's needed any more.
When was XSLT on DOMParser documents disabled?

So it seems that nsIDOMParser expects that everything can be read from the stream
synchronously.
Comment 3 Jonas Sicking (:sicking) 2011-06-14 11:22:30 PDT
Checked in. Thanks for the quick review

http://hg.mozilla.org/mozilla-central/rev/fafe864d8d8e

Note You need to log in before you can comment on or make changes to this bug.