mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 22:05:44 +00:00
Bug 474043 - Part 2 - Don't reimplement GetProtocolHandlerInfo. r=Paolo
MozReview-Commit-ID: 2gfscH2rGGB --HG-- extra : rebase_source : 3a6e4857c7ea18a1bfb470a9b04518e9484ce696
This commit is contained in:
parent
afe040fd02
commit
8fb7a5e47d
@ -130,22 +130,7 @@ HandlerService.prototype = {
|
||||
}
|
||||
|
||||
for (let scheme of Object.keys(schemes)) {
|
||||
|
||||
// This clause is essentially a reimplementation of
|
||||
// nsIExternalProtocolHandlerService.getProtocolHandlerInfo().
|
||||
// Necessary because calling that from here would make XPConnect barf
|
||||
// when getService tried to re-enter the constructor for this
|
||||
// service.
|
||||
let osDefaultHandlerFound = {};
|
||||
let protoInfo = gExternalProtocolService.getProtocolHandlerInfoFromOS(scheme,
|
||||
osDefaultHandlerFound);
|
||||
|
||||
if (this.exists(protoInfo)) {
|
||||
this.fillHandlerInfo(protoInfo, null);
|
||||
} else {
|
||||
gExternalProtocolService.setProtocolHandlerDefaults(protoInfo,
|
||||
osDefaultHandlerFound.value);
|
||||
}
|
||||
let protoInfo = gExternalProtocolService.getProtocolHandlerInfo(scheme);
|
||||
|
||||
// cache the possible handlers to avoid extra xpconnect traversals.
|
||||
let possibleHandlers = protoInfo.possibleApplicationHandlers;
|
||||
|
Loading…
Reference in New Issue
Block a user