Skip to content

Commit

Permalink
Bug 1375123 - Remove nsIDOMWindowInternal. r=Ehsan
Browse files Browse the repository at this point in the history
MozReview-Commit-ID: 2jjGFsxsLTz
  • Loading branch information
vyv03354 committed Aug 3, 2017
1 parent 2186af3 commit 09082bd
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 31 deletions.
3 changes: 1 addition & 2 deletions docshell/base/nsDocShell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -990,8 +990,7 @@ nsDocShell::GetInterface(const nsIID& aIID, void** aSink)
aIID.Equals(NS_GET_IID(nsIGlobalObject)) ||
aIID.Equals(NS_GET_IID(nsPIDOMWindowOuter)) ||
aIID.Equals(NS_GET_IID(mozIDOMWindowProxy)) ||
aIID.Equals(NS_GET_IID(nsIDOMWindow)) ||
aIID.Equals(NS_GET_IID(nsIDOMWindowInternal))) &&
aIID.Equals(NS_GET_IID(nsIDOMWindow))) &&
NS_SUCCEEDED(EnsureScriptEnvironment())) {
return mScriptGlobal->QueryInterface(aIID, aSink);
} else if (aIID.Equals(NS_GET_IID(nsIDOMDocument)) &&
Expand Down
11 changes: 0 additions & 11 deletions dom/base/nsGlobalWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,6 @@ using mozilla::dom::cache::CacheStorage;
static LazyLogModule gDOMLeakPRLog("DOMLeak");

nsGlobalWindow::WindowByIdTable *nsGlobalWindow::sWindowsById = nullptr;
bool nsGlobalWindow::sWarnedAboutWindowInternal = false;
bool nsGlobalWindow::sIdleObserversAPIFuzzTimeDisabled = false;

static int32_t gRefCnt = 0;
Expand Down Expand Up @@ -2222,16 +2221,6 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsGlobalWindow)
// Make sure this matches the cast in nsGlobalWindow::FromWrapper()
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMEventTarget)
NS_INTERFACE_MAP_ENTRY(nsIDOMWindow)
if (aIID.Equals(NS_GET_IID(nsIDOMWindowInternal))) {
foundInterface = static_cast<nsIDOMWindowInternal*>(this);
if (!sWarnedAboutWindowInternal) {
sWarnedAboutWindowInternal = true;
nsContentUtils::ReportToConsole(nsIScriptError::warningFlag,
NS_LITERAL_CSTRING("Extensions"), mDoc,
nsContentUtils::eDOM_PROPERTIES,
"nsIDOMWindowInternalWarning");
}
} else
NS_INTERFACE_MAP_ENTRY(nsIGlobalObject)
NS_INTERFACE_MAP_ENTRY(nsIScriptGlobalObject)
NS_INTERFACE_MAP_ENTRY(nsIScriptObjectPrincipal)
Expand Down
3 changes: 1 addition & 2 deletions dom/base/nsGlobalWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ class DialogValueHolder final : public nsISupports

class nsGlobalWindow : public mozilla::dom::EventTarget,
public nsPIDOMWindow<nsISupports>,
private nsIDOMWindowInternal,
private nsIDOMWindow,
public nsIScriptGlobalObject,
public nsIScriptObjectPrincipal,
public nsSupportsWeakReference,
Expand Down Expand Up @@ -2087,7 +2087,6 @@ class nsGlobalWindow : public mozilla::dom::EventTarget,
friend class IdleRequestExecutor;

static WindowByIdTable* sWindowsById;
static bool sWarnedAboutWindowInternal;
};

inline nsISupports*
Expand Down
7 changes: 0 additions & 7 deletions dom/interfaces/base/nsIDOMWindow.idl
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,3 @@ interface nsIVariant;

[scriptable, uuid(b8343993-0383-4add-9930-ad176b189240)]
interface nsIDOMWindow : nsISupports {};

/**
* Empty interface for compatibility with older versions.
* @deprecated Use nsIDOMWindow instead
*/
[scriptable, uuid(8c589e65-3237-4cd1-8bad-c5c47135e79b)]
interface nsIDOMWindowInternal : nsIDOMWindow {};
1 change: 0 additions & 1 deletion dom/locales/en-US/chrome/dom/dom.properties
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ TextContentWarning=Use of attributes’ textContent attribute is deprecated. Use
EnablePrivilegeWarning=Use of enablePrivilege is deprecated. Please use code that runs with the system principal (e.g. an extension) instead.
nsIJSONDecodeDeprecatedWarning=nsIJSON.decode is deprecated. Please use JSON.parse instead.
nsIJSONEncodeDeprecatedWarning=nsIJSON.encode is deprecated. Please use JSON.stringify instead.
nsIDOMWindowInternalWarning=Use of nsIDOMWindowInternal is deprecated. Use nsIDOMWindow instead.
FullscreenDeniedDisabled=Request for fullscreen was denied because Fullscreen API is disabled by user preference.
FullscreenDeniedFocusedPlugin=Request for fullscreen was denied because a windowed plugin is focused.
FullscreenDeniedHidden=Request for fullscreen was denied because the document is no longer visible.
Expand Down
2 changes: 1 addition & 1 deletion mobile/android/extensions/flyweb/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function Factory(component) {
let windowListener = {
onOpenWindow: function(aWindow) {
// Wait for the window to finish loading
let domWindow = aWindow.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowInternal || Ci.nsIDOMWindow);
let domWindow = aWindow.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindow);
domWindow.addEventListener("UIReady", function() {
loadIntoWindow(domWindow);
}, {once: true});
Expand Down
7 changes: 0 additions & 7 deletions xpfe/appshell/nsXULWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,6 @@ NS_IMETHODIMP nsXULWindow::GetInterface(const nsIID& aIID, void** aSink)
domWindow.forget(aSink);
return rv;
}
if (aIID.Equals(NS_GET_IID(nsIDOMWindowInternal))) {
nsCOMPtr<mozIDOMWindowProxy> window = nullptr;
rv = GetWindowDOMWindow(getter_AddRefs(window));
nsCOMPtr<nsIDOMWindowInternal> domWindowInternal = do_QueryInterface(window);
domWindowInternal.forget(aSink);
return rv;
}
if (aIID.Equals(NS_GET_IID(nsIWebBrowserChrome)) &&
NS_SUCCEEDED(EnsureContentTreeOwner()) &&
NS_SUCCEEDED(mContentTreeOwner->QueryInterface(aIID, aSink)))
Expand Down

0 comments on commit 09082bd

Please sign in to comment.