Index: src/execution.cc |
diff --git a/src/execution.cc b/src/execution.cc |
index 56c08b5b53679d44e4adaa9652f460b5c5492817..709c13df7340c21d74ef78cf11fafa34d92d775c 100644 |
--- a/src/execution.cc |
+++ b/src/execution.cc |
@@ -434,6 +434,31 @@ |
// --- C a l l s t o n a t i v e s --- |
+Handle<String> Execution::GetStackTraceLine(Handle<Object> recv, |
+ Handle<JSFunction> fun, |
+ Handle<Object> pos, |
+ Handle<Object> is_global) { |
+ Isolate* isolate = fun->GetIsolate(); |
+ Handle<Object> strict_mode = isolate->factory()->ToBoolean(false); |
+ |
+ MaybeHandle<Object> maybe_callsite = |
+ CallSiteUtils::Construct(isolate, recv, fun, pos, strict_mode); |
+ if (maybe_callsite.is_null()) { |
+ isolate->clear_pending_exception(); |
+ return isolate->factory()->empty_string(); |
+ } |
+ |
+ MaybeHandle<String> maybe_to_string = |
+ CallSiteUtils::ToString(isolate, maybe_callsite.ToHandleChecked()); |
+ if (maybe_to_string.is_null()) { |
+ isolate->clear_pending_exception(); |
+ return isolate->factory()->empty_string(); |
+ } |
+ |
+ return maybe_to_string.ToHandleChecked(); |
+} |
+ |
+ |
void StackGuard::HandleGCInterrupt() { |
if (CheckAndClearInterrupt(GC_REQUEST)) { |
isolate_->heap()->HandleGCRequest(); |