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

Side by Side Diff: src/inspector/v8-debugger-agent-impl.cc

Issue 2332163002: [inspector] fixed all shorten-64-to-32 warnings (Closed)
Patch Set: rebased Created 4 years, 2 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/v8-debugger.cc ('k') | src/inspector/v8-debugger-script.cc » ('j') | 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/v8-debugger-agent-impl.h" 5 #include "src/inspector/v8-debugger-agent-impl.h"
6 6
7 #include "src/inspector/injected-script.h" 7 #include "src/inspector/injected-script.h"
8 #include "src/inspector/inspected-context.h" 8 #include "src/inspector/inspected-context.h"
9 #include "src/inspector/java-script-call-frame.h" 9 #include "src/inspector/java-script-call-frame.h"
10 #include "src/inspector/protocol/Protocol.h" 10 #include "src/inspector/protocol/Protocol.h"
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 v8::Local<v8::Object> details = currentCallFrame->details(); 927 v8::Local<v8::Object> details = currentCallFrame->details();
928 if (hasInternalError(errorString, details.IsEmpty())) 928 if (hasInternalError(errorString, details.IsEmpty()))
929 return Array<CallFrame>::create(); 929 return Array<CallFrame>::create();
930 930
931 int contextId = currentCallFrame->contextId(); 931 int contextId = currentCallFrame->contextId();
932 InjectedScript* injectedScript = 932 InjectedScript* injectedScript =
933 contextId ? m_session->findInjectedScript(&ignored, contextId) 933 contextId ? m_session->findInjectedScript(&ignored, contextId)
934 : nullptr; 934 : nullptr;
935 935
936 String16 callFrameId = 936 String16 callFrameId =
937 RemoteCallFrameId::serialize(contextId, frameOrdinal); 937 RemoteCallFrameId::serialize(contextId, static_cast<int>(frameOrdinal));
938 if (hasInternalError( 938 if (hasInternalError(
939 errorString, 939 errorString,
940 !details 940 !details
941 ->Set(debuggerContext, 941 ->Set(debuggerContext,
942 toV8StringInternalized(m_isolate, "callFrameId"), 942 toV8StringInternalized(m_isolate, "callFrameId"),
943 toV8String(m_isolate, callFrameId)) 943 toV8String(m_isolate, callFrameId))
944 .FromMaybe(false))) 944 .FromMaybe(false)))
945 return Array<CallFrame>::create(); 945 return Array<CallFrame>::create();
946 946
947 if (injectedScript) { 947 if (injectedScript) {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 return Array<CallFrame>::create(); 999 return Array<CallFrame>::create();
1000 if (hasInternalError( 1000 if (hasInternalError(
1001 errorString, 1001 errorString,
1002 !details 1002 !details
1003 ->Delete(debuggerContext, 1003 ->Delete(debuggerContext,
1004 toV8StringInternalized(m_isolate, "returnValue")) 1004 toV8StringInternalized(m_isolate, "returnValue"))
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(
1010 !objects->Set(debuggerContext, frameOrdinal, details) 1010 errorString,
1011 .FromMaybe(false))) 1011 !objects
1012 ->Set(debuggerContext, static_cast<int>(frameOrdinal), details)
1013 .FromMaybe(false)))
1012 return Array<CallFrame>::create(); 1014 return Array<CallFrame>::create();
1013 } 1015 }
1014 1016
1015 std::unique_ptr<protocol::Value> protocolValue = 1017 std::unique_ptr<protocol::Value> protocolValue =
1016 toProtocolValue(errorString, debuggerContext, objects); 1018 toProtocolValue(errorString, debuggerContext, objects);
1017 if (!protocolValue) return Array<CallFrame>::create(); 1019 if (!protocolValue) return Array<CallFrame>::create();
1018 protocol::ErrorSupport errorSupport; 1020 protocol::ErrorSupport errorSupport;
1019 std::unique_ptr<Array<CallFrame>> callFrames = 1021 std::unique_ptr<Array<CallFrame>> callFrames =
1020 Array<CallFrame>::parse(protocolValue.get(), &errorSupport); 1022 Array<CallFrame>::parse(protocolValue.get(), &errorSupport);
1021 if (hasInternalError(errorString, !callFrames)) 1023 if (hasInternalError(errorString, !callFrames))
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
1244 1246
1245 void V8DebuggerAgentImpl::reset() { 1247 void V8DebuggerAgentImpl::reset() {
1246 if (!enabled()) return; 1248 if (!enabled()) return;
1247 m_scheduledDebuggerStep = NoStep; 1249 m_scheduledDebuggerStep = NoStep;
1248 m_scripts.clear(); 1250 m_scripts.clear();
1249 m_blackboxedPositions.clear(); 1251 m_blackboxedPositions.clear();
1250 m_breakpointIdToDebuggerBreakpointIds.clear(); 1252 m_breakpointIdToDebuggerBreakpointIds.clear();
1251 } 1253 }
1252 1254
1253 } // namespace v8_inspector 1255 } // namespace v8_inspector
OLDNEW
« no previous file with comments | « src/inspector/v8-debugger.cc ('k') | src/inspector/v8-debugger-script.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698