browser(firefox): stop video recording if page closed (#3040)

This commit is contained in:
Yury Semikhatsky 2020-07-20 10:44:11 -07:00 committed by GitHub
parent 377404448c
commit d1f937d651
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -1,2 +1,2 @@
1131 1132
Changed: yurys@chromium.org Fri Jul 17 17:30:24 PDT 2020 Changed: yurys@chromium.org Mon Jul 20 10:26:17 PDT 2020

View File

@ -137,6 +137,8 @@ class PageHandler {
dispose() { dispose() {
this._contentPage.dispose(); this._contentPage.dispose();
helper.removeListeners(this._eventListeners); helper.removeListeners(this._eventListeners);
if (this._videoSessionId !== -1)
this.stopVideoRecording().catch(e => dump(`stopVideoRecording failed:\n${e}\n`));
} }
async setViewportSize({viewportSize}) { async setViewportSize({viewportSize}) {