Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(978)

Unified Diff: src/runtime.cc

Issue 11377158: Fire 'stack' getter of error objects after GC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime.h ('k') | test/cctest/test-decls.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 446443148dcf219323317ec5ab40aefd29598706..06a8458549104a088925775540e4a10e38d05c5a 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -13098,6 +13098,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) {
« no previous file with comments | « src/runtime.h ('k') | test/cctest/test-decls.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698