Bug 1096850 - [e10s] Handle nsIWebProgress::DOMWindowID not being available for remote webProgress notifications r=billm

This commit is contained in:
Tim Taubert 2015-04-17 11:15:16 +02:00
parent 689636de4a
commit a89205c8e8

View File

@ -65,11 +65,20 @@ let WebProgressListener = {
_setupJSON: function setupJSON(aWebProgress, aRequest) {
if (aWebProgress) {
let domWindowID;
try {
domWindowID = aWebProgress && aWebProgress.DOMWindowID;
} catch (e) {
// If nsDocShell::Destroy has already been called, then we'll
// get NS_NOINTERFACE when trying to get the DOM window ID.
domWindowID = null;
}
aWebProgress = {
isTopLevel: aWebProgress.isTopLevel,
isLoadingDocument: aWebProgress.isLoadingDocument,
loadType: aWebProgress.loadType,
DOMWindowID: aWebProgress.DOMWindowID,
DOMWindowID: domWindowID
};
}