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

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

Issue 2159633002: [DevTools] Generate public versions of protocol classes to be exposed in v8_inspector/public. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed extra files Created 4 years, 4 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/Platform.h"
8 #include "platform/inspector_protocol/String16.h" 8 #include "platform/inspector_protocol/String16.h"
9 #include "platform/v8_inspector/InjectedScript.h" 9 #include "platform/v8_inspector/InjectedScript.h"
10 #include "platform/v8_inspector/InspectedContext.h" 10 #include "platform/v8_inspector/InspectedContext.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 std::vector<v8::Local<v8::Value>> arguments(1, toV8String(m_isolate, mes sage)); 101 std::vector<v8::Local<v8::Value>> arguments(1, toV8String(m_isolate, mes sage));
102 reportCall(type, arguments); 102 reportCall(type, arguments);
103 } 103 }
104 104
105 void reportCall(ConsoleAPIType type, const std::vector<v8::Local<v8::Value>> & arguments) 105 void reportCall(ConsoleAPIType type, const std::vector<v8::Local<v8::Value>> & arguments)
106 { 106 {
107 InspectedContext* inspectedContext = ensureInspectedContext(); 107 InspectedContext* inspectedContext = ensureInspectedContext();
108 if (!inspectedContext) 108 if (!inspectedContext)
109 return; 109 return;
110 V8DebuggerImpl* debugger = inspectedContext->debugger(); 110 V8DebuggerImpl* debugger = inspectedContext->debugger();
111 std::unique_ptr<V8ConsoleMessage> message = V8ConsoleMessage::createForC onsoleAPI(debugger->client()->currentTimeMS(), type, arguments, debugger->captur eStackTrace(false), inspectedContext); 111 std::unique_ptr<V8ConsoleMessage> message = V8ConsoleMessage::createForC onsoleAPI(debugger->client()->currentTimeMS(), type, arguments, debugger->captur eStackTraceImpl(false), inspectedContext);
112 debugger->ensureConsoleMessageStorage(inspectedContext->contextGroupId() )->addMessage(std::move(message)); 112 debugger->ensureConsoleMessageStorage(inspectedContext->contextGroupId() )->addMessage(std::move(message));
113 } 113 }
114 114
115 void reportDeprecatedCall(const char* id, const String16& message) 115 void reportDeprecatedCall(const char* id, const String16& message)
116 { 116 {
117 if (checkAndSetPrivateFlagOnConsole(id, false)) 117 if (checkAndSetPrivateFlagOnConsole(id, false))
118 return; 118 return;
119 std::vector<v8::Local<v8::Value>> arguments(1, toV8String(m_isolate, mes sage)); 119 std::vector<v8::Local<v8::Value>> arguments(1, toV8String(m_isolate, mes sage));
120 reportCall(ConsoleAPIType::kWarning, arguments); 120 reportCall(ConsoleAPIType::kWarning, arguments);
121 } 121 }
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 continue; 822 continue;
823 if (name->IsString()) { 823 if (name->IsString()) {
824 v8::Local<v8::Value> descriptor; 824 v8::Local<v8::Value> descriptor;
825 bool success = m_global->GetOwnPropertyDescriptor(m_context, v8::Loc al<v8::String>::Cast(name)).ToLocal(&descriptor); 825 bool success = m_global->GetOwnPropertyDescriptor(m_context, v8::Loc al<v8::String>::Cast(name)).ToLocal(&descriptor);
826 DCHECK(success); 826 DCHECK(success);
827 } 827 }
828 } 828 }
829 } 829 }
830 830
831 } // namespace blink 831 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698