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

Side by Side Diff: src/api.cc

Issue 2536763002: [inspector] [wasm] Implement GetPossibleBreakpoints (Closed)
Patch Set: Rebase Created 4 years 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/api.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 8954 matching lines...) Expand 10 before | Expand all | Expand 10 after
8965 return i::Smi::cast(array->get(index))->value(); 8965 return i::Smi::cast(array->get(index))->value();
8966 } 8966 }
8967 } // namespace 8967 } // namespace
8968 8968
8969 bool DebugInterface::Script::GetPossibleBreakpoints( 8969 bool DebugInterface::Script::GetPossibleBreakpoints(
8970 const Location& start, const Location& end, 8970 const Location& start, const Location& end,
8971 std::vector<Location>* locations) const { 8971 std::vector<Location>* locations) const {
8972 CHECK(!start.IsEmpty()); 8972 CHECK(!start.IsEmpty());
8973 i::Handle<i::Script> script = Utils::OpenHandle(this); 8973 i::Handle<i::Script> script = Utils::OpenHandle(this);
8974 if (script->type() == i::Script::TYPE_WASM) { 8974 if (script->type() == i::Script::TYPE_WASM) {
8975 // TODO(clemensh): Return the proper thing once we support wasm breakpoints. 8975 i::Handle<i::WasmCompiledModule> compiled_module(
8976 return false; 8976 i::WasmCompiledModule::cast(script->wasm_compiled_module()));
8977 return compiled_module->GetPossibleBreakpoints(start, end, locations);
8977 } 8978 }
8978 8979
8979 i::Script::InitLineEnds(script); 8980 i::Script::InitLineEnds(script);
8980 CHECK(script->line_ends()->IsFixedArray()); 8981 CHECK(script->line_ends()->IsFixedArray());
8981 i::Isolate* isolate = script->GetIsolate(); 8982 i::Isolate* isolate = script->GetIsolate();
8982 i::Handle<i::FixedArray> line_ends = 8983 i::Handle<i::FixedArray> line_ends =
8983 i::Handle<i::FixedArray>::cast(i::handle(script->line_ends(), isolate)); 8984 i::Handle<i::FixedArray>::cast(i::handle(script->line_ends(), isolate));
8984 CHECK(line_ends->length()); 8985 CHECK(line_ends->length());
8985 8986
8986 int start_offset = GetSourcePosition(start); 8987 int start_offset = GetSourcePosition(start);
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
9828 Address callback_address = 9829 Address callback_address =
9829 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 9830 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
9830 VMState<EXTERNAL> state(isolate); 9831 VMState<EXTERNAL> state(isolate);
9831 ExternalCallbackScope call_scope(isolate, callback_address); 9832 ExternalCallbackScope call_scope(isolate, callback_address);
9832 callback(info); 9833 callback(info);
9833 } 9834 }
9834 9835
9835 9836
9836 } // namespace internal 9837 } // namespace internal
9837 } // namespace v8 9838 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/inspector/v8-debugger-script.h » ('j') | test/inspector/debugger/wasm-get-breakable-locations.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698