code review #2014: gracefully deal with importing from a pre-1.9.12 module

This commit is contained in:
gorhill 2016-09-28 08:43:40 -04:00
parent 56176c8eb7
commit d721b83e21
1 changed files with 8 additions and 1 deletions

View File

@ -34,7 +34,14 @@
null
);
processObserver.start();
// https://developer.mozilla.org/en-US/Firefox/Multiprocess_Firefox/Message_Manager/Frame_script_loading_and_lifetime#Unloading_frame_scripts
// There is no way to unload a frame script, so when the extension will
// update, it may happen `processObserver` is not available because of
// trying to import from an older module version.
// TODO: remove the test once everybody is updated to 1.9.10+.
if ( processObserver ) {
processObserver.start();
}
})();
/******************************************************************************/