Closed Bug 1559414 Opened 6 years ago Closed 6 years ago

Make it clear that methods which won't work past Fission are process-bound

Categories

(Core :: DOM: Navigation, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla70
Fission Milestone M4
Tracking Status
firefox70 --- fixed

People

(Reporter: nika, Assigned: djvj)

References

(Blocks 1 open bug)

Details

Attachments

(3 files, 4 obsolete files)

This patch is effectively a series of find & replaces on a series of named methods on DOM objects. The goal is to make the consequences more clear.

They aren't marked as Legacy or Deprecated, as their behaviour may be wanted in certain edge cases, but it is now clear from reading them that they aren't working unconditionally.

The goal is to prevent new features being added which depend on these methods being used, without first having them consider the impact they will have on the fission project, and the eventual need to rewrite.

I'm open to bikeshedding on naming, as usual.

This patch is effectively a series of find & replaces on a series of named
methods on DOM objects. The goal is to make the consequences more clear.

They aren't marked as Legacy or Deprecated, as their behaviour may be wanted in
certain edge cases, but it is now clear from reading them that they aren't
working unconditionally.

The goal is to prevent new features being added which depend on these methods
being used, without first having them consider the impact they will have on the
fission project, and the eventual need to rewrite.

I'm open to bikeshedding on naming, as usual.

Kashav, please get more context from Nika next week to start looking into this.

Assignee: nika → kmadan
Attached patch rebase.patch (obsolete) — Splinter Review

I rebased this patch to tip and got it building on inbound tip again. A couple of places where the method uses needed to be changed. Rot since Nika posted the patch, or potentially pre-existing.

Nika, are there more methods you wanted to name-mangle the definition of and convert the uses of? Or is it worthwhile to go looking for more like the ones you've already done?

Also, I have zero interest in bikeshedding the naming for refactoring scaffolding :) *SameProcess* is fine by me.

Flags: needinfo?(nika)

Assigning to Kannan as he's started looking into this.

Assignee: kmadan → kvijayan

(In reply to Kannan Vijayan [:djvj] from comment #3)

Created attachment 9076923 [details] [diff] [review]
rebase.patch

I rebased this patch to tip and got it building on inbound tip again. A couple of places where the method uses needed to be changed. Rot since Nika posted the patch, or potentially pre-existing.

Nika, are there more methods you wanted to name-mangle the definition of and convert the uses of? Or is it worthwhile to go looking for more like the ones you've already done?

The big methods which haven't been changed yet are ones with super generic names, and the JS callers. For example:

Also, I have zero interest in bikeshedding the naming for refactoring scaffolding :) *SameProcess* is fine by me.

The pattern I was going to use was GetSameProcessTop (or root) and GetParentIfSameProcess. I can't remember how consistent I was when I made this initial patch.

Flags: needinfo?(nika)
Attachment #9072185 - Attachment is obsolete: true

Updated to tip and added SameProcess annotation for GetParent and ChildCount and GetChildAt.

So this patch isn't done yet. Try run revealed a bunch of android and probably some OSX-specific code I'd missed when getting this to compile locally. Addressing those now.

Attachment #9076923 - Attachment is obsolete: true
Attachment #9078528 - Attachment is obsolete: true
Attachment #9080003 - Attachment is obsolete: true
Pushed by kvijayan@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f2d3ccb209c5 Rename unaudited pre-fission methods with SameProcess for future audit burndown. r=nika
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Pushed by mozilla@jorgk.com: https://hg.mozilla.org/comm-central/rev/8254990cee1b Port bug 1559414 - s/GetSameTypeRootTreeItem/GetInProcessSameTypeRootTreeItem/. rs=bustage-fix

Sorry for the bother, jorg. Thanks for fixing this up in mailnews (I'm guessing this is thunderbird related). Going forward, how can I ensure I don't break out-of-tree builds?

There is another bug that will land shortly that might break things downstream (another pure rename patch): bug 1569262

Flags: needinfo?(jorgk)

Hi :-)
Thanks for getting back to me. Yes, Mailnews contains the C++ backend for Thunderbird. Some of the Mozilla developers are friends of Thunderbird since the use the software themselves. We usually get CC'ed or NI'ed on the relevant bugs, or some even file bugs in Thunderbird or Mailnews for us. In case of very simple stuff, I'm happy just to push a patch into the M-C bug, like I've done here.

You can easily check using Searchfox on comm-central:
https://searchfox.org/comm-central/source, in the case of bug 1569262 it's this:
https://searchfox.org/comm-central/search?q=GetRootTreeItem&case=true&regexp=false&path=

Flags: needinfo?(jorgk)
Fission Milestone: M4 → M6

Fixing my mistake, changed the wrong bug.

Fission Milestone: M6 → M4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: