Closed Bug 1523062 Opened 7 years ago Closed 7 years ago

Devirtualize a few nsIPresShell bits.

Categories

(Core :: Layout, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: emilio, Assigned: emilio)

Details

Attachments

(1 file)

No description provided.
Priority: -- → P3

No good reason they're virtual, since there's only one nsIPresShell implementation.

Pushed by emilio@crisal.io: https://hg.mozilla.org/integration/autoland/rev/41d24f9197df Devirtualize a few nsIPresShell bits. r=TYLin,rhunt

Well, PresShell.h is now exposed as mozilla/PresShell.h. So, if everybody treats PresShell directly instead of nsIPresShell, we don't need to devirtualize each method since final class's override methods should be resolved at build time...

(In reply to Masayuki Nakano [:masayuki] (JST, +0900) from comment #3)

Well, PresShell.h is now exposed as mozilla/PresShell.h. So, if everybody treats PresShell directly instead of nsIPresShell, we don't need to devirtualize each method since final class's override methods should be resolved at build time...

Sure, but that's easier said than done, since most of the users return nsIPresShell (Document::GetShell and pretty much everything else).

We could do a mass-convert the other way around (move users to mozilla::PresShell) and see how it goes, then move everything from nsIPresShell to PresShell.

(In reply to Emilio Cobos Álvarez (:emilio) from comment #4)

We could do a mass-convert the other way around (move users to mozilla::PresShell) and see how it goes, then move everything from nsIPresShell to PresShell.

Yeah, I really want to do it if I had much time...

$ rg nsIPresShell | wc -l                                                                                                                                                                                       
2122

May not be that terrible actually...

Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: