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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.h

Issue 2200613002: The HTML parser synchronously creates custom elements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Eliminate redundant TODOs. 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/core/html/parser/HTMLScriptRunner.h
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.h b/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.h
index eeb29590f4124c43680a03e611c84c83002258a6..c69e4e06b1457308d5c24e53353f78bd1ab2883e 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.h
+++ b/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.h
@@ -29,9 +29,10 @@
#include "bindings/core/v8/ScriptStreamer.h"
#include "core/dom/PendingScript.h"
#include "core/fetch/ResourceClient.h"
+#include "core/html/parser/HTMLParserReentryPermit.h"
#include "platform/heap/Handle.h"
#include "wtf/Deque.h"
-#include "wtf/PassRefPtr.h"
+#include "wtf/RefPtr.h"
#include "wtf/text/TextPosition.h"
namespace blink {
@@ -46,9 +47,9 @@ class HTMLScriptRunner final : public GarbageCollectedFinalized<HTMLScriptRunner
USING_GARBAGE_COLLECTED_MIXIN(HTMLScriptRunner);
USING_PRE_FINALIZER(HTMLScriptRunner, detach);
public:
- static HTMLScriptRunner* create(Document* document, HTMLScriptRunnerHost* host)
+ static HTMLScriptRunner* create(HTMLParserReentryPermit* reentryPermit, Document* document, HTMLScriptRunnerHost* host)
{
- return new HTMLScriptRunner(document, host);
+ return new HTMLScriptRunner(reentryPermit, document, host);
}
~HTMLScriptRunner();
@@ -63,7 +64,7 @@ public:
bool executeScriptsWaitingForParsing();
bool hasParserBlockingScript() const;
- bool isExecutingScript() const { return !!m_scriptNestingLevel; }
+ bool isExecutingScript() const { return !!m_reentryPermit->scriptNestingLevel(); }
// ResourceClient
void notifyFinished(Resource*) override;
@@ -72,7 +73,7 @@ public:
DECLARE_TRACE();
private:
- HTMLScriptRunner(Document*, HTMLScriptRunnerHost*);
+ HTMLScriptRunner(HTMLParserReentryPermit*, Document*, HTMLScriptRunnerHost*);
void executeParsingBlockingScript();
void executePendingScriptAndDispatchEvent(PendingScript*, ScriptStreamer::Type);
@@ -88,12 +89,12 @@ private:
void stopWatchingResourceForLoad(Resource*);
+ RefPtr<HTMLParserReentryPermit> m_reentryPermit;
Member<Document> m_document;
Member<HTMLScriptRunnerHost> m_host;
Member<PendingScript> m_parserBlockingScript;
// http://www.whatwg.org/specs/web-apps/current-work/#list-of-scripts-that-will-execute-when-the-document-has-finished-parsing
HeapDeque<Member<PendingScript>> m_scriptsToExecuteAfterParsing;
- unsigned m_scriptNestingLevel;
// We only want stylesheet loads to trigger script execution if script
// execution is currently stopped due to stylesheet loads, otherwise we'd

Powered by Google App Engine
This is Rietveld 408576698