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

Unified Diff: runtime/vm/os_thread.h

Issue 2680213002: Updated MallocHooks to collect stack traces when memory is allocated. (Closed)
Patch Set: Rough first patch Created 3 years, 10 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
Index: runtime/vm/os_thread.h
diff --git a/runtime/vm/os_thread.h b/runtime/vm/os_thread.h
index da298316dd60bd29c673b2754365830eaa462ad1..1312431fad5024b54f313002c5b42a4a9ba52a5c 100644
--- a/runtime/vm/os_thread.h
+++ b/runtime/vm/os_thread.h
@@ -8,6 +8,7 @@
#include "platform/globals.h"
#include "vm/allocation.h"
#include "vm/globals.h"
+#include "vm/malloc_hooks.h"
// Declare the OS-specific types ahead of defining the generic classes.
#if defined(TARGET_OS_ANDROID)
@@ -113,6 +114,8 @@ class OSThread : public BaseThread {
void EnableThreadInterrupts();
bool ThreadInterruptsEnabled();
+ static bool DoesCurrentThreadExist() { return (GetCurrentTLS() != NULL); }
+
// The currently executing thread, or NULL if not yet initialized.
static OSThread* Current() {
BaseThread* thread = GetCurrentTLS();

Powered by Google App Engine
This is Rietveld 408576698