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

Unified Diff: src/inspector/V8StackTraceImpl.cpp

Issue 2339173004: Revert of [inspector] fixed all shorten-64-to-32 warnings (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/inspector/V8RuntimeAgentImpl.cpp ('k') | src/inspector/V8ValueCopier.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/V8StackTraceImpl.cpp
diff --git a/src/inspector/V8StackTraceImpl.cpp b/src/inspector/V8StackTraceImpl.cpp
index 2d6c39ac52bfad95ee06ec1d7fea268ec50a80a4..25a0e7caf7892fd68b21cc0a37fa66cd5eee186f 100644
--- a/src/inspector/V8StackTraceImpl.cpp
+++ b/src/inspector/V8StackTraceImpl.cpp
@@ -11,8 +11,6 @@
#include "include/v8-debug.h"
#include "include/v8-profiler.h"
#include "include/v8-version.h"
-
-#include <limits>
namespace v8_inspector {
@@ -47,8 +45,7 @@
size_t maxStackSize, v8::Isolate* isolate) {
DCHECK(isolate->InContext());
int frameCount = stackTrace->GetFrameCount();
- if (frameCount > static_cast<int>(maxStackSize))
- frameCount = static_cast<int>(maxStackSize);
+ if (frameCount > static_cast<int>(maxStackSize)) frameCount = maxStackSize;
for (int i = 0; i < frameCount; i++) {
v8::Local<v8::StackFrame> stackFrame = stackTrace->GetFrame(i);
frames.push_back(toFrame(stackFrame));
@@ -162,9 +159,8 @@
v8::Local<v8::StackTrace> stackTrace;
if (isolate->InContext()) {
isolate->GetCpuProfiler()->CollectSample();
- DCHECK(maxStackSize <= std::numeric_limits<int>::max());
- stackTrace = v8::StackTrace::CurrentStackTrace(
- isolate, static_cast<int>(maxStackSize), stackTraceOptions);
+ stackTrace = v8::StackTrace::CurrentStackTrace(isolate, maxStackSize,
+ stackTraceOptions);
}
return V8StackTraceImpl::create(debugger, contextGroupId, stackTrace,
maxStackSize, description);
« no previous file with comments | « src/inspector/V8RuntimeAgentImpl.cpp ('k') | src/inspector/V8ValueCopier.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698