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

Unified Diff: src/api.cc

Issue 2626283002: [inspector] introduced debug::SetCompileEventListener (Closed)
Patch Set: addressed comments 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 | src/debug/debug.h » ('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 0418c08ff6c24aa02d74e7326c2c26989dc829c0..04da864e4b21ca8a484d1665ec9a5a7de708ebd4 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -9234,26 +9234,6 @@ int debug::Script::GetSourcePosition(const debug::Location& location) const {
return std::min(prev_line_offset + column + 1, line_offset);
}
-MaybeLocal<debug::Script> debug::Script::Wrap(v8::Isolate* v8_isolate,
- v8::Local<v8::Object> script) {
- i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
- ENTER_V8(isolate);
- i::HandleScope handle_scope(isolate);
- i::Handle<i::JSReceiver> script_receiver(Utils::OpenHandle(*script));
- if (!script_receiver->IsJSValue()) return MaybeLocal<Script>();
- i::Handle<i::Object> script_value(
- i::Handle<i::JSValue>::cast(script_receiver)->value(), isolate);
- if (!script_value->IsScript()) {
- return MaybeLocal<Script>();
- }
- i::Handle<i::Script> script_obj = i::Handle<i::Script>::cast(script_value);
- if (script_obj->type() != i::Script::TYPE_NORMAL &&
- script_obj->type() != i::Script::TYPE_WASM) {
- return MaybeLocal<Script>();
- }
- return ToApiHandle<debug::Script>(handle_scope.CloseAndEscape(script_obj));
-}
-
debug::WasmScript* debug::WasmScript::Cast(debug::Script* script) {
CHECK(script->IsWasm());
return static_cast<WasmScript*>(script);
@@ -9359,6 +9339,14 @@ void debug::SetAsyncTaskListener(Isolate* v8_isolate,
isolate->debug()->SetAsyncTaskListener(listener, data);
}
+void debug::SetCompileEventListener(Isolate* v8_isolate,
+ debug::CompileEventListener listener,
+ void* data) {
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
+ ENTER_V8(isolate);
+ isolate->debug()->SetCompileEventListener(listener, data);
+}
+
Local<String> CpuProfileNode::GetFunctionName() const {
const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
i::Isolate* isolate = node->isolate();
« no previous file with comments | « no previous file | src/debug/debug.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698