Bug 1217517 - nullcheck consumers for gKeywordURIFixup, r=jaws
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Fri, 23 Oct 2015 11:03:27 +0100
changeset 304487 1bc27334b6ee6cf9003364d7ffd6147e9704267c
parent 304486 1bce0debbdcd0200cbc00207ffdc7885a912df6e
child 304488 ccb7bb578fb15e0fe344b0e9a3b3628faed8bedc
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1217517
milestone44.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1217517 - nullcheck consumers for gKeywordURIFixup, r=jaws
browser/base/content/tab-content.js
--- a/browser/base/content/tab-content.js
+++ b/browser/base/content/tab-content.js
@@ -534,16 +534,19 @@ PageStyleHandler.init();
 var trHandler = null;
 if (Services.prefs.getBoolPref("browser.translation.detectLanguage")) {
   Cu.import("resource:///modules/translation/TranslationContentHandler.jsm");
   trHandler = new TranslationContentHandler(global, docShell);
 }
 
 function gKeywordURIFixup(fixupInfo) {
   fixupInfo.QueryInterface(Ci.nsIURIFixupInfo);
+  if (!fixupInfo.consumer) {
+    return;
+  }
 
   // Ignore info from other docshells
   let parent = fixupInfo.consumer.QueryInterface(Ci.nsIDocShellTreeItem).sameTypeRootTreeItem;
   if (parent != docShell)
     return;
 
   let data = {};
   for (let f of Object.keys(fixupInfo)) {