Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/V8DebuggerAgentImpl.h" | 5 #include "platform/v8_inspector/V8DebuggerAgentImpl.h" |
| 6 | 6 |
| 7 #include "platform/inspector_protocol/String16.h" | 7 #include "platform/inspector_protocol/String16.h" |
| 8 #include "platform/inspector_protocol/Values.h" | 8 #include "platform/inspector_protocol/Values.h" |
| 9 #include "platform/v8_inspector/IgnoreExceptionsScope.h" | 9 #include "platform/v8_inspector/IgnoreExceptionsScope.h" |
| 10 #include "platform/v8_inspector/InjectedScript.h" | 10 #include "platform/v8_inspector/InjectedScript.h" |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 699 return; | 699 return; |
| 700 InjectedScript* injectedScript = m_injectedScriptManager->findInjectedScript (errorString, remoteId.get()); | 700 InjectedScript* injectedScript = m_injectedScriptManager->findInjectedScript (errorString, remoteId.get()); |
| 701 if (!injectedScript) | 701 if (!injectedScript) |
| 702 return; | 702 return; |
| 703 | 703 |
| 704 v8::HandleScope scope(m_isolate); | 704 v8::HandleScope scope(m_isolate); |
| 705 v8::Local<v8::Context> context = injectedScript->context(); | 705 v8::Local<v8::Context> context = injectedScript->context(); |
| 706 v8::Context::Scope contextScope(context); | 706 v8::Context::Scope contextScope(context); |
| 707 | 707 |
| 708 v8::Local<v8::Object> object; | 708 v8::Local<v8::Object> object; |
| 709 v8::Local<v8::Value> value = injectedScript->findObject(*remoteId); | 709 v8::Local<v8::Value> value; |
| 710 if (value.IsEmpty() || !value->IsObject() || !value->ToObject(context).ToLoc al(&object)) { | 710 if (!injectedScript->findObject(errorString, *remoteId, &value)) |
| 711 *errorString = "Could not find object with given id"; | 711 return; |
| 712 if (!value->IsObject() || !value->ToObject(context).ToLocal(&object)) { | |
| 713 *errorString = "Could not find object with type Object and given id"; | |
|
dgozman
2016/03/18 20:52:21
Improve this error string.
kozy
2016/03/18 22:53:16
Done.
| |
| 712 return; | 714 return; |
| 713 } | 715 } |
| 714 | 716 |
| 715 v8::Local<v8::Object> detailsObject; | 717 v8::Local<v8::Object> detailsObject; |
| 716 v8::Local<v8::Value> detailsValue = debugger().generatorObjectDetails(object ); | 718 v8::Local<v8::Value> detailsValue = debugger().generatorObjectDetails(object ); |
| 717 if (!detailsValue->IsObject() || !detailsValue->ToObject(context).ToLocal(&d etailsObject)) { | 719 if (!detailsValue->IsObject() || !detailsValue->ToObject(context).ToLocal(&d etailsObject)) { |
| 718 *errorString = "Internal error"; | 720 *errorString = "Internal error"; |
| 719 return; | 721 return; |
| 720 } | 722 } |
| 721 | 723 |
| (...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1572 m_scripts.clear(); | 1574 m_scripts.clear(); |
| 1573 m_blackboxedPositions.clear(); | 1575 m_blackboxedPositions.clear(); |
| 1574 m_breakpointIdToDebuggerBreakpointIds.clear(); | 1576 m_breakpointIdToDebuggerBreakpointIds.clear(); |
| 1575 resetAsyncCallTracker(); | 1577 resetAsyncCallTracker(); |
| 1576 m_promiseTracker->clear(); | 1578 m_promiseTracker->clear(); |
| 1577 if (m_frontend) | 1579 if (m_frontend) |
| 1578 m_frontend->globalObjectCleared(); | 1580 m_frontend->globalObjectCleared(); |
| 1579 } | 1581 } |
| 1580 | 1582 |
| 1581 } // namespace blink | 1583 } // namespace blink |
| OLD | NEW |