Summary: | nested script inside external script cause error | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | johnnyding <johnnyding.webkit> | ||||||||||
Component: | Page Loading | Assignee: | Nobody <webkit-unassigned> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | ap, darin, vincent.bradley | ||||||||||
Priority: | P2 | ||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | PC | ||||||||||||
OS: | OS X 10.5 | ||||||||||||
Attachments: |
|
Description
johnnyding
2008-02-20 02:06:25 PST
Created attachment 19222 [details]
html file for this test case
Created attachment 19223 [details]
script file for this test case
Download both html file and script file to your local file system. The expected behavior is to display 'external_script_1', but 'put_content("external_script_1")" is displayed instead. This is because, in HTMLTokenizer::write(HTMLTokenizer.cpp line:1345), the code checks 'pendingScripts.isEmpty()' to decide whether to save prependingSrc or not. However, in HTMLTokenizer::scriptHandler(HTMLTokenizer.cpp line:485) and HTMLTokenizer::scriptExecution(HTMLTokenizer.cpp line:544), the code checks testBit:LoadingExtScript to decide whether to save prependingSrc or not. The later behavior is not right because, in scriptHandler and scriptExecution, even the pendingScripts queue is empty, the testBit:LoadingExtScript might be TRUE, (it may not be updated until the end of the function). A patch is coming soon. Created attachment 19226 [details]
patch v1 for fixing this problem
This bug block some Chinese websites which have high traffic such as www.chinacars.com. Could anyone help me take a look this problem? Comment on attachment 19226 [details]
patch v1 for fixing this problem
Looks good to me.
+ <head>
+ <title></title>
+ </head>
Seems like we could just omit this whole section.
+ </div>
There's no <div> for this to close.
+document.write("SUCCESS (1 of 2)\n");
\ No newline at end of file
Would have been better having a newline at the end of this file.
r=me even without these changes
Created attachment 19340 [details]
it's basically same patch as patch v1, only change the wording in test case according to darin's comment
|