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

Unified Diff: Source/bindings/templates/interface.h

Issue 17572008: WIP IDL compiler rewrite (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Branch: const + primitive type readonly attributes Created 7 years, 4 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 | « Source/bindings/templates/constructors.cpp ('k') | Source/bindings/templates/interface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 %}
« no previous file with comments | « Source/bindings/templates/constructors.cpp ('k') | Source/bindings/templates/interface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698