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 688 matching lines...) Loading... |
699 if (!m_enabled) return; | 699 if (!m_enabled) return; |
700 context->setReported(true); | 700 context->setReported(true); |
701 std::unique_ptr<protocol::Runtime::ExecutionContextDescription> description = | 701 std::unique_ptr<protocol::Runtime::ExecutionContextDescription> description = |
702 protocol::Runtime::ExecutionContextDescription::create() | 702 protocol::Runtime::ExecutionContextDescription::create() |
703 .setId(context->contextId()) | 703 .setId(context->contextId()) |
704 .setName(context->humanReadableName()) | 704 .setName(context->humanReadableName()) |
705 .setOrigin(context->origin()) | 705 .setOrigin(context->origin()) |
706 .build(); | 706 .build(); |
707 if (!context->auxData().isEmpty()) | 707 if (!context->auxData().isEmpty()) |
708 description->setAuxData(protocol::DictionaryValue::cast( | 708 description->setAuxData(protocol::DictionaryValue::cast( |
709 protocol::parseJSON(context->auxData()))); | 709 protocol::StringUtil::parseJSON(context->auxData()))); |
710 m_frontend.executionContextCreated(std::move(description)); | 710 m_frontend.executionContextCreated(std::move(description)); |
711 } | 711 } |
712 | 712 |
713 void V8RuntimeAgentImpl::reportExecutionContextDestroyed( | 713 void V8RuntimeAgentImpl::reportExecutionContextDestroyed( |
714 InspectedContext* context) { | 714 InspectedContext* context) { |
715 if (m_enabled && context->isReported()) { | 715 if (m_enabled && context->isReported()) { |
716 context->setReported(false); | 716 context->setReported(false); |
717 m_frontend.executionContextDestroyed(context->contextId()); | 717 m_frontend.executionContextDestroyed(context->contextId()); |
718 } | 718 } |
719 } | 719 } |
(...skipping 10 matching lines...) 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 |