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

Unified Diff: third_party/WebKit/Source/core/fetch/ScriptResource.cpp

Issue 2227933002: Revert CompressibleString (and its UMA) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address on Ilya's review 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/fetch/ScriptResource.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ScriptResource.cpp b/third_party/WebKit/Source/core/fetch/ScriptResource.cpp
index 167017b3cf9ab610e11ca1778377c9da36ae37dc..b5a1aeb02d03bb674729576ef530da5281512d68 100644
--- a/third_party/WebKit/Source/core/fetch/ScriptResource.cpp
+++ b/third_party/WebKit/Source/core/fetch/ScriptResource.cpp
@@ -76,11 +76,11 @@ void ScriptResource::onMemoryDump(WebMemoryDumpLevelOfDetail levelOfDetail, WebP
Resource::onMemoryDump(levelOfDetail, memoryDump);
const String name = getMemoryDumpName() + "/decoded_script";
auto dump = memoryDump->createMemoryAllocatorDump(name);
- dump->addScalar("size", "bytes", m_script.currentSizeInBytes());
+ dump->addScalar("size", "bytes", m_script.getString().sizeInBytes());
memoryDump->addSuballocation(dump->guid(), String(WTF::Partitions::kAllocatedObjectPoolName));
}
-const CompressibleString& ScriptResource::script()
+const String& ScriptResource::script()
{
ASSERT(!isPurgeable());
ASSERT(isLoaded());
@@ -92,7 +92,7 @@ const CompressibleString& ScriptResource::script()
// That's because the MemoryCache thinks that it can clear out decoded data by calling destroyDecodedData(),
// but we can't destroy script in destroyDecodedData because that's our only copy of the data!
setEncodedSize(script.sizeInBytes());
- m_script = CompressibleString(script.impl());
+ m_script = AtomicString(script);
}
return m_script;
@@ -100,7 +100,7 @@ const CompressibleString& ScriptResource::script()
void ScriptResource::destroyDecodedDataForFailedRevalidation()
{
- m_script = CompressibleString();
+ m_script = AtomicString();
}
bool ScriptResource::mimeTypeAllowedByNosniff() const
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ScriptResource.h ('k') | third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698