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

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

Issue 1389383003: WIP: Introduce CompressibleString Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bug fix Created 5 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
Index: third_party/WebKit/Source/bindings/core/v8/V8ValueCache.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8ValueCache.h b/third_party/WebKit/Source/bindings/core/v8/V8ValueCache.h
index 3bc2e00a289657813f6d9724aad46ce8651f8fc3..1db90af53b25a43b72651f714233a6d18fec48f4 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8ValueCache.h
+++ b/third_party/WebKit/Source/bindings/core/v8/V8ValueCache.h
@@ -28,6 +28,7 @@
#include "bindings/core/v8/V8GlobalValueMap.h"
#include "core/CoreExport.h"
+#include "platform/text/CompressableString.h"
#include "wtf/Allocator.h"
#include "wtf/HashMap.h"
#include "wtf/Noncopyable.h"
@@ -79,6 +80,12 @@ public:
return v8ExternalStringSlow(isolate, stringImpl);
}
+ v8::Local<v8::String> v8ExternalString(v8::Isolate* isolate, const CompressableString& string)
+ {
+ ASSERT(!string.isNull());
+ return v8ExternalStringSlow(isolate, string);
+ }
+
void setReturnValueFromString(v8::ReturnValue<v8::Value> returnValue, StringImpl* stringImpl)
{
ASSERT(stringImpl);
@@ -94,8 +101,10 @@ public:
private:
v8::Local<v8::String> v8ExternalStringSlow(v8::Isolate*, StringImpl*);
+ v8::Local<v8::String> v8ExternalStringSlow(v8::Isolate*, const CompressableString&);
void setReturnValueFromStringSlow(v8::ReturnValue<v8::Value>, StringImpl*);
v8::Local<v8::String> createStringAndInsertIntoCache(v8::Isolate*, StringImpl*);
+ v8::Local<v8::String> createStringAndInsertIntoCache(v8::Isolate*, const CompressableString&);
void InvalidateLastString();
StringCacheMapTraits::MapType m_stringCache;

Powered by Google App Engine
This is Rietveld 408576698