WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
Bug 27976
innerHTML in setTimeout in Windows file: URL pins CPU; document never stops loading
https://bugs.webkit.org/show_bug.cgi?id=27976
Summary
innerHTML in setTimeout in Windows file: URL pins CPU; document never stops l...
Dan Fabulich
Reported
2009-08-04 01:58:31 PDT
Created
attachment 34048
[details]
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>
Attachments
Example HTML file
(492 bytes, text/html)
2009-08-04 01:58 PDT
,
Dan Fabulich
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Ahmad Saleem
Comment 1
2022-07-29 15:46:46 PDT
I don't get any actual results mentioned in
Comment 0
using Safari 15.6 on macOS 12.5, it just shows "What a strange bug!" in H1 and does not getting "loading" spinner on tab or progress bar. It is same across all browsers (Chrome Canary 106 and Firefox Nightly 105). I think this bug was fixed along the way and this can be marked as "RESOLVED CONFIGURATION CHANGED". Thanks!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug