[Webkit-unassigned] [Bug 31839] JSON.stringify performance on undefined is very poor
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Nov 24 13:30:58 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=31839
Alexey Proskuryakov <ap at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #43802|review? |review+
Flag| |
--- Comment #7 from Alexey Proskuryakov <ap at webkit.org> 2009-11-24 13:30:58 PST ---
(From update of attachment 43802)
> + class StringBuilder : public Vector<UChar> {
Subclassing Vector is unsafe, because it does not have a virtual destructor.
Maybe adding private operator delete would make it a little safer? I'm not 100%
clear on what the best way to make it safe is.
> + for (size_t i = 0; i < len; i++)
> + Vector<UChar>::append(str[i]);
Should we ASSERT that the only low ASCII is used here? Otherwise, conversion
from signed to unsigned could go badly (not to mention that we don't know what
encoding it is).
> + inline void append(const char ch)
Someone could ask you why you don't use full words instead of those "ch", "len"
and "str".
> + Vector<UChar>::append(ch);
Would a simple "using Vector<UChar>::append" achieve the same result?
r=me
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list