Closed
Bug 214081
Opened 22 years ago
Closed 22 years ago
[FIX]Content sink can get confused about pending script loads
Categories
(Core :: DOM: Core & HTML, defect, P1)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla1.5beta
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
()
Details
Attachments
(3 files)
202 bytes,
application/x-javascript
|
Details | |
169 bytes,
text/html
|
Details | |
9.19 KB,
patch
|
jst
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
The basic problem is that the content sink has some logic to guess whether a
script will require the parser to be blocked. Instead of guessing, it should
use something reliable like a return value or something....
In fact, the sane way to do this may be to move the parser blocking and
unblocking into the script element itself (sort of the way the stylesheet
linking stuff works).
I'll be attaching a minimal testcase reduced from that website
![]() |
Assignee | |
Updated•22 years ago
|
Summary: Content sink can get confused about pending sheet loads → Content sink can get confused about pending script loads
![]() |
Assignee | |
Comment 1•22 years ago
|
||
![]() |
Assignee | |
Comment 2•22 years ago
|
||
This should actually finish loading and show some text or something.
![]() |
Assignee | |
Comment 3•22 years ago
|
||
![]() |
Assignee | |
Updated•22 years ago
|
Attachment #128643 -
Flags: superreview?(jst)
Attachment #128643 -
Flags: review?(bugmail)
![]() |
Assignee | |
Updated•22 years ago
|
Severity: normal → major
Priority: -- → P1
Summary: Content sink can get confused about pending script loads → [FIX]Content sink can get confused about pending script loads
Target Milestone: --- → mozilla1.5beta
![]() |
Assignee | |
Updated•22 years ago
|
Attachment #128643 -
Flags: superreview?(jst) → superreview?(peter)
Comment 4•22 years ago
|
||
Comment on attachment 128643 [details] [diff] [review]
Or we could take the hacks out and actually fire ScriptAvailable like we're supposed to
- In nsHTMLScriptElement::MaybeProcessScript():
- if (mIsEvaluated || mEvaluating || !mDocument || !mParent ||
- !mDocument->IsScriptEnabled()) {
+ if (mIsEvaluated || mEvaluating || !mDocument || !mParent) {
return;
}
Don't we still want the !mDocument->IsScriptEnabled() check here? W/o that
check, a script element that's added to a document where scripts are disabled
(from a window where scripts are enabled) could still cause the script to load
(though not execute), right?
![]() |
Assignee | |
Comment 5•22 years ago
|
||
No. Notice that the ScriptLoader does this check with this patch and if scripts
are disabled just bails (but notifies ScriptAvailable with an error, unblocking
the parser, which is key -- otherwise disabling scripts means you can't load any
pages with a <script> tag in them).
![]() |
Assignee | |
Comment 6•22 years ago
|
||
Guys, any chance of reviews sometime today? Like in the next 6-7 hours?
Comment 7•22 years ago
|
||
Comment on attachment 128643 [details] [diff] [review]
Or we could take the hacks out and actually fire ScriptAvailable like we're supposed to
r+sr=jst
Attachment #128643 -
Flags: superreview?(peter)
Attachment #128643 -
Flags: superreview+
Attachment #128643 -
Flags: review?(bugmail)
Attachment #128643 -
Flags: review+
![]() |
Assignee | |
Comment 8•22 years ago
|
||
Fixed.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
![]() |
Assignee | |
Comment 9•22 years ago
|
||
This caused regression bug 214874 -- scriptloader needs to check not only
whether scripts are enabled on the document, but also whether they are enabled
on the current scriptcontext.
You need to log in
before you can comment on or make changes to this bug.
Description
•