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

Unified Diff: third_party/WebKit/Source/bindings/modules/v8/custom/V8IDBObserverCustom.cpp

Issue 2458573002: bindings: Store ScriptState in generated callback functions (Closed)
Patch Set: Created 4 years, 2 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: third_party/WebKit/Source/bindings/modules/v8/custom/V8IDBObserverCustom.cpp
diff --git a/third_party/WebKit/Source/bindings/modules/v8/custom/V8IDBObserverCustom.cpp b/third_party/WebKit/Source/bindings/modules/v8/custom/V8IDBObserverCustom.cpp
index f4d8fdf45fa315025f75477a972f6a5899f98ea4..e82160cc587341cd37f9d3a222706bddea1ab300 100644
--- a/third_party/WebKit/Source/bindings/modules/v8/custom/V8IDBObserverCustom.cpp
+++ b/third_party/WebKit/Source/bindings/modules/v8/custom/V8IDBObserverCustom.cpp
@@ -45,11 +45,11 @@ void V8IDBObserver::constructorCustom(
if (exceptionState.hadException())
return;
+ ScriptState* scriptState = ScriptState::forReceiverObject(info);
v8::Local<v8::Function> v8Callback = v8::Local<v8::Function>::Cast(info[0]);
IDBObserverCallback* callback =
- IDBObserverCallback::create(info.GetIsolate(), v8Callback);
- IDBObserver* observer = IDBObserver::create(
- ScriptState::forReceiverObject(info), callback, idbObserverInit);
+ IDBObserverCallback::create(scriptState, v8Callback);
+ IDBObserver* observer = IDBObserver::create(callback, idbObserverInit);
if (exceptionState.hadException())
return;
DCHECK(observer);

Powered by Google App Engine
This is Rietveld 408576698