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

Unified Diff: third_party/WebKit/Source/bindings/templates/callback_function.h.tmpl

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/templates/callback_function.h.tmpl
diff --git a/third_party/WebKit/Source/bindings/templates/callback_function.h.tmpl b/third_party/WebKit/Source/bindings/templates/callback_function.h.tmpl
index 03e66568685f5141f462152918cd58d6d4650822..59f5a90933636dccb43e229873fdef4472d155e0 100644
--- a/third_party/WebKit/Source/bindings/templates/callback_function.h.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/callback_function.h.tmpl
@@ -20,9 +20,9 @@ class {{exported}}{{cpp_class}} final : public GarbageCollectedFinalized<{{cpp_c
public TraceWrapperBase {
public:
- static {{cpp_class}}* create(v8::Isolate* isolate, v8::Local<v8::Function> callback)
+ static {{cpp_class}}* create(ScriptState* scriptState, v8::Local<v8::Function> callback)
{
- return new {{cpp_class}}(isolate, callback);
+ return new {{cpp_class}}(scriptState, callback);
}
~{{cpp_class}}() = default;
@@ -44,7 +44,9 @@ public:
}
private:
- {{cpp_class}}(v8::Isolate* isolate, v8::Local<v8::Function>);
+ {{cpp_class}}(ScriptState*, v8::Local<v8::Function>);
+
+ RefPtr<ScriptState> m_scriptState;
ScopedPersistent<v8::Function> m_callback;
};

Powered by Google App Engine
This is Rietveld 408576698