[Webkit-unassigned] [Bug 28037] SocketStreamHandle interface for WebSocket API

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 11 09:08:12 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=28037


Alexey Proskuryakov <ap at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #34545|review?                     |review-
               Flag|                            |




--- Comment #4 from Alexey Proskuryakov <ap at webkit.org>  2009-08-11 09:08:11 PDT ---
(From update of attachment 34545)
> +    if (num_written < size)
> +        m_buffer.append(buf + num_written, size - num_written);

I think that we need a (large) upper limit on buffer size - it's too easy to
send data faster than network permits, exhausting system memory and making the
system unresponsive. Certainly, there are many other ways to exhaust memory via
JavaScript, so it would be just a safety net, not a real security measure.

> +    remaining_data.append(m_buffer.data() + num_written,
> +                           m_buffer.size() - num_written);

As David pointed out, this is an indentation mistake - but there's no need to
split the line anyway, it's quite short.

Looks good to me in general. I'm not sure if I'm not stepping on Dave's toes
here, but r- to address the comments.

-- 
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