Skip to content

Commit a275e72

Browse files
committedJul 16, 2020
Bug 1653214 - Part 2: Remove nsIBaseWindow::Create; r=nika
Differential Revision: https://phabricator.services.mozilla.com/D83767
1 parent 3e6487a commit a275e72

File tree

7 files changed

+2
-48
lines changed

7 files changed

+2
-48
lines changed
 

‎docshell/base/nsDocShell.cpp

-7
Original file line numberDiff line numberDiff line change
@@ -4111,13 +4111,6 @@ nsDocShell::InitWindow(nativeWindow aParentNativeWindow,
41114111
return NS_OK;
41124112
}
41134113

4114-
NS_IMETHODIMP
4115-
nsDocShell::Create() {
4116-
// Implementations have been moved to nsDocShell::Initialize
4117-
MOZ_DIAGNOSTIC_ASSERT(false);
4118-
return NS_ERROR_NULL_POINTER;
4119-
}
4120-
41214114
NS_IMETHODIMP
41224115
nsDocShell::Destroy() {
41234116
// XXX: We allow this function to be called just once. If you are going to

‎docshell/base/nsDocShellTreeOwner.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -440,9 +440,6 @@ nsDocShellTreeOwner::InitWindow(nativeWindow aParentNativeWindow,
440440
return NS_ERROR_NULL_POINTER;
441441
}
442442

443-
NS_IMETHODIMP
444-
nsDocShellTreeOwner::Create() { return NS_ERROR_NULL_POINTER; }
445-
446443
NS_IMETHODIMP
447444
nsDocShellTreeOwner::Destroy() {
448445
nsCOMPtr<nsIWebBrowserChrome> webBrowserChrome = GetWebBrowserChrome();

‎toolkit/components/browser/nsWebBrowser.cpp

-8
Original file line numberDiff line numberDiff line change
@@ -850,14 +850,6 @@ nsWebBrowser::InitWindow(nativeWindow aParentNativeWindow,
850850
return NS_ERROR_NULL_POINTER;
851851
}
852852

853-
NS_IMETHODIMP
854-
nsWebBrowser::Create() {
855-
// nsIBaseWindow::InitWindow and nsIBaseWindow::Create
856-
// implementations have been merged into nsWebBrowser::Create
857-
MOZ_DIAGNOSTIC_ASSERT(false);
858-
return NS_ERROR_NULL_POINTER;
859-
}
860-
861853
NS_IMETHODIMP
862854
nsWebBrowser::Destroy() {
863855
InternalDestroy();

‎widget/nsIBaseWindow.idl

+2-14
Original file line numberDiff line numberDiff line change
@@ -52,27 +52,15 @@ interface nsIBaseWindow : nsISupports
5252
@param cy - This is the height for the window to be.
5353
5454
@return NS_OK - Window Init succeeded without a problem.
55-
NS_ERROR_UNEXPECTED - Call was unexpected at this time. Most likely
56-
due to you calling it after create() has been called.
55+
NS_ERROR_UNEXPECTED - Call was unexpected at this time. Perhaps
56+
initWindow() had already been called.
5757
NS_ERROR_INVALID_ARG - controls that require either a parentNativeWindow
5858
or a parentWidget may return invalid arg when they do not
5959
receive what they are needing.
6060
*/
6161
[noscript]void initWindow(in nativeWindow parentNativeWindow,
6262
in nsIWidget parentWidget, in long x, in long y, in long cx, in long cy);
6363

64-
/*
65-
Tells the window that intialization and setup is complete. When this is
66-
called the window can actually create itself based on the setup
67-
information handed to it.
68-
69-
@return NS_OK - Creation was successfull.
70-
NS_ERROR_UNEXPECTED - This call was unexpected at this time.
71-
Perhaps create() had already been called or not all
72-
required initialization had been done.
73-
*/
74-
void create();
75-
7664
/*
7765
Tell the window that it should destroy itself. This call should not be
7866
necessary as it will happen implictly when final release occurs on the

‎xpfe/appshell/AppWindow.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -526,12 +526,6 @@ NS_IMETHODIMP AppWindow::InitWindow(nativeWindow aParentNativeWindow,
526526
return NS_OK;
527527
}
528528

529-
NS_IMETHODIMP AppWindow::Create() {
530-
// XXX First Check In
531-
NS_ASSERTION(false, "Not Yet Implemented");
532-
return NS_OK;
533-
}
534-
535529
NS_IMETHODIMP AppWindow::Destroy() {
536530
nsCOMPtr<nsIAppWindow> kungFuDeathGrip(this);
537531

‎xpfe/appshell/nsChromeTreeOwner.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,6 @@ NS_IMETHODIMP nsChromeTreeOwner::InitWindow(nativeWindow aParentNativeWindow,
250250
return NS_OK;
251251
}
252252

253-
NS_IMETHODIMP nsChromeTreeOwner::Create() {
254-
NS_ASSERTION(false, "You can't call this");
255-
return NS_ERROR_UNEXPECTED;
256-
}
257-
258253
NS_IMETHODIMP nsChromeTreeOwner::Destroy() {
259254
NS_ENSURE_STATE(mAppWindow);
260255
return mAppWindow->Destroy();

‎xpfe/appshell/nsContentTreeOwner.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -461,11 +461,6 @@ NS_IMETHODIMP nsContentTreeOwner::InitWindow(nativeWindow aParentNativeWindow,
461461
return NS_OK;
462462
}
463463

464-
NS_IMETHODIMP nsContentTreeOwner::Create() {
465-
NS_ASSERTION(false, "You can't call this");
466-
return NS_ERROR_UNEXPECTED;
467-
}
468-
469464
NS_IMETHODIMP nsContentTreeOwner::Destroy() {
470465
NS_ENSURE_STATE(mAppWindow);
471466
return mAppWindow->Destroy();

0 commit comments

Comments
 (0)
Failed to load comments.