Bug 24017

Summary: Remove some usage of Document in Worker.
Product: WebKit Reporter: Dmitry Titov <dimich>
Component: WebCore JavaScriptAssignee: Dmitry Titov <dimich>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, jianli, levin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 24016    
Attachments:
Description Flags
Proposed patch
none
Updated patch. ap: review+

Dmitry Titov
Reported 2009-02-18 18:46:41 PST
This is a small step toward making workers nestable.
Attachments
Proposed patch (5.25 KB, patch)
2009-02-18 19:11 PST, Dmitry Titov
no flags
Updated patch. (7.43 KB, patch)
2009-02-19 12:44 PST, Dmitry Titov
ap: review+
Dmitry Titov
Comment 1 2009-02-18 19:11:23 PST
Created attachment 27774 [details] Proposed patch
Alexey Proskuryakov
Comment 2 2009-02-19 02:11:23 PST
Comment on attachment 27774 [details] Proposed patch I don't think that the Worker object is the right place to store m_userAgent. It should be available from ScriptExecutionContext (calculated for Document, stored in WorkerContext). We should de-virtualize completeURL() some day, as it's pretty much the same in both cases.
Dmitry Titov
Comment 3 2009-02-19 12:44:09 PST
Created attachment 27808 [details] Updated patch. Made userAgent a virtual on SEC. Fixed couple of typos. The un-virtualization of completeURL - I think it deserves a separate patch, together with charset. I'l do that soon.
Alexey Proskuryakov
Comment 4 2009-02-19 14:22:15 PST
Comment on attachment 27808 [details] Updated patch. r=me > + virtual String userAgent(const KURL&) const { return m_userAgent; } There isn't much good in inlining this virtual function - it is unlikely to ever be called in a way that can be inlined. There also isn't a lot of use in keeping the implementation in header as documentation, nor a significant win in brevity.
Dmitry Titov
Comment 5 2009-02-19 23:28:19 PST
Landed as http://trac.webkit.org/changeset/41102 Before landing, I've removed inlining of WorkerContext::userAgent() as was suggested above.
Note You need to log in before you can comment on or make changes to this bug.