Closed Bug 1442039 Opened 6 years ago Closed 6 years ago

Mostly remove nsDOMClassInfo

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(15 files)

6.45 KB, patch
peterv
: review+
Details | Diff | Splinter Review
6.90 KB, patch
peterv
: review+
Details | Diff | Splinter Review
2.75 KB, patch
peterv
: review+
Details | Diff | Splinter Review
12.66 KB, patch
peterv
: review+
Details | Diff | Splinter Review
18.71 KB, patch
peterv
: review+
Details | Diff | Splinter Review
7.99 KB, patch
peterv
: review+
Details | Diff | Splinter Review
2.99 KB, patch
peterv
: review+
Details | Diff | Splinter Review
3.83 KB, patch
peterv
: review+
Details | Diff | Splinter Review
3.38 KB, patch
peterv
: review+
Details | Diff | Splinter Review
2.80 KB, patch
peterv
: review+
Details | Diff | Splinter Review
12.06 KB, patch
peterv
: review+
Details | Diff | Splinter Review
9.99 KB, patch
peterv
: review+
Details | Diff | Splinter Review
5.75 KB, patch
peterv
: review+
Details | Diff | Splinter Review
12.79 KB, patch
peterv
: review+
Details | Diff | Splinter Review
1.70 KB, patch
peterv
: review+
Details | Diff | Splinter Review
Now that bug 888600 has landed, we can do this.
Blocks: 783060
Blocks: 297145
Blocks: 340901
Blocks: 619214
Blocks: 704554
Summary: Remove DOMClassInfo → Remove nsDOMClassInfo
Depends on: 1442040
Depends on: 1442137
Summary: Remove nsDOMClassInfo → Mostly remove nsDOMClassInfo
The only caller is nsDOMClassInfo::RegisterClassProtos.  The only caller of
that is nsDOMClassInfo::Init.  In nsDOMClassInfo::Init this is called after we
have done the RegisterClassName call for "DOMConstructor".

Since the only bits of classinfo left are DOMConstructor and DOMPrototype, and
both use nsIDOMDOMConstructor as their interface, we call RegisterClassProto
with "DOMConstructor" as aClassName, find the existing nsGlobalNameStruct, and
return without doing anything.  So this entire codepath can be removed.

MozReview-Commit-ID: JfXmIex7tLC
Attachment #8955240 - Flags: review?(peterv)
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
MozReview-Commit-ID: H65oe2v7Gxt
Attachment #8955241 - Flags: review?(peterv)
We don't resolve it normally, because nsDOMConstructorSH overrides
PostCreatePrototype to be a no-op, so nsWindowSH::GlobalResolve never actually
defines the relevant property on the window.  We also hide it in
nsWindowSH::NameStructEnabled.  But in the Xray-to-window case we attempt to
define it.  We shouldn't do that.

MozReview-Commit-ID: 3tnMnSQuvuT
Attachment #8955242 - Flags: review?(peterv)
We only have classinfo left for DOMConstructor and DOMPrototype, both of which
use nsDOMConstructorSH, which overrides PostCreatePrototype.

To avoid -Werror build failures, this changeset also removes static functions
that were only reachable from PostCreatePrototype.

MozReview-Commit-ID: JpJOuMHAAuo
Attachment #8955243 - Flags: review?(peterv)
The only caller of nsDOMConstructor::nsDOMConstructor is
nsDOMConstructor::Create which has no callers.

Also removes the now-unused nsDOMConstructorSH class.

MozReview-Commit-ID: GgOO8ugXFKb
Attachment #8955244 - Flags: review?(peterv)
Also removes various code that stops compiling this way and static functions
that are now unused.

MozReview-Commit-ID: KHYxly2c3Id
Attachment #8955246 - Flags: review?(peterv)
MozReview-Commit-ID: 9mpz8o29WGp
Attachment #8955247 - Flags: review?(peterv)
GetXPCProto is now static and not called, so needs to go too.

