[FIX] web: avoid monokai ace editors leaking memory in qunit suite
When attempting to instantiate an ace editor with a given theme, ace will first create the editor with the default theme (textmate) which is always loaded, and register a callback to be called after the non-default theme has been loaded. This callback holds a reference to the editor's renderer which can itself retain large objects such as an entire owl application. These callbacks are not cleared even if the corresponding editor is destroyed. Because in tests, the theme "monokai" was not included and ace cannot load it on its own, all tests that attempt to create an ace editor with that theme will leak memory. This commit fixes the issue by adding theme-monokai to the qunit suite assets. closes odoo/odoo#129813 X-original-commit: e8c77c5737c2170bb6b53d3e667aec7318dde5b8 Related: odoo/enterprise#44653 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
This commit is contained in:
@@ -596,6 +596,7 @@ This module provides the core of the Odoo Web Client.
|
||||
'web/static/lib/ace/mode-xml.js',
|
||||
'web/static/lib/ace/mode-js.js',
|
||||
'web/static/lib/ace/mode-qweb.js',
|
||||
'web/static/lib/ace/theme-monokai.js',
|
||||
'web/static/lib/nearest/jquery.nearest.js',
|
||||
'web/static/lib/stacktracejs/stacktrace.js',
|
||||
'web/static/lib/Chart/Chart.js',
|
||||
|
||||
Reference in New Issue
Block a user