[wasm] Remove dead {WasmDebugInfo::GetScopeDetails}.

R=clemensh@chromium.org
BUG=v8:8562

Change-Id: I13e566b95785edf788de842b833cb7f5bc2b731d
Reviewed-on: https://chromium-review.googlesource.com/c/1447771
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59242}
diff --git a/src/wasm/wasm-debug.cc b/src/wasm/wasm-debug.cc
index 9f52d96..f1fac1c 100644
--- a/src/wasm/wasm-debug.cc
+++ b/src/wasm/wasm-debug.cc
@@ -477,38 +477,6 @@
     }
     return local_scope_object;
   }
-
-  Handle<JSArray> GetScopeDetails(Address frame_pointer, int frame_index,
-                                  Handle<WasmDebugInfo> debug_info) {
-    auto frame = GetInterpretedFrame(frame_pointer, frame_index);
-
-    Handle<FixedArray> global_scope =
-        isolate_->factory()->NewFixedArray(ScopeIterator::kScopeDetailsSize);
-    global_scope->set(ScopeIterator::kScopeDetailsTypeIndex,
-                      Smi::FromInt(ScopeIterator::ScopeTypeGlobal));
-    Handle<JSObject> global_scope_object =
-        GetGlobalScopeObject(frame.get(), debug_info);
-    global_scope->set(ScopeIterator::kScopeDetailsObjectIndex,
-                      *global_scope_object);
-
-    Handle<FixedArray> local_scope =
-        isolate_->factory()->NewFixedArray(ScopeIterator::kScopeDetailsSize);
-    local_scope->set(ScopeIterator::kScopeDetailsTypeIndex,
-                     Smi::FromInt(ScopeIterator::ScopeTypeLocal));
-    Handle<JSObject> local_scope_object =
-        GetLocalScopeObject(frame.get(), debug_info);
-    local_scope->set(ScopeIterator::kScopeDetailsObjectIndex,
-                     *local_scope_object);
-
-    Handle<JSArray> global_jsarr =
-        isolate_->factory()->NewJSArrayWithElements(global_scope);
-    Handle<JSArray> local_jsarr =
-        isolate_->factory()->NewJSArrayWithElements(local_scope);
-    Handle<FixedArray> all_scopes = isolate_->factory()->NewFixedArray(2);
-    all_scopes->set(0, *global_jsarr);
-    all_scopes->set(1, *local_jsarr);
-    return isolate_->factory()->NewJSArrayWithElements(all_scopes);
-  }
 };
 
 }  // namespace
@@ -668,13 +636,6 @@
 }
 
 // static
-Handle<JSObject> WasmDebugInfo::GetScopeDetails(
-    Handle<WasmDebugInfo> debug_info, Address frame_pointer, int frame_index) {
-  auto* interp_handle = GetInterpreterHandle(*debug_info);
-  return interp_handle->GetScopeDetails(frame_pointer, frame_index, debug_info);
-}
-
-// static
 Handle<JSObject> WasmDebugInfo::GetGlobalScopeObject(
     Handle<WasmDebugInfo> debug_info, Address frame_pointer, int frame_index) {
   auto* interp_handle = GetInterpreterHandle(*debug_info);
diff --git a/src/wasm/wasm-objects.h b/src/wasm/wasm-objects.h
index 95cd2c8..9112d7d 100644
--- a/src/wasm/wasm-objects.h
+++ b/src/wasm/wasm-objects.h
@@ -716,15 +716,12 @@
   uint64_t NumInterpretedCalls();
 
   // Get scope details for a specific interpreted frame.
-  // This returns a JSArray of length two: One entry for the global scope, one
-  // for the local scope. Both elements are JSArrays of size
-  // ScopeIterator::kScopeDetailsSize and layout as described in debug-scopes.h.
-  // The global scope contains information about globals and the memory.
-  // The local scope contains information about parameters, locals, and stack
-  // values.
-  static Handle<JSObject> GetScopeDetails(Handle<WasmDebugInfo>,
-                                          Address frame_pointer,
-                                          int frame_index);
+  // Both of these methods return a JSArrays (for the global scope and local
+  // scope respectively) of size {ScopeIterator::kScopeDetailsSize} and layout
+  // as described in debug-scopes.h.
+  //   - The global scope contains information about globals and the memory.
+  //   - The local scope contains information about parameters, locals, and
+  //     stack values.
   static Handle<JSObject> GetGlobalScopeObject(Handle<WasmDebugInfo>,
                                                Address frame_pointer,
                                                int frame_index);