OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "platform/v8_inspector/V8Console.h" | 5 #include "platform/v8_inspector/V8Console.h" |
6 | 6 |
7 #include "platform/inspector_protocol/String16.h" | 7 #include "platform/inspector_protocol/String16.h" |
8 #include "platform/v8_inspector/InjectedScript.h" | 8 #include "platform/v8_inspector/InjectedScript.h" |
9 #include "platform/v8_inspector/InspectedContext.h" | 9 #include "platform/v8_inspector/InspectedContext.h" |
10 #include "platform/v8_inspector/V8DebuggerAgentImpl.h" | 10 #include "platform/v8_inspector/V8DebuggerAgentImpl.h" |
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 return; | 578 return; |
579 ErrorString errorString; | 579 ErrorString errorString; |
580 OwnPtr<protocol::Runtime::RemoteObject> wrappedObject = injectedScript->wrap
Object(&errorString, info[0], "", false /** forceValueType */, false /** generat
ePreview */); | 580 OwnPtr<protocol::Runtime::RemoteObject> wrappedObject = injectedScript->wrap
Object(&errorString, info[0], "", false /** forceValueType */, false /** generat
ePreview */); |
581 if (!wrappedObject || !errorString.isEmpty()) | 581 if (!wrappedObject || !errorString.isEmpty()) |
582 return; | 582 return; |
583 | 583 |
584 OwnPtr<protocol::DictionaryValue> hints = protocol::DictionaryValue::create(
); | 584 OwnPtr<protocol::DictionaryValue> hints = protocol::DictionaryValue::create(
); |
585 if (copyToClipboard) | 585 if (copyToClipboard) |
586 hints->setBoolean("copyToClipboard", true); | 586 hints->setBoolean("copyToClipboard", true); |
587 if (V8InspectorSessionImpl* session = helper.currentSession()) | 587 if (V8InspectorSessionImpl* session = helper.currentSession()) |
588 session->runtimeAgentImpl()->inspect(wrappedObject.release(), hints.rele
ase()); | 588 session->runtimeAgentImpl()->inspect(std::move(wrappedObject), std::move
(hints)); |
589 } | 589 } |
590 | 590 |
591 void V8Console::inspectCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 591 void V8Console::inspectCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
592 { | 592 { |
593 inspectImpl(info, false); | 593 inspectImpl(info, false); |
594 } | 594 } |
595 | 595 |
596 void V8Console::copyCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 596 void V8Console::copyCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
597 { | 597 { |
598 inspectImpl(info, true); | 598 inspectImpl(info, true); |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 DEFINE_STATIC_LOCAL(protocol::HashSet<String16>, getters, ()); | 709 DEFINE_STATIC_LOCAL(protocol::HashSet<String16>, getters, ()); |
710 if (getters.size() == 0) { | 710 if (getters.size() == 0) { |
711 const char* members[] = { "$0", "$1", "$2", "$3", "$4", "$_" }; | 711 const char* members[] = { "$0", "$1", "$2", "$3", "$4", "$_" }; |
712 for (size_t i = 0; i < WTF_ARRAY_LENGTH(members); ++i) | 712 for (size_t i = 0; i < WTF_ARRAY_LENGTH(members); ++i) |
713 getters.add(members[i]); | 713 getters.add(members[i]); |
714 } | 714 } |
715 return getters.find(name) != getters.end(); | 715 return getters.find(name) != getters.end(); |
716 } | 716 } |
717 | 717 |
718 } // namespace blink | 718 } // namespace blink |
OLD | NEW |