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

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

Issue 2629883002: [wasm] Add tests for breakpoints (Closed)
Patch Set: Remove test for argument passing Created 3 years, 11 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 | « no previous file | test/cctest/wasm/test-wasm-breakpoints.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-debug.cc
diff --git a/src/wasm/wasm-debug.cc b/src/wasm/wasm-debug.cc
index fe135dd1eca63b9266be0e47f43ee3ee5fbdeb83..a62db20aec41a3bfa87599081db8ffb40c2fde46 100644
--- a/src/wasm/wasm-debug.cc
+++ b/src/wasm/wasm-debug.cc
@@ -38,16 +38,15 @@ class InterpreterHandle {
: instance_(debug_info->wasm_instance()->compiled_module()->module()),
interpreter_(GetBytesEnv(&instance_, debug_info), &allocator_),
isolate_(isolate) {
- Handle<JSArrayBuffer> mem_buffer =
- handle(debug_info->wasm_instance()->memory_buffer(), isolate);
- if (mem_buffer->IsUndefined(isolate)) {
- DCHECK_EQ(0, instance_.module->min_mem_pages);
- instance_.mem_start = nullptr;
- instance_.mem_size = 0;
- } else {
+ if (debug_info->wasm_instance()->has_memory_buffer()) {
+ JSArrayBuffer* mem_buffer = debug_info->wasm_instance()->memory_buffer();
instance_.mem_start =
reinterpret_cast<byte*>(mem_buffer->backing_store());
CHECK(mem_buffer->byte_length()->ToUint32(&instance_.mem_size));
+ } else {
+ DCHECK_EQ(0, instance_.module->min_mem_pages);
+ instance_.mem_start = nullptr;
+ instance_.mem_size = 0;
}
}
« no previous file with comments | « no previous file | test/cctest/wasm/test-wasm-breakpoints.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698