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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.cpp

Issue 2234983002: [DevTools] Removed wasThrown from evaluate-like protocol methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: a Created 4 years, 4 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 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/Parser.h" 7 #include "platform/inspector_protocol/Parser.h"
8 #include "platform/inspector_protocol/String16.h" 8 #include "platform/inspector_protocol/String16.h"
9 #include "platform/inspector_protocol/Values.h" 9 #include "platform/inspector_protocol/Values.h"
10 #include "platform/v8_inspector/InjectedScript.h" 10 #include "platform/v8_inspector/InjectedScript.h"
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 711
712 void V8DebuggerAgentImpl::evaluateOnCallFrame(ErrorString* errorString, 712 void V8DebuggerAgentImpl::evaluateOnCallFrame(ErrorString* errorString,
713 const String16& callFrameId, 713 const String16& callFrameId,
714 const String16& expression, 714 const String16& expression,
715 const Maybe<String16>& objectGroup, 715 const Maybe<String16>& objectGroup,
716 const Maybe<bool>& includeCommandLineAPI, 716 const Maybe<bool>& includeCommandLineAPI,
717 const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole, 717 const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole,
718 const Maybe<bool>& returnByValue, 718 const Maybe<bool>& returnByValue,
719 const Maybe<bool>& generatePreview, 719 const Maybe<bool>& generatePreview,
720 std::unique_ptr<RemoteObject>* result, 720 std::unique_ptr<RemoteObject>* result,
721 Maybe<bool>* wasThrown,
722 Maybe<protocol::Runtime::ExceptionDetails>* exceptionDetails) 721 Maybe<protocol::Runtime::ExceptionDetails>* exceptionDetails)
723 { 722 {
724 if (!assertPaused(errorString)) 723 if (!assertPaused(errorString))
725 return; 724 return;
726 InjectedScript::CallFrameScope scope(errorString, m_inspector, m_session->co ntextGroupId(), callFrameId); 725 InjectedScript::CallFrameScope scope(errorString, m_inspector, m_session->co ntextGroupId(), callFrameId);
727 if (!scope.initialize()) 726 if (!scope.initialize())
728 return; 727 return;
729 if (scope.frameOrdinal() >= m_pausedCallFrames.size()) { 728 if (scope.frameOrdinal() >= m_pausedCallFrames.size()) {
730 *errorString = "Could not find call frame with given id"; 729 *errorString = "Could not find call frame with given id";
731 return; 730 return;
732 } 731 }
733 732
734 if (includeCommandLineAPI.fromMaybe(false) && !scope.installCommandLineAPI() ) 733 if (includeCommandLineAPI.fromMaybe(false) && !scope.installCommandLineAPI() )
735 return; 734 return;
736 if (doNotPauseOnExceptionsAndMuteConsole.fromMaybe(false)) 735 if (doNotPauseOnExceptionsAndMuteConsole.fromMaybe(false))
737 scope.ignoreExceptionsAndMuteConsole(); 736 scope.ignoreExceptionsAndMuteConsole();
738 737
739 v8::MaybeLocal<v8::Value> maybeResultValue = m_pausedCallFrames[scope.frameO rdinal()]->evaluate(toV8String(m_isolate, expression)); 738 v8::MaybeLocal<v8::Value> maybeResultValue = m_pausedCallFrames[scope.frameO rdinal()]->evaluate(toV8String(m_isolate, expression));
740 739
741 // Re-initialize after running client's code, as it could have destroyed con text or session. 740 // Re-initialize after running client's code, as it could have destroyed con text or session.
742 if (!scope.initialize()) 741 if (!scope.initialize())
743 return; 742 return;
744 scope.injectedScript()->wrapEvaluateResult(errorString, 743 scope.injectedScript()->wrapEvaluateResult(errorString,
745 maybeResultValue, 744 maybeResultValue,
746 scope.tryCatch(), 745 scope.tryCatch(),
747 objectGroup.fromMaybe(""), 746 objectGroup.fromMaybe(""),
748 returnByValue.fromMaybe(false), 747 returnByValue.fromMaybe(false),
749 generatePreview.fromMaybe(false), 748 generatePreview.fromMaybe(false),
750 result, 749 result,
751 wasThrown,
752 exceptionDetails); 750 exceptionDetails);
753 } 751 }
754 752
755 void V8DebuggerAgentImpl::setVariableValue(ErrorString* errorString, 753 void V8DebuggerAgentImpl::setVariableValue(ErrorString* errorString,
756 int scopeNumber, 754 int scopeNumber,
757 const String16& variableName, 755 const String16& variableName,
758 std::unique_ptr<protocol::Runtime::CallArgument> newValueArgument, 756 std::unique_ptr<protocol::Runtime::CallArgument> newValueArgument,
759 const String16& callFrameId) 757 const String16& callFrameId)
760 { 758 {
761 if (!checkEnabled(errorString)) 759 if (!checkEnabled(errorString))
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
1181 { 1179 {
1182 if (!enabled()) 1180 if (!enabled())
1183 return; 1181 return;
1184 m_scheduledDebuggerStep = NoStep; 1182 m_scheduledDebuggerStep = NoStep;
1185 m_scripts.clear(); 1183 m_scripts.clear();
1186 m_blackboxedPositions.clear(); 1184 m_blackboxedPositions.clear();
1187 m_breakpointIdToDebuggerBreakpointIds.clear(); 1185 m_breakpointIdToDebuggerBreakpointIds.clear();
1188 } 1186 }
1189 1187
1190 } // namespace blink 1188 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698