From 7bb58cc689d1b675ce225ff8e5bd2f8b95728109 Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Fri, 23 Aug 2024 05:27:45 +0000 Subject: [PATCH] Bug 1914380 - broken search, TypeError: can't access property name, engine is null in SearchModeSwitcher.sys.mjs. r=Standard8 a=graft Differential Revision: https://phabricator.services.mozilla.com/D219879 UltraBlame original commit: 4db772ac6fb4857ac32d5f6c14da0c3282cee956 --- .../components/search/SearchSettings.sys.mjs | 5 +++ .../test_settings_migrate_id_format.js | 37 +++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/toolkit/components/search/SearchSettings.sys.mjs b/toolkit/components/search/SearchSettings.sys.mjs index 3716af5e7be84..38131db51d703 100644 --- a/toolkit/components/search/SearchSettings.sys.mjs +++ b/toolkit/components/search/SearchSettings.sys.mjs @@ -1596,6 +1596,11 @@ if engine . _isAppProvided +& +& +engine +. +id ) { let diff --git a/toolkit/components/search/tests/xpcshell/test_settings_migrate_id_format.js b/toolkit/components/search/tests/xpcshell/test_settings_migrate_id_format.js index 2500b9530b08f..f82feddd15900 100644 --- a/toolkit/components/search/tests/xpcshell/test_settings_migrate_id_format.js +++ b/toolkit/components/search/tests/xpcshell/test_settings_migrate_id_format.js @@ -138,6 +138,43 @@ order 1 } } +/ +/ +It +is +possible +for +inactive +engines +to +not +have +an +id +even +if +the +/ +/ +settings +version +is +over +6 +see +bug +1914380 +. +{ +_name +: +" +engine3 +" +_isAppProvided +: +true +} ] } ;