Commit 7da44451 authored by Luca Greco's avatar Luca Greco Committed by luca.greco@alcacoop.it
Browse files

Bug 1967273 - Reject clearCacheForExtensionPrincipal when application shutdown...

Bug 1967273 - Reject clearCacheForExtensionPrincipal when application shutdown is already initiated. r=willdurand

Depends on D249652

Differential Revision: https://phabricator.services.mozilla.com/D250051
parent 9865b6fc
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -443,6 +443,14 @@ function clearCacheForExtensionPrincipal(principal, clearAll = false) {
    return Promise.reject(new Error("Unexpected non extension principal"));
  }

  if (Services.startup.shuttingDown) {
    return Promise.reject(
      new Error(
        `clearCacheForExtensionPrincipal called after shutdown was initiated`
      )
    );
  }

  // TODO(Bug 1750053): replace the two specific flags with a "clear all caches one"
  // (along with covering the other kind of cached data with tests).
  const clearDataFlags = clearAll