Closed Bug 1419144 Opened 7 years ago Closed 7 years ago

Remove some functions / classes from nsGlobalWindow.cpp

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: nika, Assigned: nika)

References

Details

Attachments

(20 files, 2 obsolete files)

4.58 KB, patch
smaug
: review+
Details | Diff | Splinter Review
2.69 KB, patch
farre
: review+
Details | Diff | Splinter Review
4.59 KB, patch
smaug
: review+
Details | Diff | Splinter Review
2.71 KB, patch
farre
: review+
Details | Diff | Splinter Review
4.43 KB, patch
smaug
: review+
Details | Diff | Splinter Review
2.24 KB, patch
smaug
: review+
Details | Diff | Splinter Review
12.83 KB, patch
smaug
: review+
Details | Diff | Splinter Review
5.70 KB, patch
smaug
: review+
Details | Diff | Splinter Review
12.07 KB, patch
smaug
: review+
Details | Diff | Splinter Review
2.49 KB, patch
smaug
: review+
Details | Diff | Splinter Review
918 bytes, patch
smaug
: review+
Details | Diff | Splinter Review
1.71 KB, patch
smaug
: review+
Details | Diff | Splinter Review
1.96 KB, patch
smaug
: review+
Details | Diff | Splinter Review
3.76 KB, patch
smaug
: review+
Details | Diff | Splinter Review
12.38 KB, patch
smaug
: review+
Details | Diff | Splinter Review
10.34 KB, patch
smaug
: review+
Details | Diff | Splinter Review
1.82 KB, patch
smaug
: review+
Details | Diff | Splinter Review
2.08 KB, patch
mccr8
: review+
Details | Diff | Splinter Review
12.96 KB, patch
smaug
: review+
Details | Diff | Splinter Review
2.12 KB, patch
Details | Diff | Splinter Review
I'm going to be doing a few passes of cleanup on the code relating to nsGlobalWindow and nsPIDOMWindow. These are probably going to occur as a large number of small patches split across a few bugs whenever I feel like I've accumulated enough of them.

This patch set is focused on removing some of the functions/classes from nsGlobalWindow.cpp.
MozReview-Commit-ID: GGMJC6HuCLa
Attachment #8930225 - Flags: review?(afarre)
MozReview-Commit-ID: 1yftLoS3eo2
Attachment #8930226 - Flags: review?(bugs)
MozReview-Commit-ID: KxJgYeOQPyH
Attachment #8930227 - Flags: review?(afarre)
MozReview-Commit-ID: LRhNfAdljYJ
Attachment #8930229 - Flags: review?(bugs)
MozReview-Commit-ID: HZDX84ktgiy
Attachment #8930230 - Flags: review?(bugs)
MozReview-Commit-ID: 8vi1mAzmQUU
Attachment #8930231 - Flags: review?(bugs)
MozReview-Commit-ID: 9KwK7GyXZN3
Attachment #8930232 - Flags: review?(bugs)
MozReview-Commit-ID: CQI6eWIHzsT
Attachment #8930234 - Flags: review?(bugs)
MozReview-Commit-ID: 6PNWjgE8vgq
Attachment #8930235 - Flags: review?(bugs)
MozReview-Commit-ID: C3lK4TORumy
Attachment #8930236 - Flags: review?(bugs)
MozReview-Commit-ID: 5SuLQZqtzJf
Attachment #8930238 - Flags: review?(bugs)
MozReview-Commit-ID: Kt2moF5nsDg
Attachment #8930239 - Flags: review?(bugs)
MozReview-Commit-ID: 1ATfmoN0oue
Attachment #8930240 - Flags: review?(bugs)
MozReview-Commit-ID: HxjJ43UyecW
Attachment #8930241 - Flags: review?(bugs)
MozReview-Commit-ID: IA29zmacrJ4
Attachment #8930242 - Flags: review?(bugs)
MozReview-Commit-ID: Cgh1Cbb60Zk
Attachment #8930243 - Flags: review?(bugs)
You can remove nsGlobalWindowOuter::RiskyUnlink, in case you haven't noticed that.
I haven't gone through with a fine toothed comb and removed unused methods, but I figure there's no reason not to remove a method when someone brings it up ^.^.

MozReview-Commit-ID: 3BZIKFc5noK
Attachment #8930250 - Flags: review?(continuation)
Comment on attachment 8930250 [details] [diff] [review]
Part 20: Remove nsGlobalWindowOuter::RiskyUnlink

