| Index: third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl
|
| diff --git a/third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl
|
| index 412a9df6e81537ad6a75346ed36922528b74761e..abce755796d649ce8129f394306776281fc271a9 100644
|
| --- a/third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl
|
| +++ b/third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl
|
| @@ -11,6 +11,13 @@
|
|
|
| namespace blink {
|
|
|
| +// static
|
| +{{cpp_class}}* {{cpp_class}}::create(ScriptState* scriptState, v8::Local<v8::Value> callback){
|
| + if (isUndefinedOrNull(callback))
|
| + return nullptr;
|
| + return new {{cpp_class}}(scriptState, v8::Local<v8::Function>::Cast(callback));
|
| +}
|
| +
|
| {{cpp_class}}::{{cpp_class}}(ScriptState* scriptState, v8::Local<v8::Function> callback)
|
| : m_scriptState(scriptState),
|
| m_callback(scriptState->isolate(), this, callback) {
|
|
|