Bug 152875

Summary: Modern IDB: Success-after-open event should only have the IDBOpenDBRequest as its target
Product: WebKit Reporter: Brady Eidson <beidson>
Component: WebCore Misc.Assignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, alecflett, commit-queue, jsbell
Priority: P2    
Version: Safari 9   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 149117, 152554    
Attachments:
Description Flags
Patch v1
achristensen: review+, achristensen: commit-queue-
Patch for landing
none
Patch for landing none

Description Brady Eidson 2016-01-07 17:15:57 PST
Modern IDB: Success-after-open event should only have the IDBOpenDBRequest as its target

As opposed to other request-related events which also capture/bubble to the transaction and the IDBDatabase
Comment 1 Brady Eidson 2016-01-07 17:18:48 PST
Created attachment 268515 [details]
Patch v1
Comment 2 Alex Christensen 2016-01-07 17:35:27 PST
Comment on attachment 268515 [details]
Patch v1

View in context: https://bugs.webkit.org/attachment.cgi?id=268515&action=review

> Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp:284
> +    if (&event == m_openDatabaseSuccessEvent)

You do this comparison unnecessarily twice.  I think it should look like this:

if (&event == m_openDatabaseSuccessEvent)
    m_openDatabaseSuccessEvent = nullptr;
else if (m_transaction) {
...
}
Comment 3 Brady Eidson 2016-01-07 19:52:14 PST
Created attachment 268528 [details]
Patch for landing
Comment 4 WebKit Commit Bot 2016-01-07 19:53:23 PST
Attachment 268528 [details] did not pass style-queue:


ERROR: Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp:279:  Extra space before ) in if  [whitespace/parens] [5]
Total errors found: 1 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Brady Eidson 2016-01-07 19:54:49 PST
Created attachment 268529 [details]
Patch for landing
Comment 6 WebKit Commit Bot 2016-01-07 20:08:54 PST
Comment on attachment 268529 [details]
Patch for landing

Clearing flags on attachment: 268529

Committed r194754: <http://trac.webkit.org/changeset/194754>
Comment 7 WebKit Commit Bot 2016-01-07 20:08:57 PST
All reviewed patches have been landed.  Closing bug.