Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(238)

Issue 8493002: Change the default for the len argument to writeFrom on OutputStream (Closed)

Created:
9 years, 1 month ago by Søren Gjesse
Modified:
9 years, 1 month ago
Reviewers:
Mads Ager (google)
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Change the default for the len argument to writeFrom on OutputStream Fixed a bug in the writing code as a result. Also added copyByffer argument to one of the write methods on the OutputStream interface. R=ager@google.com BUG=dart:292 TEST=EchoServerStreamTest.dart Committed: https://code.google.com/p/dart/source/detail?r=1293

Patch Set 1 #

Patch Set 2 : Minor changes #

Total comments: 4

Patch Set 3 : Addressed review comments from ager@ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -21 lines) Patch
M runtime/bin/file_impl.dart View 1 1 chunk +3 lines, -2 lines 0 comments Download
M runtime/bin/output_stream.dart View 1 1 chunk +16 lines, -12 lines 0 comments Download
M runtime/bin/socket_stream.dart View 1 2 3 chunks +8 lines, -6 lines 0 comments Download
M tests/standalone/src/EchoServerStreamTest.dart View 1 chunk +17 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
Søren Gjesse
9 years, 1 month ago (2011-11-07 09:09:04 UTC) #1
Mads Ager (google)
lgtm http://codereview.chromium.org/8493002/diff/2001/runtime/bin/output_stream.dart File runtime/bin/output_stream.dart (right): http://codereview.chromium.org/8493002/diff/2001/runtime/bin/output_stream.dart#newcode21 runtime/bin/output_stream.dart:21: * true ownership of the specified buffer is ...
9 years, 1 month ago (2011-11-07 09:18:34 UTC) #2
Søren Gjesse
9 years, 1 month ago (2011-11-08 09:31:53 UTC) #3
http://codereview.chromium.org/8493002/diff/2001/runtime/bin/output_stream.dart
File runtime/bin/output_stream.dart (right):

http://codereview.chromium.org/8493002/diff/2001/runtime/bin/output_stream.da...
runtime/bin/output_stream.dart:21: * true ownership of the specified buffer is
passed to the system
On 2011/11/07 09:18:34, Mads Ager wrote:
> Really? I would have guessed that copyBuffer means that a copy is taken and
> therefore the caller is free to do what it wants with what it passed in?

Of cause that was wrong. copyBuffer == true means that a copy is taken.

http://codereview.chromium.org/8493002/diff/2001/runtime/bin/socket_stream.dart
File runtime/bin/socket_stream.dart (right):

http://codereview.chromium.org/8493002/diff/2001/runtime/bin/socket_stream.da...
runtime/bin/socket_stream.dart:110: bool write(List<int> buffer, [bool
copyBuffer = false]) {
On 2011/11/07 09:18:34, Mads Ager wrote:
> Ah, it is actually false by default. Update comment in socket_stream.dart.

Changed to default to be true (as stated in the comment). I think it is the
right conservative default.

Powered by Google App Engine
This is Rietveld 408576698