-
-
Save addaleax/139800e79fd687776f409edbaf35b981 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/deps/v8/src/snapshot/code-serializer.cc b/deps/v8/src/snapshot/code-serializer.cc | |
index df728fcfc966..03452a3064ac 100644 | |
--- a/deps/v8/src/snapshot/code-serializer.cc | |
+++ b/deps/v8/src/snapshot/code-serializer.cc | |
@@ -254,15 +254,17 @@ MaybeHandle<SharedFunctionInfo> CodeSerializer::Deserialize( | |
isolate->is_profiling() || | |
isolate->code_event_dispatcher()->IsListeningToCodeEvents(); | |
if (log_code_creation || FLAG_log_function_events) { | |
- String name = ReadOnlyRoots(isolate).empty_string(); | |
+ Handle<String> name(ReadOnlyRoots(isolate).empty_string(), isolate); | |
Script script = Script::cast(result->script()); | |
Handle<Script> script_handle(script, isolate); | |
- if (script->name()->IsString()) name = String::cast(script->name()); | |
+ if (script->name()->IsString()) { | |
+ name = Handle<String>(String::cast(script->name()), isolate); | |
+ } | |
if (FLAG_log_function_events) { | |
LOG(isolate, | |
FunctionEvent("deserialize", script->id(), | |
timer.Elapsed().InMillisecondsF(), | |
- result->StartPosition(), result->EndPosition(), name)); | |
+ result->StartPosition(), result->EndPosition(), *name)); | |
} | |
if (log_code_creation) { | |
Script::InitLineEnds(Handle<Script>(script, isolate)); | |
@@ -274,7 +276,7 @@ MaybeHandle<SharedFunctionInfo> CodeSerializer::Deserialize( | |
int line_num = script->GetLineNumber(info->StartPosition()) + 1; | |
int column_num = script->GetColumnNumber(info->StartPosition()) + 1; | |
PROFILE(isolate, CodeCreateEvent(CodeEventListener::SCRIPT_TAG, | |
- info->abstract_code(), info, name, | |
+ info->abstract_code(), info, *name, | |
line_num, column_num)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment