| Summary: | CrashTracer: com.apple.WebKit.Storage at WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient(WebCore::IDBServer::UniqueIDBDatabaseConnection&) | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Sihui Liu <sihui_liu> | ||||||||||||
| Component: | New Bugs | Assignee: | Sihui Liu <sihui_liu> | ||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||
| Severity: | Normal | CC: | achristensen, alecflett, beidson, cdumez, commit-queue, ews-watchlist, jsbell, webkit-bug-importer | ||||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||||
| Version: | WebKit Nightly Build | ||||||||||||||
| Hardware: | Unspecified | ||||||||||||||
| OS: | Unspecified | ||||||||||||||
| Attachments: |
|
||||||||||||||
|
Description
Sihui Liu
2018-08-10 11:01:06 PDT
Created attachment 346914 [details]
Patch
Comment on attachment 346914 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=346914&action=review > Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:66 > +UniqueIDBDatabase& UniqueIDBDatabaseConnection::database() > +{ > + ASSERT(m_database); > + return *m_database; > +} What's this used for? Doesn't this defeat the purpose of a WeakPtr? Comment on attachment 346914 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=346914&action=review >> Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:66 >> +} > > What's this used for? Doesn't this defeat the purpose of a WeakPtr? I agree with Alex, we probably want to return a raw pointer and have the caller null-check. Created attachment 346923 [details]
Patch
(In reply to Chris Dumez from comment #3) > Comment on attachment 346914 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=346914&action=review > > >> Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:66 > >> +} > > > > What's this used for? Doesn't this defeat the purpose of a WeakPtr? > > I agree with Alex, we probably want to return a raw pointer and have the > caller null-check. Added assertions to callers in IDBDatabaseTransaction and made database() raw pointer. Do you think we should make early returns on null? Comment on attachment 346923 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=346923&action=review r=me with comments. > Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:75 > + if (m_database) { This would look better as an early return. > Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:62 > + ASSERT(database); We probably want to null check it since we believe the transaction / connection can outlive their database. (In reply to Chris Dumez from comment #7) > Comment on attachment 346923 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=346923&action=review > > r=me with comments. > > > Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:75 > > + if (m_database) { > > This would look better as an early return. > Okay. > > Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:62 > > + ASSERT(database); > > We probably want to null check it since we believe the transaction / > connection can outlive their database. Done. Created attachment 346932 [details]
Patch
Created attachment 346939 [details]
Patch for landing
Comment on attachment 346939 [details] Patch for landing View in context: https://bugs.webkit.org/attachment.cgi?id=346939&action=review > Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:189 > + RELEASE_ASSERT(injectedBundle.isTestRunning()); Why is this in there? Created attachment 346940 [details]
Patch
Comment on attachment 346940 [details]
Patch
r=me
Comment on attachment 346940 [details] Patch Clearing flags on attachment: 346940 Committed r234791: <https://trac.webkit.org/changeset/234791> All reviewed patches have been landed. Closing bug. |