Skip to content

Commit

Permalink
Bug 1100069 - have nsIHandlerService::getTypeFromExtension fail grace…
Browse files Browse the repository at this point in the history
…fully and silently in xpcshell. r=bz
  • Loading branch information
mhammond committed Dec 11, 2014
1 parent 756e64c commit 3c6202d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions uriloader/exthandler/nsHandlerService.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,14 @@ HandlerService.prototype = {
var fileExtension = aFileExtension.toLowerCase();
var typeID;

// See bug 1100069 for why we want to fail gracefully and silently here.
try {
this._ds;
} catch (ex) {
Components.returnCode = Cr.NS_ERROR_NOT_AVAILABLE;
return;
}

if (this._existsLiteralTarget(NC_FILE_EXTENSIONS, fileExtension))
typeID = this._getSourceForLiteral(NC_FILE_EXTENSIONS, fileExtension);

Expand Down

0 comments on commit 3c6202d

Please sign in to comment.