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

Issue 2761673002: [dart:io][windows] Use WriteFile instead of _write (Closed)

Created:
3 years, 9 months ago by zra
Modified:
3 years, 8 months ago
Reviewers:
Florian Schneider
CC:
reviews_dartlang.org, vm-dev_dartlang.org, goderbauer
Target Ref:
refs/heads/master
Visibility:
Public.

Description

[dart:io][windows] Use WriteFile instead of _write This CL changes File::Write on Windows to call directly to WriteFile() instead of using _write(). This avoids a number of complexities: 1. Don't need to bother with text vs. binary mode. 2. Don't need to check both errno and GetLastError if _write() fails. 3. Don't need to convert to a wchar_t* for console output since we've already set the code page to UTF8. fixes #29101 R=fschneider@google.com Committed: https://github.com/dart-lang/sdk/commit/141b6351baacaedf23e740b5b7354970f2ac0979

Patch Set 1 #

Patch Set 2 : Correctly calculate the number of bytes consumed #

Total comments: 2

Patch Set 3 : Address comments #

Patch Set 4 : Format stdio.dart #

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -193 lines) Patch
M runtime/bin/file.h View 2 chunks +0 lines, -11 lines 0 comments Download
M runtime/bin/file.cc View 1 chunk +0 lines, -16 lines 0 comments Download
M runtime/bin/file_android.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M runtime/bin/file_fuchsia.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M runtime/bin/file_linux.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M runtime/bin/file_macos.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M runtime/bin/file_patch.dart View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M runtime/bin/file_unsupported.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M runtime/bin/file_win.cc View 1 2 5 chunks +30 lines, -78 lines 0 comments Download
M runtime/bin/io_natives.cc View 1 chunk +0 lines, -1 line 0 comments Download
M runtime/bin/process_patch.dart View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M sdk/lib/io/file_impl.dart View 3 chunks +0 lines, -28 lines 0 comments Download
M sdk/lib/io/stdio.dart View 1 2 3 3 chunks +4 lines, -30 lines 0 comments Download

Messages

Total messages: 8 (3 generated)
zra
3 years, 8 months ago (2017-03-29 18:05:00 UTC) #2
Florian Schneider
Lgtm https://codereview.chromium.org/2761673002/diff/20001/runtime/bin/file_win.cc File runtime/bin/file_win.cc (right): https://codereview.chromium.org/2761673002/diff/20001/runtime/bin/file_win.cc#newcode140 runtime/bin/file_win.cc:140: } else { No need for else after ...
3 years, 8 months ago (2017-03-29 18:12:11 UTC) #3
Florian Schneider
Lgtm
3 years, 8 months ago (2017-03-29 18:12:12 UTC) #4
zra
Committed patchset #4 (id:60001) manually as 141b6351baacaedf23e740b5b7354970f2ac0979 (presubmit successful).
3 years, 8 months ago (2017-03-29 20:19:33 UTC) #7
zra
3 years, 8 months ago (2017-03-29 20:20:02 UTC) #8
Message was sent while issue was closed.
https://codereview.chromium.org/2761673002/diff/20001/runtime/bin/file_win.cc
File runtime/bin/file_win.cc (right):

https://codereview.chromium.org/2761673002/diff/20001/runtime/bin/file_win.cc...
runtime/bin/file_win.cc:140: } else {
On 2017/03/29 18:12:11, Florian Schneider wrote:
> No need for else after the return.

Done.

Powered by Google App Engine
This is Rietveld 408576698