OLD | NEW |
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 V8Debugger* debugger() { return m_debugger.get(); } | 60 V8Debugger* debugger() { return m_debugger.get(); } |
61 | 61 |
62 v8::MaybeLocal<v8::Value> runCompiledScript(v8::Local<v8::Context>, | 62 v8::MaybeLocal<v8::Value> runCompiledScript(v8::Local<v8::Context>, |
63 v8::Local<v8::Script>); | 63 v8::Local<v8::Script>); |
64 v8::MaybeLocal<v8::Value> callFunction(v8::Local<v8::Function>, | 64 v8::MaybeLocal<v8::Value> callFunction(v8::Local<v8::Function>, |
65 v8::Local<v8::Context>, | 65 v8::Local<v8::Context>, |
66 v8::Local<v8::Value> receiver, | 66 v8::Local<v8::Value> receiver, |
67 int argc, v8::Local<v8::Value> info[]); | 67 int argc, v8::Local<v8::Value> info[]); |
68 v8::MaybeLocal<v8::Value> compileAndRunInternalScript(v8::Local<v8::Context>, | 68 v8::MaybeLocal<v8::Value> compileAndRunInternalScript(v8::Local<v8::Context>, |
69 v8::Local<v8::String>); | 69 v8::Local<v8::String>); |
| 70 v8::MaybeLocal<v8::Value> callInternalFunction(v8::Local<v8::Function>, |
| 71 v8::Local<v8::Context>, |
| 72 v8::Local<v8::Value> receiver, |
| 73 int argc, |
| 74 v8::Local<v8::Value> info[]); |
70 v8::MaybeLocal<v8::Script> compileScript(v8::Local<v8::Context>, | 75 v8::MaybeLocal<v8::Script> compileScript(v8::Local<v8::Context>, |
71 const String16& code, | 76 const String16& code, |
72 const String16& fileName); | 77 const String16& fileName); |
73 v8::Local<v8::Context> regexContext(); | 78 v8::Local<v8::Context> regexContext(); |
74 | 79 |
75 // V8Inspector implementation. | 80 // V8Inspector implementation. |
76 std::unique_ptr<V8InspectorSession> connect(int contextGroupId, | 81 std::unique_ptr<V8InspectorSession> connect(int contextGroupId, |
77 V8Inspector::Channel*, | 82 V8Inspector::Channel*, |
78 const StringView& state) override; | 83 const StringView& state) override; |
79 void contextCreated(const V8ContextInfo&) override; | 84 void contextCreated(const V8ContextInfo&) override; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 void discardInspectedContext(int contextGroupId, int contextId); | 118 void discardInspectedContext(int contextGroupId, int contextId); |
114 const ContextByIdMap* contextGroup(int contextGroupId); | 119 const ContextByIdMap* contextGroup(int contextGroupId); |
115 void disconnect(V8InspectorSessionImpl*); | 120 void disconnect(V8InspectorSessionImpl*); |
116 V8InspectorSessionImpl* sessionForContextGroup(int contextGroupId); | 121 V8InspectorSessionImpl* sessionForContextGroup(int contextGroupId); |
117 InspectedContext* getContext(int groupId, int contextId) const; | 122 InspectedContext* getContext(int groupId, int contextId) const; |
118 V8DebuggerAgentImpl* enabledDebuggerAgentForGroup(int contextGroupId); | 123 V8DebuggerAgentImpl* enabledDebuggerAgentForGroup(int contextGroupId); |
119 V8RuntimeAgentImpl* enabledRuntimeAgentForGroup(int contextGroupId); | 124 V8RuntimeAgentImpl* enabledRuntimeAgentForGroup(int contextGroupId); |
120 V8ProfilerAgentImpl* enabledProfilerAgentForGroup(int contextGroupId); | 125 V8ProfilerAgentImpl* enabledProfilerAgentForGroup(int contextGroupId); |
121 | 126 |
122 private: | 127 private: |
| 128 v8::MaybeLocal<v8::Value> callFunction( |
| 129 v8::Local<v8::Function>, v8::Local<v8::Context>, |
| 130 v8::Local<v8::Value> receiver, int argc, v8::Local<v8::Value> info[], |
| 131 v8::MicrotasksScope::Type runMicrotasks); |
| 132 |
123 v8::Isolate* m_isolate; | 133 v8::Isolate* m_isolate; |
124 V8InspectorClient* m_client; | 134 V8InspectorClient* m_client; |
125 std::unique_ptr<V8Debugger> m_debugger; | 135 std::unique_ptr<V8Debugger> m_debugger; |
126 v8::Global<v8::Context> m_regexContext; | 136 v8::Global<v8::Context> m_regexContext; |
127 int m_capturingStackTracesCount; | 137 int m_capturingStackTracesCount; |
128 unsigned m_lastExceptionId; | 138 unsigned m_lastExceptionId; |
129 | 139 |
130 using MuteExceptionsMap = protocol::HashMap<int, int>; | 140 using MuteExceptionsMap = protocol::HashMap<int, int>; |
131 MuteExceptionsMap m_muteExceptionsMap; | 141 MuteExceptionsMap m_muteExceptionsMap; |
132 | 142 |
133 using ContextsByGroupMap = | 143 using ContextsByGroupMap = |
134 protocol::HashMap<int, std::unique_ptr<ContextByIdMap>>; | 144 protocol::HashMap<int, std::unique_ptr<ContextByIdMap>>; |
135 ContextsByGroupMap m_contexts; | 145 ContextsByGroupMap m_contexts; |
136 | 146 |
137 using SessionMap = protocol::HashMap<int, V8InspectorSessionImpl*>; | 147 using SessionMap = protocol::HashMap<int, V8InspectorSessionImpl*>; |
138 SessionMap m_sessions; | 148 SessionMap m_sessions; |
139 | 149 |
140 using ConsoleStorageMap = | 150 using ConsoleStorageMap = |
141 protocol::HashMap<int, std::unique_ptr<V8ConsoleMessageStorage>>; | 151 protocol::HashMap<int, std::unique_ptr<V8ConsoleMessageStorage>>; |
142 ConsoleStorageMap m_consoleStorageMap; | 152 ConsoleStorageMap m_consoleStorageMap; |
143 | 153 |
144 DISALLOW_COPY_AND_ASSIGN(V8InspectorImpl); | 154 DISALLOW_COPY_AND_ASSIGN(V8InspectorImpl); |
145 }; | 155 }; |
146 | 156 |
147 } // namespace v8_inspector | 157 } // namespace v8_inspector |
148 | 158 |
149 #endif // V8_INSPECTOR_V8INSPECTORIMPL_H_ | 159 #endif // V8_INSPECTOR_V8INSPECTORIMPL_H_ |
OLD | NEW |