Created attachment 532185 [details] [diff] [review] wip 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.
Created attachment 532206 [details] [diff] [review] without QI change 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)
Comment on attachment 532206 [details] [diff] [review] without QI change r=me