Closed
Bug 950315
Opened 11 years ago
Closed 11 years ago
Make more nsDOMEventTargetHelper subclasses use auto-binding constructors
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla29
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
(Whiteboard: [qa-])
Attachments
(2 files, 6 obsolete files)
10.36 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
55.69 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
I was actually doing this because I wanted to hunt down which DETH subclasses were not on WebIDL, but this was a convenient way to do that.
This doesn't convert everything; for one thing on workers we don't BindToOwner.
![]() |
Assignee | |
Comment 1•11 years ago
|
||
Attachment #8347570 -
Flags: review?(bugs)
![]() |
Assignee | |
Comment 2•11 years ago
|
||
Attachment #8347571 -
Flags: review?(khuey)
![]() |
Assignee | |
Comment 3•11 years ago
|
||
Attachment #8347572 -
Flags: review?(bugs)
![]() |
Assignee | |
Updated•11 years ago
|
Attachment #8347570 -
Attachment is obsolete: true
Attachment #8347570 -
Flags: review?(bugs)
![]() |
Assignee | |
Comment 4•11 years ago
|
||
Attachment #8347573 -
Flags: review?(khuey)
![]() |
Assignee | |
Updated•11 years ago
|
Attachment #8347571 -
Attachment is obsolete: true
Attachment #8347571 -
Flags: review?(khuey)
![]() |
Assignee | |
Comment 5•11 years ago
|
||
Comment 6•11 years ago
|
||
Comment on attachment 8347572 [details] [diff] [review]
part 1. Convert a bunch of event targets to passing a Window or nsDOMEventTargetHelper directly to the constructor of their ancestor nsDOMEventTargetHelper.
Review of attachment 8347572 [details] [diff] [review]:
-----------------------------------------------------------------
::: content/base/src/nsDOMDataChannel.cpp
@@ +82,5 @@
>
> +nsDOMDataChannel::nsDOMDataChannel(already_AddRefed<mozilla::DataChannel> aDataChannel,
> + nsPIDOMWindow* aWindow)
> + : nsDOMEventTargetHelper(aWindow && aWindow->IsOuterWindow() ?
> + aWindow->GetCurrentInnerWindow() : aWindow)
Ugh. Followup to decide which kind of window we get here?
::: dom/devicestorage/nsDeviceStorage.cpp
@@ +2703,5 @@
> if (NS_FAILED(ds->Init(aWin, aType, storageName))) {
> *aStore = nullptr;
> return;
> }
> NS_ADDREF(*aStore = ds.get());
Feel free to make this ds.forget(aStore) while you're around :)
![]() |
Assignee | |
Comment 7•11 years ago
|
||
Attachment #8347699 -
Flags: review?(bugs)
![]() |
Assignee | |
Updated•11 years ago
|
Attachment #8347572 -
Attachment is obsolete: true
Attachment #8347572 -
Flags: review?(bugs)
![]() |
Assignee | |
Comment 8•11 years ago
|
||
Attachment #8347700 -
Flags: review?(bugs)
![]() |
Assignee | |
Updated•11 years ago
|
Attachment #8347699 -
Attachment is obsolete: true
Attachment #8347699 -
Flags: review?(bugs)
![]() |
Assignee | |
Comment 9•11 years ago
|
||
Attachment #8347701 -
Flags: review?(bugs)
![]() |
Assignee | |
Updated•11 years ago
|
Attachment #8347700 -
Attachment is obsolete: true
Attachment #8347700 -
Flags: review?(bugs)
![]() |
Assignee | |
Comment 10•11 years ago
|
||
Attachment #8347702 -
Flags: review?(bugs)
![]() |
Assignee | |
Updated•11 years ago
|
Attachment #8347701 -
Attachment is obsolete: true
Attachment #8347701 -
Flags: review?(bugs)
Comment 11•11 years ago
|
||
Comment on attachment 8347702 [details] [diff] [review]
part 1. Convert a bunch of event targets to passing a Window or nsDOMEventTargetHelper directly to the constructor of their ancestor nsDOMEventTargetHelper.
Could you add an assertion to
nsDOMEventTargetHelper::BindToOwner(nsPIDOMWindow* aOwner) that only inner window is passed there,
well perhaps MOZ_ASSERT(!aOwner || aOwner->IsInnerWindow());
And looks like all the changes are for stuff implementing webidl interfaces so SetIsDOMBinding
in DETH ctor is ok.
Attachment #8347702 -
Flags: review?(bugs) → review+
![]() |
Assignee | |
Comment 12•11 years ago
|
||
> And looks like all the changes are for stuff implementing webidl interfaces
Yes, I carefully avoided the others.
I added the assert; will see how try likes it.
![]() |
Assignee | |
Comment 13•11 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=34e356956c0c fwiw, looks good so far.
Attachment #8347573 -
Flags: review?(khuey) → review+
![]() |
Assignee | |
Comment 14•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/e9d6fd04d08e
https://hg.mozilla.org/integration/mozilla-inbound/rev/1fc3ac9b4a2c
Flags: in-testsuite-
Whiteboard: [need review]
Target Milestone: --- → mozilla29
![]() |
Assignee | |
Comment 15•11 years ago
|
||
> Ugh. Followup to decide which kind of window we get here?
Filed bug 957027.
Comment 16•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/e9d6fd04d08e
https://hg.mozilla.org/mozilla-central/rev/1fc3ac9b4a2c
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Whiteboard: [qa-]
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•