Index: src/runtime/runtime-internal.cc |
diff --git a/src/runtime/runtime-internal.cc b/src/runtime/runtime-internal.cc |
index 812cd09c099bf6bfd4499ce576b1994bf508d432..c437e3729b32238a5b0b0a5bd5c1f4b209e52ff9 100644 |
--- a/src/runtime/runtime-internal.cc |
+++ b/src/runtime/runtime-internal.cc |
@@ -366,8 +366,7 @@ bool ComputeLocation(Isolate* isolate, MessageLocation* target) { |
JavaScriptFrameIterator it(isolate); |
if (!it.done()) { |
JavaScriptFrame* frame = it.frame(); |
- JSFunction* fun = frame->function(); |
- Object* script = fun->shared()->script(); |
+ Object* script = frame->function()->shared()->script(); |
if (script->IsScript() && |
!(Script::cast(script)->source()->IsUndefined(isolate))) { |
Handle<Script> casted_script(Script::cast(script), isolate); |
@@ -377,8 +376,9 @@ bool ComputeLocation(Isolate* isolate, MessageLocation* target) { |
List<FrameSummary> frames(FLAG_max_inlining_levels + 1); |
it.frame()->Summarize(&frames); |
FrameSummary& summary = frames.last(); |
+ Handle<JSFunction> function = summary.function(); |
int pos = summary.abstract_code()->SourcePosition(summary.code_offset()); |
- *target = MessageLocation(casted_script, pos, pos + 1, handle(fun)); |
+ *target = MessageLocation(casted_script, pos, pos + 1, function); |
Toon Verwaest
2016/11/24 12:37:45
Mmh, shouldn't it be function->shared()->script()
Michael Starzinger
2016/11/24 12:53:52
Done.
|
return true; |
} |
} |