diff --git a/browser/base/content/content.js b/browser/base/content/content.js index 25f8c25199a5..b6699a474849 100644 --- a/browser/base/content/content.js +++ b/browser/base/content/content.js @@ -99,7 +99,7 @@ var handleContentContextMenu = function (event) { Services.obs.notifyObservers(subject, "content-contextmenu", null); let doc = event.target.ownerDocument; - let docLocation = doc.location.href; + let docLocation = doc.location ? doc.location.href : undefined; let charSet = doc.characterSet; let baseURI = doc.baseURI; let referrer = doc.referrer; @@ -1264,4 +1264,4 @@ var PageInfoListener = { return text.replace(endRE, ""); } }; -PageInfoListener.init(); \ No newline at end of file +PageInfoListener.init();