The QScriptValuePrivate can optimized. Now, each state have a separate attribute in which his value is kept. So, for the CString state the value is stored in m_string, for CNumber it is m_numbe... It would be much better to store the value in an union to save a memory and maybe unnecessary initialization.
Created attachment 58358 [details] Fix v1 NOTE: The patch can be applied after 40412.
Bug 40412 is closed. Should I reapply the patch to bugzilla?
Comment on attachment 58358 [details] Fix v1 This patch can't be landed by the commit-queue since it does not apply.
Created attachment 58630 [details] Fix
(In reply to comment #3) > (From update of attachment 58358 [details]) > This patch can't be landed by the commit-queue since it does not apply. Does it mean that commit-queue would block it? As I worte the patch couldn't be applied before 40412, I posted it for review. I have uploaded the same patch again.
Patch applies cleanly now and looks OK. As we discussed offline, one could use an anonymous union; this reduces the size of the patch. However, the "u." does make it more apparent that it's a union that's being manipulated. (I'm not aware of any WebKit style guidelines for unions, their naming etc.)
Comment on attachment 58630 [details] Fix r=me. This miight cause problems with non-gcc compilers in the future, but let's deal with that when we cross that bridge :). This certainly improves the readability at lot, too.
Comment on attachment 58630 [details] Fix Clearing flags on attachment: 58630 Committed r61726: <http://trac.webkit.org/changeset/61726>
All reviewed patches have been landed. Closing bug.