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

Unified Diff: src/api.cc

Issue 2592893003: [inspector] migrate AsycEvent to tupple (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/api.h ('k') | src/debug/debug.cc » ('j') | no next file with comments »
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 1dad8c5d12f34c46b3abc89e7ba6ad0f92d29e42..663e42210fa40145741b96e84da4e4ba95b77c09 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -9178,6 +9178,31 @@ debug::WasmDisassembly debug::WasmScript::DisassembleFunction(
return compiled_module->DisassembleFunction(function_index);
}
+debug::AsyncTaskEventType debug::AsyncTaskEventData::type() const {
+ i::Handle<i::Tuple3> data = Utils::OpenHandle(this);
+ return static_cast<debug::AsyncTaskEventType>(
+ i::Smi::cast(data->value1())->value());
+}
+
+int debug::AsyncTaskEventData::id() const {
+ i::Handle<i::Tuple3> data = Utils::OpenHandle(this);
+ return i::Smi::cast(data->value2())->value();
+}
+
+MaybeLocal<String> debug::AsyncTaskEventData::name() const {
+ i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
+ i::HandleScope handle_scope(isolate);
+ i::Handle<i::Tuple3> data = Utils::OpenHandle(this);
+ i::Handle<i::Object> value(data->value3(), isolate);
+ if (!value->IsString()) return MaybeLocal<String>();
+ return Utils::ToLocal(
+ handle_scope.CloseAndEscape(i::Handle<i::String>::cast(value)));
+}
+
+debug::AsyncTaskEventData* debug::AsyncTaskEventData::Cast(Value* value) {
+ return reinterpret_cast<AsyncTaskEventData*>(value);
+}
+
debug::Location::Location(int line_number, int column_number)
: line_number_(line_number), column_number_(column_number) {
CHECK(line_number >= 0);
« no previous file with comments | « src/api.h ('k') | src/debug/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698