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

Side by Side Diff: third_party/WebKit/Source/core/dom/ClassicPendingScript.h

Issue 2724673002: [WIP] Introduce ScriptResourceData
Patch Set: Fix Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ClassicPendingScript_h 5 #ifndef ClassicPendingScript_h
6 #define ClassicPendingScript_h 6 #define ClassicPendingScript_h
7 7
8 #include "bindings/core/v8/ScriptStreamer.h" 8 #include "bindings/core/v8/ScriptStreamer.h"
9 #include "core/dom/ClassicScript.h" 9 #include "core/dom/ClassicScript.h"
10 #include "core/dom/PendingScript.h" 10 #include "core/dom/PendingScript.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 bool IsExternal() const override { return is_external_; } 52 bool IsExternal() const override { return is_external_; }
53 bool ErrorOccurred() const override; 53 bool ErrorOccurred() const override;
54 bool WasCanceled() const override; 54 bool WasCanceled() const override;
55 void StartStreamingIfPossible(Document*, ScriptStreamer::Type) override; 55 void StartStreamingIfPossible(Document*, ScriptStreamer::Type) override;
56 KURL UrlForClassicScript() const override; 56 KURL UrlForClassicScript() const override;
57 void RemoveFromMemoryCache() override; 57 void RemoveFromMemoryCache() override;
58 void DisposeInternal() override; 58 void DisposeInternal() override;
59 59
60 void Prefinalize(); 60 void Prefinalize();
61 61
62 const ScriptResourceData* ResourceData() const { return resource_data_; }
63
62 private: 64 private:
63 ClassicPendingScript(ScriptElementBase*, 65 ClassicPendingScript(ScriptElementBase*,
64 ScriptResource*, 66 ScriptResource*,
65 const TextPosition&); 67 const TextPosition&);
66 ClassicPendingScript() = delete; 68 ClassicPendingScript() = delete;
67 69
68 void CheckState() const override; 70 void CheckState() const override;
69 71
70 // ScriptResourceClient 72 // ScriptResourceClient
71 void NotifyFinished(Resource*) override; 73 void NotifyFinished(Resource*) override;
72 String DebugName() const override { return "PendingScript"; } 74 String DebugName() const override { return "PendingScript"; }
73 void NotifyAppendData(ScriptResource*) override; 75 void NotifyAppendData(ScriptResource*) override;
74 76
75 // MemoryCoordinatorClient 77 // MemoryCoordinatorClient
76 void OnPurgeMemory() override; 78 void OnPurgeMemory() override;
77 79
78 const bool is_external_; 80 const bool is_external_;
79 81
80 bool integrity_failure_; 82 bool integrity_failure_;
81 83
82 Member<ScriptStreamer> streamer_; 84 Member<ScriptStreamer> streamer_;
83 85
84 // This is a temporary flag to confirm that ClassicPendingScript is not 86 // This is a temporary flag to confirm that ClassicPendingScript is not
85 // touched after its refinalizer call and thus https://crbug.com/715309 87 // touched after its refinalizer call and thus https://crbug.com/715309
86 // doesn't break assumptions. 88 // doesn't break assumptions.
87 // TODO(hiroshige): Check the state in more general way. 89 // TODO(hiroshige): Check the state in more general way.
88 bool prefinalizer_called_ = false; 90 bool prefinalizer_called_ = false;
91
92 Member<const ScriptResourceData> resource_data_;
89 }; 93 };
90 94
91 } // namespace blink 95 } // namespace blink
92 96
93 #endif // PendingScript_h 97 #endif // PendingScript_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698