Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Side by Side Diff: src/inspector/V8DebuggerAgentImpl.cpp

Issue 2345263003: [inspector] provide more usefull error message for non serializable value (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project 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 "src/inspector/V8DebuggerAgentImpl.h" 5 #include "src/inspector/V8DebuggerAgentImpl.h"
6 6
7 #include "src/inspector/InjectedScript.h" 7 #include "src/inspector/InjectedScript.h"
8 #include "src/inspector/InspectedContext.h" 8 #include "src/inspector/InspectedContext.h"
9 #include "src/inspector/JavaScriptCallFrame.h" 9 #include "src/inspector/JavaScriptCallFrame.h"
10 #include "src/inspector/RemoteObjectId.h" 10 #include "src/inspector/RemoteObjectId.h"
(...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 } 1007 }
1008 1008
1009 if (hasInternalError(errorString, 1009 if (hasInternalError(errorString,
1010 !objects->Set(debuggerContext, frameOrdinal, details) 1010 !objects->Set(debuggerContext, frameOrdinal, details)
1011 .FromMaybe(false))) 1011 .FromMaybe(false)))
1012 return Array<CallFrame>::create(); 1012 return Array<CallFrame>::create();
1013 } 1013 }
1014 1014
1015 protocol::ErrorSupport errorSupport; 1015 protocol::ErrorSupport errorSupport;
1016 std::unique_ptr<Array<CallFrame>> callFrames = Array<CallFrame>::parse( 1016 std::unique_ptr<Array<CallFrame>> callFrames = Array<CallFrame>::parse(
1017 toProtocolValue(debuggerContext, objects).get(), &errorSupport); 1017 toProtocolValue(errorString, debuggerContext, objects).get(),
dgozman 2016/09/19 17:35:06 Should check the result of toProtocolValue and ret
kozy 2016/09/20 15:34:27 Done.
1018 &errorSupport);
1018 if (hasInternalError(errorString, !callFrames)) 1019 if (hasInternalError(errorString, !callFrames))
1019 return Array<CallFrame>::create(); 1020 return Array<CallFrame>::create();
1020 return callFrames; 1021 return callFrames;
1021 } 1022 }
1022 1023
1023 std::unique_ptr<StackTrace> V8DebuggerAgentImpl::currentAsyncStackTrace() { 1024 std::unique_ptr<StackTrace> V8DebuggerAgentImpl::currentAsyncStackTrace() {
1024 if (m_pausedContext.IsEmpty()) return nullptr; 1025 if (m_pausedContext.IsEmpty()) return nullptr;
1025 V8StackTraceImpl* stackTrace = m_debugger->currentAsyncCallChain(); 1026 V8StackTraceImpl* stackTrace = m_debugger->currentAsyncCallChain();
1026 return stackTrace ? stackTrace->buildInspectorObjectForTail(m_debugger) 1027 return stackTrace ? stackTrace->buildInspectorObjectForTail(m_debugger)
1027 : nullptr; 1028 : nullptr;
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1241 1242
1242 void V8DebuggerAgentImpl::reset() { 1243 void V8DebuggerAgentImpl::reset() {
1243 if (!enabled()) return; 1244 if (!enabled()) return;
1244 m_scheduledDebuggerStep = NoStep; 1245 m_scheduledDebuggerStep = NoStep;
1245 m_scripts.clear(); 1246 m_scripts.clear();
1246 m_blackboxedPositions.clear(); 1247 m_blackboxedPositions.clear();
1247 m_breakpointIdToDebuggerBreakpointIds.clear(); 1248 m_breakpointIdToDebuggerBreakpointIds.clear();
1248 } 1249 }
1249 1250
1250 } // namespace v8_inspector 1251 } // namespace v8_inspector
OLDNEW
« src/inspector/InjectedScript.cpp ('K') | « src/inspector/StringUtil.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698