summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/chrome/abstract_web_client.js
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2019-01-15 16:03:02 +0000
committerNicolas Lempereur <nle@odoo.com>2019-01-15 17:01:57 +0000
commit535da9e78c075a40b550b9a2ead5a743e61405cd (patch)
treecd360baa9d83805f1c9d04a800e3633dd6ff0f60 /addons/web/static/src/js/chrome/abstract_web_client.js
parentb654fabe04e92015140d780d2a9faca2419a2ff5 (diff)
[FIX] web: no ResizeObserver video error on chrome
When displaying a video, with the browser window at a certain size, or resizing it (or opening developer tools) we could the following error: "ResizeObserver loop limit exceeded" This can be reproduced in chromium just with this JS code: window.onerror = function(e){ console.log(e); }; document.body.innerHTML = '<div><video controls src="v.webm"/>'; The issue only happen if: - the video server does not support HTTP range requests - the controls are displayed on the video - browser size is in problematic size/resized to problematic size And the error is raised in window.onerror but not displayed in the developer console. With this change, we ignore these errors until fixed in chromium. chromium bug tracker: https://crbug.com/809574 opw-1928512 closes #30239
Diffstat (limited to 'addons/web/static/src/js/chrome/abstract_web_client.js')
-rw-r--r--addons/web/static/src/js/chrome/abstract_web_client.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/web/static/src/js/chrome/abstract_web_client.js b/addons/web/static/src/js/chrome/abstract_web_client.js
index 80711fd24ed..7a67d29614f 100644
--- a/addons/web/static/src/js/chrome/abstract_web_client.js
+++ b/addons/web/static/src/js/chrome/abstract_web_client.js
@@ -204,6 +204,10 @@ var AbstractWebClient = Widget.extend(ServiceProviderMixin, KeyboardNavigationMi
});
}
} else {
+ // ignore Chrome video internal error: https://crbug.com/809574
+ if (!error && message === 'ResizeObserver loop limit exceeded') {
+ return;
+ }
var traceback = error ? error.stack : '';
crash_manager.show_error({
type: _t("Odoo Client Error"),