Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(353)

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/V8Console.cpp

Issue 2044343002: DevTools: update V8Inspector to work with the new v8_inspector API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comment addressed Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/Platform.h"
7 #include "platform/inspector_protocol/String16.h" 8 #include "platform/inspector_protocol/String16.h"
8 #include "platform/v8_inspector/InjectedScript.h" 9 #include "platform/v8_inspector/InjectedScript.h"
9 #include "platform/v8_inspector/InspectedContext.h" 10 #include "platform/v8_inspector/InspectedContext.h"
10 #include "platform/v8_inspector/V8Compat.h" 11 #include "platform/v8_inspector/V8Compat.h"
11 #include "platform/v8_inspector/V8DebuggerAgentImpl.h" 12 #include "platform/v8_inspector/V8DebuggerAgentImpl.h"
12 #include "platform/v8_inspector/V8DebuggerImpl.h" 13 #include "platform/v8_inspector/V8DebuggerImpl.h"
13 #include "platform/v8_inspector/V8InspectorSessionImpl.h" 14 #include "platform/v8_inspector/V8InspectorSessionImpl.h"
14 #include "platform/v8_inspector/V8ProfilerAgentImpl.h" 15 #include "platform/v8_inspector/V8ProfilerAgentImpl.h"
15 #include "platform/v8_inspector/V8RuntimeAgentImpl.h" 16 #include "platform/v8_inspector/V8RuntimeAgentImpl.h"
16 #include "platform/v8_inspector/V8StackTraceImpl.h" 17 #include "platform/v8_inspector/V8StackTraceImpl.h"
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 v8::Isolate* isolate = context->GetIsolate(); 708 v8::Isolate* isolate = context->GetIsolate();
708 console->SetPrivate(context, inspectedContextPrivateKey(isolate), v8::Extern al::New(isolate, nullptr)); 709 console->SetPrivate(context, inspectedContextPrivateKey(isolate), v8::Extern al::New(isolate, nullptr));
709 } 710 }
710 711
711 bool V8Debugger::isCommandLineAPIMethod(const String16& name) 712 bool V8Debugger::isCommandLineAPIMethod(const String16& name)
712 { 713 {
713 DEFINE_STATIC_LOCAL(protocol::HashSet<String16>, methods, ()); 714 DEFINE_STATIC_LOCAL(protocol::HashSet<String16>, methods, ());
714 if (methods.size() == 0) { 715 if (methods.size() == 0) {
715 const char* members[] = { "dir", "dirxml", "keys", "values", "profile", "profileEnd", "inspect", 716 const char* members[] = { "dir", "dirxml", "keys", "values", "profile", "profileEnd", "inspect",
716 "copy", "clear", "debug", "undebug", "monitor", "unmonitor", "table" }; 717 "copy", "clear", "debug", "undebug", "monitor", "unmonitor", "table" };
717 for (size_t i = 0; i < WTF_ARRAY_LENGTH(members); ++i) 718 for (size_t i = 0; i < PROTOCOL_ARRAY_LENGTH(members); ++i)
718 methods.add(members[i]); 719 methods.add(members[i]);
719 } 720 }
720 return methods.find(name) != methods.end(); 721 return methods.find(name) != methods.end();
721 } 722 }
722 723
723 bool V8Debugger::isCommandLineAPIGetter(const String16& name) 724 bool V8Debugger::isCommandLineAPIGetter(const String16& name)
724 { 725 {
725 DEFINE_STATIC_LOCAL(protocol::HashSet<String16>, getters, ()); 726 DEFINE_STATIC_LOCAL(protocol::HashSet<String16>, getters, ());
726 if (getters.size() == 0) { 727 if (getters.size() == 0) {
727 const char* members[] = { "$0", "$1", "$2", "$3", "$4", "$_" }; 728 const char* members[] = { "$0", "$1", "$2", "$3", "$4", "$_" };
728 for (size_t i = 0; i < WTF_ARRAY_LENGTH(members); ++i) 729 for (size_t i = 0; i < PROTOCOL_ARRAY_LENGTH(members); ++i)
729 getters.add(members[i]); 730 getters.add(members[i]);
730 } 731 }
731 return getters.find(name) != getters.end(); 732 return getters.find(name) != getters.end();
732 } 733 }
733 734
734 } // namespace blink 735 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698