[inspector] Remove obsolete v8::debug::GetDetailedStackTrace()

This method performs exactly the same operation as the official
`v8::Exception::GetStackTrace()`, which is already used in other
places, so there's no point to have a duplicate of that in the
debug interface.

Bug: chromium:1283162
Change-Id: I09dd07f678165e1565bd77173e8ce64636ef649b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3366659
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78489}
This commit is contained in:
Benedikt Meurer 2022-01-04 19:44:34 +01:00 committed by V8 LUCI CQ
parent 38d83f8193
commit c91d9eace7
3 changed files with 1 additions and 16 deletions

View File

@ -878,18 +878,6 @@ ConsoleCallArguments::ConsoleCallArguments(
args.length() > 1 ? args.address_of_first_argument() : nullptr,
args.length() - 1) {}
v8::Local<v8::StackTrace> GetDetailedStackTrace(
Isolate* v8_isolate, v8::Local<v8::Object> v8_error) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
i::Handle<i::JSReceiver> error = Utils::OpenHandle(*v8_error);
if (!error->IsJSObject()) {
return v8::Local<v8::StackTrace>();
}
i::Handle<i::FixedArray> stack_trace =
isolate->GetDetailedStackTrace(i::Handle<i::JSObject>::cast(error));
return Utils::StackTraceToLocal(stack_trace);
}
MaybeLocal<Script> GeneratorObject::Script() {
i::Handle<i::JSGeneratorObject> obj = Utils::OpenHandle(this);
i::Object maybe_script = obj->function().shared().script();

View File

@ -284,9 +284,6 @@ Local<Function> GetBuiltin(Isolate* isolate, Builtin builtin);
V8_EXPORT_PRIVATE void SetConsoleDelegate(Isolate* isolate,
ConsoleDelegate* delegate);
v8::Local<v8::StackTrace> GetDetailedStackTrace(Isolate* isolate,
v8::Local<v8::Object> error);
/**
* Native wrapper around v8::internal::JSGeneratorObject object.
*/

View File

@ -271,7 +271,7 @@ class InjectedScript::ProtocolPromiseHandler {
result->ToDetailString(isolate->GetCurrentContext())
.ToLocalChecked());
v8::Local<v8::StackTrace> stackTrace =
v8::debug::GetDetailedStackTrace(isolate, result.As<v8::Object>());
v8::Exception::GetStackTrace(result);
if (!stackTrace.IsEmpty()) {
stack = m_inspector->debugger()->createStackTrace(stackTrace);
}