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

Unified Diff: gin/v8_platform.cc

Issue 2756673004: Implement stack trace printing callback for v8 (Closed)
Patch Set: Created 3 years, 9 months 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 | « gin/public/v8_platform.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/v8_platform.cc
diff --git a/gin/v8_platform.cc b/gin/v8_platform.cc
index 276dd77c9d64f2dd941b9613839f1941a041d326..dc887c43c3e0d242f8e599c1e3be96cd35eafda7 100644
--- a/gin/v8_platform.cc
+++ b/gin/v8_platform.cc
@@ -5,6 +5,7 @@
#include "gin/public/v8_platform.h"
#include "base/bind.h"
+#include "base/debug/stack_trace.h"
#include "base/location.h"
#include "base/sys_info.h"
#include "base/threading/worker_pool.h"
@@ -42,6 +43,11 @@ class IdleTaskWithLocker : public v8::IdleTask {
DISALLOW_COPY_AND_ASSIGN(IdleTaskWithLocker);
};
+void PrintStackTrace() {
+ base::debug::StackTrace trace;
+ trace.Print();
+}
+
} // namespace
// static
@@ -263,4 +269,8 @@ void V8Platform::RemoveTraceStateObserver(
g_trace_state_dispatcher.Get().RemoveObserver(observer);
}
+v8::Platform::StackTracePrinter V8Platform::GetStackTracePrinter() {
+ return PrintStackTrace;
+}
+
} // namespace gin
« no previous file with comments | « gin/public/v8_platform.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698