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

Unified Diff: Source/bindings/v8/CustomElementConstructorBuilder.cpp

Issue 19002005: Share Custom Element registration contexts between related documents. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Tweak the test to do lazy wrapping in both cases. Created 7 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 | « Source/bindings/v8/CustomElementConstructorBuilder.h ('k') | Source/core/core.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/CustomElementConstructorBuilder.cpp
diff --git a/Source/bindings/v8/CustomElementConstructorBuilder.cpp b/Source/bindings/v8/CustomElementConstructorBuilder.cpp
index 6e4dd4022ace29a341997bc8a903b0a0c0468971..532c4e628d0206067ddd9bb23fd92fcf3a7a0351 100644
--- a/Source/bindings/v8/CustomElementConstructorBuilder.cpp
+++ b/Source/bindings/v8/CustomElementConstructorBuilder.cpp
@@ -144,11 +144,11 @@ bool CustomElementConstructorBuilder::findTagName(const AtomicString& customElem
return false;
}
-PassRefPtr<CustomElementLifecycleCallbacks> CustomElementConstructorBuilder::createCallbacks(Document* document)
+PassRefPtr<CustomElementLifecycleCallbacks> CustomElementConstructorBuilder::createCallbacks()
{
ASSERT(!m_prototype.IsEmpty());
- RefPtr<Document> protect(document);
+ RefPtr<ScriptExecutionContext> scriptExecutionContext = toScriptExecutionContext(m_context);
v8::TryCatch exceptionCatcher;
exceptionCatcher.SetVerbose(true);
@@ -159,7 +159,7 @@ PassRefPtr<CustomElementLifecycleCallbacks> CustomElementConstructorBuilder::cre
v8::Handle<v8::Function> leftDocument = retrieveCallback(isolate, "leftDocumentCallback");
v8::Handle<v8::Function> attributeChanged = retrieveCallback(isolate, "attributeChangedCallback");
- return V8CustomElementLifecycleCallbacks::create(document, m_prototype, created, enteredDocument, leftDocument, attributeChanged);
+ return V8CustomElementLifecycleCallbacks::create(scriptExecutionContext.get(), m_prototype, created, enteredDocument, leftDocument, attributeChanged);
}
v8::Handle<v8::Function> CustomElementConstructorBuilder::retrieveCallback(v8::Isolate* isolate, const char* name)
« no previous file with comments | « Source/bindings/v8/CustomElementConstructorBuilder.h ('k') | Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698