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( | 410 m_commandLineAPI.Reset(m_context->isolate(), |
411 m_context->isolate(), | 411 V8Console::createCommandLineAPI(m_context)); |
412 m_context->inspector()->console()->createCommandLineAPI( | |
413 m_context->context())); | |
414 } | |
415 return m_commandLineAPI.Get(m_context->isolate()); | 412 return m_commandLineAPI.Get(m_context->isolate()); |
416 } | 413 } |
417 | 414 |
418 InjectedScript::Scope::Scope(V8InspectorImpl* inspector, int contextGroupId) | 415 InjectedScript::Scope::Scope(V8InspectorImpl* inspector, int contextGroupId) |
419 : m_inspector(inspector), | 416 : m_inspector(inspector), |
420 m_contextGroupId(contextGroupId), | 417 m_contextGroupId(contextGroupId), |
421 m_injectedScript(nullptr), | 418 m_injectedScript(nullptr), |
422 m_handleScope(inspector->isolate()), | 419 m_handleScope(inspector->isolate()), |
423 m_tryCatch(inspector->isolate()), | 420 m_tryCatch(inspector->isolate()), |
424 m_ignoreExceptionsAndMuteConsole(false), | 421 m_ignoreExceptionsAndMuteConsole(false), |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 Response InjectedScript::CallFrameScope::findInjectedScript( | 533 Response InjectedScript::CallFrameScope::findInjectedScript( |
537 V8InspectorSessionImpl* session) { | 534 V8InspectorSessionImpl* session) { |
538 std::unique_ptr<RemoteCallFrameId> remoteId; | 535 std::unique_ptr<RemoteCallFrameId> remoteId; |
539 Response response = RemoteCallFrameId::parse(m_remoteCallFrameId, &remoteId); | 536 Response response = RemoteCallFrameId::parse(m_remoteCallFrameId, &remoteId); |
540 if (!response.isSuccess()) return response; | 537 if (!response.isSuccess()) return response; |
541 m_frameOrdinal = static_cast<size_t>(remoteId->frameOrdinal()); | 538 m_frameOrdinal = static_cast<size_t>(remoteId->frameOrdinal()); |
542 return session->findInjectedScript(remoteId.get(), m_injectedScript); | 539 return session->findInjectedScript(remoteId.get(), m_injectedScript); |
543 } | 540 } |
544 | 541 |
545 } // namespace v8_inspector | 542 } // namespace v8_inspector |
OLD | NEW |