The main purpose of these changes is to make sure that the types in
package:http_profile are compatible with the interfaces in the spec.
See runtime/vm/service/service_extension.md and
pkg/vm_service/CHANGELOG.md for the full list of changes.
TEST=pkg/vm_service/test/get_http_profile_test.dart, DevTools tests
CoreLibraryReviewExempt: Only touches sdk/lib/io/network_profiling.dart
to update the version returned by the getVersion dart:io service
extension.
Change-Id: I1b9d0b7d43defbc857a2a8fde003012effd1ee15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341120
Reviewed-by: Ben Konyi <bkonyi@google.com>
Internal references have been migrated.
Change-Id: I7db908c69127fea58f213a057b873b7b52a5e1f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350641
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
1. Implement HeapSnapshotGraph.toChunks
2. Add parameter calculateReferrers, to allow to skip calculation of referrers, when they are not needed.
Change-Id: I312f01f1527e6b2bf4c8ddce6017ca6c53c8dd3a
CoreLibraryReviewExempt: minor dart:io documentation change
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348802
Commit-Queue: Polina Cherkasova <polinach@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
I also formatted this file, since you can do that now :)
Change-Id: I7e7ad586cb4ba31f42a873a362d8099d1576e608
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350480
Commit-Queue: Morgan :) <davidmorgan@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Morgan :) <davidmorgan@google.com>
Previously we would use the value of the `nullability` getter as
the carry over nullablity for the substituted type. This CL changes
that to `declaredNullability`. The change is observable in
substituted extension types: their `nullability` is a combination
of the representation type nullability and the declared nullability,
and its value range includes `Nullability.undetermined`, which should
not be available for `ExtensionType.declaredNullability`.
The unexpected value for `ExtensionType.declaredNullability` was
detected by the assert in
`_NullabilityMarkerDetector.visitExtensionType`.
Change-Id: I38f81df57db18ec94f2f6422134c02efe6649be6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350323
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
As otherwise another class used as an annotation could be mistakenly accounted for here.
TEST=pkg/vm/testcases/transformations/resource_identifier/different.dart
Change-Id: I39f6dd60f8bb4077b40ef5e999a7c9f28f70eb82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350361
Reviewed-by: Moritz Sümmermann <mosum@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
The `int.parse()` function would - if radix is provided and not 10 - use
functions that `unsafeCast<StringBase>()`.
=> The string can be a JSString.
Issue https://github.com/dart-lang/sdk/issues/54800
CoreLibraryReviewExempt: Adding test that should pass on all backends.
Change-Id: Ie6efa5bc545cadce5ea946e2c1d732b2cf94e306
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350303
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
There are still holes for already `super.positional` in the target
constructor, and constructors that invoke it.
Change-Id: I5bd7d93947b1792c05a41c7b51426a8f7b589bca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350163
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Our async unwinding code used to only respect `catchError`
which occured between async frames and ignored trailing
`catchError` like in the code below
Future(...).catchError((_) { /* handle error */ });
This CL also simplifies how we communicate the presence of the
exception handler to the debugger: the code in the debugger did
not actually care about which frame catches the error (for async
handlers), so we don't need to precisely mark async gaps with
`has_catch_error` flag. Instead we have a single boolean
produced by unwinding which signals whether there we encountered
an asynchronous error handler or not.
Fixes https://github.com/flutter/flutter/issues/141882
TEST=service/pause_on_unhandled_async_exceptions5
Change-Id: Id6f6a97ee5444c197b2c621f68d1e47082fc8997
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350320
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Adds `readableTypeStrings` feature.
Configurations where `Type.toString` is expected to show the original type name and original names in function type named parameters will have this feature.
Exceptions are dart2js-prod, dart2js-minified, and vm-obfuscated configurations.
Change-Id: I5423bc31afd586733c6249519f030f7152ac4fc7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349460
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
+ make the implementation of ResourceProviderMixin methods not depend on MemoryResourceProvider.
This is a step towards being able to share more code between tests that use different kinds of ResourceProviders. Although ResourceProviderMixin currently still has a MemoryResourceProvider, all of the methods themselves can work against any ResourceProvider.
convertPath was moved to an extension in test_utilities (rather than to the base ResourceProvider) because it seems quite test-specific (it assumes any absolute paths are relative to drive C - something we'll need to update to use for non-memory tests.
Change-Id: Ibb3cfb31ebbdac6410868f0395bd19f9ce7b0e18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350380
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Arguments matching the following patterns were being removed from the
argument list before being processed by DartDev's argument parser:
--observe
--enable-vm-service
--devtools
This was due to these arguments having non-standard formats that caused
parsing issues in the past. However, these arguments are now completely
parsed by the VM and not actually decoded in the CLI, so there's no need
to blindly remove them. This was causing issues when passing arguments
to user processes (e.g., `dart run foo.dart --devtools-port` would drop
the `--devtools-port` argument due to this logic).
Fixes https://github.com/dart-lang/sdk/issues/54815
Change-Id: I09358d7f5004483ad3b457ba74229c940d9a0d75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350360
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
I don't try to be even close to be correct here, but this is the base
on top of which I'd like to build the full implementation.
The idea is that we scan, and implement parser listener that builds
prefixed name in scopes. We fill scope with declarations as we find them. Using these scopes we can decide which import prefixes can be removed.
As usually for shared code, clients will implement abstract methods in the client specific way.
We might get a hierarchy of `Edit` objects, such as `RemoveImportPrefix` and `RemoveImportDirective` because at least in the analyzer we might need to apply some changes to the element models (metadata, constants).
Change-Id: I153259d87a09ab070f37192ae64ccd8da36e2d41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350260
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This non-null assertion is an error. If any URIs are returned from the VM that are not `file://` URIs and also return `false` from `isResolvableUri` then this would fail, even though the return values allow `null`s and should be used.
I can't currently write a test for this because in theory there aren't any cases where would actually happen, but I triggered it due to another bug (https://github.com/dart-lang/sdk/issues/54824) and think it's better removed.
Also added some TODOs about some behaviour that may need to change as macro support progresses (it's not far enough for me to make these changes yet).
Change-Id: I4108963b6b88bbbff4bb47f69909391900b5d3ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350300
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Helin Shiah <helinx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Fix lints that were showing up in flutter code.
Change-Id: Id5e2cbae347fd2c5d73418ce5af6ce579b62e1a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349629
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
This parameter used to be positional, so name did not matter.
But now it dos.
Change-Id: I1c76c2a3958523299ff9361d299fa449eace9441
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350161
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>