summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/bindings/v8/WrapperTypeInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/bindings/v8/WrapperTypeInfo.h')
-rw-r--r--Source/WebCore/bindings/v8/WrapperTypeInfo.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/Source/WebCore/bindings/v8/WrapperTypeInfo.h b/Source/WebCore/bindings/v8/WrapperTypeInfo.h
index 1d1cbfd..166d642 100644
--- a/Source/WebCore/bindings/v8/WrapperTypeInfo.h
+++ b/Source/WebCore/bindings/v8/WrapperTypeInfo.h
@@ -41,7 +41,9 @@ namespace WebCore {
static const int v8DOMWrapperObjectIndex = 1;
static const int v8DOMHiddenReferenceArrayIndex = 2;
static const int v8DefaultWrapperInternalFieldCount = 3;
-
+
+ static const uint16_t v8DOMSubtreeClassId = 1;
+
typedef v8::Persistent<v8::FunctionTemplate> (*GetTemplateFunction)();
typedef void (*DerefObjectFunction)(void*);
typedef ActiveDOMObject* (*ToActiveDOMObjectFunction)(v8::Handle<v8::Object>);
@@ -61,6 +63,16 @@ namespace WebCore {
{
return this == that;
}
+
+ bool isSubclass(const WrapperTypeInfo* that) const
+ {
+ for (const WrapperTypeInfo* current = this; current; current = current->parentClass) {
+ if (current == that)
+ return true;
+ }
+
+ return false;
+ }
v8::Persistent<v8::FunctionTemplate> getTemplate() { return getTemplateFunction(); }
@@ -80,6 +92,7 @@ namespace WebCore {
const GetTemplateFunction getTemplateFunction;
const DerefObjectFunction derefObjectFunction;
const ToActiveDOMObjectFunction toActiveDOMObjectFunction;
+ const WrapperTypeInfo* parentClass;
};
}