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

Side by Side Diff: src/inspector/v8-inspector-impl.h

Issue 2558913004: [inspector] Store interger in context embedder data instead of a string. (Closed)
Patch Set: review comments Created 4 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
« no previous file with comments | « src/inspector/v8-heap-profiler-agent-impl.cc ('k') | src/inspector/v8-inspector-impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2010, Google Inc. All rights reserved. 2 * Copyright (c) 2010, 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 class V8StackTraceImpl; 51 class V8StackTraceImpl;
52 52
53 class V8InspectorImpl : public V8Inspector { 53 class V8InspectorImpl : public V8Inspector {
54 public: 54 public:
55 V8InspectorImpl(v8::Isolate*, V8InspectorClient*); 55 V8InspectorImpl(v8::Isolate*, V8InspectorClient*);
56 ~V8InspectorImpl() override; 56 ~V8InspectorImpl() override;
57 57
58 v8::Isolate* isolate() const { return m_isolate; } 58 v8::Isolate* isolate() const { return m_isolate; }
59 V8InspectorClient* client() { return m_client; } 59 V8InspectorClient* client() { return m_client; }
60 V8Debugger* debugger() { return m_debugger.get(); } 60 V8Debugger* debugger() { return m_debugger.get(); }
61 int contextGroupId(v8::Local<v8::Context>);
62 int contextGroupId(int contextId);
61 63
62 v8::MaybeLocal<v8::Value> runCompiledScript(v8::Local<v8::Context>, 64 v8::MaybeLocal<v8::Value> runCompiledScript(v8::Local<v8::Context>,
63 v8::Local<v8::Script>); 65 v8::Local<v8::Script>);
64 v8::MaybeLocal<v8::Value> callFunction(v8::Local<v8::Function>, 66 v8::MaybeLocal<v8::Value> callFunction(v8::Local<v8::Function>,
65 v8::Local<v8::Context>, 67 v8::Local<v8::Context>,
66 v8::Local<v8::Value> receiver, 68 v8::Local<v8::Value> receiver,
67 int argc, v8::Local<v8::Value> info[]); 69 int argc, v8::Local<v8::Value> info[]);
68 v8::MaybeLocal<v8::Value> compileAndRunInternalScript(v8::Local<v8::Context>, 70 v8::MaybeLocal<v8::Value> compileAndRunInternalScript(v8::Local<v8::Context>,
69 v8::Local<v8::String>); 71 v8::Local<v8::String>);
70 v8::MaybeLocal<v8::Value> callInternalFunction(v8::Local<v8::Function>, 72 v8::MaybeLocal<v8::Value> callInternalFunction(v8::Local<v8::Function>,
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 v8::Local<v8::Function>, v8::Local<v8::Context>, 131 v8::Local<v8::Function>, v8::Local<v8::Context>,
130 v8::Local<v8::Value> receiver, int argc, v8::Local<v8::Value> info[], 132 v8::Local<v8::Value> receiver, int argc, v8::Local<v8::Value> info[],
131 v8::MicrotasksScope::Type runMicrotasks); 133 v8::MicrotasksScope::Type runMicrotasks);
132 134
133 v8::Isolate* m_isolate; 135 v8::Isolate* m_isolate;
134 V8InspectorClient* m_client; 136 V8InspectorClient* m_client;
135 std::unique_ptr<V8Debugger> m_debugger; 137 std::unique_ptr<V8Debugger> m_debugger;
136 v8::Global<v8::Context> m_regexContext; 138 v8::Global<v8::Context> m_regexContext;
137 int m_capturingStackTracesCount; 139 int m_capturingStackTracesCount;
138 unsigned m_lastExceptionId; 140 unsigned m_lastExceptionId;
141 int m_lastContextId;
139 142
140 using MuteExceptionsMap = protocol::HashMap<int, int>; 143 using MuteExceptionsMap = protocol::HashMap<int, int>;
141 MuteExceptionsMap m_muteExceptionsMap; 144 MuteExceptionsMap m_muteExceptionsMap;
142 145
143 using ContextsByGroupMap = 146 using ContextsByGroupMap =
144 protocol::HashMap<int, std::unique_ptr<ContextByIdMap>>; 147 protocol::HashMap<int, std::unique_ptr<ContextByIdMap>>;
145 ContextsByGroupMap m_contexts; 148 ContextsByGroupMap m_contexts;
146 149
147 using SessionMap = protocol::HashMap<int, V8InspectorSessionImpl*>; 150 using SessionMap = protocol::HashMap<int, V8InspectorSessionImpl*>;
148 SessionMap m_sessions; 151 SessionMap m_sessions;
149 152
150 using ConsoleStorageMap = 153 using ConsoleStorageMap =
151 protocol::HashMap<int, std::unique_ptr<V8ConsoleMessageStorage>>; 154 protocol::HashMap<int, std::unique_ptr<V8ConsoleMessageStorage>>;
152 ConsoleStorageMap m_consoleStorageMap; 155 ConsoleStorageMap m_consoleStorageMap;
153 156
157 protocol::HashMap<int, int> m_contextIdToGroupIdMap;
158
154 DISALLOW_COPY_AND_ASSIGN(V8InspectorImpl); 159 DISALLOW_COPY_AND_ASSIGN(V8InspectorImpl);
155 }; 160 };
156 161
157 } // namespace v8_inspector 162 } // namespace v8_inspector
158 163
159 #endif // V8_INSPECTOR_V8INSPECTORIMPL_H_ 164 #endif // V8_INSPECTOR_V8INSPECTORIMPL_H_
OLDNEW
« no previous file with comments | « src/inspector/v8-heap-profiler-agent-impl.cc ('k') | src/inspector/v8-inspector-impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698