Bug 1125396 - Check to make sure messageManager exists before sending message with article data. r=jaws

--HG--
extra : rebase_source : 8ab9ef73d3aa5663c6769ada8fe08c6ba10d0e1e
extra : histedit_source : 9047108c3f642ad1d6a57046b6e181b17d46bed2
This commit is contained in:
Margaret Leibovic 2015-01-23 15:23:21 -08:00
parent f7d7c7805d
commit 4eeb97280a

View File

@ -45,7 +45,10 @@ let ReaderParent = {
case "Reader:ArticleGet":
this._getArticle(message.data.url, message.target).then((article) => {
message.target.messageManager.sendAsyncMessage("Reader:ArticleData", { article: article });
// Make sure the target browser is still alive before trying to send data back.
if (message.target.messageManager) {
message.target.messageManager.sendAsyncMessage("Reader:ArticleData", { article: article });
}
});
break;