[Webkit-unassigned] [Bug 31839] JSON.stringify performance on undefined is very poor
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Nov 30 13:50:01 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=31839
--- Comment #9 from Darin Adler <darin at apple.com> 2009-11-30 13:50:00 PST ---
(In reply to comment #7)
> (From update of attachment 43802 [details])
> > + 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.
Private inheritance might work better. Then you can expose Vector functions
with "using" individually.
> 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).
Yes.
> > + inline void append(const char ch)
>
> Someone could ask you why you don't use full words instead of those "ch", "len"
> and "str".
Like me.
> Would a simple "using Vector<UChar>::append" achieve the same result?
Yes.
--
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