зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1609224
- Don't use PlacesUtils if it's not defined. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D60266 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
ac359bc8bf
Коммит
524c7d25e9
|
@ -22,6 +22,7 @@ loader.lazyImporter(
|
|||
"PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
);
|
||||
const { AppConstants } = require("resource://gre/modules/AppConstants.jsm");
|
||||
|
||||
/**
|
||||
* Creates a target actor proxy for handling requests to a single browser frame.
|
||||
|
@ -99,6 +100,11 @@ exports.FrameTargetActorProxy = protocol.ActorClassWithSpec(proxySpec, {
|
|||
},
|
||||
|
||||
async getFaviconData() {
|
||||
if (!AppConstants.MOZ_PLACES) {
|
||||
// PlacesUtils is not supported
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
const { data } = await PlacesUtils.promiseFaviconData(this._form.url);
|
||||
return data;
|
||||
|
|
Загрузка…
Ссылка в новой задаче