Closed Bug 656878 Opened 13 years ago Closed 13 years ago

nsStringArraySH::GetProperty copies string to js, but it could probably share it

Categories

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

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: smaug, Assigned: smaug)

Details

Attachments

(3 files)

Attached file testcase
Assignee: nobody → Olli.Pettay
Attached patch wipSplinter Review
Uploaded to tryserver.

While I was looking at this code, I removed one QI in nsDOMTokenListSH::GetStringAt.

We may want to add some helper method which does all the ForgetSharedBuffer
thing. Or perhaps the last parameter of ReadableToJSVal should be
boolean to indicate whether it is ok to call ForgetSharedBuffer.
The QI removal doesn't apparently work, so this is just about the
string handling optimization.
(The QI optimization fails because I forgot the code is used also for nsDOMSettableTokenList)
Attachment #532206 - Flags: review?(bzbarsky)
Comment on attachment 532206 [details] [diff] [review]
without QI change

r=me
Attachment #532206 - Flags: review?(bzbarsky) → review+
http://hg.mozilla.org/mozilla-central/rev/5d5f2f15037b
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: