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

Issue 10962012: Use native wrapper fields to store socket ids. (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 wrapper fields to store socket ids. This relies on landing the change to fix implicit super constructors for subclasses of something that has native fields. R=sgjesse@google.com BUG=dartbug.com/5301 Committed: https://code.google.com/p/dart/source/detail?r=12684

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -64 lines) Patch
M runtime/bin/eventhandler.cc View 2 chunks +11 lines, -2 lines 0 comments Download
M runtime/bin/eventhandler.dart View 2 chunks +4 lines, -4 lines 0 comments Download
M runtime/bin/process.cc View 2 chunks +6 lines, -7 lines 0 comments Download
M runtime/bin/process_impl.dart View 1 chunk +5 lines, -0 lines 0 comments Download
M runtime/bin/socket.h View 2 chunks +4 lines, -1 line 0 comments Download
M runtime/bin/socket.cc View 12 chunks +38 lines, -28 lines 2 comments Download
M runtime/bin/socket_impl.dart View 16 chunks +21 lines, -19 lines 2 comments Download
M runtime/bin/socket_stream_impl.dart View 1 chunk +1 line, -1 line 0 comments Download
M runtime/bin/stdio.dart View 2 chunks +2 lines, -0 lines 0 comments Download
M runtime/bin/timer_impl.dart View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Mads Ager (google)
8 years, 3 months ago (2012-09-20 15:01:12 UTC) #1
Søren Gjesse
lgtm https://codereview.chromium.org/10962012/diff/1/runtime/bin/socket.cc File runtime/bin/socket.cc (right): https://codereview.chromium.org/10962012/diff/1/runtime/bin/socket.cc#newcode49 runtime/bin/socket.cc:49: intptr_t socket = 0; Why do you initialize ...
8 years, 3 months ago (2012-09-21 06:47:06 UTC) #2
Mads Ager (google)
8 years, 3 months ago (2012-09-21 08:18:25 UTC) #3
https://codereview.chromium.org/10962012/diff/1/runtime/bin/socket.cc
File runtime/bin/socket.cc (right):

https://codereview.chromium.org/10962012/diff/1/runtime/bin/socket.cc#newcode49
runtime/bin/socket.cc:49: intptr_t socket = 0;
On 2012/09/21 06:47:06, Søren Gjesse wrote:
> Why do you initialize to 0?

Just to make sure that we have some initialization. If for some weird reason the
GetSocketIdNativeField call fails to assign to it, it is nice to have a
recognizable value when something else fails later.

https://codereview.chromium.org/10962012/diff/1/runtime/bin/socket_impl.dart
File runtime/bin/socket_impl.dart (right):

https://codereview.chromium.org/10962012/diff/1/runtime/bin/socket_impl.dart#...
runtime/bin/socket_impl.dart:40: _closed = true;
On 2012/09/21 06:47:06, Søren Gjesse wrote:
> We could consider making this a state with 3 values INIT, OPEN, CLOSED,
instead
> of having a socket starting out "closed".

Yes, we could do that to give better error messages. I'd like to postpone that
until we are done moving these to use native fields.

Powered by Google App Engine
This is Rietveld 408576698