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

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

Issue 181513002: Kill [SetWrapperReferenceFromReference] IDL extended attribute (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 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/scripts/v8_interface.py ('k') | Source/bindings/tests/idls/TestInterfacePython4.idl » ('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 7a52a835454614793d759fa1a00727b8ec181018..28204a139f4403aa4507e45f44644a8baa5e5da2 100644
--- a/Source/bindings/templates/interface.cpp
+++ b/Source/bindings/templates/interface.cpp
@@ -678,7 +678,7 @@ static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
{##############################################################################}
{% block visit_dom_wrapper %}
-{% if reachable_node_function or reachable_node_reference_function or
+{% if reachable_node_function or
set_wrapper_reference_to_list %}
void {{v8_class}}::visitDOMWrapper(void* object, const v8::Persistent<v8::Object>& wrapper, v8::Isolate* isolate)
{
@@ -696,14 +696,12 @@ void {{v8_class}}::visitDOMWrapper(void* object, const v8::Persistent<v8::Object
{% endfor %}
{% endif %}
{% if reachable_node_function %}
- if (Node* owner = impl->{{reachable_node_function}}()) {
+ // The {{reachable_node_function}}() method may return a reference or a pointer.
+ if (Node* owner = WTF::getPtr(impl->{{reachable_node_function}}())) {
Node* root = V8GCController::opaqueRootForGC(owner, isolate);
isolate->SetReferenceFromGroup(v8::UniqueId(reinterpret_cast<intptr_t>(root)), wrapper);
return;
}
- {% elif reachable_node_reference_function %}
- Node* root = V8GCController::opaqueRootForGC(&impl->{{reachable_node_reference_function}}(), isolate);
- isolate->SetReferenceFromGroup(v8::UniqueId(reinterpret_cast<intptr_t>(root)), wrapper);
{% endif %}
{% if reachable_node_function or set_wrapper_reference_to_list %}
Nils Barth (inactive) 2014/02/28 02:18:16 This conditional is no longer necessary; I'll fix
Nils Barth (inactive) 2014/03/03 01:58:30 Fixed in: Cleanup [SetWrapperReferenceFromReferenc
setObjectGroup(object, wrapper, isolate);
« no previous file with comments | « Source/bindings/scripts/v8_interface.py ('k') | Source/bindings/tests/idls/TestInterfacePython4.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698