Closed
Bug 1035595
Opened 11 years ago
Closed 11 years ago
Don't use specific type for nsTArray<T>::Length() in nsGUIEventIPC.h
Categories
(Core :: Widget, defect)
Core
Widget
Tracking
()
RESOLVED
FIXED
mozilla33
Tracking | Status | |
---|---|---|
firefox30 | --- | unaffected |
firefox31 | --- | unaffected |
firefox32 | --- | affected |
firefox33 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(2 files)
3.64 KB,
patch
|
roc
:
review+
lmandel
:
approval-mozilla-aurora-
|
Details | Diff | Splinter Review |
12.10 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
The result of nsTArray<T>::Length() is defined as nsTArray<T>::size_type. It was alias of uint32_t. However, now, size_t.
nsGUIEventIPC.h is too sensitive for size difference of it. Let's use logically correct type.
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #8452186 -
Flags: review?(roc)
Assignee | ||
Comment 2•11 years ago
|
||
This is optional patch. This replaces nsTArray<nsRefPtr<mozilla::dom::Touch>> with WidgetTouchEvent::TouchArray. This is not related this bug directly, however, this improves the code with the new type for easier to maintain.
Attachment #8452191 -
Flags: review?(roc)
Attachment #8452186 -
Flags: review?(roc) → review+
Comment on attachment 8452191 [details] [diff] [review]
Use mozilla::WidgetTouchEvent::TouchArray instead of nsTArry<nsRefPtr<mozilla::dom::Touch>>
Review of attachment 8452191 [details] [diff] [review]:
-----------------------------------------------------------------
You could use "auto" in some of these places too.
Attachment #8452191 -
Flags: review?(roc) → review+
Assignee | ||
Comment 4•11 years ago
|
||
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #3)
> You could use "auto" in some of these places too.
Indeed. I'll file a bug for it. Thank you.
Assignee | ||
Comment 5•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/c45fdb6a9e35
https://hg.mozilla.org/integration/mozilla-inbound/rev/c175c61ec086
The first patch fixes a crash bug in e10s build. I'll request approval for 32 since it's a regression of bug 1004098.
Updated•11 years ago
|
Summary: Don't use specific type for nsTArray<T>::Lnegth() in nsGUIEventIPC.h → Don't use specific type for nsTArray<T>::Length() in nsGUIEventIPC.h
Comment 6•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/c45fdb6a9e35
https://hg.mozilla.org/mozilla-central/rev/c175c61ec086
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
Assignee | ||
Comment 7•11 years ago
|
||
Comment on attachment 8452186 [details] [diff] [review]
Use strictly same type variable at reading length of nsTArray derived classes in nsGUIEventIPC.h
Approval Request Comment
[Feature/regressing bug #]: bug 1004098
[User impact if declined]: In e10s mode on 64bit binary, this may cause crash (by MOZ_CRASH() in editor) occurs on 64 bit binary at using IME. (sizeof(size_t) should be 64bit on 64bit buils, therefore, at writing the length of the array in WidgetTextEvent, it writes as uint64_t. However, at reading it, it picks up as uint32_t. This caused reading wrong address at reading remaining members.
[Describe test coverage new/current, TBPL]: Not tested with automated tests. This is already landed on m-c.
[Risks and why]: None because this just makes nsGUIEventIPC.h use strictly same variable type of the result of nsTArray<T>::Length() at reading its value in child process.
[String/UUID change made/needed]: Nothing.
Attachment #8452186 -
Flags: approval-mozilla-aurora?
Updated•11 years ago
|
status-firefox30:
--- → unaffected
status-firefox31:
--- → unaffected
status-firefox32:
--- → affected
status-firefox33:
--- → fixed
Comment 8•11 years ago
|
||
Comment on attachment 8452186 [details] [diff] [review]
Use strictly same type variable at reading length of nsTArray derived classes in nsGUIEventIPC.h
Given that this is e10s specific and we don't ship e10s, Aurora-
Attachment #8452186 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora-
You need to log in
before you can comment on or make changes to this bug.
Description
•