Closed
Bug 294115
Opened 20 years ago
Closed 18 years ago
[FIX]Eliminate the DummyParserRequest
Categories
(Core :: DOM: HTML Parser, defect, P1)
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(1 file, 1 obsolete file)
|
7.20 KB,
patch
|
Details | Diff | Splinter Review |
I think we can replace the DummyParserRequest with blocking onload via the nsIDocument api I added in bug 293818. Need to deal with Cancel(), though; I think expected behavior on pressing the stop button is in fact that nothing else will be parsed. So we may want to terminate the parser even when just STOP_NETWORK is done (right now we do it for STOP_CONTENT). Then we can nix this class altogether.
| Assignee | ||
Updated•20 years ago
|
Priority: -- → P1
Target Milestone: --- → mozilla1.9alpha
| Assignee | ||
Comment 1•18 years ago
|
||
I decided to not worry about Cancel(). Right now it only cancels the parser if we're under the event loop; if we're under parsing (e.g. inline script) it doesn't. The parser will cancel itself anyway once it gets the OnStopRequest from necko, unless it's already buffered up the whole document...
If we decide we do want to cancel, we can add this to nsDocShell::Stop:
if (mContentViewer) {
// Terminate the parser, in case it hasn't happened yet
nsCOMPtr<nsIDocument> doc;
mContentViewer->GetDocument(getter_AddRefs(doc));
if (doc) {
doc->StopDocumentLoad();
}
}
Attachment #254093 -
Flags: superreview?(jst)
Attachment #254093 -
Flags: review?(mrbkap)
| Assignee | ||
Updated•18 years ago
|
Summary: Eliminate the DummyParserRequest → [FIX]Eliminate the DummyParserRequest
Comment 2•18 years ago
|
||
Comment on attachment 254093 [details] [diff] [review] Proposed patch Seems reasonable.
Attachment #254093 -
Flags: review?(mrbkap) → review+
Comment 3•18 years ago
|
||
Comment on attachment 254093 [details] [diff] [review] Proposed patch Yay, less code! Looks good. sr=jst
Attachment #254093 -
Flags: superreview?(jst) → superreview+
| Assignee | ||
Comment 4•18 years ago
|
||
Attachment #254093 -
Attachment is obsolete: true
| Assignee | ||
Comment 5•18 years ago
|
||
Fixed.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Does the code added in this bug still serve a purpose considering that nsDocument::BeginLoad() and nsDocument::EndLoad() block and unblock onload?
| Assignee | ||
Comment 7•15 years ago
|
||
Good question. Maybe not. Are there cases when DropParserAndPerfHint happen after the content-loaded events fire?
You need to log in
before you can comment on or make changes to this bug.
Description
•