OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 Response ensureContext(V8InspectorImpl* inspector, int contextGroupId, | 234 Response ensureContext(V8InspectorImpl* inspector, int contextGroupId, |
235 Maybe<int> executionContextId, int* contextId) { | 235 Maybe<int> executionContextId, int* contextId) { |
236 if (executionContextId.isJust()) { | 236 if (executionContextId.isJust()) { |
237 *contextId = executionContextId.fromJust(); | 237 *contextId = executionContextId.fromJust(); |
238 } else { | 238 } else { |
239 v8::HandleScope handles(inspector->isolate()); | 239 v8::HandleScope handles(inspector->isolate()); |
240 v8::Local<v8::Context> defaultContext = | 240 v8::Local<v8::Context> defaultContext = |
241 inspector->client()->ensureDefaultContextInGroup(contextGroupId); | 241 inspector->client()->ensureDefaultContextInGroup(contextGroupId); |
242 if (defaultContext.IsEmpty()) | 242 if (defaultContext.IsEmpty()) |
243 return Response::Error("Cannot find default execution context"); | 243 return Response::Error("Cannot find default execution context"); |
244 *contextId = V8Debugger::contextId(defaultContext); | 244 *contextId = InspectedContext::contextId(defaultContext); |
245 } | 245 } |
246 return Response::OK(); | 246 return Response::OK(); |
247 } | 247 } |
248 | 248 |
249 } // namespace | 249 } // namespace |
250 | 250 |
251 V8RuntimeAgentImpl::V8RuntimeAgentImpl( | 251 V8RuntimeAgentImpl::V8RuntimeAgentImpl( |
252 V8InspectorSessionImpl* session, protocol::FrontendChannel* FrontendChannel, | 252 V8InspectorSessionImpl* session, protocol::FrontendChannel* FrontendChannel, |
253 protocol::DictionaryValue* state) | 253 protocol::DictionaryValue* state) |
254 : m_session(session), | 254 : m_session(session), |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
730 } | 730 } |
731 | 731 |
732 bool V8RuntimeAgentImpl::reportMessage(V8ConsoleMessage* message, | 732 bool V8RuntimeAgentImpl::reportMessage(V8ConsoleMessage* message, |
733 bool generatePreview) { | 733 bool generatePreview) { |
734 message->reportToFrontend(&m_frontend, m_session, generatePreview); | 734 message->reportToFrontend(&m_frontend, m_session, generatePreview); |
735 m_frontend.flush(); | 735 m_frontend.flush(); |
736 return m_inspector->hasConsoleMessageStorage(m_session->contextGroupId()); | 736 return m_inspector->hasConsoleMessageStorage(m_session->contextGroupId()); |
737 } | 737 } |
738 | 738 |
739 } // namespace v8_inspector | 739 } // namespace v8_inspector |
OLD | NEW |