Fix host bindings

The CL https://crrev.com/c/3565361 added a method to the host bindings
stub to reset the cached stub data. This does not really work as we
explicilty check on the C++ side that the host bindings are fully
implemented.

This CL is a forward fix that moves the resetting out of the
bindings stub. The `#urlsBeingSaved` Map is not cleared, given
that its in-accessible by the outside anyway.

Roll failure: https://crrev.com/c/3564055.

R=dsv@chromium.org

Bug: None
Change-Id: I94fb41ded43540b742883b96b358f3d3b727dfac
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3563073
Commit-Queue: Simon Zünd <szuend@chromium.org>
Auto-Submit: Simon Zünd <szuend@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
diff --git a/front_end/core/host/InspectorFrontendHost.ts b/front_end/core/host/InspectorFrontendHost.ts
index d6ccc58..dd851f0 100644
--- a/front_end/core/host/InspectorFrontendHost.ts
+++ b/front_end/core/host/InspectorFrontendHost.ts
@@ -360,12 +360,6 @@
   async initialTargetId(): Promise<string|null> {
     return null;
   }
-
-  resetStubState(): void {
-    this.#urlsBeingSaved.clear();
-    this.recordedEnumeratedHistograms.splice(0);
-    this.recordedPerformanceHistograms.splice(0);
-  }
 }
 
 // @ts-ignore Global injected by devtools-compatibility.js
diff --git a/test/unittests/front_end/helpers/RealConnection.ts b/test/unittests/front_end/helpers/RealConnection.ts
index cea982f..54b3051 100644
--- a/test/unittests/front_end/helpers/RealConnection.ts
+++ b/test/unittests/front_end/helpers/RealConnection.ts
@@ -50,7 +50,7 @@
   });
 
   beforeEach(() => {
-    Host.InspectorFrontendHost.InspectorFrontendHostInstance.resetStubState();
+    resetHostBindingStubState();
   });
 
   describe(title, fn);
@@ -101,3 +101,8 @@
   }
   return executionContexts[0];
 }
+
+function resetHostBindingStubState() {
+  Host.InspectorFrontendHost.InspectorFrontendHostInstance.recordedEnumeratedHistograms.splice(0);
+  Host.InspectorFrontendHost.InspectorFrontendHostInstance.recordedPerformanceHistograms.splice(0);
+}