Commit Graph

726 Commits

Author SHA1 Message Date
sgjesse@google.com 310225aabf Revert "Fixes to eventhandler and HTTP"
This reverts commit 21994e29d17b686d71432dfac3bc59e5f2238aa1.

TBR=ager@google.com

BUG=

Review URL: https://codereview.chromium.org//11614028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16256 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 13:21:12 +00:00
sgjesse@google.com e107943e70 Fixes to eventhandler and HTTP
1. Improve error handling in Windows event handler

Whenever an error happens on an IO operation this
generates an error event and the handle is marked as having has
an error.

The test http_shutdown_test have been fixed to check for error as well
as succesful request when the server is closing the connection due to
closing the output stream before the input have been read. The test
have also been extended to have the client send more request data to
get more errors.

2. Disable event handler events until re-enabled from Dart

When an eventhandle event is posted to Dart this event is now
disabled in the eventhandler until re-enabled from Dart.

On Linux and Mac OS this was already the case as the file
descriptor for which the event(s) was posted was removed from
epoll/kqueue when events was posted.

On Windows this is now changed so that after an event is posted
it needs to be re-enabled from Dart code like on Linux and Mac
OS.

Changed the Dart event handler code to avoid posting disabling of
the out handler as the C++ code is already doing this on all
platforms.

3. Cancel HTTP parser when a connection is closing

When a HTTP connection is closing and moved to the close queue
there should be no more envents from the HTTP parser for whatever
data is still buffered.

R=ager@google.com

BUG=7294

Review URL: https://codereview.chromium.org//11623004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16252 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 12:32:35 +00:00
ager@google.com abb1941544 Fix closing of process stdin on Process.run.
R=sgjesse@google.com
BUG=dartbug/7473

Review URL: https://codereview.chromium.org//11614024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16244 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 06:18:54 +00:00
ager@google.com 1fe5a6d631 Complete the transition to unicode APIs on Windows.
Define _UNICODE and UNICODE so that we do not add accidental
dependencies on non-unicode APIs.

Reapply the change without the completely broken code in
socket_win.cc. Instead use 'A' versions explicitly.

R=sgjesse@google.com,antonm@google.com

Review URL: https://codereview.chromium.org//11564017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16122 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-13 15:51:48 +00:00
ager@google.com 0952f0a37f Revert last unicode change. Causes Pub issues.
R=sgjesse@google.com
BUG=

Review URL: https://codereview.chromium.org//11570006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16105 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-13 12:56:02 +00:00
ager@google.com 2a3c575b79 Complete the transition to unicode APIs on Windows.
Define _UNICODE and UNICODE so that we do not add accidental
dependencies on non-unicode APIs.

Anton, this could have an influence on Dartium builds as well?

R=sgjesse@google.com,antonm@google.com
BUG=

Review URL: https://codereview.chromium.org//11567010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16104 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-13 12:43:01 +00:00
whesse@google.com ff80433b70 Add client certificates to HttpsServer and HttpClient.
BUG=

Review URL: https://codereview.chromium.org//11553027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16097 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-13 10:10:17 +00:00
ager@google.com 2a1c56378d Fix extraction of error messages on Windows from getaddrinfo.
Use WSAGetLastError which is thread safe. This also means
lets us use the unicode support for normal error messages.

R=sgjesse@google.com
BUG=

Review URL: https://codereview.chromium.org//11566007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16096 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-13 10:09:52 +00:00
ager@google.com 8d523fead9 Use unicode versions of process APIs on Windows. Additionally,
retrieve the arguments to dart as unicode strings.

R=sgjesse@google.com
BUG=

Review URL: https://codereview.chromium.org//11565008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16093 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-13 09:24:05 +00:00
meh@google.com 1125aff405 Move generate_perf_events_symbols flag to VM (new issue with @google address)
Changes reviewed and approved here:
https://chromiumcodereview.appspot.com/11490026

Created a new issue using meh@google.com instead of meh@chromium.org so I can commit to trunk.

BUG=

Committed: https://code.google.com/p/dart/source/detail?r=16016

Review URL: https://codereview.chromium.org//11549011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16084 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-13 00:42:19 +00:00
ager@google.com ae0c2dc6e8 Update Windows file implementation to use the unicode APIs.
R=sgjesse@google.com
BUG=

Review URL: https://codereview.chromium.org//11554021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16045 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-12 15:38:51 +00:00
ager@google.com b54f69bc18 Use unicode versions of all directory system calls on Windows.
R=sgjesse@google.com
BUG=

Review URL: https://codereview.chromium.org//11550014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16043 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-12 15:01:48 +00:00
ager@google.com 8a14c1c319 Use FormatMessageW for Windows error messages to handle internationalized messages correctly.
R=sgjesse@google.com
BUG=dartbug.com/6986

Review URL: https://codereview.chromium.org//11558012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16041 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-12 14:39:21 +00:00
ager@google.com 81ea12b120 Fix unresolved classes issues in dart:io.
R=sgjesse@google.com
BUG=dartbug.com/7299

