зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1685090 - [devtools] Print exceptions when importing functions thrown in browser toolbox tests. r=jdescottes
Without this, we were silently ignoring many errors when evaluating a piece of JS. Imported function may still work, but were missing global variables. Very misleading! Differential Revision: https://phabricator.services.mozilla.com/D100927
This commit is contained in:
Родитель
c6424c9f35
Коммит
6bd8a09aee
|
@ -155,7 +155,14 @@ async function initBrowserToolboxTask({
|
|||
}
|
||||
|
||||
async function importScript(script) {
|
||||
await consoleFront.evaluateJSAsync(script);
|
||||
const response = await consoleFront.evaluateJSAsync(script);
|
||||
if (response.hasException) {
|
||||
ok(
|
||||
false,
|
||||
"ToolboxTask.spawn exception while importing script: " +
|
||||
response.exceptionMessage
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
async function destroy() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче