Commit Graph

3601 Commits

Author SHA1 Message Date
koda@google.com 85aeff6569 Fix typing for checked mode test.
TBR=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42073 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-02 20:26:53 +00:00
koda@google.com 96576ad59e vmservice: basic object graph serialization.
Sends a service event with binary data encoding the basic shape of the object graph; for each object, its:
* size
* class id
* neighbors (excluding smis and nulls)

This is a minimal implementation to make the first unit test pass (TDD).

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42070 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-02 19:33:09 +00:00
johnmccutchan@google.com bcce1a362b Upgrade Observatory to latest SDK
BUG=
R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42048 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-01 22:00:52 +00:00
zra@google.com 9c352e0898 Moves BUILD.gn config from root to runtime.
Cannot checkout a single file from svn through gclient.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41677 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-11 22:59:00 +00:00
zra@google.com b4d3762221 Adds GN build files for building in GN based projects.
Review URL: https://codereview.chromium.org//690923003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41673 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-11 22:03:55 +00:00
kustermann@google.com 53cc8c512d Support for the ALPN extension of the TLS protocol for Client and Server
This CL uses the NSS support for the ALPN extension of the TLS protocol
(see RFC 7301).

R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41628 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-10 12:31:02 +00:00
zra@google.com 0219bdb81a Regularize naming to make BUILD.gn files easier to write.
Review URL: https://codereview.chromium.org//703693002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41510 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-04 22:03:57 +00:00
sgjesse@google.com 65e1149f8c Make stdout/stderr async
This makes stdout.write and stderr.write async.

This effectively reverts https://code.google.com/p/dart/source/detail?r=33645

Reapplies r41350 after the dart2js batch-runner have been changed to handle
async stdout/stderr.

R=ricow@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41436 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-31 12:11:53 +00:00
zra@google.com 306ef8dd75 Fixes leak in Process.runSync().
This removes the call to _stdin._sink.destroy()
from my previous CL, which broke a test.
stdin is closed by the native implementation.
Closing again shouldn't cause a problem, but
it looks like destroy() attempts to do a lot
more than that.

OTOH adding the remove call is sufficient to
fix the leak, so let's just stick with that.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41395 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-29 14:32:30 +00:00
zra@google.com 4e15424820 Reverts 41378 for test failure.
Review URL: https://codereview.chromium.org//688443005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41386 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-29 01:57:22 +00:00
zra@google.com 2bb9c19ab8 Fixes memory leak in Process.runSync()
This was introduced in 36665 by https://codereview.chromium.org/307503002/

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41378 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 23:02:54 +00:00
sgjesse@google.com b6d16215aa Revert "Make stdout/stderr async"
This reverts r41350.

There are test-failures that needs to be analyzed.

TBR=iposva@google.com, ajohnsen@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41353 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 09:07:56 +00:00
sgjesse@google.com c50df5e563 Make stdout/stderr async
This makes stdout.write and stderr.write async.

This effectively reverts https://code.google.com/p/dart/source/detail?r=33645

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41350 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 08:53:10 +00:00
turnidge@google.com c658fa60f9 Fix deadlock that can occur while handling service messages at a breakpoint.
Deadlock looks like:

  Regular Isolate
  -> paused at breakpoint in debug message loop
  -> holds debug message queue lock to get message notifications
  -> handles an service message
  -> waits for portmap lock to send response

  Service Isolate
  -> receives request for paused isolate
  -> holds portmap lock to send message
  -> runs custom message notifier to wake debug message loop
  -> waits for debug message queue lock

I've solved this by releasing the debug message queue lock while
handling service messages.  This requires me to poll for new service
messages after reacquiring the debug message queue lock to make sure I
haven't dropped any notifications.

It's a little weird that the embedder (runtime/bin) needs to be aware
of the locking in the core vm (runtime/vm), but this seemed like the
simplest fix for now.

BUG=
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41326 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 16:57:21 +00:00
kustermann@google.com 360dfe4f41 Several bugfixes in dart:io's handing of sockets
This CL includes fixes for the following issues:

a) The event handler created listening socket metadata (values of a hashtable
indexed by filedescriptor) sometimes as SocketData and sometimes as
ListeningSocketData depending whether the socket has been listened to or not.
This was very buggy, in particular because multiple isolates can have a
reference to the same server socket in different states (opened, listened,
closed).

=> This should be fixed by sending the file descriptior typeMask always to the
   eventhandler.

b) A server socket cloned via the ServerSocketReference mechanism, opens a
receive port for sending (fd, address, port) to isolates/... which want to
create a server socket from the reference.
This receive port was not closed properly when calling only close() (and not
listening first).

=> This should be fixed by closing this receiveport on the ServerSocket.close()
   call as well.

c) It was assumed in the event handler that a close command needs to have the
Dart_Port in a hash table. But this is only the case if the user actually
listened to the ServerSocket. Otherwise the event handler does not know about
the server socket. This caused a NULL dereference which resulted in a SEGFAULT.

=> This should be fixed by checking if the Dart_Port is in the hashmap of the
ListeningSocketData or not.

d) Too many bits were considered when extracting token count in C++ code.

The CL includes a regression test which should trigger these issues.

BUG=21384,21383
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41276 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-24 08:55:50 +00:00
srdjan@google.com 5b9f017992 Fix issue 20133: do not crash if debug port is illegal.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41155 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-16 17:08:22 +00:00
ajohnsen@google.com 1e731cf3e5 Don't create unused OSError in Socket_Available.
BUG=
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41005 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-09 06:21:21 +00:00
turnidge@google.com f90e8ad15f Begin implementing a debugger page in Observatory.
In progress.

For now we have a split view with the stack on top and
console/controls on the bottom.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40887 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-02 17:33:38 +00:00
asiva@google.com 2761153e08 Fix following compiler warnings:
os_win.cc(266) : warning C4018: '>=' : signed/unsigned mismatch
stub_code_ia32.cc(89) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
stub_code_ia32.cc(213) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
stub_code_ia32.cc(317) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
crypto_win.cc(5) : warning C4005: '_CRT_RAND_S' : macro redefinition
file_win.cc(512) : warning C4101: 'st' : unreferenced local variable

BUG=http://dartbug.com/21150
R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40826 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-30 23:29:26 +00:00
whesse@google.com 57ba535cf1 Update version of NSS in Dart to 3.16.7
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40802 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-30 09:15:32 +00:00
johnmccutchan@google.com 4b43b25d69 Fix handling of VM reconnect
BUG=
R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40737 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-26 20:15:15 +00:00
iposva@google.com cc13627fc8 - Remove Isolate::CurrentAddress().
- Remove use of INFINITY and -INFINITY.

R=rmacnak@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40700 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-25 23:39:30 +00:00
sgjesse@google.com b90c405572 Remove the assumption that stat64 and lstat64 cannot return EINTR on Linux
BUG=http://dartbug.com/21080
R=ajohnsen@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40671 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-25 07:06:06 +00:00
ajohnsen@google.com 0491f4e887 Per isolate package root.
BUG=
R=iposva@google.com, ricow@google.com, sgjesse@google.com, turnidge@google.com

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40581 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-23 05:46:14 +00:00
ajohnsen@google.com 38619425c2 Revert "Per isolate package root."
Revert "Fix test in checked mode."

The Dartium branch is locked atm, making it impossible to land this and have green Dartium bots.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40540 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-22 11:13:28 +00:00
ajohnsen@google.com a058d07806 Per isolate package root.
BUG=
R=iposva@google.com, sgjesse@google.com, turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40534 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-22 08:07:06 +00:00
whesse@google.com 0b9b34eb7f Update NSS to 3.16.4. Updated to Chromium's copy of NSS at revision 291806
Includes a fix for an Android L issue.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40430 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-18 10:40:40 +00:00
turnidge@google.com 16343fa13f Add tools/ddbg_service.
This is the directory where we will work on a version of ddbg that
uses the vm service.

Not yet functional.

BUG=
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40334 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-16 18:16:28 +00:00
johnmccutchan@google.com a6c16efa38 Do not navigate to vm-connect page upon disconnect
Also, prompt the user when they click a link when we hvae no connection

BUG=
R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40262 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-15 18:19:48 +00:00
ajohnsen@google.com 9dd4df6f9a Fix datagram issue where available is not correctly updated upon receive.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40235 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-15 08:21:44 +00:00
rmacnak@google.com 128148aafc Preserve the contents of Dart strings with unmatched surrogate halfs by avoiding a UTF16 -> UTF8 -> UTF16 conversion.
Clean up some confusion between code points and code units.

BUG=http://dartbug.com/20583
BUG=http://dartbug.com/20874
R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40174 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-11 18:42:04 +00:00
rmacnak@google.com eff104a2e5 Give fields a model class in the service library.
R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40166 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-11 17:32:55 +00:00
johnmccutchan@google.com 435c6ad7ac Reduce service isolate startup time from ~80ms to ~30ms
- Get access to dart:io internal signal listening function using API instead of mirrors.

