Bug 874900 - Add a null-check in BrowserElementChild's observe() function. r=ehsan

This fixes benign JS exceptions thrown here.
This commit is contained in:
Justin Lebar 2013-07-23 08:17:02 -07:00
parent fc522869fc
commit 2c7d68e8fb

View File

@ -264,8 +264,9 @@ BrowserElementChild.prototype = {
},
observe: function(subject, topic, data) {
// Ignore notifications not about our document.
if (subject != content.document)
// Ignore notifications not about our document. (Note that |content| /can/
// be null; see bug 874900.)
if (!content || subject != content.document)
return;
switch (topic) {
case 'fullscreen-origin-change':