Commit Graph

3601 Commits

Author SHA1 Message Date
hausner@google.com 93d190dcbb More length restrictions in debugger protocol
Restrict the length of the textual representation of variable values that are sent over the debugger wire protocol. The full value can still be retrieved explicitly by the debugger client.
 
Review URL: https://codereview.chromium.org//12040053

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17517 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 00:53:42 +00:00
hausner@google.com 74b36381d8 Limit textual representation of arrays in debugger
The debugger wire protocol choked when large arrays were present, because it tried to send the entire array as textual value. This change limits the size of the textual representation to about 256 characters. If elements are dropped, they are printed as …

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17486 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-23 18:41:00 +00:00
floitsch@google.com 1febeb689a Move some core classes to collection library.
Review URL: https://codereview.chromium.org//11867024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17352 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-21 13:34:02 +00:00
hausner@google.com c3a133777d Add function for one-time stop at function entry
Adds function Dart_OneTimeBreakAtEntry()

Used by debugger clients to stop at the beginning of the program without setting a user-visible breakpoint.
Review URL: https://codereview.chromium.org//11926026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17332 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-19 00:03:30 +00:00
regis@google.com 912194a756 Fix vm code base so that it can be built for --arch=simarm (no snapshot yet).
Review URL: https://codereview.chromium.org//11956004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17246 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 00:34:20 +00:00
hausner@google.com 7e70aaddf7 Support for embedded Dart scripts
Add a line and column offset to scripts so that errors and exceptions
in embedded Dart scripts are reported at the proper location.
New API call Dart_LoadEmbeddedScript() that allows to specify
line and column offsets.

Stumbled on and fixed a bug. Script::kind field was not externalized to snapshot.
Review URL: https://codereview.chromium.org//11824067

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16934 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-10 21:47:09 +00:00
whesse@google.com 62a9af5ae9 Speed up secure sockets by increasing encrypted buffer size.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16921 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-10 14:24:57 +00:00
ager@google.com 91514e50e0 Remove accidental addition of new stream API in dart:io.
R=ajohnsen@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16903 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-10 08:43:56 +00:00
whesse@google.com 7f499abb04 Fix race condition in Directory.create.
BUG=https://code.google.com/p/dart/issues/detail?id=7679

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16842 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-09 09:59:14 +00:00
sgjesse@google.com 800b4b6c37 Add function for finding what a InputStream or OutputStream is attached to
For the dart:io types InputStream and OutputStream the top level
function stdioType will return whether the stream is attached to a
terminal, pipe, file or something else.

BUG=dart:2789

R=ager@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16839 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-09 09:17:07 +00:00
floitsch@google.com 4a7dfd2da3 Big merge from experimental to bleeding edge.
Review URL: https://codereview.chromium.org//11783009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16687 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 11:23:16 +00:00
whesse@google.com 7f60b90a48 Add synchronous directory listing to dart:io Directory.
BUG=dart:4730

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16636 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-04 13:51:15 +00:00
ager@google.com cfeb884afd Properly initialize eventhandler mask for all handles on Windows.
The change to make writes to stdout/stderr async exposed this
issue.

R=sgjesse@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16601 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-03 13:16:19 +00:00
meh@google.com 432978367e Clean up CodeObservers
Move CodeObserver registration to the OS abstraction.
Move Pprof logic to the OS abstraction.
Remove pprof from VM tests because now pprof logic is in the VM itself.
Add DISALLOW and AllStatic to Code Observers where appropriate.

Previous review: https://codereview.chromium.org/11572032/

BUG=7321

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16462 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-22 00:23:25 +00:00
meh@google.com ef737f105d Revert "Clean up CodeObservers"
This reverts commit 43e5ada2fba69c7d5c009b5bf70a234f12941617.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16446 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 17:45:36 +00:00
meh@google.com 6fbf9f1c2e Clean up CodeObservers
Move CodeObserver registration to the OS abstraction
Move Pprof logic to the OS abstraction
Add DISALLOW and AllStatic to Code Observers where appropriate

BUG=7321

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16445 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 17:37:59 +00:00
devoncarew@google.com 7695213dcf Fix an issue with newlines and exception text in the debugger wire protocol.
Review URL: https://codereview.chromium.org//11645046

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16444 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 17:27:23 +00:00
ager@google.com 6d0f985432 Add exitCode setter to set the exit code returned by the Dart VM
standalone binary on normal termination.

This is needed to be able to set the exit code without cutting
off pending asynchronous operations.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16435 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 10:36:52 +00:00
whesse@google.com ee2a8fe7d6 Add automatic initialization of SecureSocket library.
BUG=dart:7541

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16384 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-20 18:17:07 +00:00
ager@google.com 87a43bef60 Implement debugger connection on Windows.
This is a slightly cleaned up version of the code that Devon
created.

All of eventhandler and socket in bin is designed for async
communication only. Therefore, it does not make much sense
to use it for something as simple as this. I have put the
sync send and receive operations into DebuggerConnectionImpl
instead of attempting to use the async Socket::Read and
Socket::Write.

R=devoncarew@google.com,sgjesse@google.com,hausner@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16336 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-19 18:42:19 +00:00
ager@google.com 60c599f5d1 Be explicit about use of W version on Windows.
The trunk builder is unhappy. I don't understand why since we are
defining UNICODE and _UNICODE in our header files. However, let's
just be explicit.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16322 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-19 14:37:14 +00:00
kustermann@google.com 29585740d6 Set close-on-exec flag on pipe() and kqueue() file descriptors on MacOS
Review URL: https://codereview.chromium.org//11571056

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16316 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-19 12:43:38 +00:00
ager@google.com 406617e179 Fix Windows XP process handling.
ProcThreadAttributeLists are not supported on Windows XP so we need
to dynamically load the functions and check that they exist. This
of course means that file descriptors are inherited on XP, but we
knew that already.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16309 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-19 10:10:01 +00:00
kustermann@google.com c20c523de8 Set close-on-exec flag on pipe() and epoll() file descriptors
Review URL: https://codereview.chromium.org//11644017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16308 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-19 09:36:47 +00:00
sgjesse@google.com 606bfd5e96 Reapply "Fixes to eventhandler and HTTP""
This reapplies r16252 with a number of fixes.

R=ager@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16306 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-19 08:11:51 +00:00
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