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

Unified Diff: Source/bindings/modules/v8/IDBBindingUtilities.cpp

Issue 924863003: IndexedDB: Replace custom binding logic with [SetWrapperReferenceTo] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/bindings/modules/v8/IDBBindingUtilities.cpp
diff --git a/Source/bindings/modules/v8/IDBBindingUtilities.cpp b/Source/bindings/modules/v8/IDBBindingUtilities.cpp
index 6bfa0b7269a3149a2befa32957b644965ad5f5b9..14ef3138ffd404c762628b3639af75135d417045 100644
--- a/Source/bindings/modules/v8/IDBBindingUtilities.cpp
+++ b/Source/bindings/modules/v8/IDBBindingUtilities.cpp
@@ -116,28 +116,10 @@ static v8::Local<v8::Value> toV8(const IDBAny* impl, v8::Local<v8::Object> creat
return v8::Null(isolate);
case IDBAny::DOMStringListType:
return toV8(impl->domStringList(), creationContext, isolate);
- case IDBAny::IDBCursorType: {
- // Ensure request wrapper is kept alive at least as long as the cursor wrapper,
- // so that event listeners are retained.
- v8::Local<v8::Value> cursor = toV8(impl->idbCursor(), creationContext, isolate);
- v8::Local<v8::Value> request = toV8(impl->idbCursor()->request(), creationContext, isolate);
-
- // FIXME: Due to race at worker shutdown, V8 may return empty handles.
jsbell 2015/02/13 19:28:00 Hopefully we're already handling this in the gener
- if (!cursor.IsEmpty())
- V8HiddenValue::setHiddenValue(isolate, cursor->ToObject(isolate), V8HiddenValue::idbCursorRequest(isolate), request);
- return cursor;
- }
- case IDBAny::IDBCursorWithValueType: {
- // Ensure request wrapper is kept alive at least as long as the cursor wrapper,
- // so that event listeners are retained.
- v8::Local<v8::Value> cursor = toV8(impl->idbCursorWithValue(), creationContext, isolate);
- v8::Local<v8::Value> request = toV8(impl->idbCursorWithValue()->request(), creationContext, isolate);
-
- // FIXME: Due to race at worker shutdown, V8 may return empty handles.
- if (!cursor.IsEmpty())
- V8HiddenValue::setHiddenValue(isolate, cursor->ToObject(isolate), V8HiddenValue::idbCursorRequest(isolate), request);
- return cursor;
- }
+ case IDBAny::IDBCursorType:
+ return toV8(impl->idbCursor(), creationContext, isolate);
+ case IDBAny::IDBCursorWithValueType:
+ return toV8(impl->idbCursorWithValue(), creationContext, isolate);
case IDBAny::IDBDatabaseType:
return toV8(impl->idbDatabase(), creationContext, isolate);
case IDBAny::IDBIndexType:

Powered by Google App Engine
This is Rietveld 408576698