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

Side by Side Diff: src/wasm/wasm-objects.cc

Issue 2685163006: [inspector] migrate set/remove BreakPoint to debug-interface.h (Closed)
Patch Set: added a test, ready for review Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/wasm/wasm-objects.h" 5 #include "src/wasm/wasm-objects.h"
6 #include "src/utils.h" 6 #include "src/utils.h"
7 7
8 #include "src/base/iterator.h" 8 #include "src/base/iterator.h"
9 #include "src/debug/debug-interface.h" 9 #include "src/debug/debug-interface.h"
10 #include "src/objects-inl.h" 10 #include "src/objects-inl.h"
(...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 locations->push_back(v8::debug::Location(func_idx, offset)); 1101 locations->push_back(v8::debug::Location(func_idx, offset));
1102 } 1102 }
1103 } 1103 }
1104 return true; 1104 return true;
1105 } 1105 }
1106 1106
1107 bool WasmCompiledModule::SetBreakPoint( 1107 bool WasmCompiledModule::SetBreakPoint(
1108 Handle<WasmCompiledModule> compiled_module, int* position, 1108 Handle<WasmCompiledModule> compiled_module, int* position,
1109 Handle<Object> break_point_object) { 1109 Handle<Object> break_point_object) {
1110 Isolate* isolate = compiled_module->GetIsolate(); 1110 Isolate* isolate = compiled_module->GetIsolate();
1111 1111 fprintf(stderr, "WasmCompiledModule::SetBreakpoint: %d\n", *position);
1112 // Find the function for this breakpoint. 1112 // Find the function for this breakpoint.
1113 int func_index = compiled_module->GetContainingFunction(*position); 1113 int func_index = compiled_module->GetContainingFunction(*position);
1114 if (func_index < 0) return false; 1114 if (func_index < 0) return false;
1115 WasmFunction& func = compiled_module->module()->functions[func_index]; 1115 WasmFunction& func = compiled_module->module()->functions[func_index];
1116 int offset_in_func = *position - func.code_start_offset; 1116 int offset_in_func = *position - func.code_start_offset;
1117 1117
1118 // According to the current design, we should only be called with valid 1118 // According to the current design, we should only be called with valid
1119 // breakable positions. 1119 // breakable positions.
1120 DCHECK(IsBreakablePosition(compiled_module, func_index, offset_in_func)); 1120 DCHECK(IsBreakablePosition(compiled_module, func_index, offset_in_func));
1121 1121
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
1179 !array->get(kPreviousInstanceWrapper)->IsFixedArray()) 1179 !array->get(kPreviousInstanceWrapper)->IsFixedArray())
1180 return false; 1180 return false;
1181 return true; 1181 return true;
1182 } 1182 }
1183 1183
1184 void WasmInstanceWrapper::set_instance_object(Handle<JSObject> instance, 1184 void WasmInstanceWrapper::set_instance_object(Handle<JSObject> instance,
1185 Isolate* isolate) { 1185 Isolate* isolate) {
1186 Handle<WeakCell> cell = isolate->factory()->NewWeakCell(instance); 1186 Handle<WeakCell> cell = isolate->factory()->NewWeakCell(instance);
1187 set(kWrapperInstanceObject, *cell); 1187 set(kWrapperInstanceObject, *cell);
1188 } 1188 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698