Closed
Bug 1377490
Opened 8 years ago
Closed 8 years ago
Make nsWindow final to allow the compiler to devirtualize some calls
Categories
(Core :: Widget: Win32, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)
References
(Blocks 1 open bug)
Details
(Keywords: perf)
Attachments
(1 file)
5.81 KB,
patch
|
jimm
:
review+
|
Details | Diff | Splinter Review |
My first attempt didn't quite work out:
https://hg.mozilla.org/try/rev/635d506cdeb8aff7f21d8a7c93dfc23c889b2d02
It seems like it should be an idempotent change, but apparently not:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=ed958cccbc7f110e2fbb49c79f2b09d7b8d4b20d
I'll try adding a bool:1 on nsWindow to indicate the special
"ChidlWindow" behavior for WindowStyle() instead...
Assignee | ||
Comment 1•8 years ago
|
||
This should be an idempotent change. I think we could get rid of
the mIsChildWindow flag if the 'mWindowType' values used for
nsWindow vs ChildWindow are disjoint, but I'll leave that for
a follow-up bug (if you think it's possible).
There were a few M(c3) failures, but after a few more runs it
looks like they were just noise.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=bc1d738fd463c618db9d542a9676e70a329a45be
Attachment #8882718 -
Flags: review?(jmathies)
Comment 2•8 years ago
|
||
Comment on attachment 8882718 [details] [diff] [review]
Make nsWindow 'final' to possibly devirtualize some calls
Review of attachment 8882718 [details] [diff] [review]:
-----------------------------------------------------------------
::: widget/windows/nsWindow.h
@@ +77,5 @@
> typedef mozilla::widget::MSGResult MSGResult;
> typedef mozilla::widget::IMEContext IMEContext;
>
> public:
> + nsWindow(bool aIsChildWindow = false);
You should probably add "explicit" here. I don't think we want a bool to be able to implicitly convertible to a nsWindow.
We should have been checking this on Linux and probably also macOS builds, but that check may not be available with MSVC.
Assignee | ||
Comment 3•8 years ago
|
||
(In reply to Xidorn Quan [:xidorn] UTC+10 from comment #2)
> You should probably add "explicit" here. I don't think we want a bool to be
> able to implicitly convertible to a nsWindow.
Heh, yeah, I forgot. Thanks, I'll add it.
> We should have been checking this on Linux and probably also macOS builds,
> but that check may not be available with MSVC.
I'm doing similar changes for gtk in bug 1377486 and cocoa in bug 1377591.
![]() |
||
Updated•8 years ago
|
Attachment #8882718 -
Flags: review?(jmathies) → review+
Pushed by mpalmgren@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8b0cc21a82b3
Make nsWindow 'final' to possibly devirtualize some calls. r=jimm
Comment 5•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Updated•4 years ago
|
Performance Impact: --- → ?
Whiteboard: [qf]
You need to log in
before you can comment on or make changes to this bug.
Description
•