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

Issue 171503009: Remove SocketData and now only pass the dart port to epoll. (Closed)

Created:
6 years, 10 months ago by Anders Johnsen
Modified:
6 years, 10 months ago
Reviewers:
Søren Gjesse
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Remove SocketData and now only pass the dart port to epoll. This avoids keeping extra data alive. BUG=

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 10

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+131 lines, -324 lines) Patch
M runtime/bin/eventhandler.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M runtime/bin/eventhandler_android.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M runtime/bin/eventhandler_android.cc View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M runtime/bin/eventhandler_linux.h View 1 2 3 1 chunk +3 lines, -57 lines 0 comments Download
M runtime/bin/eventhandler_linux.cc View 1 2 3 8 chunks +73 lines, -181 lines 0 comments Download
M runtime/bin/eventhandler_macos.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M runtime/bin/eventhandler_macos.cc View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M runtime/bin/eventhandler_win.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M runtime/bin/eventhandler_win.cc View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M runtime/bin/socket.cc View 1 chunk +29 lines, -39 lines 0 comments Download
M runtime/bin/socket_linux.cc View 10 chunks +10 lines, -31 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Anders Johnsen
6 years, 10 months ago (2014-02-19 16:54:21 UTC) #1
Søren Gjesse
LGTM! The description should probably be updated to say this is Linux only, and that ...
6 years, 10 months ago (2014-02-20 08:15:54 UTC) #2
Anders Johnsen
6 years, 10 months ago (2014-02-20 08:56:21 UTC) #3
https://codereview.chromium.org/171503009/diff/50001/runtime/bin/eventhandler...
File runtime/bin/eventhandler_linux.cc (right):

https://codereview.chromium.org/171503009/diff/50001/runtime/bin/eventhandler...
runtime/bin/eventhandler_linux.cc:38: static void AddToEpollInstance(intptr_t
epoll_fd_, int fd, Dart_Port port,
On 2014/02/20 08:15:54, Søren Gjesse wrote:
> Move all arguments to the secone line for better readability.

Done.

https://codereview.chromium.org/171503009/diff/50001/runtime/bin/eventhandler...
runtime/bin/eventhandler_linux.cc:64: : shutdown_(false) {
On 2014/02/20 08:15:54, Søren Gjesse wrote:
> Does this fit on the previous line?

Done.

https://codereview.chromium.org/171503009/diff/50001/runtime/bin/eventhandler...
runtime/bin/eventhandler_linux.cc:80: event.data.u64 = timer_fd_ | TIMER_BIT;
On 2014/02/20 08:15:54, Søren Gjesse wrote:
> Can't we just use ILLEGAL_PORT (value 0) here, and avoid using the high bit?

Done.

https://codereview.chromium.org/171503009/diff/50001/runtime/bin/eventhandler...
runtime/bin/eventhandler_linux.cc:194: void
EventHandlerImplementation::SendData(intptr_t id,
On 2014/02/20 08:15:54, Søren Gjesse wrote:
> This method is no longer sending data, but just making direct calls. We should
> rename it to match that behavior.
> 
> Maybe we should also add the thread ID asserts that we added to the Mac
> directory watcher code to test/document which methods are called in which
> thread.

Done.

https://codereview.chromium.org/171503009/diff/50001/runtime/bin/socket_linux.cc
File runtime/bin/socket_linux.cc (right):

https://codereview.chromium.org/171503009/diff/50001/runtime/bin/socket_linux...
runtime/bin/socket_linux.cc:64: addr.ss.ss_family, SOCK_STREAM | SOCK_NONBLOCK |
SOCK_CLOEXEC, 0));
On 2014/02/20 08:15:54, Søren Gjesse wrote:
> Does the Mac/Android system calls also support these additional flags?

Not sure. Will do follow-up for other platforms.

Powered by Google App Engine
This is Rietveld 408576698