Commit Graph

3172 Commits

Author SHA1 Message Date
Steven Sheffey 025b433c00 Updated directory_linux.cc to conform with the deprecation of readdir_r (#27093)
* Updated directory_linux.cc to conform with the deprecation of readdir_r

* Fixes to directory_linux.cc

* Modified error checking to more accurately represent the original code

* Removed redundant check and changed variable names for readability

* Changed variable name in DeleteRecursively for readability

* Modified loop for better error checking

* Simplified loop in DirectoryListingEntry::Next

* Fixed text on a comment

* Added summary of pull request and fixed code style

* Fixed commenting style

* Fixed a comment referencing readdir_r
2016-08-23 07:49:00 -07:00
Zachary Anderson 22dbeee255 [fuchsia] remove unused file. update vm test statuses
R=asiva@google.com

Review URL: https://codereview.chromium.org/2263783002 .
2016-08-22 08:55:18 -07:00
Ryan Macnak d418dde65b Reduce copying in sending service responses.
Add missing safepoint transitions.

Issue #27092
Likely contributes to Issue #27010

dart2js hello
Peak RSS at first Observatory visit -> Peak RSS after visiting timeline (with endless recorder)
Before 215M -> 321M
After 182M -> 233M

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2254543006 .
2016-08-18 10:34:50 -07:00
Zachary Anderson 1b303e64fe [fuchsia] Fix build. Build packages/ output. Add Directory::Exists().
The build was broken by the addition of OS::MaxRSS, which I've added
unimplemented. I need the packages/ output to get the Dart language
tests going. I've added Directory::Exists() so that we can give
the right error message on a missing package: import instead of
crashing.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2259613002 .
2016-08-18 09:21:14 -07:00
Zachary Anderson c21891ec6a Fuchsia: Improves run_vm_tests wrapper program.
This change makes a few improvements to Fuchsia's wrapper around
run_vm_tests:
- Loads the binary into memory only once, speeding things up a bit.
- Captures the output of 'run_vm_tests --list' to extract the list
  of tests to run instead of reading it from a file.
- Captures the output of the tests, and prints a test's stdout
  and stderr to the console only if the test failed.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2238983003 .
2016-08-18 08:50:26 -07:00
Zachary Anderson 21f670dfb8 [fuchsia] Remove no longer needed fuchsia_test
R=asiva@google.com

Review URL: https://codereview.chromium.org/2244413005 .
2016-08-18 07:48:25 -07:00
William Hesse a9c89293af Fix missing global declarations in socket_unsupported.cc
BUG=
R=terry@google.com,fschneider@google.com

Review URL: https://codereview.chromium.org/2251783002 .
2016-08-16 17:35:03 +02:00
Florian Schneider 021ebb2033 Correct and GC unrecognized flags from our tests.
Fix some misspelled flags.

Remove some non-existent flags.

Fix --short_socket_read and --short_socket_write flags used in IO tests.

Running with --ignore-unrecognized-flags is still on because some flags are only visible
in DEBUG mode.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/2247733005 .
2016-08-15 18:28:11 -07:00
James Robinson fa1bbc98cf [fuchsia] Use sysconf to get number of processors
We should be using standard interfaces to access information like
the nunber of processors.

R=zra@google.com

Review URL: https://codereview.chromium.org/2244253004 .
2016-08-15 15:21:36 -07:00
James Robinson cfdd6ee5cc [fuchsia] Update run_vm_tests_fuchsia for fuchsia launchpad API change
R=zra@google.com

Review URL: https://codereview.chromium.org/2235033002 .
2016-08-10 15:41:03 -07:00
Zach Anderson 581939d8b6 Retry: Fixes memory leaks in the eventhandler
Crashes were caused by removing from a std::map while iterating over it.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2231123002 .
2016-08-10 15:20:30 -07:00
Matthias Hausner 1a6d1eca32 Implement @patch annotation for patch class members
Allow members of patch classes to be annotated with @patch. The VM
ignores the annotation. I simply replaces the original method
if the name matches, or reports an error if field names match.

Adding a bit is_patched to members to do more checking remains a
TODO. There are currently no unused bits available, and I don’t want
to increase the size of Function objects for this.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/2230383003 .
2016-08-10 12:54:57 -07:00
Zachary Anderson bf085120f6 Revert: Fixes leak of duplicate command line environment strings
For bot crashes on Mac

Review URL: https://codereview.chromium.org/2229973002 .
2016-08-09 15:36:57 -07:00
Zachary Anderson 92abe83b26 Fixes memory leaks in the eventhandler
These probably only happen when the VM is going down after an unhandled
exception, but I want to fix them anyway.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2228503007 .
2016-08-09 15:20:50 -07:00
Adam Barth fac99f35b3 Switch Dart_Initialize to use a struct
The number of NULL parameters was getting out of hand.

R=zra@google.com

Review URL: https://codereview.chromium.org/2223463003
2016-08-09 12:25:39 -07:00
Adam Barth bd41127c7f Revert "Switch Dart_Initialize to use a struct"
I landed the wrong version of my patch.

This reverts commit bdc25d5695.
2016-08-09 12:24:13 -07:00
Adam Barth bdc25d5695 Switch Dart_Initialize to use a struct
The number of NULL parameters was getting out of hand.

R=zra@google.com

Review URL: https://codereview.chromium.org/2223463003 .
2016-08-09 12:20:16 -07:00
Matthias Hausner e11ca24053 Use metadata annotation @patch for patch classes
Annotate patch classes and top-level patch functions with @patch
instead of the pseudo-keyword patch. This allows the analyzer
to read patch files, and matches the syntax that dart2js uses.

The deprecated syntax is still supported, but a warning is printed when detected.

BUG=

Review URL: https://codereview.chromium.org/2220883004 .
2016-08-09 09:48:03 -07:00
Zachary Anderson 82cb63e70f Fixes leak of duplicate command line environment strings
R=asiva@google.com

Review URL: https://codereview.chromium.org/2222013002 .
2016-08-08 12:53:26 -07:00
Zachary Anderson 1c6d8fd4ec Fuchsia: Fix arm64 build
R=asiva@google.com

Review URL: https://codereview.chromium.org/2226843002 .
2016-08-08 12:43:13 -07:00
John McCutchan a67b9c82ee Support devFS writes via HTTP PUT
- [x] Allow DevFS writes over HTTP PUT with a gzip compressed payload.
- [x] Add service test for http put writes.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2225583002 .
2016-08-08 10:35:29 -07:00
Florian Loitsch 596723f0c3 Fix return type for JoinMulticast.
Fixes #27032.

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

Review URL: https://codereview.chromium.org/2220983002 .
2016-08-08 12:22:30 +02:00
Zachary Anderson 8808f853e3 Fix memory leaks in BoringSSL secure socket implementation
After running our tests with ASAN and inspecting the
BoringSSL code, it appears that the calls indicated
in the CL increment the reference count of the
objects passed in being added to the security context.
Therefore, to avoid a leak, we have to free() the
objects to decrement the reference count so that the
memory is freed when the context is destroyed.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2206233003 .
2016-08-04 10:49:51 -07:00
Florian Loitsch b8c12bc9ff Make Mac-port non-blocking.
Fixes issue #26790.

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

Review URL: https://codereview.chromium.org/2211523002 .
2016-08-04 15:58:20 +02:00
Florian Loitsch ef4933df25 Better error-message when bind fails.
See #26790.

R=sgjesse@google.com

Committed: https://github.com/dart-lang/sdk/commit/34aed6a08b8547a985ac701cf3910a5f5450dd52

Reverted: https://github.com/dart-lang/sdk/commit/a1005bad7e249a5510b30683a5ca52b16baafbc4

Committed: https://github.com/dart-lang/sdk/commit/8c4954492f0593f41d270691bb82c26d8509c894

Reverted: https://github.com/dart-lang/sdk/commit/5ebcd3cda0f34be580be1a8ed816849a82691427

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

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

Reverted: https://github.com/dart-lang/sdk/commit/90a194be3c03c058c4e087e1bd11823817982393
2016-08-04 14:45:01 +02:00
Florian Loitsch 90a194be3c Enter a description of the change.
Merge branch 'master' into revert

Revert "Better error-message when bind fails."

This reverts commit eaeb260244.

Review URL: https://codereview.chromium.org/2213533002 .
2016-08-03 23:18:39 +02:00
Florian Loitsch eaeb260244 Better error-message when bind fails.
See #26790.

R=sgjesse@google.com

Committed: https://github.com/dart-lang/sdk/commit/34aed6a08b8547a985ac701cf3910a5f5450dd52

Reverted: https://github.com/dart-lang/sdk/commit/a1005bad7e249a5510b30683a5ca52b16baafbc4

Committed: https://github.com/dart-lang/sdk/commit/8c4954492f0593f41d270691bb82c26d8509c894

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

Reverted: https://github.com/dart-lang/sdk/commit/5ebcd3cda0f34be580be1a8ed816849a82691427
2016-08-03 22:44:28 +02:00
Zachary Anderson 0e6f087942 Clear the error bit after reading the default trusted certs
fixes #26954

R=whesse@google.com

Review URL: https://codereview.chromium.org/2211453002 .
2016-08-03 12:24:35 -07:00
Ryan Macnak 5ebcd3cda0 Revert "Better error-message when bind fails."
This reverts commit 8c4954492f.

This change broke the Android build.

Review URL: https://codereview.chromium.org/2201183004 .
2016-08-03 09:54:57 -07:00
Florian Loitsch 8c4954492f Better error-message when bind fails.
See #26790.

R=sgjesse@google.com

Committed: https://github.com/dart-lang/sdk/commit/34aed6a08b8547a985ac701cf3910a5f5450dd52

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

Reverted: https://github.com/dart-lang/sdk/commit/a1005bad7e249a5510b30683a5ca52b16baafbc4
2016-08-03 16:27:48 +02:00
Florian Loitsch a1005bad7e Revert "Better error-message when bind fails."
This reverts commit 34aed6a08b.

Review URL: https://codereview.chromium.org/2210523002 .
2016-08-03 15:47:15 +02:00
Florian Loitsch 873c6e4688 Don't close stdio/stderr when shutting down.
Fixes #26872.

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

Review URL: https://codereview.chromium.org/2204953002 .
2016-08-03 15:30:30 +02:00
Florian Loitsch 34aed6a08b Better error-message when bind fails.
See #26790.

R=sgjesse@google.com

Review URL: https://codereview.chromium.org/2205913003 .
2016-08-03 15:29:41 +02:00
Zachary Anderson e476e00ca6 Fuchsia: Use low-level prng call, add test, update test runner.
There is now a syscall for getting cryptographically secure random bytes.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2204523002 .
2016-08-02 13:18:37 -07:00
Zachary Anderson 5c38ff4180 [GN] Add Core{Foundation,Services}.framework to libs in Mac build
The gen_snapshot binary compiles on the host and needs these two frameworks on
the link line since it uses CFRunLoop and FSEvents.

R=phosek@chromium.org, zra@google.com

Review URL: https://codereview.chromium.org/2202883002 .
2016-08-02 09:19:56 -07:00
Adam Barth 81253916a8 Fix Flutter build
Flutter now defines is_fuchsia to false, which breaks this check in this code.
The Fuchsia build seems fine without this check, so I've removed it.

TBR=zra@google.com
2016-08-01 16:50:42 -07:00
John McCutchan 9c83d24622 Add --hot-reload-rollback test mode
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2200683002 .
2016-08-01 10:57:22 -07:00
John McCutchan 1033075c36 Fix shutdown loaders
BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2202593002 .
2016-08-01 09:23:45 -07:00
Zachary Anderson 31c98f0191 Fuchsia: Paralellize VM test wrapper. Update statuses for Fuchsia update
R=asiva@google.com

Review URL: https://codereview.chromium.org/2197773004 .
2016-07-29 14:20:46 -07:00
Ryan Macnak acf93a6b19 Fail cleanly if we cannot open a file to write a snapshot.
R=regis@google.com

Review URL: https://codereview.chromium.org/2193293002 .
2016-07-29 13:52:09 -07:00
Todd Turnidge e819c0e91b Fuchsia changes for my recent cl.
BUG=
R=zra@google.com

Review URL: https://codereview.chromium.org/2193313003 .
2016-07-29 12:57:17 -07:00
Todd Turnidge ac5175d47a More fixes.
BUG=

Review URL: https://codereview.chromium.org/2196593003 .
2016-07-29 12:52:31 -07:00
Todd Turnidge 71c240470d Fix build. Fix tests.
BUG=

Review URL: https://codereview.chromium.org/2194973004 .
2016-07-29 12:32:53 -07:00
Todd Turnidge 1166f83bf6 Only reload libraries when they may have been modified.
We now check all of the scripts which make up a library.  If any
script is modified, then we consider that library to be modified.  We
also consider any library which imports a modified library to be
modified.  To propagate this info efficiently, we build and discard
the imported-by graph when beginning a reload.

The embedder must provide a FileModifiedCallback in order to support
the detection of modified scripts.

In order to detect changes to package: libraries, we have modified the
embedder interface to provide the resolved url when possible, so that
we don't need to re-resolve package uris when checking for reload.
This change is incompatible and all embedders will need to be updated.

We now support a "force" flag when reloading sources.  This causes all
libraries to be reloaded regardless of whether the underlying scripts
have been updated.

Closes #26919

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2186423002 .
2016-07-29 11:23:18 -07:00
Adam Barth 28b14cae16 Update to launchpad API
This API is the new way to launch processes.
2016-07-29 10:36:21 -07:00
Zachary Anderson 74bbc7f55f Fuchsia: Make some more VM tests pass
R=asiva@google.com

Review URL: https://codereview.chromium.org/2189973003 .
2016-07-29 08:07:25 -07:00
Zachary Anderson 5475ab6fbb Fuchsia: Builds run_vm_tests and a wrapper program for running it.
This CL adds rules to the GN build for building run_vm_tests for
Fuchsia. It also adds a wrapper program in
//runtime/bin/run_vm_tests_fuchsia.cc and a file containing the
output of 'run_vm_tests --list', //runtime/bin/fuchsia_vm_tests.txt.
The wrapper program and text file make it easier to run the tests
on Fuchsia, and should be able to go away once we are out of the
bootstrapping phase.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2187153003 .
2016-07-28 10:35:25 -07:00
John McCutchan a458f45a02 Enable WebSocket compression for the service protocol
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2184793002 .
2016-07-26 15:25:05 -07:00
John McCutchan d0ebc78d68 Peturb the reload points on the reload bot
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2183533002 .
2016-07-25 13:34:04 -07:00
Jacob Richman 96ca5db7e5 Add JSNative utility class with static methods methods to efficiently manipulate typed JSInterop objects in cases where the member name is not known statically. These methods would be extension methods on JSObject if Dart supported extension methods. Update package js to export these methods. Implement in Dart2JS. Implement JS$ in dart2js.
BUG=
R=alanknight@google.com, sra@google.com

Review URL: https://codereview.chromium.org/2150313003 .
2016-07-25 09:59:01 -07:00