Index: Source/bindings/templates/interface.h |
diff --git a/Source/bindings/templates/interface.h b/Source/bindings/templates/interface.h |
index 4bae14ae7d7fb3ce78f442edc4585095ae9b389a..6dd126633fa1c0b354a7e5346da20f2480148f5c 100644 |
--- a/Source/bindings/templates/interface.h |
+++ b/Source/bindings/templates/interface.h |
@@ -27,6 +27,7 @@ |
{% for filename in header_includes %} |
#include "{{filename}}" |
{% endfor %} |
+ |
namespace WebCore { |
class {{v8_class_name}} { |
@@ -40,9 +41,7 @@ public: |
} |
static void derefObject(void*); |
static WrapperTypeInfo info; |
- |
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0; |
- |
static inline void* toInternalPointer({{cpp_class_name}}* impl) |
{ |
return impl; |
@@ -52,14 +51,11 @@ public: |
{ |
return static_cast<{{cpp_class_name}}*>(object); |
} |
- |
static void installPerContextProperties(v8::Handle<v8::Object>, {{cpp_class_name}}*, v8::Isolate*) { } |
static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8::Isolate*) { } |
- |
private: |
friend v8::Handle<v8::Object> wrap({{cpp_class_name}}*, v8::Handle<v8::Object> creationContext, v8::Isolate*); |
static v8::Handle<v8::Object> createWrapper(PassRefPtr<{{cpp_class_name}}>, v8::Handle<v8::Object> creationContext, v8::Isolate*); |
- |
}; |
template<> |
@@ -68,11 +64,12 @@ public: |
static WrapperTypeInfo* info() { return &{{v8_class_name}}::info; } |
}; |
+ |
inline v8::Handle<v8::Object> wrap({{cpp_class_name}}* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
{ |
ASSERT(impl); |
ASSERT(DOMDataStore::getWrapper<{{v8_class_name}}>(impl, isolate).IsEmpty()); |
- return {{v8_class_name}}::createWrapper(impl, creationContext, isolate); |
+ return {{v8_class_name}}::{{ custom_wrap and "wrap" or "createWrapper" }}(impl, creationContext, isolate); |
} |
inline v8::Handle<v8::Value> toV8({{cpp_class_name}}* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
@@ -124,10 +121,9 @@ inline v8::Handle<v8::Value> toV8(PassRefPtr< {{cpp_class_name}} > impl, v8::Han |
return toV8(impl.get(), creationContext, isolate); |
} |
- |
} |
- |
{% if conditional_string %} |
+ |
#endif // {{conditional_string}} |
{% endif %} |