Chromium Code Reviews| Index: third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.cpp |
| diff --git a/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.cpp b/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.cpp |
| index d9c7c0d5e91cacf12f47987d09eb3d9627bb5514..2c7998259a659d3b63ac1720de03eb21d6f1792a 100644 |
| --- a/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.cpp |
| +++ b/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.cpp |
| @@ -312,4 +312,17 @@ void V8PerIsolateData::setScriptDebugger(PassOwnPtr<ScriptDebuggerBase> debugger |
| m_scriptDebugger = debugger; |
| } |
| +void V8PerIsolateData::addCompressableString(const CompressableString& string) |
| +{ |
| + m_compressableStrings.add(string.impl()); |
|
haraken
2015/11/24 11:15:41
Who removes the destructed strings from the m_comp
hajimehoshi
2015/11/26 10:49:12
Now CompressibleStringTable owns and destroys the
|
| +} |
| + |
| +void V8PerIsolateData::compressStrings() |
| +{ |
| + for (RefPtr<CompressableStringImpl> string : m_compressableStrings) { |
| + if (string->sizeInBytes() > 100000 && !string->isCompressed()) |
| + string->compress(); |
| + } |
| +} |
| + |
| } // namespace blink |