| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010-2011 Google Inc. All rights reserved. | 2 * Copyright (c) 2010-2011 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 // Get agent from the map again, since it could have detached during script | 121 // Get agent from the map again, since it could have detached during script |
| 122 // execution. | 122 // execution. |
| 123 if (V8DebuggerAgentImpl* agent = enabledDebuggerAgentForGroup(groupId)) | 123 if (V8DebuggerAgentImpl* agent = enabledDebuggerAgentForGroup(groupId)) |
| 124 agent->didExecuteScript(); | 124 agent->didExecuteScript(); |
| 125 return result; | 125 return result; |
| 126 } | 126 } |
| 127 | 127 |
| 128 v8::MaybeLocal<v8::Value> V8InspectorImpl::compileAndRunInternalScript( | 128 v8::MaybeLocal<v8::Value> V8InspectorImpl::compileAndRunInternalScript( |
| 129 v8::Local<v8::Context> context, v8::Local<v8::String> source) { | 129 v8::Local<v8::Context> context, v8::Local<v8::String> source) { |
| 130 v8::Local<v8::UnboundScript> unboundScript; | 130 v8::Local<v8::UnboundScript> unboundScript; |
| 131 if (!v8::DebugInterface::CompileInspectorScript(m_isolate, source) | 131 if (!v8::debug::DebugInterface::CompileInspectorScript(m_isolate, source) |
| 132 .ToLocal(&unboundScript)) | 132 .ToLocal(&unboundScript)) |
| 133 return v8::MaybeLocal<v8::Value>(); | 133 return v8::MaybeLocal<v8::Value>(); |
| 134 v8::MicrotasksScope microtasksScope(m_isolate, | 134 v8::MicrotasksScope microtasksScope(m_isolate, |
| 135 v8::MicrotasksScope::kDoNotRunMicrotasks); | 135 v8::MicrotasksScope::kDoNotRunMicrotasks); |
| 136 v8::Context::Scope contextScope(context); | 136 v8::Context::Scope contextScope(context); |
| 137 return unboundScript->BindToCurrentContext()->Run(context); | 137 return unboundScript->BindToCurrentContext()->Run(context); |
| 138 } | 138 } |
| 139 | 139 |
| 140 v8::MaybeLocal<v8::Script> V8InspectorImpl::compileScript( | 140 v8::MaybeLocal<v8::Script> V8InspectorImpl::compileScript( |
| 141 v8::Local<v8::Context> context, const String16& code, | 141 v8::Local<v8::Context> context, const String16& code, |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 } | 379 } |
| 380 | 380 |
| 381 V8InspectorSessionImpl* V8InspectorImpl::sessionForContextGroup( | 381 V8InspectorSessionImpl* V8InspectorImpl::sessionForContextGroup( |
| 382 int contextGroupId) { | 382 int contextGroupId) { |
| 383 if (!contextGroupId) return nullptr; | 383 if (!contextGroupId) return nullptr; |
| 384 SessionMap::iterator iter = m_sessions.find(contextGroupId); | 384 SessionMap::iterator iter = m_sessions.find(contextGroupId); |
| 385 return iter == m_sessions.end() ? nullptr : iter->second; | 385 return iter == m_sessions.end() ? nullptr : iter->second; |
| 386 } | 386 } |
| 387 | 387 |
| 388 } // namespace v8_inspector | 388 } // namespace v8_inspector |
| OLD | NEW |