Bug 152875 - Modern IDB: Success-after-open event should only have the IDBOpenDBRequest as its target
Summary: Modern IDB: Success-after-open event should only have the IDBOpenDBRequest as...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: Safari 9
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords:
Depends on:
Blocks: 149117 152554
  Show dependency treegraph
 
Reported: 2016-01-07 17:15 PST by Brady Eidson
Modified: 2016-01-07 20:08 PST (History)
4 users (show)

See Also:


Attachments
Patch v1 (4.67 KB, patch)
2016-01-07 17:18 PST, Brady Eidson
achristensen: review+
achristensen: commit-queue-
Details | Formatted Diff | Diff
Patch for landing (4.35 KB, patch)
2016-01-07 19:52 PST, Brady Eidson
no flags Details | Formatted Diff | Diff
Patch for landing (4.35 KB, patch)
2016-01-07 19:54 PST, Brady Eidson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.