This CL changes File::Write on Windows to call directly to WriteFile()
instead of using _write(). This avoids a number of complexities:
1. Don't need to bother with text vs. binary mode.
2. Don't need to check both errno and GetLastError if _write() fails.
3. Don't need to convert to a wchar_t* for console output since we've
already set the code page to UTF8.
fixes#29101R=fschneider@google.com
Review-Url: https://codereview.chromium.org/2761673002 .
- Move some misplaced entry points from the vm list to the standalone embedder list.
- Add missing libdart_with_precompiler to GN.
- Add ability to reference the root library in treeshaking roots without knowing its URI (as ::).
R=zra@google.com
Review-Url: https://codereview.chromium.org/2786483002 .
The finalizer sends the "close" message to the EventHandler for the
file descriptor in the _NativeSocket's native field. To avoid races and
spurious messages, this CL stores a pointer to a wrapper object in the
native field instead of the file descriptor. All messsages about the
_NativeSocket sent to the EventHandler use the wrapper object instead of
the file descriptor. When the EventHandler closes the file, the file
descriptor in the wrapper object is set to -1 so that the finalizer will
instead do nothing.
On Windows, there is another level of indirection since the OS HANDLEs
were already wrapped in various kinds of Handle objects. As an additional
complication, ClientSocket close on Windows is asynchronous, so the
EventHandler may shutdown before all of the ClientSocket Handles can be
destroyed.
related #27898, #28081R=johnmccutchan@google.com
Review-Url: https://codereview.chromium.org/2760293002 .
Fix observatory tests broken by running dartfmt due to line and column changes.
Temporarily reverted formatting for evaluate_activation_test.dart as dartfmt doesn't yet handle multitests.
BUG=
R=johnmccutchan@google.com
Review-Url: https://codereview.chromium.org/2759973004 .
I've omitted files where the formatter output is significantly uglier
than the original code and I'll send those files in a separate CL
with options for how to make the code look reasonable while still
taking advantage of the formatter.
BUG=
R=johnmccutchan@google.com
Review-Url: https://codereview.chromium.org/2751423005 .
On Windows, some Windows 10 builds support only ANSI output, but not
input, so these need to be separated.
I'm also improving the detection on Mac and Linux to avoid hardcoding
the result. Instead, supportsAnsiEscapes will be true if isatty() and
the TERM environment variable contains the string 'xterm'.
related #28614R=lrn@google.com
Review-Url: https://codereview.chromium.org/2753233002 .
Like HOST_ARCH_*, HOST_OS_* describes the OS the VM is running on, which may be different from the OS the VM is generating code for during AOT compilation.
Currently we conflate the two when emitting AOT as assembly, and we get away with it because Flutter only uses assembly for targeting iOS and one can only target iOS from a Mac, but we expect to use assembly for Android as well so native tools can unwind Dart frames.
R=zra@google.com
Review-Url: https://codereview.chromium.org/2750843003 .
To align better with OpenSSL 1.1.0, BoringSSL is transitioning the APIs
from SSL_CTX_set_min_version to (the longer but more
upstream-compatible) SSL_CTX_set_min_proto_version.
BUG=
R=zra@google.com
Review-Url: https://codereview.chromium.org/2727663007 .
IsolateData contains AppSnapshot which might own some HeapPage-s, so we can't
destroy IsolateData in the Dart_IsolateShutdownCallback, because some thread
running in the isolate (e.g. background compiler) might still touch
thoses pages or objects they host.
We need to delay destruction of AppSnapshot until after the isolate shutdown.
Current API does not allow that, so we introduce a new isolate lifecycle
callback - Dart_IsolateCleanupCallback, which is invoked at the end of the
isolote lifecycle when things like background compiler have been stopped
and no Dart code is supposed to run.
BUG=
R=rmacnak@google.com
Review-Url: https://codereview.chromium.org/2720723005 .
- Consistently accept hypens or underscores in option names.
- Replace --snapshot_kind=none with --dependencies-only, since the former is ambiguous as to whether an existing core snapshot needs to be read. Important when using an embedder-specific dart: library.
- Don't try to canonicalize file paths for the snapshot pieces since this fails if there isn't already a file on disk.
R=asiva@google.com, goderbauer@google.com
Review-Url: https://codereview.chromium.org/2707383007 .
This deletion has several reasons:
- This code is broken and refers to non-existant private parts of dart:io
(e.g. `_NativeSocket._sockets`, `_ProcessImpl._processes`, `_RandomAccessFile._files`).
- This code is not reachable through the service protocol. `_serviceObjectHandler` uses
`paths` to fetch the right handler from `_servicePathMap` but caller `ServiceGetIOHandler`
always passes empty paths.
- The only test that was attempting to test some of this code through mirrors (sic!)
has been disabled since January 2015.
After deletion all tests continue to pass meaning that nobody really relies on this
broken code in any way.
BUG=https://github.com/dart-lang/sdk/issues/28882R=johnmccutchan@google.com
Review-Url: https://codereview.chromium.org/2715253002 .
This change has two pieces.
- Set the console code page to UTF8.
- This makes strings printed with print() display correctly
- Set the file translation mode to _O_WTEXT when writing to a
stdout or stderr that is connected to a console.
- This makes strings printed with e.g. stdout.writeln()
display correctly.
fixes#28571R=asiva@google.com, fschneider@google.com
Review-Url: https://codereview.chromium.org/2698813002 .