Commit Graph

3601 Commits

Author SHA1 Message Date
John McCutchan 38ab14f734 Use a source_set instead of static_library for libdart_embedder_noio
Some linkers (like libtool) complain when trying to create a
static_library with no sources. A source_set communicates the same thing
to GN without upsetting the linker.

patch from issue 1313973005 at patchset 1 (http://crrev.com/1313973005#ps1)

BUG=

Review URL: https://codereview.chromium.org//1331193002 .
2015-09-10 09:33:01 -07:00
William Hesse e40f303178 Remove checkout of NSS and sqlite from DEPS, remove support files.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1309903010 .
2015-09-10 12:56:22 +02:00
Rico Wind c6918fb126 Refactor the io resource classes
Move stopwatch so that we will only ever need one instance

Add utility functions for doing reads and writes

The only functional change here is that I say that an except is a read
of one byte, which also updates the readcount. I think this is just as
correct as what we did before.

BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1320023008 .
2015-09-09 09:18:07 +02:00
Ryan Macnak 83585cfbf1 Emit assembly instead of a blob for the instructions snapshot, and provide labels for the entry point of each Instructions.
R=asiva@google.com

Review URL: https://codereview.chromium.org//1309563006 .
2015-09-04 15:15:50 -07:00
Rico Wind 06ab2bdbdd Extract meta data about open sockets into separate class.
The current implementation only has information about tcp and udp
sockets, and we explicitly do not track internal and pipe uses of
_NativeSockets.

The testing of this is done through the service layer, which is the end user of
this.

BUG=
R=sgjesse@google.com

Committed: https://github.com/dart-lang/sdk/commit/01eff8ce18be7eceb6ce0be1097005965edf2588

Review URL: https://codereview.chromium.org//1323943003 .
2015-09-03 19:18:42 +02:00
William Hesse b033893060 Initialize member to NULL in SecureSocket.
BUG=

Review URL: https://codereview.chromium.org//1318843005 .
2015-09-03 11:32:06 +02:00
William Hesse 2a091441a1 Fix two memory leaks in SecureSocket.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1308953007 .
2015-09-03 10:43:16 +02:00
Ryan Macnak 0ed4d44a99 Toward precompiled snapshots.
Gets as far as encountering null Instructions in the first Dart_Invoke after loading the snapshot.

R=asiva@google.com

Review URL: https://codereview.chromium.org//1318803002 .
2015-09-02 16:15:02 -07:00
Rico Wind 665f397bb8 Revert "Extract meta data about open sockets into separate class."
This reverts commit 01eff8ce18.

Seeing issues on windows and on dart2js

R=sgjesse@google.com
BUG=

Review URL: https://codereview.chromium.org//1323183002 .
2015-09-02 16:18:52 +02:00
Rico Wind 01eff8ce18 Extract meta data about open sockets into separate class.
The current implementation only has information about tcp and udp
sockets, and we explicitly do not track internal and pipe uses of
_NativeSockets.

The testing of this is done through the service layer, which is the end user of
this.

BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1323943003 .
2015-09-02 15:26:35 +02:00
Zachary Anderson 98384272a5 Don't stop the event handler.
The EventHandler can't be stopped until Dart_Cleanup shuts down all isolates and cleans up all VM thread pool threads.

TBR

BUG=

Review URL: https://codereview.chromium.org//1325963002 .
2015-09-01 20:33:38 -07:00
Zachary Anderson 9395a5b86f Join embedder threads on Windows.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1291163002 .
2015-09-01 17:53:03 -07:00
William Hesse db97aa7e96 Fix hostname checking problem in SecureSocket
BUG=https://github.com/dart-lang/sdk/issues/24071
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1308773005 .
2015-08-28 10:08:34 +02:00
John McCutchan 021d7c0aa5 Make build incremental
- Make sure observatory's index.html is touched.
- Switch generate_snapshot_bin to have only one output (a timestamp file)

Fixes #24220

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

Review URL: https://codereview.chromium.org//1304953004 .
2015-08-27 11:14:13 -07:00
Ivan Posva 7ac684d461 - Fix XCode build, by making sure that we do depend on boringssl
where needed.

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1304373008 .
2015-08-26 11:35:06 -07:00
Ryan Macnak c3abcd8f93 Add argument to Dart_Initialize for precompiled instructions.
R=asiva@google.com

Review URL: https://codereview.chromium.org//1311963002 .
2015-08-26 11:04:27 -07:00
William Hesse 891c36a8e0 Do not request a client certificate as the default for SSL.
BUG=

TBR=kustermann@google.com

Review URL: https://codereview.chromium.org//1313393003 .
2015-08-26 18:48:24 +02:00
William Hesse 13bf8ff9f8 Breaking Change: merge BoringSSL branch into master
This replaces the NSS secure networking library from Mozilla
with the BoringSSL library from Google. This library, based
on OpenSSL, reads certificates from files in PEM format, rather
than storing certificates and keys in a SQLite database, the
way NSS does. There will be a blog post, changelog entries,
and other documentation of the breaking changes.

Review URL: https://codereview.chromium.org//1319703002 .
2015-08-26 14:42:12 +02:00
John McCutchan a9be61a358 Static analysis fixes and debug prints for wedging test
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1302313003 .
2015-08-21 14:31:33 -07:00
John McCutchan 1ff7144c31 Switch to a VM wide timeline recorder
- Initialize and shutdown timeline recorder with VM.
- Allocate global blocks for timeline events without an isolate.
- Stop storing the Stream pointer inside a TimelineEvent.
- Store category name in TimelineEvent.
- Store isolate pointer in TimelineEvent.
- TimelineEventRecorder::WriteTo is full VM dump.
- Allow JSONStream to be used without an isolate.
- When a ThreadRegistry is deleted, Finish all open timeline blocks.
- PrintJSON takes a filter.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1294023009 .
2015-08-18 15:18:02 -07:00
Anders Johnsen 54b7e9fec4 Fix arguments passed to FileSystemException from _socketType, when failing to resolve the type.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1293433003 .
2015-08-13 09:32:26 +02:00
John McCutchan 590557dfd0 When no service response is requested, send null back to the service isolate so it can cleanup
BUG=
R=turnidge@google.com

Review URL: https://codereview.chromium.org//1285673003 .
2015-08-11 07:13:09 -07:00
Zachary Anderson d4d89d6f12 Reverts VM thread cleanup
BUG=

Review URL: https://codereview.chromium.org//1275853008 .
2015-08-07 19:10:31 -07:00
Zachary Anderson 55bfb3d54b Clean VM thread shutdown:
Second attempt at: https://codereview.chromium.org/1177153005/

This time with fixed error propagation in the embedder.

R=turnidge@google.com

Review URL: https://codereview.chromium.org//1279733003 .
2015-08-07 18:42:00 -07:00
Ivan Posva 756763f3ca - Do not include crt_externs.h on iOS.
R=asiva@google.com

Review URL: https://codereview.chromium.org//1276293003 .
2015-08-07 10:44:20 -07:00
John McCutchan a1798f7e45 Enable native stack walking for allocation profiling
- Use native stack walker for allocation profiling when --profile-vm is passed
- Helpers for retrieving SP, FP, and PC registers
- Refactor sampler code to share more code between allocation sampling / interrupt sampling
- Export all symbols into the dynamic symbol table for run_vm_tests (already doing this for Dart executable)

R=regis@google.com

Review URL: https://codereview.chromium.org//1274663004 .
2015-08-06 13:31:56 -07:00
Ivan Posva ee9c0cbb2c - Make sure to close the port if a packages file was passed on the
command line without actually loading packages.

BUG=23991
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1278623002 .
2015-08-05 16:34:50 -07:00
Zachary Anderson 4ca87e6d88 Revert VM thread cleanup
TBR

BUG=

Review URL: https://codereview.chromium.org//1270323002 .
2015-08-05 01:27:01 -07:00
Ivan Posva 337931709a - Implement loading of .packages files from http.
- Fix bad type annotation in builtin.dart when getting an async
  load error.

Review URL: https://codereview.chromium.org//1268313002 .
2015-08-05 00:13:39 -07:00
Zachary Anderson 174d552574 Enables clean VM shutdown.
. Disables isolate spawning during Dart_Cleanup.
. Adds a static call Isolate::KillAllIsolates, which sends the
  OOB Kill message to all isolates when called from
  Dart_Cleanup.
. Modifies thread pool shutdown to block until all threads have
  exited.
. Fixes tests.

BUG=
R=turnidge@google.com

Review URL: https://codereview.chromium.org//1177153005 .
2015-08-04 23:29:25 -07:00
Ivan Posva f63db4960c - Implement resource loading via the Resource class.
R=asiva@google.com

Review URL: https://codereview.chromium.org//1264413002 .
2015-08-04 15:39:14 -07:00
Ryan Macnak ba88435b7d Add --observe to standalone embedder's help message.
BUG=http://dartbug.com/23743
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1256263010 .
2015-08-04 15:14:48 -07:00
John McCutchan 040ae23be8 Fix clean builds
BUG=

Review URL: https://codereview.chromium.org//1266043004 .
2015-08-03 12:16:58 -07:00
John McCutchan fc2d849cd5 Fix http requests and the crash dump RPC
- Fix HTTP and crash dump service requests by giving them a non-null id.
- Add basic heartbeat test for _getCrashDump RPC over HTTP.
- Fix some analyzer warnings.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1266943005 .
2015-07-31 14:38:04 -07:00
John McCutchan 67b480ee0d Stop sniffing user agent in vm service http server
- We don't need this check anymore.
- Removing it fixes an issue with uberproxy.

R=sigmund@google.com

Review URL: https://codereview.chromium.org//1261483003 .
2015-07-31 12:20:56 -07:00
Ryan Macnak 8a3e134502 Non-tree-shaking --precompile.
R=srdjan@google.com

Review URL: https://codereview.chromium.org//1261673004 .
2015-07-30 15:29:19 -07:00
John McCutchan dc2450aaad Move file i/o natives from builtin list to io native list
- This is being done so that Sky programs can perform file i/o.

R=asiva@google.com

Review URL: https://codereview.chromium.org//1265703004 .
2015-07-30 09:08:40 -07:00
Ivan Posva a78db046a6 - Fix logic bug when skipping comments.
Review URL: https://codereview.chromium.org//1269643002 .
2015-07-29 15:39:51 -07:00
Ivan Posva b07a9ddbca - Implement .packages specification.
Limitation: Currently only works for file: based .package files. If a script is loaded from http: then the VM currently assumes a co-located packages/ directory.

R=asiva@google.com

Review URL: https://codereview.chromium.org//1232593003 .
2015-07-29 11:30:33 -07:00
Natalie Weizenbaum 4153313dfd Make VM service id handling JSON-RPC 2 compliant.
* Numeric ids will not be converted to strings.

* String ids will be escaped, so an id of '"' doesn't produce invalid
  JSON.

* List or map ids will be rejected.

* Null ids will produce no response.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1255003003 .
2015-07-27 16:14:34 -07:00
Todd Turnidge e4684c7627 Provide stdout and stderr output in the Observatory debugger.
Implement two new streams, 'Stdout' and 'Stderr' in the service protocol.

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1232193003 .
2015-07-14 12:54:07 -07:00
Soren Gjesse 4205b2997e Change stdout/stderr to binary mode on Windows
Every other file opened in Windows is in binary mode, and there is no
way of opening a file in text mode.

This is a breaking change if one is relying on the CR insertion
when writing to stdout/stderr on Windows.

BUG=https://github.com/dart-lang/sdk/issues/19334
R=kustermann@google.com

Review URL: https://codereview.chromium.org//1228053002.
2015-07-10 13:57:15 +02:00
Srdjan Mitrovic 940cc2dab8 Fix package load error reporting.
BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org//1224403002 .
2015-07-09 14:49:54 -07:00
Daniel Andersson ff373e01dd Add forward-declarations in attempt to fix Mac/Windows build.
BUG=

Review URL: https://codereview.chromium.org//1225423002 .
2015-07-09 12:52:55 -07:00
Siva Annamalai 9342193461 These missing dependencies will cause a violation of "gn check" in a future version of gn.
BUG=
R=zra@google.com

Review URL: https://codereview.chromium.org//1214933010.
2015-07-01 11:25:36 -07:00
Soren Gjesse 0415d9271d Improve the encoding/decoding to/from system encoding on Windows
On Windows the dart:io SYSTEM_ENCODING is now also working with strings
which have null characters in them. Previously the string would be
terminated at the null character.

BUG=https://github.com/dart-lang/sdk/issues/23295
R=kustermann@google.com, lrn@google.com

Review URL: https://codereview.chromium.org//1194883002.
2015-06-24 10:36:05 +02:00
John McCutchan 983395f5f3 Misc service fixes
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1202583002.
2015-06-22 13:59:23 -07:00
John McCutchan 4dbbd524ac Allow mapping of builtin libraries in gen_snapshot
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1193933004.
2015-06-19 10:26:53 -07:00
Søren Gjesse eaeecf2ed1 Add file modes for opening a file write only
Added two new file modes WRITE_ONLY and WRITE_ONLY_APPEND. The current
file modes WRITE and WRITE_APPEND are kept as the read/write mode with
no change. Kept the same overall handling of create/truncate/append
semantics for the new file modes.

R=ager@google.com, ahe@google.com
BUG=

Review URL: https://codereview.chromium.org//1193653002.
2015-06-18 15:19:26 +02:00
John McCutchan bcf6eb7099 Remove dart_debugger_api.h
BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org//1190103003.
2015-06-17 14:56:55 -07:00