Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Issue 924863003: IndexedDB: Replace custom binding logic with [SetWrapperReferenceTo] (Closed)

Created:
5 years, 10 months ago by jsbell
Modified:
5 years, 5 months ago
CC:
blink-reviews, arv+blink, vivekg_samsung, vivekg, dgrogan, cmumford, blink-reviews-bindings_chromium.org, jsbell+idb_chromium.org
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

IndexedDB: Replace custom binding logic with [SetWrapperReferenceTo] An IDBCursor's associated IDBRequest should be re-used each time the cursor advances. To keep the request's wrapper alive a hidden reference was set on the cursor's wrapper, with custom bindings code. Replace that with the [SetWrapperReferenceTo] Blink IDL extended attribute which does the same thing. R=haraken@chromium.org,kouhei@chromium.org

Patch Set 1 #

Total comments: 2

Patch Set 2 : Restore deleted line #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -35 lines) Patch
A + LayoutTests/storage/indexeddb/key-cursor-request-cycle.html View 5 chunks +2 lines, -5 lines 0 comments Download
A + LayoutTests/storage/indexeddb/key-cursor-request-cycle-expected.txt View 4 chunks +3 lines, -6 lines 0 comments Download
M Source/bindings/core/v8/V8HiddenValue.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/bindings/modules/v8/IDBBindingUtilities.cpp View 1 chunk +4 lines, -22 lines 0 comments Download
M Source/modules/indexeddb/IDBCursor.idl View 1 chunk +2 lines, -1 line 0 comments Download
M Source/modules/indexeddb/IDBCursorWithValue.idl View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (1 generated)
jsbell
haraken@ - the patch was simple, but I'm seeing an intermittent crash here running the ...
5 years, 10 months ago (2015-02-13 19:28:01 UTC) #1
haraken
+kouhei [SetWrapperReferenceTo] is already used in a lot of places, so I'm wondering why you ...
5 years, 10 months ago (2015-02-15 07:46:10 UTC) #3
kouhei (in TOK)
On 2015/02/15 07:46:10, haraken wrote: > +kouhei > > [SetWrapperReferenceTo] is already used in a ...
5 years, 10 months ago (2015-02-16 03:34:56 UTC) #4
jsbell
On 2015/02/16 03:34:56, kouhei wrote: > I'll create a CL to remove V8 wrapper creation ...
5 years, 10 months ago (2015-02-17 20:59:48 UTC) #5
haraken
> Since the only way to access an IDBCursor instance is via IDBRequest > (request.result) ...
5 years, 10 months ago (2015-02-18 00:03:05 UTC) #6
jsbell
On 2015/02/18 00:03:05, haraken wrote: > > Since the only way to access an IDBCursor ...
5 years, 10 months ago (2015-02-18 01:12:23 UTC) #7
jsbell
haraken writes in https://codereview.chromium.org/1200613002/: >>>> [SetWrapperReferenceTo] is not a way to "create the target wrapper ...
5 years, 5 months ago (2015-07-09 00:08:54 UTC) #8
haraken
5 years, 5 months ago (2015-07-09 00:20:24 UTC) #9
On 2015/07/09 00:08:54, jsbell wrote:
> haraken writes in https://codereview.chromium.org/1200613002/:
> 
> >>>>
> [SetWrapperReferenceTo] is not a way to "create the target wrapper and keep it
> alive". [SetWrapperReferenceTo] is a way to "keep the target wrapper alive if
> the target wrapper exists". It is not a responsibility of
> [SetWrapperReferenceFrom/To] to create the wrapper :)
> <<<<
> 
> Ah, excellent point. I'd still like to eliminate the custom bindings here;
it's
> fragile to manually ensure that every place an IDBCursor is returned to script
> the reference to an IDBRequest is established, and prevents us from replacing
> chunks of IDBAny with a union. So maybe I can explore a
> [EnsureWrapperReferenceTo] CL at some point.

Yeah, that makes sense. And [EnsureWrapperReferenceTo] should create the target
wrapper when the original wrapper is created (not when a GC calls
visitDOMWrapper).

Powered by Google App Engine
This is Rietveld 408576698