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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8Binding.h

Issue 1583263002: Experimental CompressibleString UMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/V8Binding.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8Binding.h b/third_party/WebKit/Source/bindings/core/v8/V8Binding.h
index fc9d5be4d7e2359b3f6fc44ed8776f60961227b8..3e3744ca457acc625e0da7209c31b506d7eeb936 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8Binding.h
+++ b/third_party/WebKit/Source/bindings/core/v8/V8Binding.h
@@ -47,6 +47,7 @@
#include "core/CoreExport.h"
#include "platform/JSONValues.h"
#include "platform/heap/Handle.h"
+#include "platform/text/CompressibleString.h"
#include "wtf/text/AtomicString.h"
#include <v8.h>
@@ -433,6 +434,13 @@ inline v8::Local<v8::String> v8String(v8::Isolate* isolate, const String& string
return V8PerIsolateData::from(isolate)->stringCache()->v8ExternalString(isolate, string.impl());
}
+inline v8::Local<v8::String> v8String(v8::Isolate* isolate, const CompressibleString& string)
+{
+ if (string.isNull())
+ return v8::String::Empty(isolate);
+ return V8PerIsolateData::from(isolate)->stringCache()->v8ExternalString(isolate, string);
+}
+
inline v8::Local<v8::String> v8AtomicString(v8::Isolate* isolate, const char* str, int length = -1)
{
ASSERT(isolate);

Powered by Google App Engine
This is Rietveld 408576698