Closed Bug 94903 Opened 23 years ago Closed 23 years ago

External JavaScript File on Unreachable Host Stalls Page Display

Categories

(Core :: DOM: HTML Parser, defect, P2)

defect

Tracking

()

VERIFIED FIXED
mozilla0.9.4

People

(Reporter: bugmail, Assigned: harishd)

Details

(Whiteboard: [fix in hand])

Attachments

(5 files)

Using Mozilla 2001080214 on Mac OS 9.1:

When a document contains a SCRIPT element whose SRC attribute value includes a
hostname that is inaccessible, page display stalls indefinitely.

For example, a hostname that cannot be resolved or does not acknowledge a
connection request will cause this problem. Mozilla continues to display it's
page-loading status indicators in perpetual motion until Stop is pressed, but
all content following the SCRIPT element is never displayed.

This is a different situation from a SRC attribute URI that simply cannot be
found (404). In that case, the remote host returns some HTML as a 404 error page
which causes a syntax error in the JS engine, but then proceeds to display the
rest of the page.

Guessing Parser.
Attached file Minimal testcase
In the testcase now attached, the SRCRIPT SRC URI contains a fictional hostname,
"foo.bar," which never resolves. Mozilla fully loads the testcase HTML and
starts parsing. It displays the paragraph, "Foo," preceding the SCRIPT, but
forever stalls at the SCRIPT itself. The paragraph following the SCRIPT, "Bar,"
never displays regardless of user action.

This also occurs 1) if the protocol is not running on the hostname specified in
the SRC, and 2) if the testcase is loaded through the local filesystem and the
SRC URI is also local, but doesn't exist.
Johnny, could you please sr=? thanx.
Status: NEW → ASSIGNED
Whiteboard: [fix in hand]
Target Milestone: --- → mozilla0.9.4
For verification purposes, be sure to test the second testcase as well. Save it
to your local filesystem and access it only via [File/Open File...].
The second test case works with or without my change!
On what platform? Give it a try under Mac OS 9.
When performing the second testcase, I do seem to at least sometimes see the
error, "redeclaration of const kIOServiceProgID" on the JS Console, though I
couldn't say if it's relevant at all. (Source file:
chrome://communicator/content/utilityOverlay.js)
Third test case shows how non-existent script referenced via file://localhost
will also block page loading.
Third testcase works for me, I suspect because the SCRIPT is in the HEAD. Moving
the SCRIPT to the BODY causes the behavior I described.
Third test cast does NOT work (i.e. does NOT load) on Mozilla/5.0 (X11; U; Linux
i686; en-US; rv:0.9.3) Gecko/2001080221
Is it safe to mark this bug All/All?
sr=jst
I think you need to do this for XHTML as well. Please check, and if it is
needed, apply. r=heikki
OS: Mac System 9.x → All
Priority: -- → P2
Hardware: Macintosh → All
Do we need to be concerned with XML here? Is there a processing instruction for
associating script files with XML as there is for style sheets?

<?xml-script?> or anything like that? (Like <?xml-stylesheet?>.)
I'm not sure about XML but we should definitely be concerned about XHTML.
This is fixed. Marking FIXED.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
QA Contact: bsharma → moied
Verified fixed with build 20020103 on Win2k, Linux, and Mac 
fixed checked in cvs Version 3.478
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: