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

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

Issue 1927703003: [DevTools] Remove bind from CommandLineAPI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-injected-script-host
Patch Set: Created 4 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/V8InjectedScriptHost.h" 5 #include "platform/v8_inspector/V8InjectedScriptHost.h"
6 6
7 #include "platform/inspector_protocol/String16.h" 7 #include "platform/inspector_protocol/String16.h"
8 #include "platform/v8_inspector/InjectedScriptNative.h" 8 #include "platform/v8_inspector/InjectedScriptNative.h"
9 #include "platform/v8_inspector/V8Compat.h" 9 #include "platform/v8_inspector/V8Compat.h"
10 #include "platform/v8_inspector/V8DebuggerImpl.h" 10 #include "platform/v8_inspector/V8DebuggerImpl.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 return result; 165 return result;
166 } 166 }
167 167
168 void V8InjectedScriptHost::getEventListenersCallback(const v8::FunctionCallbackI nfo<v8::Value>& info) 168 void V8InjectedScriptHost::getEventListenersCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
169 { 169 {
170 if (info.Length() < 1) 170 if (info.Length() < 1)
171 return; 171 return;
172 172
173 V8DebuggerClient* client = unwrapDebugger(info)->client(); 173 V8DebuggerClient* client = unwrapDebugger(info)->client();
174 V8EventListenerInfoList listenerInfo; 174 V8EventListenerInfoList listenerInfo;
175 // eventListeners call can produce message on ErrorEvent during lazy event l istener compilation.
176 client->muteWarningsAndDeprecations();
175 client->eventListeners(info[0], listenerInfo); 177 client->eventListeners(info[0], listenerInfo);
178 client->unmuteWarningsAndDeprecations();
176 179
177 v8::Local<v8::Object> result = v8::Object::New(info.GetIsolate()); 180 v8::Local<v8::Object> result = v8::Object::New(info.GetIsolate());
178 protocol::HashSet<String16> types; 181 protocol::HashSet<String16> types;
179 for (auto& info : listenerInfo) 182 for (auto& info : listenerInfo)
180 types.add(info.eventType); 183 types.add(info.eventType);
181 for (const auto& it : types) { 184 for (const auto& it : types) {
182 v8::Local<v8::Array> listeners = wrapListenerFunctions(info.GetIsolate() , listenerInfo, it.first); 185 v8::Local<v8::Array> listeners = wrapListenerFunctions(info.GetIsolate() , listenerInfo, it.first);
183 if (!listeners->Length()) 186 if (!listeners->Length())
184 continue; 187 continue;
185 result->Set(toV8String(info.GetIsolate(), it.first), listeners); 188 result->Set(toV8String(info.GetIsolate(), it.first), listeners);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 { 258 {
256 return v8::Private::ForApi(isolate, toV8StringInternalized(isolate, "V8Debug ger#scopeExtension")); 259 return v8::Private::ForApi(isolate, toV8StringInternalized(isolate, "V8Debug ger#scopeExtension"));
257 } 260 }
258 261
259 bool V8Debugger::isRemoteObjectAPIMethod(const String16& name) 262 bool V8Debugger::isRemoteObjectAPIMethod(const String16& name)
260 { 263 {
261 return name == "bindRemoteObject"; 264 return name == "bindRemoteObject";
262 } 265 }
263 266
264 } // namespace blink 267 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698