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

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

Issue 14711003: Custom Element constructors should synchronously invoke the ready callback (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 | « LayoutTests/fast/dom/custom/constructor-calls-ready-synchronously-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/CustomElementConstructor.cpp
diff --git a/Source/core/dom/CustomElementConstructor.cpp b/Source/core/dom/CustomElementConstructor.cpp
index f664ecf92864d5eadb5d9316e46ffe2df99ae40c..ff02ea7446bb947cd3e173ac1ac4e6e11e2cc84d 100644
--- a/Source/core/dom/CustomElementConstructor.cpp
+++ b/Source/core/dom/CustomElementConstructor.cpp
@@ -32,6 +32,7 @@
#include "core/dom/CustomElementConstructor.h"
+#include "core/dom/CustomElementRegistry.h"
#include "core/dom/Document.h"
#include "core/dom/Element.h"
@@ -55,7 +56,12 @@ Document* CustomElementConstructor::document() const {
PassRefPtr<Element> CustomElementConstructor::createElement(ExceptionCode& ec) {
if (!document())
return 0;
- return document()->createElementNS(m_tag.namespaceURI(), m_tag.localName(), m_typeExtension, ec);
+ RefPtr<Element> result;
+ {
+ CustomElementRegistry::CallbackDeliveryScope deliveryScope;
+ result = document()->createElementNS(m_tag.namespaceURI(), m_tag.localName(), m_typeExtension, ec);
+ }
+ return result.release();
}
}
« no previous file with comments | « LayoutTests/fast/dom/custom/constructor-calls-ready-synchronously-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698