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

Unified Diff: Source/bindings/tests/results/V8TestInterfacePython3.cpp

Issue 140653013: Have DOMImplementation::document() return reference. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Binding test added for [SetWrapperReferenceFrom] extended attribute. 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
Index: Source/bindings/tests/results/V8TestInterfacePython3.cpp
diff --git a/Source/bindings/tests/results/V8TestInterfacePython3.cpp b/Source/bindings/tests/results/V8TestInterfacePython3.cpp
index 98d25492c7f9839dde760dab8975bdf41fc5bcee..738f7f0c9446838b65987f8340eb4afed0049aa6 100644
--- a/Source/bindings/tests/results/V8TestInterfacePython3.cpp
+++ b/Source/bindings/tests/results/V8TestInterfacePython3.cpp
@@ -36,9 +36,11 @@
#include "RuntimeEnabledFeatures.h"
#include "bindings/v8/ExceptionState.h"
#include "bindings/v8/V8DOMConfiguration.h"
+#include "bindings/v8/V8GCController.h"
#include "bindings/v8/V8ObjectConstructor.h"
#include "core/dom/ContextFeatures.h"
#include "core/dom/Document.h"
+#include "core/dom/Element.h"
#include "platform/TraceEvent.h"
#include "wtf/GetPtr.h"
#include "wtf/RefPtr.h"
@@ -73,6 +75,13 @@ template <typename T> void V8_USE(T) { }
} // namespace TestInterfacePython3V8Internal
+void V8TestInterfacePython3::visitDOMWrapper(void* object, const v8::Persistent<v8::Object>& wrapper, v8::Isolate* isolate)
+{
+ TestInterfacePython3* impl = fromInternalPointer(object);
+ Node* root = V8GCController::opaqueRootForGC(&impl->document(), isolate);
+ isolate->SetReferenceFromGroup(v8::UniqueId(reinterpret_cast<intptr_t>(root)), wrapper);
+}
+
static void configureV8TestInterfacePython3Template(v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate, WrapperWorldType currentWorldType)
{
functionTemplate->ReadOnlyPrototype();

Powered by Google App Engine
This is Rietveld 408576698