- Service isolate can start with service deactivated.
- Load Observatory front end resources only when service activated.
- Do not execute Dart Service code until service is activated.
- Register live isolates when service is activated.

- Startup refactored to allow for future use of script snapshots.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40124 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-10 22:38:33 +00:00
johnmccutchan@google.com 22144dbed2 Add support for TokenStream, LocalVarDescriptors, and PcDescriptors to service lib
Add generic 'Object' ref and view element. This will work for any ServiceObject with type == 'Object'.

Ref element uses the vmType as the link text if there is no name.
View element is mostly just <object-common> but that allows calculating retaining path, retained size, etc.

BUG=
R=rmacnak@google.com, turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40119 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-10 21:20:59 +00:00
regis@google.com 0220e41d72 New bigint implementation in the vm.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40061 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 21:47:44 +00:00
rmacnak@google.com 27b99b257c Don't double-escape strings in the VM Service, and don't use \u0000 to determine the string length.
This makes characters above ASCII to display as themselves in Observatory, strings with \u0000 in the middle not to be truncated, and avoids a bug in the previous escaping where a non-ASCII character in the last position would have its escaped representation cut off.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40060 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 21:34:06 +00:00
rmacnak@google.com 26fcef52bf Fix UI for retained size of a class.
(Was broken by r39758)

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40046 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 17:42:14 +00:00
turnidge@google.com 320c1bb74d Rework how types work in the VM Service.
We now return a "type" property and an optional "_vmType" property for
each response.  We use this to "hide" vm implementation specifics in
the VM Service protocol.

For example, before we might have returned an integer reference with type
"@Smi".  Now it would have the type "@int" and the _vmType "@Smi".

This also allows us to hide funky vm internal types behind the generic
"Object" type.

Updated the protocol.md file somewhat to describe a notion of "private
properties".

Updated the Observatory and unit tests.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40044 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 17:25:52 +00:00
iposva@google.com adbe016fbc - Support loading from https.
- Remove over-eager assertion.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40005 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 00:10:06 +00:00
zra@google.com 0f6c47ab78 Delays creating a snapshot file until after the snapshot is created.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39998 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-08 20:52:25 +00:00
rmacnak@google.com 48d9189ab7 Add a manual test for inspecting types that have a special VM implementation.
R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39982 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-08 17:38:35 +00:00
blois@google.com 2941737d68 Updating Android library dependencies
We ran into some linker issues on gen_snapshot after upgrading to to Ubuntu 14.04 where it was unable to resolve pthread_condattr_setclock. I'm not sure if an additional dependency was added for this, or if the declaration moved.

The core issue though is that in cross-compilations, some of the necessary dependencies were being added as 'linux', but this is not the case when compiling for host when the target is Android. The gen_snapshot target was accounting for this by adding the dependencies for android itself, but instead it should be done at the targets.

The fix here is to move the dependencies from gen_snapshot and onto the targets as conditional OS=android, and to include the same set of libraries.

BUG=
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39972 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-08 15:59:30 +00:00
ajohnsen@google.com ebfff1fd60 Remove last _logResolution reference.
Was missed due to merge.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39899 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-05 06:32:49 +00:00
ajohnsen@google.com d6bbe5ad08 Don't do Uri->String->Uri when resolving package imports.
This fixes an issue on windows where Uri.parse(Uri.toFilePath()) would produce escaped Windows paths.

BUG=
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39898 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-05 06:24:22 +00:00
ajohnsen@google.com 8674d45766 Remove debug logging from builtin.
BUG=
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39897 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-05 05:38:34 +00:00
ajohnsen@google.com ed3981ec78 Reduce the number of Uris parsed in builtin.
BUG=
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39896 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-05 05:33:17 +00:00
rmacnak@google.com 154c31169e Teach the Observatory about WeakProperties (ephemerons).
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39885 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-04 20:36:34 +00:00
rmacnak@google.com 22fed7f373 Teach the Observatory about MirrorReferences.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39883 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-04 19:55:15 +00:00
rmacnak@google.com 92b17f752b Address static warnings in the service library and tests.
BUG=http://dartbug.com/20805
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39882 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-04 18:38:39 +00:00
turnidge@google.com d3173684dd Add --break-at-isolate-spawn to help with isolate debugging.
This flags stops spawned isolates with a one-time breakpoint at their
entrypoints.

Fix a bug in Observatory which interfered with browsing a spawned
isolate.

BUG=
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39878 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-04 16:53:44 +00:00