Closed Bug 1078744 Opened 10 years ago Closed 10 years ago

Replace SetIsDOMBinding with SetIsNonDOMBinding

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: peterv, Assigned: peterv)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

There's very few wrappercached things left that don't use the new DOM bindings.
This adds a whitelist of things in nsWrapperCache, because I'd like to eventually be able to remove the flag.
Attachment #8500679 - Flags: review?(bzbarsky)
Since we're whitelisting the few that aren't DOM bindings we can remove a bunch of asserts from the rest.
Attachment #8500681 - Flags: review?(bzbarsky)
Comment on attachment 8500679 [details] [diff] [review]
Invert the flag for dom bindings in nsWrapperCache and add SetIsNotDOMBinding v1

I assume you audited pretty carefully and I don't need to repeat the audit?

r=me
Attachment #8500679 - Flags: review?(bzbarsky) → review+
Comment on attachment 8500681 [details] [diff] [review]
Remove some IsDOMBinding asserts v1

r=me
Attachment #8500681 - Flags: review?(bzbarsky) → review+
Comment on attachment 8500682 [details] [diff] [review]
Remove nsWrapperCache::SetIsDOMBinding v1

r="it compiles, so it must be right".

I did check over the codegen and wrappercache bits.

We should update the documentation at https://developer.mozilla.org/en-US/docs/Mozilla/WebIDL_bindings#Adding_WebIDL_bindings_to_a_class and perhaps post about this to mozilla.dev.platform.
Attachment #8500682 - Flags: review?(bzbarsky) → review+
(In reply to Boris Zbarsky [:bz] from comment #4)
> I assume you audited pretty carefully and I don't need to repeat the audit?

Yeah, I went over all the things inheriting from nsWrapperCache (and then from EventTarget and DOMEventTargetHelper). The three things inheriting from EventTarget (TabChildGlobal, nsInProcessTabChildGlobal and nsWindowRoot) and the SandboxPrivate are the only ones that hold non-DOM binding JS objects.

I'll work on converting the EventTarget ones to DOM bindings too, and then we might be able to remove IsDOMBinding(). SandboxPrivate will be the odd one out, but it should always have a JS object and its WrapObject should never be called I think. But that's for a separate bug.
Woohoo!
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.