Bug 151752 - Modern IDB: IDBTransaction::error is not exposed
Summary: Modern IDB: IDBTransaction::error is not exposed
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: 151753
Blocks: 149117 150882
  Show dependency treegraph
 
Reported: 2015-12-02 10:12 PST by Brady Eidson
Modified: 2015-12-02 20:44 PST (History)
4 users (show)

See Also:


Attachments
Patch v1 (12.44 KB, patch)
2015-12-02 11:40 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 2015-12-02 10:12:43 PST
Modern IDB: IDBTransaction::error is not exposed

There's at least 3 layout tests that hit this, so I'll get all three of those running.
Comment 1 Brady Eidson 2015-12-02 11:40:14 PST
Created attachment 266458 [details]
Patch v1
Comment 2 WebKit Commit Bot 2015-12-02 12:32:53 PST
Comment on attachment 266458 [details]
Patch v1

Clearing flags on attachment: 266458

Committed r192956: <http://trac.webkit.org/changeset/192956>
Comment 3 WebKit Commit Bot 2015-12-02 12:32:55 PST
All reviewed patches have been landed.  Closing bug.
Comment 4 Darin Adler 2015-12-02 17:01:37 PST
Comment on attachment 266458 [details]
Patch v1

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

> Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp:119
>  RefPtr<DOMError> IDBTransaction::error() const

Why does this return a RefPtr? Should just return a DOMError*, not a RefPtr. Unless it manufactures a new error object.
Comment 5 Brady Eidson 2015-12-02 20:44:15 PST
(In reply to comment #4)
> Comment on attachment 266458 [details]
> Patch v1
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=266458&action=review
> 
> > Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp:119
> >  RefPtr<DOMError> IDBTransaction::error() const
> 
> Why does this return a RefPtr? Should just return a DOMError*, not a RefPtr.
> Unless it manufactures a new error object.

All of the abstract bindings left behind from Legacy IDB inappropriately return RefPtrs like this.  And, sadly, sometimes LegacyIDB does (incorrectly) manufacture a new object each call instead of retaining the same one for repeated calls.

Instead of trying to clean up that mess while both implementations live side by side, I consider fixing it to be part of "Remove LegacyIDB"