| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 , m_native(injectedScriptNative) | 69 , m_native(injectedScriptNative) |
| 70 , m_contextId(contextId) | 70 , m_contextId(contextId) |
| 71 { | 71 { |
| 72 m_context.SetWeak(this, &weakCallback, v8::WeakCallbackType::kParameter); | 72 m_context.SetWeak(this, &weakCallback, v8::WeakCallbackType::kParameter); |
| 73 } | 73 } |
| 74 | 74 |
| 75 InjectedScript::~InjectedScript() | 75 InjectedScript::~InjectedScript() |
| 76 { | 76 { |
| 77 } | 77 } |
| 78 | 78 |
| 79 void InjectedScript::getCollectionEntries(ErrorString* errorString, const String
16& objectId, OwnPtr<Array<CollectionEntry>>* result) | |
| 80 { | |
| 81 v8::HandleScope handles(m_isolate); | |
| 82 V8FunctionCall function(m_manager->debugger(), context(), v8Value(), "getCol
lectionEntries"); | |
| 83 function.appendArgument(objectId); | |
| 84 OwnPtr<protocol::Value> resultValue = makeCall(function); | |
| 85 protocol::ErrorSupport errors(errorString); | |
| 86 *result = Array<CollectionEntry>::parse(resultValue.get(), &errors); | |
| 87 } | |
| 88 | |
| 89 void InjectedScript::getProperties(ErrorString* errorString, const String16& obj
ectId, bool ownProperties, bool accessorPropertiesOnly, bool generatePreview, Ow
nPtr<Array<PropertyDescriptor>>* properties, Maybe<protocol::Runtime::ExceptionD
etails>* exceptionDetails) | 79 void InjectedScript::getProperties(ErrorString* errorString, const String16& obj
ectId, bool ownProperties, bool accessorPropertiesOnly, bool generatePreview, Ow
nPtr<Array<PropertyDescriptor>>* properties, Maybe<protocol::Runtime::ExceptionD
etails>* exceptionDetails) |
| 90 { | 80 { |
| 91 v8::HandleScope handles(m_isolate); | 81 v8::HandleScope handles(m_isolate); |
| 92 V8FunctionCall function(m_manager->debugger(), context(), v8Value(), "getPro
perties"); | 82 V8FunctionCall function(m_manager->debugger(), context(), v8Value(), "getPro
perties"); |
| 93 function.appendArgument(objectId); | 83 function.appendArgument(objectId); |
| 94 function.appendArgument(ownProperties); | 84 function.appendArgument(ownProperties); |
| 95 function.appendArgument(accessorPropertiesOnly); | 85 function.appendArgument(accessorPropertiesOnly); |
| 96 function.appendArgument(generatePreview); | 86 function.appendArgument(generatePreview); |
| 97 | 87 |
| 98 OwnPtr<protocol::Value> result = makeCallWithExceptionDetails(function, exce
ptionDetails); | 88 OwnPtr<protocol::Value> result = makeCallWithExceptionDetails(function, exce
ptionDetails); |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 return; | 409 return; |
| 420 *result = remoteObject.release(); | 410 *result = remoteObject.release(); |
| 421 if (exceptionDetails) | 411 if (exceptionDetails) |
| 422 *exceptionDetails = createExceptionDetails(tryCatch.Message()); | 412 *exceptionDetails = createExceptionDetails(tryCatch.Message()); |
| 423 if (wasThrown) | 413 if (wasThrown) |
| 424 *wasThrown = true; | 414 *wasThrown = true; |
| 425 } | 415 } |
| 426 } | 416 } |
| 427 | 417 |
| 428 } // namespace blink | 418 } // namespace blink |
| OLD | NEW |