Bug 1353867 - Change WindowProxy type. r=bzbarsky
Add a WindowProxyHolder type and generate binding code that takes or returns it whenever the WebIDL refers to the WindowProxy type. This patch just makes the WindowProxyHolder hold a strong reference to a nsPIDOMWindowOuter. Differential Revision: https://phabricator.services.mozilla.com/D12650
This commit is contained in:
@@ -374,11 +374,14 @@ int32_t HTMLObjectElement::TabIndexDefault() {
|
||||
return IsFocusableForTabIndex() ? 0 : -1;
|
||||
}
|
||||
|
||||
nsPIDOMWindowOuter* HTMLObjectElement::GetContentWindow(
|
||||
Nullable<WindowProxyHolder> HTMLObjectElement::GetContentWindow(
|
||||
nsIPrincipal& aSubjectPrincipal) {
|
||||
nsIDocument* doc = GetContentDocument(aSubjectPrincipal);
|
||||
if (doc) {
|
||||
return doc->GetWindow();
|
||||
nsPIDOMWindowOuter* win = doc->GetWindow();
|
||||
if (win) {
|
||||
return WindowProxyHolder(win);
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user