Commit Graph

3601 Commits

Author SHA1 Message Date
sgjesse@google.com 5973b2c422 Make the construction of a ProcessResult public
There was really no need for it to be a private implementation.

BUG=http://dartbug.com/23070
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44935 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-07 13:05:45 +00:00
koda@google.com 909b3f5cb5 Fix Dartium build: Add missing Dart_ExitIsolate before call to Dart_CreateIsolate.
The API specifies that there must be no current isolate when creating a new one.
Add the corresponding check.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44848 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-01 22:32:22 +00:00
asiva@google.com f752505e8d Fix windows compilation error "cannot allocate an array of constant size 0".
Review URL: https://codereview.chromium.org//1045253003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44817 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-31 19:32:23 +00:00
asiva@google.com 0dde7915cf Adjust vmservice_dartium.cc to account for new isolate snapshot buffer name.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44815 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-31 18:46:48 +00:00
asiva@google.com 87c8a6ee76 First step towards splitting a full snapshot into a vm isolate snapshot and a
regular isolate snapsot.
- change gen_snapshot to split a full snapshot into a vm isolate snapshot
  and an isolate snapshot
- change the build process and scripts to account for splitting the full
  snapshot

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44814 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-31 18:46:19 +00:00
asiva@google.com 354b4f3228 Move definition of trace_debug_protocol to dbg_connection.cc as this file is also linked into libvmservice_io
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44778 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-30 15:40:51 +00:00
johnmccutchan@google.com 14afbd7fc2 Fix compile all for service isolate
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44768 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-28 00:00:42 +00:00
johnmccutchan@google.com bc0b241b0e Enable strict flags for all service tests
BUG=
R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44765 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-27 23:32:07 +00:00
turnidge@google.com 4b43e9759d Clean up observatory testing processes when we are done with them.
BUG=
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44742 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-27 16:09:12 +00:00
kasperl@google.com 4c94a04529 Fix assert syntax in VM service code.
R=iposva@google.com, johnmccutchan@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44727 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-27 07:38:04 +00:00
johnmccutchan@google.com d2f5d87c96 Shutdown the service isolate when shutting down the VM
- Add a service control message to initiate service isolate shutdown.
- Provide a callback for the embedder to do any service isolate cleanup.
- Dart_Cleanup will now block until the service isolate shuts down.

R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44685 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-25 15:50:19 +00:00
rmacnak@google.com fbc6b005a4 Support percent encoded data URIs in the standalone embedder.
BUG=
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44609 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-20 20:11:53 +00:00
sgjesse@google.com a27b06c0f2 Make sure File_WriteFrom write all data unless an error occour
Signals can interrupt write before all requested data is written.

R=ajohnsen@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44570 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-19 10:13:28 +00:00
paulberry@google.com 8edfda7956 Avoid race in _FileSystemWatcher if subscription closed while event queued.
BUG=dartbug.com/22769
R=ajohnsen@google.com, sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44459 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-13 12:53:07 +00:00
iposva@google.com 24e965b323 - Avoid rewrapping LoadError inside LoadError.
R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44419 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-11 23:54:10 +00:00
turnidge@google.com 1989cc3ac8 Yesterday's deadlock fix was wrong. It could drop notifications.
BUG=
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44382 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 18:15:37 +00:00
sgjesse@google.com 48584debbd Make Socket address and port getters available after the socket is closed
There getters are used for generating eddor messages.

TBR=ajohnsen@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44359 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 08:54:22 +00:00
turnidge@google.com 1f851c718c Implement 'print', 'up', 'down', and 'frame' commands in the Observatory debugger.
Implement in-frame evaluation in the vm service.

Add a notion of 'current frame' and use it across the debugger,
particularly in source-location based commands (break, clear).

Change the expansion logic for frames, so that by default only the
current frame is shown.  When a user expands a frame it is now pinned.

Change command line parsing so that internal whitespace is preserved.  We need this to properly evaluate expressions with internal whitespace.

Fix a deadlock in the debugger message loop.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44353 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 00:07:45 +00:00
sgjesse@google.com 1d808d071b Fixed a number of bugs on RawSocket and Socket
The checking of the closed state was not present when dealing
with the properties port, remotePort, address and remoteAddress
on RawSocket and Socket. Then now all throw SocketException when
the RawSocket or Socket is closed.

* Calling port on a RawSocket would return the port even if it
  was closed

* Calling remotePort, address and remoteAddress did not check for
  OSError

* Calling remotePort, address and remoteAddress on a closed
  RawSocket caused syscalls using the already closed fd, which
  might also have been re-allocated already.

* Calling port, remotePort, address and remoteAddress on a closed
  Socket caused null pointer exception

R=ajohnsen@google.com

Correctly check for errors when getting remote address and port

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44319 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-09 13:33:28 +00:00
johnmccutchan@google.com fb58815c44 Remove 'dart:io' import in builtin.dart
BUG=
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44274 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 00:17:33 +00:00
sgjesse@google.com 5f27351942 Make sure to check for OS errors when constructing Uri.base
R=iposva@google.com
BUG=http://dartbug.com/22649

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44256 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-05 10:26:57 +00:00
johnmccutchan@google.com 827338a560 Enable loading via service isolate
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44251 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-05 01:37:05 +00:00
whesse@google.com 1d928984a3 Recommit "Fix issues with Socket shutdown.""
This recommits revision r44178, which was reverted in r44180, with changes to
fix the issues with Process.stdin.  It also adds a test for issue 22636, duplicate READ_CLOSED message.

Changes from r44187
Test tests/standalone/io/issue_22636_test.dart added.
Line "native.closedReadEventSent = true;" added to _RawSocket._writePipe() in runtime/bin/socket_patch.dart.

BUG=http://dartbug.com/22636
BUG=http://dartbug.com/22637
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44236 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-04 14:37:34 +00:00
whesse@google.com bbfd19ca02 Revert "Fix issues with Socket shutdown."
This reverts commit r44178, because it makes 10 tests about process stderr
and stdin fail with timeouts.
Original CL: https://codereview.chromium.org/975723002/

BUG=dartbug.com/22637
BUG=dartbug.com/22636
R=kustermann@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44180 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-03 16:51:57 +00:00
whesse@google.com 7d15c8182a Fix issues with Socket shutdown.
BUG=dartbug.com/22637
BUG=dartbug.com/22636

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44178 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-03 16:19:23 +00:00
sgjesse@google.com 0518874077 Add error handling when initializing the file system watcher
R=kustermann@google.com, wibling@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43838 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-18 13:20:15 +00:00
johnmccutchan@google.com 65bab52df5 Fix HTTP support in vm-service
- Add back Message.fromUri constructor.
- Fix 'root' isolateId alias.
- FATAL on missing source files when starting up the service isolate.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43814 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-17 16:36:36 +00:00
zra@google.com b1c08457f6 Allows gen_snapshot to be built with asan in the Mojo tree.
R=koda@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43764 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-13 15:37:03 +00:00
johnmccutchan@google.com 9b1f39bf58 Initialize standalone embedder debugger before calling Dart_Initialize
BUG=dartbug.com/22394
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43741 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-12 21:22:34 +00:00
sgjesse@google.com b40b0690c6 Fix Android build
R=whesse@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43728 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-12 15:13:35 +00:00
kustermann@google.com e06874c751 Fix potential use-after-free bug in windows eventhandler
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43725 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-12 13:47:45 +00:00
sgjesse@google.com 3fe2af43d1 Reafctor to use 'const RawAddr&' or 'RawAddr*' in the eventhandler code
Also pass the port as part of RawAddr instead of in a separate argument
when both addr and port are passed.

