OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007-2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2007-2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 ScriptDebugServer& debugServer = host->scriptDebugServer(); | 293 ScriptDebugServer& debugServer = host->scriptDebugServer(); |
294 v8SetReturnValue(info, debugServer.collectionEntries(object)); | 294 v8SetReturnValue(info, debugServer.collectionEntries(object)); |
295 } | 295 } |
296 | 296 |
297 void V8InjectedScriptHost::getInternalPropertiesMethodCustom(const v8::FunctionC
allbackInfo<v8::Value>& info) | 297 void V8InjectedScriptHost::getInternalPropertiesMethodCustom(const v8::FunctionC
allbackInfo<v8::Value>& info) |
298 { | 298 { |
299 if (info.Length() < 1 || !info[0]->IsObject()) | 299 if (info.Length() < 1 || !info[0]->IsObject()) |
300 return; | 300 return; |
301 | 301 |
302 v8::Local<v8::Object> object = v8::Local<v8::Object>::Cast(info[0]); | 302 v8::Local<v8::Object> object = v8::Local<v8::Object>::Cast(info[0]); |
303 | 303 v8::MaybeLocal<v8::Array> properties = v8::Debug::GetInternalProperties(info
.GetIsolate(), object); |
304 InjectedScriptHost* host = V8InjectedScriptHost::toImpl(info.Holder()); | 304 v8SetReturnValue(info, properties); |
305 ScriptDebugServer& debugServer = host->scriptDebugServer(); | |
306 v8SetReturnValue(info, debugServer.getInternalProperties(object)); | |
307 } | 305 } |
308 | 306 |
309 static v8::Local<v8::Array> getJSListenerFunctions(v8::Isolate* isolate, Executi
onContext* executionContext, const EventListenerInfo& listenerInfo) | 307 static v8::Local<v8::Array> getJSListenerFunctions(v8::Isolate* isolate, Executi
onContext* executionContext, const EventListenerInfo& listenerInfo) |
310 { | 308 { |
311 v8::Local<v8::Array> result = v8::Array::New(isolate); | 309 v8::Local<v8::Array> result = v8::Array::New(isolate); |
312 size_t handlersCount = listenerInfo.eventListenerVector.size(); | 310 size_t handlersCount = listenerInfo.eventListenerVector.size(); |
313 for (size_t i = 0, outputIndex = 0; i < handlersCount; ++i) { | 311 for (size_t i = 0, outputIndex = 0; i < handlersCount; ++i) { |
314 RefPtr<EventListener> listener = listenerInfo.eventListenerVector[i].lis
tener; | 312 RefPtr<EventListener> listener = listenerInfo.eventListenerVector[i].lis
tener; |
315 if (listener->type() != EventListener::JSEventListenerType) { | 313 if (listener->type() != EventListener::JSEventListenerType) { |
316 ASSERT_NOT_REACHED(); | 314 ASSERT_NOT_REACHED(); |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 InjectedScriptNative* injectedScriptNative = InjectedScriptNative::fromInjec
tedScriptHost(info.Holder()); | 609 InjectedScriptNative* injectedScriptNative = InjectedScriptNative::fromInjec
tedScriptHost(info.Holder()); |
612 if (!injectedScriptNative) | 610 if (!injectedScriptNative) |
613 return; | 611 return; |
614 int id = info[0].As<v8::Int32>()->Value(); | 612 int id = info[0].As<v8::Int32>()->Value(); |
615 String groupName = injectedScriptNative->groupName(id); | 613 String groupName = injectedScriptNative->groupName(id); |
616 if (!groupName.isEmpty()) | 614 if (!groupName.isEmpty()) |
617 info.GetReturnValue().Set(v8String(info.GetIsolate(), groupName)); | 615 info.GetReturnValue().Set(v8String(info.GetIsolate(), groupName)); |
618 } | 616 } |
619 | 617 |
620 } // namespace blink | 618 } // namespace blink |
OLD | NEW |