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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.cpp

Issue 1583263002: Experimental CompressibleString UMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add DecompressingInForegroundTab Created 4 years, 11 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/bindings/core/v8/ScriptSourceCode.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.cpp
index 9e17ff28c30c1461742161060958e1d9dbeab044..afa20981713cc8098273be3eefaacd297453f550 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.cpp
@@ -13,6 +13,11 @@ ScriptSourceCode::ScriptSourceCode()
}
ScriptSourceCode::ScriptSourceCode(const String& source, const KURL& url, const TextPosition& startPosition)
+ : ScriptSourceCode(CompressibleString(source.impl()), url, startPosition)
+{
+}
+
+ScriptSourceCode::ScriptSourceCode(const CompressibleString& source, const KURL& url, const TextPosition& startPosition)
: m_source(source)
, m_resource(0)
, m_url(url)
@@ -82,7 +87,7 @@ void ScriptSourceCode::treatNullSourceAsEmpty()
// the empty script. Consequently, we need to disambiguate between such null string occurrences.
// Do that by converting the latter case's null strings into empty ones.
if (m_source.isNull())
- m_source = "";
+ m_source = CompressibleString(StringImpl::empty());
haraken 2016/01/19 07:43:35 CompressibleString() ?
hajimehoshi 2016/01/19 10:19:20 Done.
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698