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

Issue 10963024: Use native fields for process pid and fix bug that allowed killing (Closed)

Created:
8 years, 3 months ago by Mads Ager (google)
Modified:
8 years, 3 months ago
Reviewers:
Søren Gjesse
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Use native fields for process pid and fix bug that allowed killing a process before it was started. We should make the change to make Process.start return a future that does not complete unless the process is actually started. That would have avoided this issue as well. R=sgjesse@google.com BUG=dartbug.com/5301 Committed: https://code.google.com/p/dart/source/detail?r=12691

Patch Set 1 #

Patch Set 2 : Add the actual native field to Process #

Total comments: 4

Patch Set 3 : Address review commetns. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -9 lines) Patch
M runtime/bin/process.h View 1 chunk +5 lines, -0 lines 0 comments Download
M runtime/bin/process.cc View 3 chunks +19 lines, -2 lines 0 comments Download
M runtime/bin/process_impl.dart View 1 2 3 chunks +6 lines, -7 lines 0 comments Download
A tests/standalone/io/process_kill_unstarted_test.dart View 1 2 1 chunk +15 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Mads Ager (google)
8 years, 3 months ago (2012-09-21 09:30:51 UTC) #1
Mads Ager (google)
Don't review this yet, might be a good idea to actually extend NativeFieldWrapperClass1 when setting ...
8 years, 3 months ago (2012-09-21 09:56:40 UTC) #2
Mads Ager (google)
OK, ready for review. :)
8 years, 3 months ago (2012-09-21 10:06:37 UTC) #3
Søren Gjesse
lgtm https://codereview.chromium.org/10963024/diff/1007/runtime/bin/process_impl.dart File runtime/bin/process_impl.dart (right): https://codereview.chromium.org/10963024/diff/1007/runtime/bin/process_impl.dart#newcode231 runtime/bin/process_impl.dart:231: _reportError(new ProcessException("Cannot kill process that is not started")); ...
8 years, 3 months ago (2012-09-21 10:44:16 UTC) #4
Mads Ager (google)
8 years, 3 months ago (2012-09-21 11:07:39 UTC) #5
https://codereview.chromium.org/10963024/diff/1007/runtime/bin/process_impl.dart
File runtime/bin/process_impl.dart (right):

https://codereview.chromium.org/10963024/diff/1007/runtime/bin/process_impl.d...
runtime/bin/process_impl.dart:231: _reportError(new ProcessException("Cannot
kill process that is not started"));
On 2012/09/21 10:44:16, Søren Gjesse wrote:
> Long line.

Done.

https://codereview.chromium.org/10963024/diff/1007/tests/standalone/io/proces...
File tests/standalone/io/process_kill_unstarted_test.dart (right):

https://codereview.chromium.org/10963024/diff/1007/tests/standalone/io/proces...
tests/standalone/io/process_kill_unstarted_test.dart:12: try {
On 2012/09/21 10:44:16, Søren Gjesse wrote:
> Why not use Expect.throws here?

Because I forgot we had that. ;-) Done! Thanks!

Powered by Google App Engine
This is Rietveld 408576698