| Index: src/runtime/runtime-internal.cc
|
| diff --git a/src/runtime/runtime-internal.cc b/src/runtime/runtime-internal.cc
|
| index c1ef69efdc027325f00160b6c655371132ca3e70..b382173ba608489429900ba88ac23a077fbfff23 100644
|
| --- a/src/runtime/runtime-internal.cc
|
| +++ b/src/runtime/runtime-internal.cc
|
| @@ -15,7 +15,7 @@
|
| #include "src/isolate-inl.h"
|
| #include "src/messages.h"
|
| #include "src/parsing/parse-info.h"
|
| -#include "src/parsing/parser.h"
|
| +#include "src/parsing/parsing.h"
|
| #include "src/wasm/wasm-module.h"
|
|
|
| namespace v8 {
|
| @@ -389,11 +389,16 @@ Handle<String> RenderCallSite(Isolate* isolate, Handle<Object> object) {
|
| MessageLocation location;
|
| if (ComputeLocation(isolate, &location)) {
|
| Zone zone(isolate->allocator(), ZONE_NAME);
|
| - std::unique_ptr<ParseInfo> info(
|
| - location.function()->shared()->is_function()
|
| - ? new ParseInfo(&zone, handle(location.function()->shared()))
|
| - : new ParseInfo(&zone, location.script()));
|
| - if (Parser::ParseStatic(info.get())) {
|
| + bool successfully_parsed = false;
|
| + std::unique_ptr<ParseInfo> info;
|
| + if (location.function()->shared()->is_function()) {
|
| + info.reset(new ParseInfo(&zone, handle(location.function()->shared())));
|
| + successfully_parsed = parsing::ParseFunction(info.get());
|
| + } else {
|
| + info.reset(new ParseInfo(&zone, location.script()));
|
| + successfully_parsed = parsing::ParseProgram(info.get());
|
| + }
|
| + if (successfully_parsed) {
|
| CallPrinter printer(isolate,
|
| location.function()->shared()->IsUserJavaScript());
|
| Handle<String> str = printer.Print(info->literal(), location.start_pos());
|
|
|