| 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 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 void V8RuntimeAgentImpl::reportExecutionContextCreated(InspectedContext* context
) | 647 void V8RuntimeAgentImpl::reportExecutionContextCreated(InspectedContext* context
) |
| 648 { | 648 { |
| 649 if (!m_enabled) | 649 if (!m_enabled) |
| 650 return; | 650 return; |
| 651 context->setReported(true); | 651 context->setReported(true); |
| 652 std::unique_ptr<protocol::Runtime::ExecutionContextDescription> description
= protocol::Runtime::ExecutionContextDescription::create() | 652 std::unique_ptr<protocol::Runtime::ExecutionContextDescription> description
= protocol::Runtime::ExecutionContextDescription::create() |
| 653 .setId(context->contextId()) | 653 .setId(context->contextId()) |
| 654 .setName(context->humanReadableName()) | 654 .setName(context->humanReadableName()) |
| 655 .setOrigin(context->origin()).build(); | 655 .setOrigin(context->origin()).build(); |
| 656 if (!context->auxData().isEmpty()) | 656 if (!context->auxData().isEmpty()) |
| 657 description->setAuxData(protocol::DictionaryValue::cast(parseJSON(contex
t->auxData()))); | 657 description->setAuxData(protocol::DictionaryValue::cast(protocol::parseJ
SON(context->auxData()))); |
| 658 m_frontend.executionContextCreated(std::move(description)); | 658 m_frontend.executionContextCreated(std::move(description)); |
| 659 } | 659 } |
| 660 | 660 |
| 661 void V8RuntimeAgentImpl::reportExecutionContextDestroyed(InspectedContext* conte
xt) | 661 void V8RuntimeAgentImpl::reportExecutionContextDestroyed(InspectedContext* conte
xt) |
| 662 { | 662 { |
| 663 if (m_enabled && context->isReported()) { | 663 if (m_enabled && context->isReported()) { |
| 664 context->setReported(false); | 664 context->setReported(false); |
| 665 m_frontend.executionContextDestroyed(context->contextId()); | 665 m_frontend.executionContextDestroyed(context->contextId()); |
| 666 } | 666 } |
| 667 } | 667 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 678 reportMessage(message, true); | 678 reportMessage(message, true); |
| 679 } | 679 } |
| 680 | 680 |
| 681 void V8RuntimeAgentImpl::reportMessage(V8ConsoleMessage* message, bool generateP
review) | 681 void V8RuntimeAgentImpl::reportMessage(V8ConsoleMessage* message, bool generateP
review) |
| 682 { | 682 { |
| 683 message->reportToFrontend(&m_frontend, m_session, generatePreview); | 683 message->reportToFrontend(&m_frontend, m_session, generatePreview); |
| 684 m_frontend.flush(); | 684 m_frontend.flush(); |
| 685 } | 685 } |
| 686 | 686 |
| 687 } // namespace v8_inspector | 687 } // namespace v8_inspector |
| OLD | NEW |