bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

External JavaScript File on Unreachable Host Stalls Page Display

VERIFIED FIXED in mozilla0.9.4

Status

()

Core
HTML: Parser
P2
major
VERIFIED FIXED
17 years ago
17 years ago

People

(Reporter: Greg K., Assigned: harishd)

Tracking

Trunk
mozilla0.9.4
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [fix in hand])

Attachments

(5 attachments)

(Reporter)

Description

17 years ago
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.
(Reporter)

Comment 1

17 years ago
Created attachment 45533 [details]
Minimal testcase
(Reporter)

Comment 2

17 years ago
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.
(Assignee)

Comment 3

17 years ago
Created attachment 45817 [details] [diff] [review]
patch v1.1 [ Make sure that the parser resumes parsing even when loading external js fails ]
(Assignee)

Comment 4

17 years ago
Johnny, could you please sr=? thanx.
Status: NEW → ASSIGNED
Whiteboard: [fix in hand]
Target Milestone: --- → mozilla0.9.4
(Reporter)

Comment 5

17 years ago
Created attachment 45832 [details]
Second testcase; access this file only via local filesystem
(Reporter)

Comment 6

17 years ago
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...].
(Assignee)

Comment 7

17 years ago
The second test case works with or without my change!
(Reporter)

Comment 8

17 years ago
On what platform? Give it a try under Mac OS 9.
(Reporter)

Comment 9

17 years ago
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)

Comment 10

17 years ago
Created attachment 45854 [details]
Third test case: non-existent file://localhost

Comment 11

17 years ago
Third test case shows how non-existent script referenced via file://localhost
will also block page loading.
(Reporter)

Comment 12

17 years ago
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.

Comment 13

17 years ago
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
(Reporter)

Comment 14

17 years ago
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
(Reporter)

Comment 17

17 years ago
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?>.)
(Assignee)

Comment 18

17 years ago
I'm not sure about XML but we should definitely be concerned about XHTML.
(Assignee)

Comment 19

17 years ago
Created attachment 46256 [details] [diff] [review]
patch v1.2 [ fix for xhtml document included ]
(Assignee)

Comment 20

17 years ago
This is fixed. Marking FIXED.
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED

Updated

17 years ago
QA Contact: bsharma → moied

Comment 21

17 years ago
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.