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

Unified Diff: src/api.cc

Issue 2851853002: [inspector] entered into context before getPossibleBreakpoints call (Closed)
Patch Set: Created 3 years, 8 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 | src/debug/debug-interface.h » ('j') | src/inspector/v8-debugger-agent-impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 02cfe3b18cd4f4f6ee0f66ed24209adacaad3458..de5447de2aef5b419f0ca55d89955fbadb47fe36 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -9497,6 +9497,15 @@ int debug::WasmScript::NumImportedFunctions() const {
return static_cast<int>(compiled_module->module()->num_imported_functions);
}
+Maybe<int> debug::WasmScript::ContextId() const {
+ i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
+ i::HandleScope handle_scope(isolate);
+ i::Handle<i::Script> script = Utils::OpenHandle(this);
+ i::Object* value = script->context_data();
+ if (value->IsSmi()) return Just(i::Smi::cast(value)->value());
+ return Nothing<int>();
+}
+
std::pair<int, int> debug::WasmScript::GetFunctionRange(
int function_index) const {
i::DisallowHeapAllocation no_gc;
« no previous file with comments | « no previous file | src/debug/debug-interface.h » ('j') | src/inspector/v8-debugger-agent-impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698