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

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

Issue 531183003: bindings: Retires manual dispatching in createV8{HTML,SVG}Wrapper, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed bindings/modules/v8/custom/custom.gni Created 6 years, 3 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
Index: Source/bindings/templates/interface.cpp
diff --git a/Source/bindings/templates/interface.cpp b/Source/bindings/templates/interface.cpp
index e364c9411002df90132dc029a1f1c79582a0483d..e57c7227b79868469154c68275f1c9082a5cb09a 100644
--- a/Source/bindings/templates/interface.cpp
+++ b/Source/bindings/templates/interface.cpp
@@ -1141,6 +1141,7 @@ v8::Handle<v8::ObjectTemplate> V8Window::getShadowObjectTemplate(v8::Isolate* is
{##############################################################################}
{% block wrap %}
+{% if not is_script_wrappable %}
{% if special_wrap_for or is_document %}
v8::Handle<v8::Object> wrap({{cpp_class}}* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{
@@ -1171,22 +1172,17 @@ v8::Handle<v8::Object> wrap({{cpp_class}}* impl, v8::Handle<v8::Object> creation
}
{% endif %}
+{% endif %}
{% endblock %}
{##############################################################################}
{% block create_wrapper %}
-{% if not has_custom_to_v8 %}
+{% if not has_custom_to_v8 and not is_script_wrappable %}
v8::Handle<v8::Object> {{v8_class}}::createWrapper({{pass_cpp_type}} impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{
ASSERT(impl);
ASSERT(!DOMDataStore::containsWrapper<{{v8_class}}>(impl.get(), isolate));
- {% if is_script_wrappable %}
- const WrapperTypeInfo* actualInfo = impl->typeInfo();
- // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperTypeInfo. These will both have
- // the same object de-ref functions, though, so use that as the basis of the check.
- RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction);
- {% endif %}
{% if is_document %}
if (LocalFrame* frame = impl->frame()) {

Powered by Google App Engine
This is Rietveld 408576698