R=kustermann@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43722 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-12 11:39:20 +00:00
kustermann@google.com be70a52106 Reorder includes and remove platform/globals include
TBR=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43693 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-11 17:24:37 +00:00
kustermann@google.com dbd56a9b5c Add unittest for CircularLinkedList + bugfix
BUG=
R=whesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43691 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-11 16:20:18 +00:00
kustermann@google.com 70ca358a33 Send destroy events for each closed listening socket instead of waiting for all listening sockets to be done
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43680 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-11 11:34:47 +00:00
kustermann@google.com 615d1a01ac Reland "Introduce optional 'bool shared' parameter to ServerSocket.bind() ..."
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43678 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-11 10:01:20 +00:00
kustermann@google.com 700bea9f78 Parenthesize expression using bit-wise and on windows
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43640 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-10 12:17:54 +00:00
sgjesse@google.com 7b7ac3620a Add support to specify the source address for socket connect
BUG=http://dartbug.com/22253
R=kustermann@google.com, lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43638 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-10 11:56:51 +00:00
kustermann@google.com f0e8ff5381 Fix mac build: Add new disable_tokens=false value to super constructor call
Review URL: https://codereview.chromium.org//899593004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43634 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-10 10:34:35 +00:00
kustermann@google.com 1c7ef3c4f2 Implement mac support for having multiple Dart_Port's registered on one OS socket
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43632 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-10 10:15:33 +00:00
kustermann@google.com 74c0f65c89 Implement windows support for having multiple Dart_Port's registered on one OS socket
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43631 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-10 10:08:49 +00:00
sgjesse@google.com 91e7a32eb5 Remove SetNonBlocking/SetBlocking methods from Socket and add missing close-on-exec
The methods SetNonBlocking/SetBlocking on Sockets where not implemented on Linux
and not used on Windwsm. Removed and call directly to FDUtils when needed.

In Socket::Accept setting close on exec was missing on OS X and Android.

R=kustermann@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43627 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-10 07:29:36 +00:00
kustermann@google.com ebde0dbaeb Extract common Mask/Dart_Port settings of linux event handler implementation to eventhandler.h
R=sgjesse@google.com, wibling@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43585 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 08:50:32 +00:00
johnmccutchan@google.com 7cfc0d2e78 Fix checked mode failure in _asyncLoadError
Fixes dartbug.com/22295

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43554 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-06 14:39:08 +00:00
kustermann@google.com 3ea331e741 Introduce a kSetEventMaskCommand, some cleanups in windows eventhandler
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43547 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-06 09:36:57 +00:00
kustermann@google.com a7f50cd5d2 Move CircularLinkedList to eventhandler.h
Move constants and InterruptMessage to eventhandler.h

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43524 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-05 21:45:47 +00:00
turnidge@google.com d554f4fbfe Finish moving service protocol to json rpc.
Service

- Remove support for old-style service requests.

- Drop 'arguments' from JsonStream and ServiceRequestHandler.

- Json-rpc inspired renaming: command->method, options->params all over.

- Implement getFlagList, setFlag, getObjectByAddress.

- Add helpers PrintMissingParamError and PrintInvalidParamError
  to make our error messages more regular.

- Update tests.

- Service_SetSource removed for now.  John will resurrect.

Observatory

- Drop all Deprecated 'get' functions.  We now use json rpc for everything.

- Drop 'link' and 'relativeLink' from ServiceObject -- they were
  ui-specific and they are no longer meaningful anyways.  Use 'id' instead.

- New pages: VMPage, FlagsPage, InspectPage, ErrorPage.  All urls
  used by Observatory are now 'new school' and have a proper
  prefix.  ErrorPage is the new catch-all.

- Pages now use a Uri instead of a url String.  This lets them
  grab query parameters more easily.

- SimplePage replaces IsolateSuffixPage.

- We now use gotoLink() or makeLink() to make our navigation
  links.  gotoLink gets some optional parameters to make it
  easier to construct links to ServiceObjects.

- Rework mouse clicks on the heap map to use getObjectByAddress.

- Remove the breakpoint_list.  It wasn't working.  I'll add it back later.

- Silence logging of getIsolateMetric/getVMMetric.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43514 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-05 17:45:52 +00:00
iposva@google.com c859d25679 - Return exit code 253 in case of API errors during loading. This
will trigger for example when loading outdated snapshots.

R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43505 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-05 14:30:24 +00:00
kustermann@google.com cae03aaf1a Wait for eventhandler to shut down before exiting
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43504 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-05 13:16:07 +00:00
johnmccutchan@google.com 9c89a1bdc8 Synchronize gen_snapshot sources in bin/BUILD.gn with bin.gypi
BUG=
R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43490 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-04 22:33:12 +00:00