| 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 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 createBoundFunctionProperty(context, commandLineAPI, "unmonitor", V8Console:
:unmonitorFunctionCallback); | 674 createBoundFunctionProperty(context, commandLineAPI, "unmonitor", V8Console:
:unmonitorFunctionCallback); |
| 675 createBoundFunctionProperty(context, commandLineAPI, "inspect", V8Console::i
nspectCallback); | 675 createBoundFunctionProperty(context, commandLineAPI, "inspect", V8Console::i
nspectCallback); |
| 676 createBoundFunctionProperty(context, commandLineAPI, "copy", V8Console::copy
Callback); | 676 createBoundFunctionProperty(context, commandLineAPI, "copy", V8Console::copy
Callback); |
| 677 createBoundFunctionProperty(context, commandLineAPI, "$_", V8Console::lastEv
aluationResultCallback); | 677 createBoundFunctionProperty(context, commandLineAPI, "$_", V8Console::lastEv
aluationResultCallback); |
| 678 createBoundFunctionProperty(context, commandLineAPI, "$0", V8Console::inspec
tedObject0); | 678 createBoundFunctionProperty(context, commandLineAPI, "$0", V8Console::inspec
tedObject0); |
| 679 createBoundFunctionProperty(context, commandLineAPI, "$1", V8Console::inspec
tedObject1); | 679 createBoundFunctionProperty(context, commandLineAPI, "$1", V8Console::inspec
tedObject1); |
| 680 createBoundFunctionProperty(context, commandLineAPI, "$2", V8Console::inspec
tedObject2); | 680 createBoundFunctionProperty(context, commandLineAPI, "$2", V8Console::inspec
tedObject2); |
| 681 createBoundFunctionProperty(context, commandLineAPI, "$3", V8Console::inspec
tedObject3); | 681 createBoundFunctionProperty(context, commandLineAPI, "$3", V8Console::inspec
tedObject3); |
| 682 createBoundFunctionProperty(context, commandLineAPI, "$4", V8Console::inspec
tedObject4); | 682 createBoundFunctionProperty(context, commandLineAPI, "$4", V8Console::inspec
tedObject4); |
| 683 | 683 |
| 684 inspectedContext->debugger()->client()->installAdditionalCommandLineAPI(cont
ext, commandLineAPI); |
| 685 |
| 684 commandLineAPI->SetPrivate(context, inspectedContextPrivateKey(isolate), v8:
:External::New(isolate, inspectedContext)); | 686 commandLineAPI->SetPrivate(context, inspectedContextPrivateKey(isolate), v8:
:External::New(isolate, inspectedContext)); |
| 685 return commandLineAPI; | 687 return commandLineAPI; |
| 686 } | 688 } |
| 687 | 689 |
| 688 void V8Console::clearInspectedContextIfNeeded(v8::Local<v8::Context> context, v8
::Local<v8::Object> console) | 690 void V8Console::clearInspectedContextIfNeeded(v8::Local<v8::Context> context, v8
::Local<v8::Object> console) |
| 689 { | 691 { |
| 690 v8::Isolate* isolate = context->GetIsolate(); | 692 v8::Isolate* isolate = context->GetIsolate(); |
| 691 console->SetPrivate(context, inspectedContextPrivateKey(isolate), v8::Extern
al::New(isolate, nullptr)); | 693 console->SetPrivate(context, inspectedContextPrivateKey(isolate), v8::Extern
al::New(isolate, nullptr)); |
| 692 } | 694 } |
| 693 | 695 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 709 DEFINE_STATIC_LOCAL(protocol::HashSet<String16>, getters, ()); | 711 DEFINE_STATIC_LOCAL(protocol::HashSet<String16>, getters, ()); |
| 710 if (getters.size() == 0) { | 712 if (getters.size() == 0) { |
| 711 const char* members[] = { "$0", "$1", "$2", "$3", "$4", "$_" }; | 713 const char* members[] = { "$0", "$1", "$2", "$3", "$4", "$_" }; |
| 712 for (size_t i = 0; i < WTF_ARRAY_LENGTH(members); ++i) | 714 for (size_t i = 0; i < WTF_ARRAY_LENGTH(members); ++i) |
| 713 getters.add(members[i]); | 715 getters.add(members[i]); |
| 714 } | 716 } |
| 715 return getters.find(name) != getters.end(); | 717 return getters.find(name) != getters.end(); |
| 716 } | 718 } |
| 717 | 719 |
| 718 } // namespace blink | 720 } // namespace blink |
| OLD | NEW |