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 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 } | 642 } |
643 } | 643 } |
644 | 644 |
645 void V8RuntimeAgentImpl::reportExecutionContextCreated(InspectedContext* context
) | 645 void V8RuntimeAgentImpl::reportExecutionContextCreated(InspectedContext* context
) |
646 { | 646 { |
647 if (!m_enabled) | 647 if (!m_enabled) |
648 return; | 648 return; |
649 context->setReported(true); | 649 context->setReported(true); |
650 std::unique_ptr<protocol::Runtime::ExecutionContextDescription> description
= protocol::Runtime::ExecutionContextDescription::create() | 650 std::unique_ptr<protocol::Runtime::ExecutionContextDescription> description
= protocol::Runtime::ExecutionContextDescription::create() |
651 .setId(context->contextId()) | 651 .setId(context->contextId()) |
652 .setIsDefault(context->isDefault()) | |
653 .setName(context->humanReadableName()) | 652 .setName(context->humanReadableName()) |
654 .setOrigin(context->origin()) | 653 .setOrigin(context->origin()).build(); |
655 .setFrameId(context->frameId()).build(); | 654 if (!context->auxData().isEmpty()) |
| 655 description->setAuxData(protocol::SerializedValue::create(context->auxDa
ta())); |
656 m_frontend.executionContextCreated(std::move(description)); | 656 m_frontend.executionContextCreated(std::move(description)); |
657 } | 657 } |
658 | 658 |
659 void V8RuntimeAgentImpl::reportExecutionContextDestroyed(InspectedContext* conte
xt) | 659 void V8RuntimeAgentImpl::reportExecutionContextDestroyed(InspectedContext* conte
xt) |
660 { | 660 { |
661 if (m_enabled && context->isReported()) { | 661 if (m_enabled && context->isReported()) { |
662 context->setReported(false); | 662 context->setReported(false); |
663 m_frontend.executionContextDestroyed(context->contextId()); | 663 m_frontend.executionContextDestroyed(context->contextId()); |
664 } | 664 } |
665 } | 665 } |
(...skipping 10 matching lines...) Expand all Loading... |
676 reportMessage(message, true); | 676 reportMessage(message, true); |
677 } | 677 } |
678 | 678 |
679 void V8RuntimeAgentImpl::reportMessage(V8ConsoleMessage* message, bool generateP
review) | 679 void V8RuntimeAgentImpl::reportMessage(V8ConsoleMessage* message, bool generateP
review) |
680 { | 680 { |
681 message->reportToFrontend(&m_frontend, m_session, generatePreview); | 681 message->reportToFrontend(&m_frontend, m_session, generatePreview); |
682 m_frontend.flush(); | 682 m_frontend.flush(); |
683 } | 683 } |
684 | 684 |
685 } // namespace blink | 685 } // namespace blink |
OLD | NEW |