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

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

Issue 2212393002: Report the size of |ScriptResource::m_script| as decoded size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 47fbbf9062239523b28255f0ef19787b144b4add..7b3af7d991b44e91877225536487a607c8a99301 100644
--- a/third_party/WebKit/Source/core/fetch/ScriptResource.cpp
+++ b/third_party/WebKit/Source/core/fetch/ScriptResource.cpp
@@ -89,12 +89,8 @@ const String& ScriptResource::script() {
if (m_script.isNull() && data()) {
String script = decodedText();
clearData();
- // We lie a bit here and claim that script counts as encoded data (even
- // though it's really decoded data). 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.charactersSizeInBytes());
+ setEncodedSizeMemoryUsage(0);
+ setDecodedSize(script.charactersSizeInBytes());
m_script = AtomicString(script);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698