Summary: | ScriptExecutionContext has too many ifdef ENABLE(SQL_DATABASE) | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Adam Barth <abarth> | ||||||||||||||||||||
Component: | New Bugs | Assignee: | Adam Barth <abarth> | ||||||||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||||||||
Severity: | Normal | CC: | eric, haraken, japhet, morrita, rakuco, webkit.review.bot | ||||||||||||||||||||
Priority: | P2 | ||||||||||||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||||||||
OS: | Unspecified | ||||||||||||||||||||||
Bug Depends on: | |||||||||||||||||||||||
Bug Blocks: | 79327, 79635, 79636 | ||||||||||||||||||||||
Attachments: |
|
Description
Adam Barth
2012-02-26 23:39:59 PST
Created attachment 128966 [details]
work in progress
Currently just a work-in-progress. Created attachment 128973 [details]
work in progress
Created attachment 128975 [details]
Patch
Comment on attachment 128975 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=128975&action=review > Source/WebCore/history/PageCache.cpp:124 > + if (DatabaseContext::from(frame->document())->hasOpenDatabases()) { It looks this from() call makes the lazy instantiation making less sense. How about to hide hide this behind a static method? > Source/WebCore/history/PageCache.cpp:267 > + && !DatabaseContext::from(document)->hasOpenDatabases() Ditto. > Source/WebCore/loader/FrameLoader.cpp:423 > + DatabaseContext::from(doc)->stopDatabases(0); Ditto on from(). > Source/WebCore/storage/DatabaseContext.cpp:78 > + ASSERT(isContextThread()); Windows bot is right. We don't have isContextThread() on DatabaseContext. BTW I'm totally unware that ScriptExceptionContext has such a ifdef-ed crap. Supplementable effectively helps ;-) Great points. I'll update the patch. Thanks! Created attachment 129103 [details]
Patch
Comment on attachment 129103 [details]
Patch
LGTM.
Created attachment 129558 [details]
Patch for landing
Created attachment 129560 [details]
Patch for landing
Created attachment 129565 [details]
Patch for landing
Created attachment 129566 [details]
Patch for landing
Created attachment 129610 [details]
Patch for landing
Committed r109319: <http://trac.webkit.org/changeset/109319> |