Bug 57574 - Preload scanner fails to pick up resources from document.write() output
Summary: Preload scanner fails to pick up resources from document.write() output
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-31 13:52 PDT by Antti Koivisto
Modified: 2011-03-31 17:46 PDT (History)
6 users (show)

See Also:


Attachments
patch (10.05 KB, patch)
2011-03-31 14:21 PDT, Antti Koivisto
oliver: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2011-03-31 13:52:15 PDT
With this

<script>
    document.write('<script src="resources/document-write-plaintext.js"></sc'+'ript>');
    document.write('<script src="resources/script1.js"></sc'+'ript>');
</script>

preload scanner does fails to pick up the script1.js. This used to work and was lost with the HTML5 parser.
Comment 1 Antti Koivisto 2011-03-31 14:21:02 PDT
Created attachment 87785 [details]
patch

- Scan script inserted source using a separate preload scanner.
- Make the main preload scanner correctly process the remaining source if script execution blocked the parser.
Comment 2 Oliver Hunt 2011-03-31 14:36:30 PDT
Comment on attachment 87785 [details]
patch

r=me, but it would be good to have a test for nested document.write()
Comment 3 Antti Koivisto 2011-03-31 15:51:29 PDT
http://trac.webkit.org/changeset/82631
Comment 4 Adam Barth 2011-03-31 16:00:51 PDT
Comment on attachment 87785 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=87785&action=review

> LayoutTests/fast/preloader/document-write.html:13
> +    if (window.layoutTestController)
> +        setTimeout(function(){ layoutTestController.notifyDone() }, 1000);

This seems like it will make the test slow and flaky.  :(
Comment 5 WebKit Review Bot 2011-03-31 16:33:31 PDT
http://trac.webkit.org/changeset/82631 might have broken Leopard Intel Release (Tests)
The following tests are not passing:
fast/preloader/document-write-2.html
fast/preloader/document-write.html
fast/preloader/scan-body-from-head.html
Comment 6 Antti Koivisto 2011-03-31 17:46:38 PDT
<rdar://problem/9219111>