[gcmole] Handlify script in code-serializer.cc
R=mslekova@chromium.org Bug: v8:9992 Change-Id: I970b919e456257f5776454edceb0bcc1c40eff7d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1930556 Auto-Submit: Dan Elphick <delphick@chromium.org> Commit-Queue: Maya Lekova <mslekova@chromium.org> Reviewed-by: Maya Lekova <mslekova@chromium.org> Cr-Commit-Position: refs/heads/master@{#65115}
This commit is contained in:
parent
8e8fe47505
commit
1269498fa7
@ -228,13 +228,12 @@ void CodeSerializer::SerializeGeneric(HeapObject heap_object) {
|
||||
void CreateInterpreterDataForDeserializedCode(Isolate* isolate,
|
||||
Handle<SharedFunctionInfo> sfi,
|
||||
bool log_code_creation) {
|
||||
Script script = Script::cast(sfi->script());
|
||||
Handle<Script> script_handle(script, isolate);
|
||||
Handle<Script> script(Script::cast(sfi->script()), isolate);
|
||||
String name = ReadOnlyRoots(isolate).empty_string();
|
||||
if (script.name().IsString()) name = String::cast(script.name());
|
||||
if (script->name().IsString()) name = String::cast(script->name());
|
||||
Handle<String> name_handle(name, isolate);
|
||||
|
||||
SharedFunctionInfo::ScriptIterator iter(isolate, script);
|
||||
SharedFunctionInfo::ScriptIterator iter(isolate, *script);
|
||||
for (SharedFunctionInfo shared_info = iter.Next(); !shared_info.is_null();
|
||||
shared_info = iter.Next()) {
|
||||
if (!shared_info.HasBytecodeArray()) continue;
|
||||
@ -253,8 +252,8 @@ void CreateInterpreterDataForDeserializedCode(Isolate* isolate,
|
||||
|
||||
if (!log_code_creation) continue;
|
||||
Handle<AbstractCode> abstract_code = Handle<AbstractCode>::cast(code);
|
||||
int line_num = script.GetLineNumber(info->StartPosition()) + 1;
|
||||
int column_num = script.GetColumnNumber(info->StartPosition()) + 1;
|
||||
int line_num = script->GetLineNumber(info->StartPosition()) + 1;
|
||||
int column_num = script->GetColumnNumber(info->StartPosition()) + 1;
|
||||
PROFILE(isolate,
|
||||
CodeCreateEvent(CodeEventListener::INTERPRETED_FUNCTION_TAG,
|
||||
*abstract_code, *info, *name_handle, line_num,
|
||||
|
Loading…
Reference in New Issue
Block a user