Closed Bug 1312936 Opened 3 years ago Closed 3 years ago

Use ACString for nsITranserable.getAnyTransferData

Categories

(Core :: DOM: Editor, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: m_kato, Assigned: m_kato)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

To reduce small allocation and clean up editor code...
Comment on attachment 8804537 [details]
Bug 1312936 - Part 1. Use ACString for nsITranserable.getAnyTransferData.

https://reviewboard.mozilla.org/r/88472/#review87548

::: widget/nsITransferable.idl:145
(Diff revision 1)
>      *
>      * @param  aFlavor (out parameter) the flavor of data that was retrieved
>      * @param  aData the data. Some variant of class in nsISupportsPrimitives.idl
>      * @param  aDataLen the length of the data
>      */
> -  void getAnyTransferData ( out string aFlavor, out nsISupports aData, out unsigned long aDataLen ) ;
> +  void getAnyTransferData ( out ACString aFlavor, out nsISupports aData,

I assume that only ASCII characters are available for Content-Type value. If no, we need to use AUTF8String.
Attachment #8804537 - Flags: review?(masayuki) → review+
Comment on attachment 8804538 [details]
Bug 1312936 - Part 2. Use nsAutoCString for nsITranserable.getAnyTransferData into editor.

https://reviewboard.mozilla.org/r/88474/#review87550

Excellent!
Attachment #8804538 - Flags: review?(masayuki) → review+
Comment on attachment 8804537 [details]
Bug 1312936 - Part 1. Use ACString for nsITranserable.getAnyTransferData.

https://reviewboard.mozilla.org/r/88472/#review87548

> I assume that only ASCII characters are available for Content-Type value. If no, we need to use AUTF8String.

This is ASCII only
Pushed by m_kato@ga2.so-net.ne.jp:
https://hg.mozilla.org/integration/mozilla-inbound/rev/80687b4d7461
Part 1. Use ACString for nsITranserable.getAnyTransferData. r=masayuki
https://hg.mozilla.org/integration/mozilla-inbound/rev/357f4f16be12
Part 2. Use nsAutoCString for nsITranserable.getAnyTransferData into editor. r=masayuki
https://hg.mozilla.org/mozilla-central/rev/80687b4d7461
https://hg.mozilla.org/mozilla-central/rev/357f4f16be12
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.