Review URL: https://codereview.chromium.org//11553020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16026 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-12 09:23:57 +00:00
meh@google.com c9271a657a Revert "Move generate_perf_events_symbols flag to VM (new issue with @google address)"
This reverts commit d4d38edbb889d186930c9346c867a0252f425e99.

BUG=

Review URL: https://codereview.chromium.org//11519025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16017 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-12 03:41:30 +00:00
meh@google.com 9067ec4d33 Move generate_perf_events_symbols flag to VM (new issue with @google address)
Changes reviewed and approved here:
https://chromiumcodereview.appspot.com/11490026

Created a new issue using meh@google.com instead of meh@chromium.org so I can commit to trunk.

BUG=

Review URL: https://codereview.chromium.org//11549011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16016 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-12 02:55:21 +00:00
ager@google.com 662e9d8032 Fix extraction of environment variables on Windows.
Environment variables were extracted using GetEnvironmentStringsA
and that does not play nice with for instance Danish letters
in environment variables.

This causes problems for pub if the current user has an
internationalized name.

This is the first patch in a series that will switch to the
unicode APIs on Windows.

R=sgjesse@google.com
BUG=

Review URL: https://codereview.chromium.org//11529008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15977 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-11 14:42:09 +00:00
whesse@google.com f542f14380 Enable client certificates in SecureSocket and SecureServerSocket
BUG=

Review URL: https://codereview.chromium.org//11467004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15957 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-11 09:26:23 +00:00
whesse@google.com e5fa0078db Disable SSL session cache to fix issue with SecureSocket connections.
BUG=dart:7208
TEST=standalone/io/secure_session_resume_test.dart

Review URL: https://codereview.chromium.org//11478049

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15904 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-10 13:14:58 +00:00
ager@google.com 3d5ed6402c Fix Windows process implementation to only inherit the three handles needed for stdin, stdout and stderr.
This time without attempting to update test binaries.

R=kustermann@google.com

Review URL: https://codereview.chromium.org//11497007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15898 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-10 12:15:51 +00:00
ager@google.com 5c48ccc7df Revert update of stable test binary.
R=kustermann@google.com
BUG=

Review URL: https://codereview.chromium.org//11474053

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15897 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-10 11:55:15 +00:00
ager@google.com 88a5725b48 Fix Windows process implementation to only inherit the three
handles needed for stdin, stdout and stderr.

R=sgjesse@google.com,ahe@google.com,kustermann@google.com
BUG=dartbug.com/7191

Review URL: https://codereview.chromium.org//11474026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15896 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-10 11:51:37 +00:00
ager@google.com c44170ebd5 Reapply change to use system code page on Windows to fix Pub.
This time with correct null termination of the char* that
we convert.

R=sgjesse@google.com
BUG=dartbug.com/7180

Review URL: https://codereview.chromium.org//11472032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15860 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-07 20:14:37 +00:00
rnystrom@google.com cf5ab6030e Revert "By default use current code page on Windows for decoding string"
This reverts commit c247cd299958d0ee713dcfef8aaf44d230a3a7e0.

Revert "Fix memory leaks in system string patch"

This reverts commit 5e533a0c383518fc1851fbdc01a796f7d6b077f8.

Review URL: https://codereview.chromium.org//11446067

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15854 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-07 18:49:52 +00:00
ager@google.com 2d5c3b2101 Fix memory leaks in system string patch
R=sgjesse@google.com
BUG=

Review URL: https://codereview.chromium.org//11470017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15846 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-07 13:30:17 +00:00
ager@google.com 66f08dcabf By default use current code page on Windows for decoding string
data from processes.

R=sgjesse@google.com
BUG=dartbug.com/7180

Review URL: https://codereview.chromium.org//11475026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15844 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-07 12:51:49 +00:00
cshapiro@google.com f5c4d7a381 Unify specification of file open, close, and write callbacks.
Review URL: https://codereview.chromium.org//11442024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15807 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-06 21:56:31 +00:00
sgjesse@google.com 3130a75c97 Make all allocation of external arrays used for IO use the IOBuffer class
This will not make a difference right now, but when we start to do
something with io buffers they should originate from the same place.

R=ager@google.com

BUG=

Review URL: https://codereview.chromium.org//11438045

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15785 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-06 13:44:24 +00:00
whesse@google.com 5bc3e0566f Stop leaking NSS library objects in SecureSocket.
This reduces memory leakage per secure connection from 600 kb to less than 3 kb, perhaps even to zero.

Review URL: https://codereview.chromium.org//11450033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15784 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-06 13:34:16 +00:00
asiva@google.com 1390105fbb Fix for issue 6768
Original CL done by Max Heinritz(meh@chromium.org)
Correct PrintUsage in gen_snapshot. 

Update PrintUsage in gen_snapshot to accurately describe proper usage of the command. 

BUG=6768
Review URL: https://codereview.chromium.org//11446018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15757 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-05 22:34:07 +00:00
whesse@google.com 4eeedf0cab Add a callback to SecureSocket for certificates that fail to be authenticated.
BUG=

Review URL: https://codereview.chromium.org//11415290

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15734 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-05 14:31:51 +00:00
iposva@google.com cb148cc938 - Add an extension test which throws from native code.
Review URL: https://codereview.chromium.org//11447010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15728 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-05 13:02:44 +00:00
podivilov@google.com d94dd29bb8 Support symbolic links and package imports in gen_snapshot.
R=asiva@google.com,iposva@google.com

Review URL: https://codereview.chromium.org//11421215

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15702 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-04 20:27:00 +00:00
ager@google.com 59ea7c3f6c Fix a number of int type issues in dart:io File implementation to avoid implicit conversions that can change the value.
R=sgjesse@google.com
BUG=dartbug.com/5301

Review URL: https://codereview.chromium.org//11414293

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15635 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-03 14:39:05 +00:00
whesse@google.com 7bc0bbd284 Add built-in root certificates to dart:io SecureSocket.
Add flag that allows them to disabled at runtime.

BUG=

Review URL: https://codereview.chromium.org//11308271

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15634 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-03 13:15:51 +00:00
iposva@google.com abfa6f634c - Consolidate libdart and libdart_export by always exporting
the Dart C API symbols.
Review URL: https://codereview.chromium.org//11415254

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15627 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-03 10:38:24 +00:00
ager@google.com 67f052fa04 Add RandomAccessFile.read method and use it for file input stream.
I will deprecate the readList method completely as my next change.

R=sgjesse@google.com
BUG=

Review URL: https://codereview.chromium.org//11308226

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15571 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 09:29:40 +00:00
whesse@google.com 34771fb64c Clean up svn:ignore property and .gitignore in dart, dart/pkg, dart/runtime, and dart/samples.
Review URL: https://codereview.chromium.org//11421093

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15392 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-27 14:07:53 +00:00
whesse@google.com 49d23f1c0a Add onError to dart:io SecureSocket. Allow onConnect and outputStream to coexist on Socket and SecureSocket.
BUG=

Review URL: https://codereview.chromium.org//11280162

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15378 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-27 10:09:35 +00:00
iposva@google.com e90e9086e2 - Remove unneeded library tags when concatenating libraries.
Review URL: https://codereview.chromium.org//11411176

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15368 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-27 05:41:14 +00:00
tball@google.com bf5f0db5d0 Added support for isolate unhandled exceptions.
BUG=

Review URL: https://codereview.chromium.org//11413101

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15352 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-26 23:31:47 +00:00
sgjesse@google.com 3231b9fdd7 Roll NSS to 169195.
This updates NSS to version 3.14.

It also contains a fix for compiling with -O3 on GCC 4.6.3.

R=whesse@google.com
Review URL: https://codereview.chromium.org//11413141

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15278 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-23 10:12:07 +00:00
whesse@google.com 15d5c6b582 Rename TlsSocket to SecureSocket, and all other Tls... items to Secure....
BUG=

Review URL: https://codereview.chromium.org//11419138

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15274 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-23 09:21:48 +00:00
ager@google.com 3c8d8827c0 Deal with extension loading from packages.
The issue is bad interplay with package and dart-ext URIs.
dart-ext URIs overwrite the package URI which makes us lose
the package URI path components. This change resolves
all the way to a file path for dart-ext URIs if the base
URI is a package URI.

R=whesse@google.com
BUG=dartbug.com/6264

Review URL: https://codereview.chromium.org//11308170

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15272 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-23 07:03:15 +00:00
whesse@google.com 0807c2662b Implement input and output streams for secure network sockets.
BUG=dart:6701

Review URL: https://codereview.chromium.org//11416108

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15267 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-22 16:37:10 +00:00
ager@google.com 2ab635e6c7 Remove output directory from library path on Linux.
Move the setting of -rdynamic to the two executables that need
it (dart, dart_no_snapshot). It is needed to allow dynamically
loaded libraries to lookup the API symbols in the binary. We
use that for native extensions.

R=whesse@google.com,iposva@google.com
BUG=

Review URL: https://codereview.chromium.org//11316144

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15258 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-22 14:41:34 +00:00
iposva@google.com 3d61f5d16a Fix bug 6467:
- Do not attempt to Dart_ExitScope if no scope exists.
- Print more informative message if Dart_Initialization fails.
Review URL: https://codereview.chromium.org//11308166

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15242 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-22 07:54:21 +00:00
hausner@google.com 65bf9cbb2a Remove abstract from class members in dart libraries
Add VM flag to produce compile error for explicitly
defined abstract class members.
Review URL: https://codereview.chromium.org//11299121

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15210 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-21 17:23:35 +00:00
whesse@google.com 961699f924 Working tls server sockets.
Add is_server parameter to _TlsSocket, pass it through to _TlsFilterImpl.connect.

Add TlsServerSocket class.

BUG=

Review URL: https://codereview.chromium.org//11414009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15163 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 17:45:18 +00:00
gram@google.com 3601944836 Revised CL for customisable logging (replacing printfs).
Review URL: https://codereview.chromium.org//11312242

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15096 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 17:38:15 +00:00