OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 // We send exception in result for compatibility reasons, even though it's | 399 // We send exception in result for compatibility reasons, even though it's |
400 // accessible through exceptionDetails.exception. | 400 // accessible through exceptionDetails.exception. |
401 response = createExceptionDetails(tryCatch, objectGroup, generatePreview, | 401 response = createExceptionDetails(tryCatch, objectGroup, generatePreview, |
402 exceptionDetails); | 402 exceptionDetails); |
403 if (!response.isSuccess()) return response; | 403 if (!response.isSuccess()) return response; |
404 } | 404 } |
405 return Response::OK(); | 405 return Response::OK(); |
406 } | 406 } |
407 | 407 |
408 v8::Local<v8::Object> InjectedScript::commandLineAPI() { | 408 v8::Local<v8::Object> InjectedScript::commandLineAPI() { |
409 if (m_commandLineAPI.IsEmpty()) | 409 if (m_commandLineAPI.IsEmpty()) { |
410 m_commandLineAPI.Reset(m_context->isolate(), | 410 m_commandLineAPI.Reset( |
411 V8Console::createCommandLineAPI(m_context)); | 411 m_context->isolate(), |
| 412 m_context->inspector()->console()->createCommandLineAPI( |
| 413 m_context->context())); |
| 414 } |
412 return m_commandLineAPI.Get(m_context->isolate()); | 415 return m_commandLineAPI.Get(m_context->isolate()); |
413 } | 416 } |
414 | 417 |
415 InjectedScript::Scope::Scope(V8InspectorImpl* inspector, int contextGroupId) | 418 InjectedScript::Scope::Scope(V8InspectorImpl* inspector, int contextGroupId) |
416 : m_inspector(inspector), | 419 : m_inspector(inspector), |
417 m_contextGroupId(contextGroupId), | 420 m_contextGroupId(contextGroupId), |
418 m_injectedScript(nullptr), | 421 m_injectedScript(nullptr), |
419 m_handleScope(inspector->isolate()), | 422 m_handleScope(inspector->isolate()), |
420 m_tryCatch(inspector->isolate()), | 423 m_tryCatch(inspector->isolate()), |
421 m_ignoreExceptionsAndMuteConsole(false), | 424 m_ignoreExceptionsAndMuteConsole(false), |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 Response InjectedScript::CallFrameScope::findInjectedScript( | 536 Response InjectedScript::CallFrameScope::findInjectedScript( |
534 V8InspectorSessionImpl* session) { | 537 V8InspectorSessionImpl* session) { |
535 std::unique_ptr<RemoteCallFrameId> remoteId; | 538 std::unique_ptr<RemoteCallFrameId> remoteId; |
536 Response response = RemoteCallFrameId::parse(m_remoteCallFrameId, &remoteId); | 539 Response response = RemoteCallFrameId::parse(m_remoteCallFrameId, &remoteId); |
537 if (!response.isSuccess()) return response; | 540 if (!response.isSuccess()) return response; |
538 m_frameOrdinal = static_cast<size_t>(remoteId->frameOrdinal()); | 541 m_frameOrdinal = static_cast<size_t>(remoteId->frameOrdinal()); |
539 return session->findInjectedScript(remoteId.get(), m_injectedScript); | 542 return session->findInjectedScript(remoteId.get(), m_injectedScript); |
540 } | 543 } |
541 | 544 |
542 } // namespace v8_inspector | 545 } // namespace v8_inspector |
OLD | NEW |