MozReview-Commit-ID: I6DilDx2e2m
Attachment #8955248 - Flags: review?(peterv)
MozReview-Commit-ID: 5JpNuBq5RUg
Attachment #8955249 - Flags: review?(peterv)
MozReview-Commit-ID: WocCkriliI
Attachment #8955250 - Flags: review?(peterv)
MozReview-Commit-ID: 7J8hsPuYtPa
Attachment #8955251 - Flags: review?(peterv)
MozReview-Commit-ID: Imt658SuM9w
Attachment #8955252 - Flags: review?(peterv)
MozReview-Commit-ID: 9lawfsdyyZq
Attachment #8955253 - Flags: review?(peterv)
MozReview-Commit-ID: 6pZs1XI1oSd
Attachment #8955254 - Flags: review?(peterv)
MozReview-Commit-ID: KmIhVN7TeNN
Attachment #8955255 - Flags: review?(peterv)
Blocks: 1442360
Priority: -- → P2
Attachment #8955240 - Flags: review?(peterv) → review+
Attachment #8955241 - Flags: review?(peterv) → review+
Attachment #8955242 - Flags: review?(peterv) → review+
Attachment #8955243 - Flags: review?(peterv) → review+
Attachment #8955244 - Flags: review?(peterv) → review+
Attachment #8955246 - Flags: review?(peterv) → review+
Attachment #8955247 - Flags: review?(peterv) → review+
Attachment #8955248 - Flags: review?(peterv) → review+
Attachment #8955249 - Flags: review?(peterv) → review+
Attachment #8955250 - Flags: review?(peterv) → review+
Attachment #8955251 - Flags: review?(peterv) → review+
Attachment #8955252 - Flags: review?(peterv) → review+
Attachment #8955253 - Flags: review?(peterv) → review+
Attachment #8955254 - Flags: review?(peterv) → review+
Attachment #8955255 - Flags: review?(peterv) → review+
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/5900a3a5a232
part 1.  Remove the now-useless nsScriptNameSpaceManager::RegisterClassProto function.  r=peterv
https://hg.mozilla.org/integration/mozilla-inbound/rev/e75da32a2992
part 2.  Remove the now-unused eTypeClassProto type for nsGlobalNameStruct.  r=peterv
https://hg.mozilla.org/integration/mozilla-inbound/rev/20d2f8bbd902
part 3.  Stop trying to resolve DOMConstructor on Xrays.  r=peterv
https://hg.mozilla.org/integration/mozilla-inbound/rev/6f4d03bae224
part 4.  Remove the dead code in nsDOMClassInfo::PostCreatePrototype.  r=peterv
https://hg.mozilla.org/integration/mozilla-inbound/rev/96295638ca8e
part 5.  Remove the now-dead nsDOMConstructor class.  r=peterv
https://hg.mozilla.org/integration/mozilla-inbound/rev/b4492fdf4a10
part 6.  Remove now-unused classinfo bits for DOMConstructor and DOMPrototype.  r=peterv
https://hg.mozilla.org/integration/mozilla-inbound/rev/9a44d04d09bf
part 7.  Remove now-unused nsScriptNameSpaceManager::RegisterClassName.  r=peterv
https://hg.mozilla.org/integration/mozilla-inbound/rev/316552bee730
part 8.  Remove now-unused eTypeClassConstructor type of nsGlobalNameStruct.  r=peterv
https://hg.mozilla.org/integration/mozilla-inbound/rev/1a8c0603d612
part 9.  Remove now-unused NS_GetDOMClassInfoInstance.  r=peterv
https://hg.mozilla.org/integration/mozilla-inbound/rev/58c5cfca84ff
part 10.  Remove now-unused nsEventTargetSH.  r=peterv
https://hg.mozilla.org/integration/mozilla-inbound/rev/e609ee0164b0
part 11.  Remove all the non-static bits from nsDOMClassInfo.  r=peterv
https://hg.mozilla.org/integration/mozilla-inbound/rev/a9a5c2206177
part 12.  Remove various unused static stuff from nsDOMClassInfo.  r=peterv
https://hg.mozilla.org/integration/mozilla-inbound/rev/4a94ee5c9105
part 13.  Remove the now-pointless nsWindowSH::NameStructEnabled.  r=peterv
https://hg.mozilla.org/integration/mozilla-inbound/rev/b68c19a47cab
part 14.  Remove nsDOMClassInfoID.h.  r=peterv
https://hg.mozilla.org/integration/mozilla-inbound/rev/9624e53b439e
part 15.  Remove nsIDOMDOMConstructor.  r=petev
Blocks: 1448414
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: