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

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

Issue 2963603003: [wasm] Remove some small TODOs and small fixes. (Closed)
Patch Set: Created 3 years, 6 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
Index: src/wasm/wasm-objects.cc
diff --git a/src/wasm/wasm-objects.cc b/src/wasm/wasm-objects.cc
index d8c4a7a4d0b14d80c0167ca064f5f25b5bf95533..33744abe6316ca96441bb5b4c17901d7848eedf2 100644
--- a/src/wasm/wasm-objects.cc
+++ b/src/wasm/wasm-objects.cc
@@ -271,7 +271,7 @@ Handle<FixedArray> WasmTableObject::AddDispatchTable(
if (instance.is_null()) return dispatch_tables;
// TODO(titzer): use weak cells here to avoid leaking instances.
- // Grow the dispatch table and add a new triple at the end.
+ // Grow the dispatch table and add a new entry at the end.
Handle<FixedArray> new_dispatch_tables =
isolate->factory()->CopyFixedArrayAndGrow(dispatch_tables, 4);
@@ -360,9 +360,9 @@ Handle<JSArrayBuffer> GrowMemoryBuffer(Isolate* isolate,
// TODO(gdeepti): Change the protection here instead of allocating a new
// buffer before guard regions are turned on, see issue #5886.
- const bool enable_guard_regions =
- (old_buffer.is_null() && EnableGuardRegions()) ||
- (!old_buffer.is_null() && old_buffer->has_guard_region());
+ const bool enable_guard_regions = old_buffer.is_null()
+ ? EnableGuardRegions()
+ : old_buffer->has_guard_region();
size_t new_size =
static_cast<size_t>(old_pages + pages) * WasmModule::kPageSize;
Handle<JSArrayBuffer> new_buffer =
« src/wasm/wasm-module.h ('K') | « src/wasm/wasm-module.cc ('k') | src/wasm/wasm-opcodes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698