Bug 23952 - Refactor so that Document::write is funnel method again for all document.write
Summary: Refactor so that Document::write is funnel method again for all document.write
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-13 10:13 PST by Adam Treat
Modified: 2009-02-13 14:50 PST (History)
2 users (show)

See Also:


Attachments
Refactor patch (4.07 KB, patch)
2009-02-13 10:14 PST, Adam Treat
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Treat 2009-02-13 10:13:34 PST
In r40976 a change was made to speedup document.write from JS.  With the change Document::write was effectively implemented in two places: in Document.cpp and in JSHTMLDocumentCustom.cpp.  This patch refactors so that Document::write is the funnel method again, but keeps the speedup.

Cheers,
Adam
Comment 1 Adam Treat 2009-02-13 10:14:24 PST
Created attachment 27664 [details]
Refactor patch
Comment 2 Adam Treat 2009-02-13 10:15:58 PST
I've also removed Document::pendingWrite since it is no longer needed with this patch.
Comment 3 Darin Adler 2009-02-13 11:46:29 PST
Comment on attachment 27664 [details]
Refactor patch

Seems fine.

r=me
Comment 4 Darin Adler 2009-02-13 11:46:51 PST
Does this compile on all platforms?
Comment 5 Adam Treat 2009-02-13 12:50:23 PST
I can only compile it on Qt, but I have compiled and tested and it works for Qt.
Comment 6 Adam Treat 2009-02-13 13:02:14 PST
Landed with r40988.
Comment 7 Darin Adler 2009-02-13 14:30:24 PST
I missed the fact that this leaves an extra if statement in Document::write. Currently it checks m_tokenizer for 0 twice in a row.
Comment 8 Adam Treat 2009-02-13 14:45:30 PST
I'll remove that.  Sorry.
Comment 9 Adam Treat 2009-02-13 14:50:12 PST
Fixed with r40992.