| 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::getFunctionDetails(ErrorString* errorString, const String16
& functionId, OwnPtr<FunctionDetails>* result) | |
| 80 { | |
| 81 v8::HandleScope handles(m_isolate); | |
| 82 V8FunctionCall function(m_manager->debugger(), context(), v8Value(), "getFun
ctionDetails"); | |
| 83 function.appendArgument(functionId); | |
| 84 OwnPtr<protocol::Value> resultValue = makeCall(function); | |
| 85 protocol::ErrorSupport errors(errorString); | |
| 86 *result = FunctionDetails::parse(resultValue.get(), &errors); | |
| 87 } | |
| 88 | |
| 89 void InjectedScript::getCollectionEntries(ErrorString* errorString, const String
16& objectId, OwnPtr<Array<CollectionEntry>>* result) | 79 void InjectedScript::getCollectionEntries(ErrorString* errorString, const String
16& objectId, OwnPtr<Array<CollectionEntry>>* result) |
| 90 { | 80 { |
| 91 v8::HandleScope handles(m_isolate); | 81 v8::HandleScope handles(m_isolate); |
| 92 V8FunctionCall function(m_manager->debugger(), context(), v8Value(), "getCol
lectionEntries"); | 82 V8FunctionCall function(m_manager->debugger(), context(), v8Value(), "getCol
lectionEntries"); |
| 93 function.appendArgument(objectId); | 83 function.appendArgument(objectId); |
| 94 OwnPtr<protocol::Value> resultValue = makeCall(function); | 84 OwnPtr<protocol::Value> resultValue = makeCall(function); |
| 95 protocol::ErrorSupport errors(errorString); | 85 protocol::ErrorSupport errors(errorString); |
| 96 *result = Array<CollectionEntry>::parse(resultValue.get(), &errors); | 86 *result = Array<CollectionEntry>::parse(resultValue.get(), &errors); |
| 97 } | 87 } |
| 98 | 88 |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 return; | 419 return; |
| 430 *result = remoteObject.release(); | 420 *result = remoteObject.release(); |
| 431 if (exceptionDetails) | 421 if (exceptionDetails) |
| 432 *exceptionDetails = createExceptionDetails(tryCatch.Message()); | 422 *exceptionDetails = createExceptionDetails(tryCatch.Message()); |
| 433 if (wasThrown) | 423 if (wasThrown) |
| 434 *wasThrown = true; | 424 *wasThrown = true; |
| 435 } | 425 } |
| 436 } | 426 } |
| 437 | 427 |
| 438 } // namespace blink | 428 } // namespace blink |
| OLD | NEW |