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

Unified Diff: src/wasm/wasm-debug.cc

Issue 2526783002: [base] Define CHECK comparison for signed vs. unsigned (Closed)
Patch Set: Rebase & refactor for windows Created 4 years, 1 month 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
Index: src/wasm/wasm-debug.cc
diff --git a/src/wasm/wasm-debug.cc b/src/wasm/wasm-debug.cc
index 979fad83310dda0e9062237cd45215da5cda277e..3c9ae84982eabc0d790f5a0ec9c1d5f0ab616bb9 100644
--- a/src/wasm/wasm-debug.cc
+++ b/src/wasm/wasm-debug.cc
@@ -47,12 +47,10 @@ FixedArray *GetAsmJsOffsetTables(Handle<WasmDebugInfo> debug_info,
}
// Wasm bytes must be valid and must contain asm.js offset table.
DCHECK(asm_offsets.ok());
- DCHECK_GE(static_cast<size_t>(kMaxInt), asm_offsets.val.size());
+ DCHECK_GE(kMaxInt, asm_offsets.val.size());
int num_functions = static_cast<int>(asm_offsets.val.size());
- DCHECK_EQ(
- wasm::GetNumberOfFunctions(handle(debug_info->wasm_instance())),
- static_cast<int>(num_functions +
- compiled_module->module()->num_imported_functions));
+ DCHECK_EQ(wasm::GetNumberOfFunctions(handle(debug_info->wasm_instance())),
+ num_functions + compiled_module->module()->num_imported_functions);
Handle<FixedArray> all_tables =
isolate->factory()->NewFixedArray(num_functions);
debug_info->set(kWasmDebugInfoAsmJsOffsets, *all_tables);
@@ -60,7 +58,7 @@ FixedArray *GetAsmJsOffsetTables(Handle<WasmDebugInfo> debug_info,
std::vector<std::pair<int, int>> &func_asm_offsets = asm_offsets.val[func];
if (func_asm_offsets.empty()) continue;
size_t array_size = 2 * kIntSize * func_asm_offsets.size();
- CHECK_LE(array_size, static_cast<size_t>(kMaxInt));
+ CHECK_LE(array_size, kMaxInt);
ByteArray *arr =
*isolate->factory()->NewByteArray(static_cast<int>(array_size));
all_tables->set(func, arr);
« src/base/logging.h ('K') | « src/wasm/ast-decoder.cc ('k') | src/wasm/wasm-interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698