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

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

Issue 114813006: IDL compiler: [SetReference] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: gclw Created 7 years 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/V8TestInterfacePython.cpp
diff --git a/Source/bindings/tests/results/V8TestInterfacePython.cpp b/Source/bindings/tests/results/V8TestInterfacePython.cpp
index 5a2f2860210bd94c532f2e287b096099ba2eb713..db0c44d342fa7f0d9d3173be3e5a9d5ad40e7060 100644
--- a/Source/bindings/tests/results/V8TestInterfacePython.cpp
+++ b/Source/bindings/tests/results/V8TestInterfacePython.cpp
@@ -35,12 +35,11 @@
#include "V8TestInterfacePython.h"
#include "RuntimeEnabledFeatures.h"
+#include "V8ReferencedType.h"
#include "bindings/v8/ExceptionState.h"
#include "bindings/v8/V8DOMConfiguration.h"
-#include "bindings/v8/V8GCController.h"
#include "core/dom/ContextFeatures.h"
#include "core/dom/Document.h"
-#include "core/dom/Element.h"
#include "platform/TraceEvent.h"
namespace WebCore {
@@ -156,9 +155,13 @@ static void voidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<
void V8TestInterfacePython::visitDOMWrapper(void* object, const v8::Persistent<v8::Object>& wrapper, v8::Isolate* isolate)
{
TestInterfacePythonImplementation* impl = fromInternalPointer(object);
- if (Node* owner = impl->ownerNode()) {
- setObjectGroup(V8GCController::opaqueRootForGC(owner, isolate), wrapper, isolate);
- return;
+ v8::Local<v8::Object> creationContext = v8::Local<v8::Object>::New(isolate, wrapper);
+ V8WrapperInstantiationScope scope(creationContext, isolate);
+ ReferencedType* referencedName = impl->referencedName();
+ if (referencedName) {
+ if (!DOMDataStore::containsWrapper<V8ReferencedType>(referencedName, isolate))
+ wrap(referencedName, creationContext, isolate);
+ DOMDataStore::setWrapperReference<V8ReferencedType>(wrapper, referencedName, isolate);
}
setObjectGroup(object, wrapper, isolate);
}
« no previous file with comments | « Source/bindings/tests/idls/TestInterfacePython3.idl ('k') | Source/bindings/tests/results/V8TestInterfacePython2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698