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

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

Issue 2629883002: [wasm] Add tests for breakpoints (Closed)
Patch Set: Fix bug in wasm-debug.cc 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') | test/cctest/wasm/test-wasm-breakpoints.cc » ('J')
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 bb9bb07c06e418855c9abe983b29c6e24d0332b3..3b372e042ba1ba9ca8d223e604637439ff850c3e 100644
--- a/src/wasm/wasm-debug.cc
+++ b/src/wasm/wasm-debug.cc
@@ -34,16 +34,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());
titzer 2017/01/16 13:55:27 byte* instead of byte * (I guess clang-format is
Clemens Hammacher 2017/01/16 18:51:30 Fixed with http://crrev.com/2635003002 and http://
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') | test/cctest/wasm/test-wasm-breakpoints.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698