OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 if (!scope.object()->IsObject()) { | 211 if (!scope.object()->IsObject()) { |
212 *errorString = "Value with given id is not an object"; | 212 *errorString = "Value with given id is not an object"; |
213 return; | 213 return; |
214 } | 214 } |
215 | 215 |
216 v8::Local<v8::Object> object = scope.object().As<v8::Object>(); | 216 v8::Local<v8::Object> object = scope.object().As<v8::Object>(); |
217 scope.injectedScript()->getProperties(errorString, object, scope.objectGroup
Name(), ownProperties.fromMaybe(false), accessorPropertiesOnly.fromMaybe(false),
generatePreview.fromMaybe(false), result, exceptionDetails); | 217 scope.injectedScript()->getProperties(errorString, object, scope.objectGroup
Name(), ownProperties.fromMaybe(false), accessorPropertiesOnly.fromMaybe(false),
generatePreview.fromMaybe(false), result, exceptionDetails); |
218 if (!errorString->isEmpty() || exceptionDetails->isJust() || accessorPropert
iesOnly.fromMaybe(false)) | 218 if (!errorString->isEmpty() || exceptionDetails->isJust() || accessorPropert
iesOnly.fromMaybe(false)) |
219 return; | 219 return; |
220 v8::Local<v8::Array> propertiesArray; | 220 v8::Local<v8::Array> propertiesArray; |
221 if (hasInternalError(errorString, !v8::Debug::GetInternalProperties(m_debugg
er->isolate(), scope.object()).ToLocal(&propertiesArray))) | 221 if (hasInternalError(errorString, !m_debugger->internalProperties(scope.cont
ext(), scope.object()).ToLocal(&propertiesArray))) |
222 return; | 222 return; |
223 std::unique_ptr<protocol::Array<InternalPropertyDescriptor>> propertiesProto
colArray = protocol::Array<InternalPropertyDescriptor>::create(); | 223 std::unique_ptr<protocol::Array<InternalPropertyDescriptor>> propertiesProto
colArray = protocol::Array<InternalPropertyDescriptor>::create(); |
224 for (uint32_t i = 0; i < propertiesArray->Length(); i += 2) { | 224 for (uint32_t i = 0; i < propertiesArray->Length(); i += 2) { |
225 v8::Local<v8::Value> name; | 225 v8::Local<v8::Value> name; |
226 if (hasInternalError(errorString, !propertiesArray->Get(scope.context(),
i).ToLocal(&name)) || !name->IsString()) | 226 if (hasInternalError(errorString, !propertiesArray->Get(scope.context(),
i).ToLocal(&name)) || !name->IsString()) |
227 return; | 227 return; |
228 v8::Local<v8::Value> value; | 228 v8::Local<v8::Value> value; |
229 if (hasInternalError(errorString, !propertiesArray->Get(scope.context(),
i + 1).ToLocal(&value))) | 229 if (hasInternalError(errorString, !propertiesArray->Get(scope.context(),
i + 1).ToLocal(&value))) |
230 return; | 230 return; |
231 std::unique_ptr<RemoteObject> wrappedValue = scope.injectedScript()->wra
pObject(errorString, value, scope.objectGroupName()); | 231 std::unique_ptr<RemoteObject> wrappedValue = scope.injectedScript()->wra
pObject(errorString, value, scope.objectGroupName()); |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 } | 410 } |
411 } | 411 } |
412 | 412 |
413 void V8RuntimeAgentImpl::inspect(std::unique_ptr<protocol::Runtime::RemoteObject
> objectToInspect, std::unique_ptr<protocol::DictionaryValue> hints) | 413 void V8RuntimeAgentImpl::inspect(std::unique_ptr<protocol::Runtime::RemoteObject
> objectToInspect, std::unique_ptr<protocol::DictionaryValue> hints) |
414 { | 414 { |
415 if (m_enabled) | 415 if (m_enabled) |
416 m_frontend.inspectRequested(std::move(objectToInspect), std::move(hints)
); | 416 m_frontend.inspectRequested(std::move(objectToInspect), std::move(hints)
); |
417 } | 417 } |
418 | 418 |
419 } // namespace blink | 419 } // namespace blink |
OLD | NEW |