Bug 1377486 - Make nsWindow 'final' to possibly devirtualize some calls. r=tn

MozReview-Commit-ID: GrcIukJYmt6
This commit is contained in:
Mats Palmgren 2017-07-01 19:59:21 +02:00
parent 57cdb660f1
commit 15925cc551
5 changed files with 4 additions and 17 deletions

View File

@ -41,7 +41,7 @@ namespace mozilla {
} // namespace ipc
}
class nsWindow : public nsBaseWidget
class nsWindow final : public nsBaseWidget
{
private:
virtual ~nsWindow();

View File

@ -66,7 +66,6 @@ using namespace mozilla::widget;
static NS_DEFINE_CID(kXULFilePickerCID, XULFILEPICKER_CID);
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindow)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsChildWindow)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsTransferable)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBidiKeyboard)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLFormatConverter)
@ -230,7 +229,7 @@ NS_DEFINE_NAMED_CID(NS_GFXINFO_CID);
static const mozilla::Module::CIDEntry kWidgetCIDs[] = {
{ &kNS_WINDOW_CID, false, nullptr, nsWindowConstructor },
{ &kNS_CHILD_CID, false, nullptr, nsChildWindowConstructor },
{ &kNS_CHILD_CID, false, nullptr, nsWindowConstructor },
{ &kNS_APPSHELL_CID, false, nullptr, nsAppShellConstructor, Module::ALLOW_IN_GPU_PROCESS },
{ &kNS_COLORPICKER_CID, false, nullptr, nsColorPickerConstructor, Module::MAIN_PROCESS_ONLY },
{ &kNS_FILEPICKER_CID, false, nullptr, nsFilePickerConstructor, Module::MAIN_PROCESS_ONLY },

View File

@ -6192,12 +6192,6 @@ nsWindow::DispatchRestoreEventAccessible(void)
#endif /* #ifdef ACCESSIBILITY */
// nsChildWindow class
nsChildWindow::nsChildWindow() = default;
nsChildWindow::~nsChildWindow() = default;
void
nsWindow::SetInputContext(const InputContext& aContext,
const InputContextAction& aAction)

View File

@ -68,7 +68,7 @@ class TimeStamp;
class CurrentX11TimeGetter;
}
class nsWindow : public nsBaseWidget
class nsWindow final : public nsBaseWidget
{
public:
typedef mozilla::gfx::DrawTarget DrawTarget;
@ -567,10 +567,4 @@ private:
mozilla::UniquePtr<mozilla::CurrentX11TimeGetter> mCurrentTimeGetter;
};
class nsChildWindow : public nsWindow {
public:
nsChildWindow();
~nsChildWindow();
};
#endif /* __nsWindow_h__ */

View File

@ -15,7 +15,7 @@
@class UIView;
@class ChildView;
class nsWindow :
class nsWindow final :
public nsBaseWidget
{
typedef nsBaseWidget Inherited;