mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 22:07:41 +00:00
Bug 1563997: Handle webcompat Components stub in MozillaFileLogger.js. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D37938 --HG-- extra : rebase_source : dc1827f5a28dce10881d01461e7ff2a9889d1b65
This commit is contained in:
parent
dc7ff541ae
commit
df821804ae
@ -18,7 +18,14 @@ function importJSM(jsm) {
|
||||
return SpecialPowers.wrap(obj);
|
||||
}
|
||||
|
||||
let CC = (typeof Components === "object"
|
||||
// When running in release builds, we get a fake Components object in
|
||||
// web contexts, so we need to check that the Components object is sane,
|
||||
// too, not just that it exists.
|
||||
let haveComponents =
|
||||
typeof Components === "object" &&
|
||||
typeof Components.Constructor === "function";
|
||||
|
||||
let CC = (haveComponents
|
||||
? Components
|
||||
: SpecialPowers.wrap(SpecialPowers.Components)).Constructor;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user