Index: Source/bindings/v8/ScriptWrappable.h |
diff --git a/Source/bindings/v8/ScriptWrappable.h b/Source/bindings/v8/ScriptWrappable.h |
index 45f3e7c002b3404ac4ab68a40cf5ca8f42b48393..85eb194f35affde04e8821ceeea7679605544289 100644 |
--- a/Source/bindings/v8/ScriptWrappable.h |
+++ b/Source/bindings/v8/ScriptWrappable.h |
@@ -99,6 +99,8 @@ public: |
info.ignoreMember(m_maskedStorage); |
} |
+ bool containsWrapper() const { return (m_maskedStorage & 1) == 1; } |
+ |
static bool wrapperCanBeStoredInObject(const void*) { return false; } |
static bool wrapperCanBeStoredInObject(const ScriptWrappable*) { return true; } |
@@ -152,7 +154,15 @@ protected: |
} |
private: |
- inline bool containsWrapper() const { return (m_maskedStorage & 1) == 1; } |
+ friend class MinorGCWrapperVisitor; // For calling rawWrapper(). |
haraken
2013/04/26 13:42:23
Is this the only function we need to make a friend
marja
2013/04/26 13:48:17
Afaics, the only other use of wrapper() is in DOMD
|
+ |
+ v8::Object* rawWrapper() const |
+ { |
+ if (!containsWrapper()) |
+ return NULL; |
haraken
2013/04/26 13:42:23
NULL => 0
marja
2013/04/26 13:48:17
Done.
|
+ return reinterpret_cast<v8::Object*>(maskOrUnmaskValue(m_maskedStorage)); |
+ } |
+ |
inline bool containsTypeInfo() const { return m_maskedStorage && ((m_maskedStorage & 1) == 0); } |
static inline uintptr_t maskOrUnmaskValue(uintptr_t value) |