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

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

Issue 2352263003: Revert of [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
« no previous file with comments | « src/inspector/StringUtil.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 994 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 .FromMaybe(false))) 1005 .FromMaybe(false)))
1006 return Array<CallFrame>::create(); 1006 return Array<CallFrame>::create();
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 std::unique_ptr<protocol::Value> protocolValue =
1016 toProtocolValue(errorString, debuggerContext, objects);
1017 if (!protocolValue) return Array<CallFrame>::create();
1018 protocol::ErrorSupport errorSupport; 1015 protocol::ErrorSupport errorSupport;
1019 std::unique_ptr<Array<CallFrame>> callFrames = 1016 std::unique_ptr<Array<CallFrame>> callFrames = Array<CallFrame>::parse(
1020 Array<CallFrame>::parse(protocolValue.get(), &errorSupport); 1017 toProtocolValue(debuggerContext, objects).get(), &errorSupport);
1021 if (hasInternalError(errorString, !callFrames)) 1018 if (hasInternalError(errorString, !callFrames))
1022 return Array<CallFrame>::create(); 1019 return Array<CallFrame>::create();
1023 return callFrames; 1020 return callFrames;
1024 } 1021 }
1025 1022
1026 std::unique_ptr<StackTrace> V8DebuggerAgentImpl::currentAsyncStackTrace() { 1023 std::unique_ptr<StackTrace> V8DebuggerAgentImpl::currentAsyncStackTrace() {
1027 if (m_pausedContext.IsEmpty()) return nullptr; 1024 if (m_pausedContext.IsEmpty()) return nullptr;
1028 V8StackTraceImpl* stackTrace = m_debugger->currentAsyncCallChain(); 1025 V8StackTraceImpl* stackTrace = m_debugger->currentAsyncCallChain();
1029 return stackTrace ? stackTrace->buildInspectorObjectForTail(m_debugger) 1026 return stackTrace ? stackTrace->buildInspectorObjectForTail(m_debugger)
1030 : nullptr; 1027 : nullptr;
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1244 1241
1245 void V8DebuggerAgentImpl::reset() { 1242 void V8DebuggerAgentImpl::reset() {
1246 if (!enabled()) return; 1243 if (!enabled()) return;
1247 m_scheduledDebuggerStep = NoStep; 1244 m_scheduledDebuggerStep = NoStep;
1248 m_scripts.clear(); 1245 m_scripts.clear();
1249 m_blackboxedPositions.clear(); 1246 m_blackboxedPositions.clear();
1250 m_breakpointIdToDebuggerBreakpointIds.clear(); 1247 m_breakpointIdToDebuggerBreakpointIds.clear();
1251 } 1248 }
1252 1249
1253 } // namespace v8_inspector 1250 } // namespace v8_inspector
OLDNEW
« no previous file with comments | « src/inspector/StringUtil.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698