Commit Graph

3601 Commits

Author SHA1 Message Date
ajohnsen@google.com 32ef8cdecf Add 'address' and 'port' to SocketException, and include them in toString().
BUG=
R=whesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24784 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-05 12:36:10 +00:00
whesse@google.com 686724212d dart:io | Pass errors from multithreaded encryption back to Dart.
BUG=dartbug.com/11383
R=ajohnsen@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24765 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-04 09:21:01 +00:00
ajohnsen@google.com 856df98a8f Remove old code for dealing with non-typed buffers in Socket.write.
BUG=
R=whesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24722 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-03 11:43:02 +00:00
ajohnsen@google.com 908bf5b435 Fix Stdio->Stdin typo and missing external.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24685 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-02 13:29:34 +00:00
ajohnsen@google.com 8aa206940c Add Stdio.readByteSync and Stdio.readLineSync.
BUG=https://code.google.com/p/dart/issues/detail?id=7136
R=whesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24684 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-02 13:18:00 +00:00
ajohnsen@google.com 5dcd8f20e0 Extract the correct os-error on Socket.write, and report correctly in IOSink.
BUG=
R=whesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24623 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-01 11:23:17 +00:00
asiva@google.com 1e0c98714b Make writes consistent across socket and file synchronous/asynchronus writes in terms of truncation semantics (reports an argument error if the list element contains a non byte value).
Remove Common_IsBuiltinList as it is not used anymore

Change synchronous file writes to use Dart_TypedDataAcquireData and
Dart_TypedDataReleaseData since the buffer object is always a Uint8List
instead of the more expensive Dart_ListGetAsBytes.

R=ajohnsen@google.com, iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24620 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-29 18:19:33 +00:00
ajohnsen@google.com b39d2c08ca Implement redirect-stdout-on-close on Winows, to the 'NUL' device.
BUG=https://code.google.com/p/dart/issues/detail?id=11593
R=kustermann@google.com, whesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24578 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-28 10:29:21 +00:00
ajohnsen@google.com 900dba8e03 Remove static mutexes/monitors from dart:io.
BUG=
R=whesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24576 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-28 08:44:15 +00:00
ajohnsen@google.com 6005ff6a18 Fix comment from earlier commit.
BUG=
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24526 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-27 16:45:40 +00:00
ajohnsen@google.com d506a6e490 Stop printing when stdout is closed.
This makes sure we don't print(...) data to a file opened after stdout
was closed.

BUG=https://code.google.com/p/dart/issues/detail?id=9615
R=kustermann@google.com, whesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24525 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-27 16:44:39 +00:00
whesse@google.com 6aa0fafa00 Fix runtime build for Android
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24510 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-27 08:31:17 +00:00
iposva@google.com 2d2f1bf4ea - Use VOID_TEMP_FAILURE_RETRY where needed
Review URL: https://codereview.chromium.org//17840009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24505 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-27 01:14:12 +00:00
ajohnsen@google.com 7aa0222b5b Avoid picking port 65535 for ServerSockets, when any is requested.
Some browsers block requests to 65535.

BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24471 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-26 15:12:56 +00:00
sgjesse@google.com 78e9b8ef87 dart:io | Add rename to Link
R=whesse@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24468 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-26 14:09:29 +00:00
sgjesse@google.com fe175fd430 Change the timeout handling in the standalone VM to use 64-bit integers - take 2
Missed two places in previous commit.

TBR=floitsch@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24467 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-26 13:45:58 +00:00
sgjesse@google.com 89a21f2479 Change the timeout handling in the standalone VM to use 64-bit integers
R=floitsch@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24466 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-26 13:33:10 +00:00
whesse@google.com 7db2572902 dart:io | Change names for SecureSocket exceptions.
BUG=
R=ajohnsen@google.com, sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24405 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-25 13:54:42 +00:00
sgjesse@google.com 887c8e7596 Move getters from Options to Platform
The getters for executable, script and version are now statics on
Platform. I kept them on Options for now, but updated most tests to
use Platform.

R=ajohnsen@google.com, floitsch@google.com, iposva@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24401 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-25 12:56:23 +00:00
sgjesse@google.com 6783eaecbd Fix checked mode error in previous commit
TBR=ajohnsen@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24399 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-25 12:11:45 +00:00
sgjesse@google.com 8a2a138ed2 Detect EOF when reading stdio from terminal on Mac OS
R=ajohnsen@google.com
BUG=http://dartbug.com/453

patch from issue 17381012

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24397 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-25 11:47:55 +00:00
ajohnsen@google.com 015f2ee53c Fix InternetAddress.resolve impl and test for Windows.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24396 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-25 11:40:10 +00:00
sgjesse@google.com d550b05ca2 Remove dead code and re-enable short socket read
The native function Socket_ReadList have not been used for some time now.

Unfortunately the replacement function Socket_Read did not apply
short socket reads for testing. This is now in place again.

R=ajohnsen@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24394 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-25 11:32:39 +00:00
ajohnsen@google.com 3ad9779be6 Add reverse dns lookup as a method on InternetAddress.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24393 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-25 11:27:48 +00:00
ajohnsen@google.com 0bd36e7793 Add missing include of ifaddrs in mac.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24270 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-21 08:22:29 +00:00
ajohnsen@google.com 63e62f6806 Update mac and android Socket::LookupAddress.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24269 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-21 08:13:42 +00:00
ajohnsen@google.com 4624420914 Add NetworkAdaptor to dart:io.
NetworkAdaptor contains a static method, list, that will query the
underlaying system for active network adaptors.

BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24267 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-21 07:58:48 +00:00
ajohnsen@google.com e01bcbaa0d Include parent environment by default, add option to not, for Process.
BUG=https://code.google.com/p/dart/issues/detail?id=9294,https://code.google.com/p/dart/issues/detail?id=9295
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24262 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-21 06:44:55 +00:00
asiva@google.com 45445820da Replace uses of Dart_GetClass with Dart_GetType and Dart_InstanceGetClass with Dart_InstanceGetType (The idea is to deprecate Dart_GetClass and Dart_InstanceGetClass from the API)
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24244 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-20 18:11:47 +00:00
whesse@google.com 91deb19914 dart:io | Enable multithreaded secure networking encryption.
BUG=
R=ajohnsen@google.com, sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24233 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-20 15:06:43 +00:00
ajohnsen@google.com ff7d45d16f Always escape " in Process on Windows.
BUG=https://code.google.com/p/dart/issues/detail?id=10895
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24232 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-20 14:50:33 +00:00
zra@google.com 4c0268f31e Removes references to LIB_DIR from gyp files.
This eliminates the cirular dependency warnings from make.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24206 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-19 22:33:57 +00:00
sgjesse@google.com 54f6939ffc Ensure that there is no "hidden" DNS lookup in secure socket code
The required setting of the internet adddress of the peer for NSS is
now using the internet address which have already been looked up in
Dart code for normal secure socket connect.

In the cases where SecureSocket.secure and RawSecureSocket.secure is
used with a host name, the internet address of the already connected
socket will be used. If that is not sufficient an IntetnetAddress from
DNS lookup in Dart can be passed instead of just a host name.

R=ajohnsen@google.com, whesse@google.com
BUG=http://dartbug.com/11103

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24174 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-19 09:07:43 +00:00
johnmccutchan@google.com 2cf19138e3 HTTP loading cleanups
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24165 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-19 00:02:38 +00:00
iposva@google.com 55f0303ff3 - Fix PATH_MAX vs MAX_PATH confusion.
Review URL: https://codereview.chromium.org//17190005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24150 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-18 16:24:20 +00:00
iposva@google.com 7769854d0d - Do NOT mix malloc/free and new/delete!
R=sgjesse@google.com, sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24145 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-18 15:44:21 +00:00
johnmccutchan@google.com e93ba804c4 Revert 24099
Review URL: https://codereview.chromium.org//17284004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24100 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-17 16:38:17 +00:00
johnmccutchan@google.com 5103b96715 Make implicit things explicit when loading scripts.
Explicitly:
Set current working directory
Set windows flag

Previously these were side effects of calling other functions.

Also use ' strings consistently.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24099 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-17 15:59:13 +00:00
ajohnsen@google.com 1f449fd355 Report async errors when they happend, in directory listing.
This ensure that we capture the correct OS error.

Also fix compiler issue for mac and dart2js.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24076 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-17 08:16:42 +00:00
ajohnsen@google.com 69f44acd72 Use correct keyword for forward-declaration in directory.h.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24075 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-17 07:31:46 +00:00
ajohnsen@google.com 1b83d3b52e Make Directory.list pull-based, making it possible to pause, resume and cancel directory listing.
BUG=https://code.google.com/p/dart/issues/detail?id=10163,
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24074 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-17 07:27:19 +00:00
asiva@google.com 51651ee00b Split dart_api.h into multiple parts:
dart_api.h - Has the core API functions
dart_mirrors_api.h - Has API functions to support Mirrors or reflection
dart_native_api.h - Has parts which support the native message handling,
                    profilling and other internal tools

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24062 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 23:47:40 +00:00
sgjesse@google.com 7ce40aa3a0 dart:io | Add File.rename
R=ajohnsen@google.com
BUG=

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24030 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 13:34:54 +00:00
sgjesse@google.com 000875ca45 dart:io | Add File.rename
R=ajohnsen@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24029 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 12:58:21 +00:00
sgjesse@google.com 0cd11fcdc3 Remove Encoding.BINARY
THe Encoding.BINARY was a bad idea. It is now removed and null is used to indicate binary result from Process.run.

R=ajohnsen@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23977 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-13 13:06:11 +00:00
sgjesse@google.com c2d41fb1ba Add support for binary stdout/stderr data when using Process.run
R=ajohnsen@google.com
BUG=http://dartbug.com/9167

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23962 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-13 10:27:54 +00:00
sgjesse@google.com 55709f1f43 Ensure that only byte values are sent by sockets and web sockets
R=ajohnsen@google.com
BUG=http://dartbug.com/11007

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23896 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-12 08:33:16 +00:00
ajohnsen@google.com 5ce3b9ddea Clean up dart:io exceptions.
- Introduce IOException.
- Remove HttpParserException.
- Merge RedirectLimitExceededException and RedirectLoopException into
RedirectException.
- Remove 'IO' from FileIOException, DirectoryIOException, LinkIOException
and SocketIOException.

BUG=https://code.google.com/p/dart/issues/detail?id=9955
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23848 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-11 13:15:46 +00:00
ajohnsen@google.com 8bd584804b Require exact match of vm arguments.
This will make sure e.g. '--verbose-gc' won't trigger '--verbose'.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23845 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-11 11:55:43 +00:00
ajohnsen@google.com 2149b3a859 Add 'Server' and 'User-Agent' default header fields.
They include the major and minor version of Dart.

BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23844 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-11 11:54:15 +00:00