Summary: | Have window.indexedDB.deleteDatabase return an IDBOpenDBRequest | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Brady Eidson <beidson> | ||||
Component: | WebCore Misc. | Assignee: | Brady Eidson <beidson> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | achristensen, rniwa | ||||
Priority: | P2 | ||||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 149117 | ||||||
Attachments: |
|
Description
Brady Eidson
2015-09-16 13:19:20 PDT
Created attachment 261322 [details]
Patch v1
Comment on attachment 261322 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=261322&action=review looks mostly good. Please upload another patch. > Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp:71 > +PassRefPtr<WebCore::IDBRequest> IDBFactory::getDatabaseNames(ScriptExecutionContext*, ExceptionCode&) Just return a RefPtr, no PassRefPtr. Here and elsewhere in patch. We're trying to get rid of PassRefPtr. > Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp:86 > +PassRefPtr<WebCore::IDBOpenDBRequest> IDBFactory::deleteDatabase(ScriptExecutionContext* context, const String& name, ExceptionCode& ec) can context be nullptr? > Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp:68 > + static WTF::NeverDestroyed<String> readyState; Will there only be one readyState for all IDBRequests? (In reply to comment #2) > Comment on attachment 261322 [details] > Patch v1 > > View in context: > https://bugs.webkit.org/attachment.cgi?id=261322&action=review > > looks mostly good. Please upload another patch. > > > Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp:71 > > +PassRefPtr<WebCore::IDBRequest> IDBFactory::getDatabaseNames(ScriptExecutionContext*, ExceptionCode&) > > Just return a RefPtr, no PassRefPtr. Here and elsewhere in patch. We're > trying to get rid of PassRefPtr. This is a new concrete implementation of the IDB classes which has plenty of PassRefPtr usage. The LegacyIDB* implementation also uses it. My plan is to finish the new implementation, remove Legacy, then give the IDL implementation layer a nice cleanup. > > > Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp:86 > > +PassRefPtr<WebCore::IDBOpenDBRequest> IDBFactory::deleteDatabase(ScriptExecutionContext* context, const String& name, ExceptionCode& ec) > > can context be nullptr? Nope. Man, the bindings generator should pass in references... > > Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp:68 > > + static WTF::NeverDestroyed<String> readyState; > > Will there only be one readyState for all IDBRequests? Right now, yes. In the future, this method will return one of 3 static strings. But the purpose of this patch (and handfuls of followups coming soon) is to just start filling in code, getting things building, etc etc. Rebaselined js/dom/global-constructors-attributes-idb.html for WK1 in https://trac.webkit.org/changeset/189904. Please do wait for EWS, it's totally worth it. |