| Index: third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.cpp b/third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.cpp
|
| index 0128c8fb0a92b08fc6f2e2f000c5457327a0944a..4da926a81f14e7d7417aa6ee02a9a62ab05102de 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.cpp
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.cpp
|
| @@ -61,6 +61,7 @@ static v8::Local<v8::Value> compileAndRunPrivateScript(ScriptState* scriptState,
|
| v8::Local<v8::Value> importFunctionValue = privateScriptControllerObject->Get(context, v8String(isolate, "import")).ToLocalChecked();
|
| if (importFunctionValue->IsUndefined()) {
|
| v8::Local<v8::Function> function;
|
| + // This is a memory leak, FunctionTemplates are eternal.
|
| if (!v8::FunctionTemplate::New(isolate, importFunction)->GetFunction(context).ToLocal(&function)
|
| || !v8CallBoolean(privateScriptControllerObject->Set(context, v8String(isolate, "import"), function))) {
|
| fprintf(stderr, "Private script error: Setting import function failed. (Class name = %s)\n", scriptClassName.utf8().data());
|
|
|