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

Unified Diff: src/factory.cc

Issue 1108013003: Introduce --zap-cpp-pointers (off by default) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixes Created 3 years, 7 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 | « src/execution.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 22f2e639106df8d3c3a4ed54f0b166553256bd58..eef3e197b6ea1e706825eac2597880a712d74dfb 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -34,8 +34,22 @@ namespace internal {
return Handle<TYPE>(TYPE::cast(__object__), ISOLATE); \
}
+// TODO(jkummerow): Handlify more of heap.cc to maintain the rule that
+// "there are no raw pointers anywhere on the stack when an allocation
+// is happening", and then move the ZapHeapPointersInCppFrames() call
+// into Heap::AllocateRaw.
+#if DEBUG
+#define MAYBE_ZAP_STACK(isolate) \
+ if (FLAG_zap_cpp_pointers) { \
+ ZapHeapPointersInCppFrames(isolate); \
+ }
+#else
+#define MAYBE_ZAP_STACK(isolate)
+#endif
+
#define CALL_HEAP_FUNCTION(ISOLATE, FUNCTION_CALL, TYPE) \
do { \
+ MAYBE_ZAP_STACK(ISOLATE); \
AllocationResult __allocation__ = FUNCTION_CALL; \
Object* __object__ = NULL; \
RETURN_OBJECT_UNLESS_RETRY(ISOLATE, TYPE) \
« no previous file with comments | « src/execution.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698