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

Unified Diff: third_party/WebKit/Source/core/loader/resource/ScriptResource.cpp

Issue 2807343002: Rename ScriptResource/WorkerScriptLoader::Script() to SourceText() (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
Index: third_party/WebKit/Source/core/loader/resource/ScriptResource.cpp
diff --git a/third_party/WebKit/Source/core/loader/resource/ScriptResource.cpp b/third_party/WebKit/Source/core/loader/resource/ScriptResource.cpp
index c53f90b24b123c85b8cb16fbf44ce351c2a4c01f..c811db9710a47876aef5c7740e44b9bb2bcb437a 100644
--- a/third_party/WebKit/Source/core/loader/resource/ScriptResource.cpp
+++ b/third_party/WebKit/Source/core/loader/resource/ScriptResource.cpp
@@ -77,26 +77,26 @@ void ScriptResource::OnMemoryDump(WebMemoryDumpLevelOfDetail level_of_detail,
Resource::OnMemoryDump(level_of_detail, memory_dump);
const String name = GetMemoryDumpName() + "/decoded_script";
auto dump = memory_dump->CreateMemoryAllocatorDump(name);
- dump->AddScalar("size", "bytes", script_.CharactersSizeInBytes());
+ dump->AddScalar("size", "bytes", source_text_.CharactersSizeInBytes());
memory_dump->AddSuballocation(
dump->Guid(), String(WTF::Partitions::kAllocatedObjectPoolName));
}
-const String& ScriptResource::Script() {
+const String& ScriptResource::SourceText() {
DCHECK(IsLoaded());
- if (script_.IsNull() && Data()) {
- String script = DecodedText();
+ if (source_text_.IsNull() && Data()) {
+ String source_text = DecodedText();
ClearData();
- SetDecodedSize(script.CharactersSizeInBytes());
- script_ = AtomicString(script);
+ SetDecodedSize(source_text.CharactersSizeInBytes());
+ source_text_ = AtomicString(source_text);
}
- return script_;
+ return source_text_;
}
void ScriptResource::DestroyDecodedDataForFailedRevalidation() {
- script_ = AtomicString();
+ source_text_ = AtomicString();
}
// static

Powered by Google App Engine
This is Rietveld 408576698