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

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

Issue 1221193004: Bindings: visitDOMWrapper should not create a new wrapper (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 | « no previous file | Source/bindings/tests/results/core/V8TestInterface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/templates/interface.cpp
diff --git a/Source/bindings/templates/interface.cpp b/Source/bindings/templates/interface.cpp
index 71e7b74097f95c65efb92339f943f2d4e498f268..0ebd759e16a7affa06a8b7eb5382636e890846a6 100644
--- a/Source/bindings/templates/interface.cpp
+++ b/Source/bindings/templates/interface.cpp
@@ -564,9 +564,8 @@ void {{v8_class}}::visitDOMWrapper(v8::Isolate* isolate, ScriptWrappable* script
V8WrapperInstantiationScope scope(creationContext, isolate);
{{set_wrapper_reference_to.cpp_type}} {{set_wrapper_reference_to.name}} = impl->{{set_wrapper_reference_to.name}}();
if ({{set_wrapper_reference_to.name}}) {
- if (!DOMDataStore::containsWrapper({{set_wrapper_reference_to.name}}, isolate))
- {{set_wrapper_reference_to.name}}->wrap(isolate, creationContext);
- DOMDataStore::setWrapperReference(wrapper, {{set_wrapper_reference_to.name}}, isolate);
+ if (DOMDataStore::containsWrapper({{set_wrapper_reference_to.name}}, isolate))
+ DOMDataStore::setWrapperReference(wrapper, {{set_wrapper_reference_to.name}}, isolate);
}
{% endif %}
{% if set_wrapper_reference_from %}
« no previous file with comments | « no previous file | Source/bindings/tests/results/core/V8TestInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698