Index: src/runtime/runtime-internal.cc |
diff --git a/src/runtime/runtime-internal.cc b/src/runtime/runtime-internal.cc |
index 7ad925b9c0384cf2074fbbdcb4f4a6a33cc5c1dc..0f807be5b8008214a84354592f99128d4fb01ed7 100644 |
--- a/src/runtime/runtime-internal.cc |
+++ b/src/runtime/runtime-internal.cc |
@@ -179,19 +179,16 @@ RUNTIME_FUNCTION(Runtime_RenderCallSite) { |
if (location.start_pos() == -1) return isolate->heap()->empty_string(); |
Zone zone; |
- ParseInfo info(&zone); |
- if (location.function()->shared()->is_function()) { |
- info.InitializeFromJSFunction(location.function()); |
- } else { |
- info.InitializeFromScript(location.script()); |
- } |
+ SmartPointer<ParseInfo> info(location.function()->shared()->is_function() |
+ ? new ParseInfo(&zone, location.function()) |
+ : new ParseInfo(&zone, location.script())); |
- if (!Parser::ParseStatic(&info)) { |
+ if (!Parser::ParseStatic(info.get())) { |
isolate->clear_pending_exception(); |
return isolate->heap()->empty_string(); |
} |
CallPrinter printer(isolate, &zone); |
- const char* string = printer.Print(info.function(), location.start_pos()); |
+ const char* string = printer.Print(info->function(), location.start_pos()); |
return *isolate->factory()->NewStringFromAsciiChecked(string); |
} |