Action name exported by mozilla is messed up in at-poke

RESOLVED FIXED

Status

()

Core
Disability Access APIs
RESOLVED FIXED
14 years ago
14 years ago

People

(Reporter: Louie Zhao, Assigned: Louie Zhao)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

2.00 KB, patch
Philip K. Warren
: review+
Henry Jia
: superreview+
Details | Diff | Splinter Review
(Assignee)

Description

14 years ago
Using at-poke to examine "action" of mozilla's element, the actoin name is
messed up. This bug is caused by wrong cache of name string. Meanwhile, the
current implementation will export the same action name for all actions of the
element.
(Assignee)

Comment 1

14 years ago
Created attachment 146568 [details] [diff] [review]
patch v1
(Assignee)

Updated

14 years ago
Attachment #146568 - Flags: review?(pkw)

Comment 2

14 years ago
Comment on attachment 146568 [details] [diff] [review]
patch v1

Looks good.
Attachment #146568 - Flags: review?(pkw) → review+
(Assignee)

Updated

14 years ago
Attachment #146568 - Flags: superreview?(Henry.Jia)
(Assignee)

Updated

14 years ago
Attachment #146568 - Flags: superreview?(Henry.Jia) → superreview?(jst)

Comment 3

14 years ago
Comment on attachment 146568 [details] [diff] [review]
patch v1

sr=henry
Attachment #146568 - Flags: superreview?(jst) → superreview+
(Assignee)

Comment 4

14 years ago
Thanks for r and sr. Patch checked in trunk.
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
+    void SetName(nsAString &aString) { mName = NS_ConvertUCS2toUTF8(aString); }

CopyUTF16toUTF8(aString, mName) would have been better...

Comment 6

14 years ago
Biesi, can you tell us more about why that's better? We use it in several places.
it avoids one string copy. NS_ConvertUCS... itself converts the string; and then
the assignment copies again.

CopyUTF8To... just copies once.

also see bug 209699 comment 0

(this is of course only an issue when assigning an NS_Convert... to something else)
You need to log in before you can comment on or make changes to this bug.