Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index e68ac531f7bd320862ce24a89781df567332b7c0..b922c087426cc97af54588db79be80c16f9f2d67 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -628,6 +628,7 @@ struct ValueInfo : public Malloced { |
// A template-ized version of the IsXXX functions. |
template <class C> static inline bool Is(Object* obj); |
+class Failure; |
class MaybeObject BASE_EMBEDDED { |
public: |
@@ -641,6 +642,10 @@ class MaybeObject BASE_EMBEDDED { |
*obj = reinterpret_cast<Object*>(this); |
return true; |
} |
+ inline Failure* ToFailureUnchecked() { |
+ ASSERT(IsFailure()); |
+ return reinterpret_cast<Failure*>(this); |
+ } |
inline Object* ToObjectUnchecked() { |
ASSERT(!IsFailure()); |
return reinterpret_cast<Object*>(this); |