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

Unified Diff: third_party/WebKit/Source/core/dom/ClassicPendingScript.h

Issue 2828193003: Explicitly track the lifecycle of PendingScript. (Closed)
Patch Set: . Created 3 years, 8 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 | « no previous file | third_party/WebKit/Source/core/dom/ClassicPendingScript.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/ClassicPendingScript.h
diff --git a/third_party/WebKit/Source/core/dom/ClassicPendingScript.h b/third_party/WebKit/Source/core/dom/ClassicPendingScript.h
index aa78d17141ae8353edc8616ccb0b6ea86f2bfb4f..b1649b0f2a15904bd4f2aaef0c29c1b29deecdc4 100644
--- a/third_party/WebKit/Source/core/dom/ClassicPendingScript.h
+++ b/third_party/WebKit/Source/core/dom/ClassicPendingScript.h
@@ -60,11 +60,24 @@ class CORE_EXPORT ClassicPendingScript final
void Prefinalize();
private:
+ enum ReadyState {
+ // These states are considered "not ready".
+ kWaitingForResource,
+ kWaitingForStreaming,
+ // These states are considered "ready".
+ kReady,
+ kErrorOccurred,
+ };
+
ClassicPendingScript(ScriptElementBase*,
ScriptResource*,
const TextPosition&);
ClassicPendingScript() = delete;
+ // Advances the current state of the script, reporting to the client if
+ // appropriate.
+ void AdvanceReadyState(ReadyState);
+
void CheckState() const override;
// ScriptResourceClient
@@ -75,8 +88,8 @@ class CORE_EXPORT ClassicPendingScript final
// MemoryCoordinatorClient
void OnPurgeMemory() override;
+ ReadyState ready_state_;
bool integrity_failure_;
-
Member<ScriptStreamer> streamer_;
// This is a temporary flag to confirm that ClassicPendingScript is not
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ClassicPendingScript.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698