[Webkit-unassigned] [Bug 27976] New: innerHTML in setTimeout in Windows file: URL pins CPU; document never stops loading

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 4 01:58:32 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=27976

           Summary: innerHTML in setTimeout in Windows file: URL pins CPU;
                    document never stops loading
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Windows XP
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P3
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: dan at fabulich.com


Created an attachment (id=34048)
 --> (https://bugs.webkit.org/attachment.cgi?id=34048)
Example HTML file

On Windows, save the attached HTML file to disk.  It's pasted below for your
reading pleasure.

Expected: The page should load without error, with the message: "What a strange
bug!"

Actual: The page looks fine; it has the expected message.  But the "Loading..."
spinner never stops spinning, and one CPU remains pinned as long as the page
remains open.

The problem appears to be related to the setTimeout call.  If you comment out
the setTimeout line 15 and uncomment the ordinary "foo" call on line 16, the
page behaves as expected.  If you comment out the innerHTML on line 12, the
page remains blank as expected.

The problem only appears to occur in "file:" URLs.  When you load the page over
HTTP, the page loads as expected.

The page works as expected in Firefox 3.5 for Windows and IE8.  The page works
as expected in Safari 4.0.2 for OS X 10.5.7.

Tested on WebKit nightly build r46726.  Mozilla/5.0 (Windows; U; Windows NT
5.1; en-US) AppleWebKit/532+ (KHTML, like Gecko) Version/4.0 Safari/530.17

Here's the doc:

<!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<script type="text/javascript">

window.onload=function() {
    var div = document.getElementById("bar");
    function foo() {
        div.innerHTML = "<h1>What a strange bug!<\/h1>";
    }

    window.setTimeout(function() {foo();}, 0);
    //foo();

}

</script>
<title>Example Bug</title>
</head>
<body><div id="bar"></div></body>
</html>

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list