make some nsGlobalWindow methods non-virtual

RESOLVED FIXED in Firefox 54

Status

()

enhancement
RESOLVED FIXED
2 years ago
4 months ago

People

(Reporter: bkelly, Assigned: bkelly)

Tracking

unspecified
mozilla54
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox54 fixed)

Details

Attachments

(1 attachment)

I noticed last night that I accidentally made some methods on nsGlobalWindow virtual in bug 1303167.  We can remove the virtual keyword here since we proxy from the nsPIDOMWindowInner via an inline method instead of using a virtual call.
This patch removes some virtual keywords that I accidentally left in when I implemented bug 1303167.  They turned out to be unnecessary.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=1fceb3a215a49cfcca3c9848e0ad9db03f5bda7a
Attachment #8842865 - Flags: review?(bugs)
Comment on attachment 8842865 [details] [diff] [review]
Remove unnecessary virtual keyword from some nsGlobalWindow methods. r=smaug

oh, the setup is a bit unusual. Parent class calling subclass' methods via casting.
Attachment #8842865 - Flags: review?(bugs) → review+
(In reply to Olli Pettay [:smaug] from comment #2)
> oh, the setup is a bit unusual. Parent class calling subclass' methods via
> casting.

Yes, but its an established pattern here.  Its the best way to expose methods on nsPIDOMWindowInner, but not on nsPIDOMWindowOuter.  Since we do the weird casting thing between nsPIDOMWindow[Inner|Outer] and nsGlobalWindow they must all have the same vtbl.
Pushed by bkelly@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8c90ca8335b1
Remove unnecessary virtual keyword from some nsGlobalWindow methods. r=smaug
https://hg.mozilla.org/mozilla-central/rev/8c90ca8335b1
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.