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

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: 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 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 725
726 void V8DebuggerAgentImpl::evaluateOnCallFrame(ErrorString* errorString, 726 void V8DebuggerAgentImpl::evaluateOnCallFrame(ErrorString* errorString,
727 const String16& callFrameId, 727 const String16& callFrameId,
728 const String16& expression, 728 const String16& expression,
729 const Maybe<String16>& objectGroup, 729 const Maybe<String16>& objectGroup,
730 const Maybe<bool>& includeCommandLineAPI, 730 const Maybe<bool>& includeCommandLineAPI,
731 const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole, 731 const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole,
732 const Maybe<bool>& returnByValue, 732 const Maybe<bool>& returnByValue,
733 const Maybe<bool>& generatePreview, 733 const Maybe<bool>& generatePreview,
734 std::unique_ptr<RemoteObject>* result, 734 std::unique_ptr<RemoteObject>* result,
735 Maybe<bool>* wasThrown,
736 Maybe<protocol::Runtime::ExceptionDetails>* exceptionDetails) 735 Maybe<protocol::Runtime::ExceptionDetails>* exceptionDetails)
737 { 736 {
738 if (!assertPaused(errorString)) 737 if (!assertPaused(errorString))
739 return; 738 return;
740 InjectedScript::CallFrameScope scope(errorString, m_inspector, m_session->co ntextGroupId(), callFrameId); 739 InjectedScript::CallFrameScope scope(errorString, m_inspector, m_session->co ntextGroupId(), callFrameId);
741 if (!scope.initialize()) 740 if (!scope.initialize())
742 return; 741 return;
743 if (scope.frameOrdinal() >= m_pausedCallFrames.size()) { 742 if (scope.frameOrdinal() >= m_pausedCallFrames.size()) {
744 *errorString = "Could not find call frame with given id"; 743 *errorString = "Could not find call frame with given id";
745 return; 744 return;
746 } 745 }
747 746
748 if (includeCommandLineAPI.fromMaybe(false) && !scope.installCommandLineAPI() ) 747 if (includeCommandLineAPI.fromMaybe(false) && !scope.installCommandLineAPI() )
749 return; 748 return;
750 if (doNotPauseOnExceptionsAndMuteConsole.fromMaybe(false)) 749 if (doNotPauseOnExceptionsAndMuteConsole.fromMaybe(false))
751 scope.ignoreExceptionsAndMuteConsole(); 750 scope.ignoreExceptionsAndMuteConsole();
752 751
753 v8::MaybeLocal<v8::Value> maybeResultValue = m_pausedCallFrames[scope.frameO rdinal()]->evaluate(toV8String(m_isolate, expression)); 752 v8::MaybeLocal<v8::Value> maybeResultValue = m_pausedCallFrames[scope.frameO rdinal()]->evaluate(toV8String(m_isolate, expression));
754 753
755 // Re-initialize after running client's code, as it could have destroyed con text or session. 754 // Re-initialize after running client's code, as it could have destroyed con text or session.
756 if (!scope.initialize()) 755 if (!scope.initialize())
757 return; 756 return;
758 scope.injectedScript()->wrapEvaluateResult(errorString, 757 scope.injectedScript()->wrapEvaluateResult(errorString,
759 maybeResultValue, 758 maybeResultValue,
760 scope.tryCatch(), 759 scope.tryCatch(),
761 objectGroup.fromMaybe(""), 760 objectGroup.fromMaybe(""),
762 returnByValue.fromMaybe(false), 761 returnByValue.fromMaybe(false),
763 generatePreview.fromMaybe(false), 762 generatePreview.fromMaybe(false),
764 result, 763 result,
765 wasThrown,
766 exceptionDetails); 764 exceptionDetails);
767 } 765 }
768 766
769 void V8DebuggerAgentImpl::setVariableValue(ErrorString* errorString, 767 void V8DebuggerAgentImpl::setVariableValue(ErrorString* errorString,
770 int scopeNumber, 768 int scopeNumber,
771 const String16& variableName, 769 const String16& variableName,
772 std::unique_ptr<protocol::Runtime::CallArgument> newValueArgument, 770 std::unique_ptr<protocol::Runtime::CallArgument> newValueArgument,
773 const String16& callFrameId) 771 const String16& callFrameId)
774 { 772 {
775 if (!checkEnabled(errorString)) 773 if (!checkEnabled(errorString))
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 { 1193 {
1196 if (!enabled()) 1194 if (!enabled())
1197 return; 1195 return;
1198 m_scheduledDebuggerStep = NoStep; 1196 m_scheduledDebuggerStep = NoStep;
1199 m_scripts.clear(); 1197 m_scripts.clear();
1200 m_blackboxedPositions.clear(); 1198 m_blackboxedPositions.clear();
1201 m_breakpointIdToDebuggerBreakpointIds.clear(); 1199 m_breakpointIdToDebuggerBreakpointIds.clear();
1202 } 1200 }
1203 1201
1204 } // namespace blink 1202 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698