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

Issue 833623004: Add support for file locking (Closed)

Created:
5 years, 11 months ago by Søren Gjesse
Modified:
5 years, 11 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Target Ref:
refs/remotes/git-svn
Visibility:
Public.

Description

Add support for file locking This adds support for file locking in dart:io. BUG=http://dartbug.com/17045 R=kustermann@google.com, lrn@google.com Committed: https://code.google.com/p/dart/source/detail?r=42733

Patch Set 1 #

Patch Set 2 : Added tests #

Patch Set 3 : Added Mac OS and Android implementation #

Patch Set 4 : Added Windows implementation #

Patch Set 5 : Comment/doc fixes #

Total comments: 46

Patch Set 6 : Addressed review comments #

Patch Set 7 : Fix dart2js #

Patch Set 8 : Rebased #

Patch Set 9 : Fix Windows build #

Patch Set 10 : Fix Windows test #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+766 lines, -25 lines) Patch
M runtime/bin/builtin_natives.cc View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/bin/file.h View 3 chunks +13 lines, -0 lines 0 comments Download
M runtime/bin/file.cc View 1 2 3 4 5 2 chunks +54 lines, -0 lines 0 comments Download
M runtime/bin/file_android.cc View 1 2 3 4 5 1 chunk +26 lines, -0 lines 0 comments Download
M runtime/bin/file_linux.cc View 1 2 3 4 5 1 chunk +26 lines, -0 lines 0 comments Download
M runtime/bin/file_macos.cc View 1 2 3 4 5 1 chunk +26 lines, -0 lines 0 comments Download
M runtime/bin/file_patch.dart View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/bin/file_win.cc View 1 2 3 4 5 6 7 8 3 chunks +40 lines, -1 line 0 comments Download
M runtime/bin/io_service.h View 1 chunk +13 lines, -12 lines 0 comments Download
M sdk/lib/_internal/compiler/js_lib/io_patch.dart View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M sdk/lib/io/file.dart View 1 2 3 4 5 6 2 chunks +112 lines, -0 lines 6 comments Download
M sdk/lib/io/file_impl.dart View 1 2 3 4 5 1 chunk +79 lines, -0 lines 0 comments Download
M sdk/lib/io/io_service.dart View 1 chunk +13 lines, -12 lines 0 comments Download
A tests/standalone/io/file_lock_script.dart View 1 2 3 4 5 1 chunk +32 lines, -0 lines 0 comments Download
A tests/standalone/io/file_lock_test.dart View 1 2 3 4 5 6 7 8 9 1 chunk +325 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (1 generated)
Søren Gjesse
5 years, 11 months ago (2015-01-08 11:02:23 UTC) #1
Lasse Reichstein Nielsen
lgtm https://codereview.chromium.org/833623004/diff/80001/runtime/bin/file.cc File runtime/bin/file.cc (right): https://codereview.chromium.org/833623004/diff/80001/runtime/bin/file.cc#newcode397 runtime/bin/file.cc:397: int64_t lock; Is this the type on all ...
5 years, 11 months ago (2015-01-08 11:59:22 UTC) #2
kustermann
lgtm https://codereview.chromium.org/833623004/diff/80001/runtime/bin/file_android.cc File runtime/bin/file_android.cc (right): https://codereview.chromium.org/833623004/diff/80001/runtime/bin/file_android.cc#newcode115 runtime/bin/file_android.cc:115: ASSERT(handle_->fd() >= 0); ASSERT(end > start); https://codereview.chromium.org/833623004/diff/80001/runtime/bin/file_android.cc#newcode133 runtime/bin/file_android.cc:133: ...
5 years, 11 months ago (2015-01-08 12:54:28 UTC) #3
Søren Gjesse
https://codereview.chromium.org/833623004/diff/80001/runtime/bin/file.cc File runtime/bin/file.cc (right): https://codereview.chromium.org/833623004/diff/80001/runtime/bin/file.cc#newcode397 runtime/bin/file.cc:397: int64_t lock; On 2015/01/08 11:59:22, Lasse Reichstein Nielsen wrote: ...
5 years, 11 months ago (2015-01-09 13:06:21 UTC) #4
Søren Gjesse
Committed patchset #10 (id:180001) manually as 42733 (presubmit successful).
5 years, 11 months ago (2015-01-09 13:06:50 UTC) #5
nweiz
https://codereview.chromium.org/833623004/diff/180001/sdk/lib/io/file.dart File sdk/lib/io/file.dart (right): https://codereview.chromium.org/833623004/diff/180001/sdk/lib/io/file.dart#newcode738 sdk/lib/io/file.dart:738: * obtain an exclusive lock on the same file. ...
5 years, 11 months ago (2015-01-14 01:09:37 UTC) #7
Søren Gjesse
https://codereview.chromium.org/833623004/diff/180001/sdk/lib/io/file.dart File sdk/lib/io/file.dart (right): https://codereview.chromium.org/833623004/diff/180001/sdk/lib/io/file.dart#newcode738 sdk/lib/io/file.dart:738: * obtain an exclusive lock on the same file. ...
5 years, 11 months ago (2015-01-14 13:06:06 UTC) #8
nweiz
5 years, 11 months ago (2015-01-16 00:06:45 UTC) #9
Message was sent while issue was closed.
https://codereview.chromium.org/833623004/diff/180001/sdk/lib/io/file.dart
File sdk/lib/io/file.dart (right):

https://codereview.chromium.org/833623004/diff/180001/sdk/lib/io/file.dart#ne...
sdk/lib/io/file.dart:743: */
Mention what happens when the lock can't be acquired. In particular, what
specific error should users check for? Is that error consistent across systems?

https://codereview.chromium.org/833623004/diff/180001/sdk/lib/io/file.dart#ne...
sdk/lib/io/file.dart:793: */
What is the Future returned by this waiting for?

Powered by Google App Engine
This is Rietveld 408576698