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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h

Issue 1389383003: WIP: Introduce CompressibleString Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bug fix Created 5 years 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 16 matching lines...) Expand all
27 #define V8PerIsolateData_h 27 #define V8PerIsolateData_h
28 28
29 #include "bindings/core/v8/ScopedPersistent.h" 29 #include "bindings/core/v8/ScopedPersistent.h"
30 #include "bindings/core/v8/ScriptState.h" 30 #include "bindings/core/v8/ScriptState.h"
31 #include "bindings/core/v8/V8HiddenValue.h" 31 #include "bindings/core/v8/V8HiddenValue.h"
32 #include "bindings/core/v8/WrapperTypeInfo.h" 32 #include "bindings/core/v8/WrapperTypeInfo.h"
33 #include "core/CoreExport.h" 33 #include "core/CoreExport.h"
34 #include "core/inspector/ScriptDebuggerBase.h" 34 #include "core/inspector/ScriptDebuggerBase.h"
35 #include "gin/public/isolate_holder.h" 35 #include "gin/public/isolate_holder.h"
36 #include "gin/public/v8_idle_task_runner.h" 36 #include "gin/public/v8_idle_task_runner.h"
37 #include "platform/text/CompressableString.h"
37 #include "wtf/HashMap.h" 38 #include "wtf/HashMap.h"
38 #include "wtf/Noncopyable.h" 39 #include "wtf/Noncopyable.h"
39 #include "wtf/OwnPtr.h" 40 #include "wtf/OwnPtr.h"
40 #include "wtf/Vector.h" 41 #include "wtf/Vector.h"
41 #include <v8.h> 42 #include <v8.h>
42 43
43 namespace blink { 44 namespace blink {
44 45
45 class DOMDataStore; 46 class DOMDataStore;
46 class StringCache; 47 class StringCache;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // EndOfScopeTasks are run by V8RecursionScope when control is returning 121 // EndOfScopeTasks are run by V8RecursionScope when control is returning
121 // to C++ from script, after executing a script task (e.g. callback, 122 // to C++ from script, after executing a script task (e.g. callback,
122 // event) or microtasks (e.g. promise). This is explicitly needed for 123 // event) or microtasks (e.g. promise). This is explicitly needed for
123 // Indexed DB transactions per spec, but should in general be avoided. 124 // Indexed DB transactions per spec, but should in general be avoided.
124 void addEndOfScopeTask(PassOwnPtr<EndOfScopeTask>); 125 void addEndOfScopeTask(PassOwnPtr<EndOfScopeTask>);
125 void runEndOfScopeTasks(); 126 void runEndOfScopeTasks();
126 void clearEndOfScopeTasks(); 127 void clearEndOfScopeTasks();
127 128
128 void setScriptDebugger(PassOwnPtr<ScriptDebuggerBase>); 129 void setScriptDebugger(PassOwnPtr<ScriptDebuggerBase>);
129 130
131 void addCompressableString(const CompressableString&);
132
133 void compressStrings();
134
130 private: 135 private:
131 V8PerIsolateData(); 136 V8PerIsolateData();
132 ~V8PerIsolateData(); 137 ~V8PerIsolateData();
133 138
134 typedef HashMap<const void*, v8::Eternal<v8::FunctionTemplate>> DOMTemplateM ap; 139 typedef HashMap<const void*, v8::Eternal<v8::FunctionTemplate>> DOMTemplateM ap;
135 DOMTemplateMap& currentDOMTemplateMap(); 140 DOMTemplateMap& currentDOMTemplateMap();
136 bool hasInstance(const WrapperTypeInfo* untrusted, v8::Local<v8::Value>, DOM TemplateMap&); 141 bool hasInstance(const WrapperTypeInfo* untrusted, v8::Local<v8::Value>, DOM TemplateMap&);
137 v8::Local<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*, v 8::Local<v8::Value>, DOMTemplateMap&); 142 v8::Local<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*, v 8::Local<v8::Value>, DOMTemplateMap&);
138 143
139 bool m_destructionPending; 144 bool m_destructionPending;
(...skipping 15 matching lines...) Expand all
155 bool m_isHandlingRecursionLevelError; 160 bool m_isHandlingRecursionLevelError;
156 bool m_isReportingException; 161 bool m_isReportingException;
157 162
158 #if ENABLE(ASSERT) 163 #if ENABLE(ASSERT)
159 int m_internalScriptRecursionLevel; 164 int m_internalScriptRecursionLevel;
160 #endif 165 #endif
161 bool m_performingMicrotaskCheckpoint; 166 bool m_performingMicrotaskCheckpoint;
162 167
163 Vector<OwnPtr<EndOfScopeTask>> m_endOfScopeTasks; 168 Vector<OwnPtr<EndOfScopeTask>> m_endOfScopeTasks;
164 OwnPtr<ScriptDebuggerBase> m_scriptDebugger; 169 OwnPtr<ScriptDebuggerBase> m_scriptDebugger;
170
171 HashSet<RefPtr<CompressableStringImpl>> m_compressableStrings;
165 }; 172 };
166 173
167 } // namespace blink 174 } // namespace blink
168 175
169 #endif // V8PerIsolateData_h 176 #endif // V8PerIsolateData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698