Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index de74f2ca6240d69f13fbd45df4d232a833ba3759..71d4387684f21445b5b1e05643119e2d27357465 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -12921,6 +12921,17 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_CollectStackTrace) { |
} |
+// Mark a function to recognize when called after GC to format the stack trace. |
+RUNTIME_FUNCTION(MaybeObject*, Runtime_MarkOneShotGetter) { |
+ ASSERT_EQ(args.length(), 1); |
+ CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0); |
+ HandleScope scope(isolate); |
+ Handle<String> key = isolate->factory()->hidden_stack_trace_symbol(); |
+ JSObject::SetHiddenProperty(fun, key, key); |
+ return *fun; |
+} |
+ |
+ |
// Retrieve the raw stack trace collected on stack overflow and delete |
// it since it is used only once to avoid keeping it alive. |
RUNTIME_FUNCTION(MaybeObject*, Runtime_GetOverflowedRawStackTrace) { |