зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1335807 - JavaScript Error: 'NS_NOINTERFACE: ' {file: 'resource:///modules/ContentWebRTC.jsm' line: 387}, r=felipe.
This commit is contained in:
Родитель
735050d760
Коммит
a1b5dae154
|
@ -385,12 +385,23 @@ function getInnerWindowIDForWindow(aContentWindow) {
|
|||
}
|
||||
|
||||
function getMessageManagerForWindow(aContentWindow) {
|
||||
let ir = aContentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDocShell)
|
||||
.sameTypeRootTreeItem
|
||||
.QueryInterface(Ci.nsIInterfaceRequestor);
|
||||
aContentWindow.QueryInterface(Ci.nsIInterfaceRequestor);
|
||||
|
||||
let docShell;
|
||||
try {
|
||||
// If e10s is disabled, this throws NS_NOINTERFACE for closed tabs.
|
||||
// This throws NS_NOINTERFACE for closed tabs.
|
||||
docShell = aContentWindow.getInterface(Ci.nsIDocShell);
|
||||
} catch (e) {
|
||||
if (e.result == Cr.NS_NOINTERFACE) {
|
||||
return null;
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
|
||||
let ir = docShell.sameTypeRootTreeItem
|
||||
.QueryInterface(Ci.nsIInterfaceRequestor);
|
||||
try {
|
||||
// This throws NS_NOINTERFACE for closed tabs (only with e10s enabled).
|
||||
return ir.getInterface(Ci.nsIContentFrameMessageManager);
|
||||
} catch (e) {
|
||||
if (e.result == Cr.NS_NOINTERFACE) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче