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

Unified Diff: Source/core/dom/Document.cpp

Issue 542113003: bindings: Introduces ScriptWrappable::associateWithWrapper in addition to wrap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index ac3d14065363a169bfbaab9e2a1207145b4f692b..630733b12b641c8ddf93a58aab979ada6560953f 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -5776,13 +5776,16 @@ v8::Handle<v8::Object> Document::wrap(v8::Handle<v8::Object> creationContext, v8
return wrapper;
wrapperType->installConditionallyEnabledProperties(wrapper, isolate);
+ return associateWithWrapper(wrapperType, wrapper, isolate);
+}
+
+v8::Handle<v8::Object> Document::associateWithWrapper(const WrapperTypeInfo* wrapperType, v8::Handle<v8::Object> wrapper, v8::Isolate* isolate)
+{
wrapperType->refObject(toScriptWrappableBase());
V8DOMWrapper::associateObjectWithWrapperNonTemplate(this, wrapperType, wrapper, isolate);
-
DOMWrapperWorld& world = DOMWrapperWorld::current(isolate);
if (world.isMainWorld() && frame())
frame()->script().windowProxy(world)->updateDocumentWrapper(wrapper);
haraken 2014/09/05 16:41:39 The line 5876 - 5788 should be put in Document::wr
Yuki 2014/09/08 07:56:05 As we talked offline, we need two entry points for
-
return wrapper;
}

Powered by Google App Engine
This is Rietveld 408576698