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

Unified Diff: third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl

Issue 2279703002: Add a scoped context object for synchronous CE creation (Closed)
Patch Set: Clean up Created 4 years, 4 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: third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl
diff --git a/third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl
index 385c01603ba81bcf9de31ccb7fb1019b711956b2..dd4ce04e3fccf545f662e4590cbb6c66b87fa1b5 100644
--- a/third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl
@@ -12,6 +12,7 @@
{% endif %}
{% if namespace == 'HTML' %}
#include "core/dom/custom/CustomElement.h"
+#include "core/dom/custom/CustomElementCreationScope.h"
{% endif %}
#include "core/dom/custom/V0CustomElement.h"
#include "core/dom/custom/V0CustomElementRegistrationContext.h"
@@ -94,6 +95,7 @@ static void create{{namespace}}FunctionMap()
QualifiedName tagName(nullAtom, localName, HTMLNames::xhtmlNamespaceURI);
if (flags & AsynchronousCustomElements)
return CustomElement::createCustomElementAsync(document, tagName);
+ CustomElementCreationScope scope(&document);
return CustomElement::createCustomElementSync(document, tagName);
}
{% endif %}
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLElementCustom.cpp ('k') | third_party/WebKit/Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698