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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8StringResource.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/bindings/core/v8/V8StringResource.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8StringResource.cpp b/third_party/WebKit/Source/bindings/core/v8/V8StringResource.cpp
index f4a208552a1c472e7c795ae0e4f149eaf4e35082..7cbc56e74a303e2588409d6c5a3b928c4b55f3ac 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8StringResource.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8StringResource.cpp
@@ -47,7 +47,7 @@ struct StringTraits<String> {
template<>
struct StringTraits<AtomicString> {
- static AtomicString fromStringResource(WebCoreStringResourceBase* resource)
+ static const AtomicString& fromStringResource(WebCoreStringResourceBase* resource)
{
return resource->getAtomicString();
}
@@ -106,17 +106,10 @@ StringType v8StringToWebCoreString(v8::Local<v8::String> v8String, ExternalMode
v8::String::ExternalStringResourceBase* resource = v8String->GetExternalStringResourceBase(&encoding);
if (LIKELY(!!resource)) {
WebCoreStringResourceBase* base;
- if (UNLIKELY(resource->IsCompressible())) {
- if (encoding == v8::String::ONE_BYTE_ENCODING)
- base = static_cast<WebCoreCompressibleStringResource8*>(resource);
- else
- base = static_cast<WebCoreCompressibleStringResource16*>(resource);
- } else {
- if (encoding == v8::String::ONE_BYTE_ENCODING)
- base = static_cast<WebCoreStringResource8*>(resource);
- else
- base = static_cast<WebCoreStringResource16*>(resource);
- }
+ if (encoding == v8::String::ONE_BYTE_ENCODING)
+ base = static_cast<WebCoreStringResource8*>(resource);
+ else
+ base = static_cast<WebCoreStringResource16*>(resource);
return StringTraits<StringType>::fromStringResource(base);
}
}

Powered by Google App Engine
This is Rietveld 408576698