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

Unified Diff: src/transitions.h

Issue 1009603003: Add debug checks to catch crashes with WeakCell::cast(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « src/objects-inl.h ('k') | src/type-feedback-vector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/transitions.h
diff --git a/src/transitions.h b/src/transitions.h
index 648559ba4cd2652fd836b691e81c9fbb226a48d9..1cb91a222e6fec33133c3c3fd060102cb01a3750 100644
--- a/src/transitions.h
+++ b/src/transitions.h
@@ -68,6 +68,7 @@ class TransitionArray: public FixedArray {
}
static inline Map* GetSimpleTransition(Object* raw_transition) {
DCHECK(IsSimpleTransition(raw_transition));
+ DCHECK(raw_transition->IsWeakCell());
return Map::cast(WeakCell::cast(raw_transition)->value());
}
static inline bool IsFullTransitionArray(Object* raw_transitions) {
« no previous file with comments | « src/objects-inl.h ('k') | src/type-feedback-vector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698