Review of attachment 8930250 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks.
Attachment #8930250 - Flags: review?(continuation) → review+
Attachment #8930224 - Flags: review?(bugs) → review+
Attachment #8930226 - Flags: review?(bugs) → review+
Attachment #8930228 - Flags: review?(bugs) → review+
Attachment #8930229 - Flags: review?(bugs) → review+
Attachment #8930230 - Flags: review?(bugs) → review+
Attachment #8930231 - Flags: review?(bugs) → review+
Attachment #8930232 - Flags: review?(bugs) → review+
Attachment #8930233 - Flags: review?(bugs) → review+
Attachment #8930234 - Flags: review?(bugs) → review+
Attachment #8930235 - Flags: review?(bugs) → review+
Attachment #8930236 - Flags: review?(bugs) → review+
Comment on attachment 8930238 [details] [diff] [review]
Part 14: Move some debug defines to the places where they are used

You can kill
+
+#if defined(DEBUG_bryner) || defined(DEBUG_chb)
+#define DEBUG_PAGE_CACHE
+#endif
+
Attachment #8930238 - Flags: review?(bugs) → review+
Comment on attachment 8930239 [details] [diff] [review]
Part 15: Move gOpenPopupSpamCount to nsGlobalWindowOuter

GetPopupControlState() is not inner only
Attachment #8930239 - Flags: review?(bugs) → review-
Attachment #8930240 - Flags: review?(bugs) → review+
Attachment #8930243 - Flags: review?(bugs) → review+
Attachment #8930242 - Flags: review?(bugs) → review+
Attachment #8930241 - Flags: review?(bugs) → review+
MozReview-Commit-ID: Kt2moF5nsDg
Attachment #8930727 - Flags: review?(bugs)
Attachment #8930239 - Attachment is obsolete: true
Attachment #8930238 - Attachment is obsolete: true
Attachment #8930225 - Flags: review?(afarre) → review+
Attachment #8930227 - Flags: review?(afarre) → review+
Comment on attachment 8930727 [details] [diff] [review]
Part 15: Move PopupControlState into nsContentUtils

This is a bit confusing to have nsContentUtils::GetPopupControlState and 
nsGlobalWindow*::GetPopupControlState()
Could we just have the first one?

Or at least I would just make nsGlobalWindowInner::GetPopupControlState() to return nsContentUtils::GetPopupControlState() and then there wasn't need to change nsGlobalWindowInner::DialogsAreBeingAbused()
With that, r+
Attachment #8930727 - Flags: review?(bugs) → review+
Pushed by nika@thelayzells.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/7b4fc8a5f472
Part 1: Move ShouldShowFocusRingIfFocusedByMouse into nsGlobalWindowInner.cpp, r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/e863c2b5a8d3
Part 2: Remove unused gThrottledIdlePeriodLength, r=farre
https://hg.mozilla.org/integration/mozilla-inbound/rev/61d666efd282
Part 3: Move pref caches into nsGlobalWindowInner where they are used, r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/4435161ad0bc
Part 4: Remove RemoveIdleCallback from outer window, r=farre
https://hg.mozilla.org/integration/mozilla-inbound/rev/98490bf58d1b
Part 5: Move CommandDispatcher and ChildCommandDispatcher into nsGlobalWindowOuter.cpp, r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/53bc343fcf1b
Part 6: Move IsInterval into nsGlobalWindowInner.cpp, r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/5d92f87daafa
Part 7: Move WindowDestroyedEvent into its own file, r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/752c1ff4c3a4
Part 8: Move TryGetTabChildGlobalAsEventTarget into nsContentUtils, r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/f44b0454c43e
Part 9: Move CreateNativeGlobalForInner into nsGlobalWindowOuter.cpp, r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/0f9298059e50
Part 10: Move PushPopupControlState and PopPopupControlState into nsGlobalWindowOuter.cpp, r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/dcb748bda970
Part 11: Remove some unused defines, r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/965e9680ca56
Part 12: Move kXULControllersCID into nsGlobalWindowOuter.cpp, r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/0f54c70b06fa
Part 13: Move some defines into nsGlobalWindowInner.cpp, r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/b0be253b85aa
Part 14: Move some debug defines to the places where they are used, r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/3db4f6535159
Part 15: Move PopupControlState into nsContentUtils, r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/ba08fd3b33d2
Part 16: Move gDumpFile into nsGlobalWindowInner, r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/8fa06e5b80ba
Part 17: Split gDOMLeakPRLog into Inner/Outer variants, r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/9291e7d4b268
Part 18: Move AsInner() and AsOuter() off of nsPIDOMWindow<T>, r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/4b7ee0d7ade8
Part 19: Move IsRootOuterWindow to nsPIDOMWindowOuter, r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/cb55e8d55ff9
Part 20: Remove nsGlobalWindowOuter::RiskyUnlink, r=mccr8
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: