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

Issue 23830014: Throw exception if path can't be watched. (Closed)

Created:
7 years, 3 months ago by Anders Johnsen
Modified:
7 years, 3 months ago
Reviewers:
zra, Ivan Posva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Throw exception if path can't be watched. BUG=http://code.google.com/p/dart/issues/detail?id=13552 R=zra@google.com Committed: https://code.google.com/p/dart/source/detail?r=27847

Patch Set 1 #

Total comments: 2

Patch Set 2 : Remove debug print. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M runtime/bin/file_system_watcher.cc View 1 chunk +1 line, -1 line 1 comment Download

Messages

Total messages: 6 (0 generated)
Anders Johnsen
7 years, 3 months ago (2013-09-24 20:01:23 UTC) #1
zra
lgtm Thanks for the quick fix! https://codereview.chromium.org/23830014/diff/1/runtime/bin/file_patch.dart File runtime/bin/file_patch.dart (right): https://codereview.chromium.org/23830014/diff/1/runtime/bin/file_patch.dart#newcode81 runtime/bin/file_patch.dart:81: print(socketId); Is this ...
7 years, 3 months ago (2013-09-24 20:08:11 UTC) #2
Anders Johnsen
https://codereview.chromium.org/23830014/diff/1/runtime/bin/file_patch.dart File runtime/bin/file_patch.dart (right): https://codereview.chromium.org/23830014/diff/1/runtime/bin/file_patch.dart#newcode81 runtime/bin/file_patch.dart:81: print(socketId); On 2013/09/24 20:08:11, zra wrote: > Is this ...
7 years, 3 months ago (2013-09-24 20:12:31 UTC) #3
Anders Johnsen
Committed patchset #2 manually as r27847 (presubmit successful).
7 years, 3 months ago (2013-09-24 20:13:19 UTC) #4
Ivan Posva
-Ivan https://codereview.chromium.org/23830014/diff/5001/runtime/bin/file_system_watcher.cc File runtime/bin/file_system_watcher.cc (right): https://codereview.chromium.org/23830014/diff/5001/runtime/bin/file_system_watcher.cc#newcode38 runtime/bin/file_system_watcher.cc:38: Dart_ThrowException(DartUtils::NewDartOSError()); Shouldn't we implement the watching manually by ...
7 years, 3 months ago (2013-09-24 21:25:07 UTC) #5
zra
7 years, 3 months ago (2013-09-24 21:48:06 UTC) #6
Message was sent while issue was closed.
On 2013/09/24 21:25:07, Ivan Posva wrote:
> -Ivan
> 
>
https://codereview.chromium.org/23830014/diff/5001/runtime/bin/file_system_wa...
> File runtime/bin/file_system_watcher.cc (right):
> 
>
https://codereview.chromium.org/23830014/diff/5001/runtime/bin/file_system_wa...
> runtime/bin/file_system_watcher.cc:38:
> Dart_ThrowException(DartUtils::NewDartOSError());
> Shouldn't we implement the watching manually by polling instead of just
throwing
> out to the user code?

Polling in a directory with lots of files could be expensive, but it is probably
preferable to throwing an exception, especially if we can't get something like
inotify working on all platforms. Instead of throwing an exception, we could
bail to an alternate implementation of _listen that polls and adds events to the
list when a change is detected by comparing with some state held in the class.
Maybe the polling frequency, or some filters on files to poll, could be optional
parameters to _listen or the constructor to keep time spent polling under
application control.

Powered by Google App Engine
This is Rietveld 408576698