This is a breaking change. Request: https://github.com/dart-lang/sdk/issues/33501
HttpHeaders use lowercase by default for all headers, since it is supposed to be case insensitive. Some servers incorrectly treat case as significant, however, and expect headers with capitalization or in uppercase. The current implementation forces headers to be lower cases when adding values. Users cannot even manually modify the headers.
This change removes this restriction here so that users can modify the headers to whatever form they want. The new behavior is backwards compatible except if class was implemented. All headers inside http.dart are written as lower cases, adding values to HttpHeaders is still receiving lower cases input.
The other cl (https://dart-review.googlesource.com/c/http_multi_server/+/121411) migrates multi_headers.dart to be compatible with this change.
Bug: https://github.com/dart-lang/sdk/issues/33501
Change-Id: Ieb9f4061b27ed3bbc6d82e6a408c77d11abb037b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135357
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Add tests verifying #40590 so that we don't regress it.
Change-Id: I74105cc1e6a33b75d7ff67dc07b7cc913040dc8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135840
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Tests currently pass, so we can close that bug. However, if for some
reason it becomes an issue such that these tests fail, they will link to
a bug with detailed info on a potential cause.
Bug: 40625
Change-Id: I212eb5401622a189de4998247b0ff521077e30e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135763
Reviewed-by: Paul Berry <paulberry@google.com>
The target of a property access can be null if it is a cascade. If that
access is then modified, fix aggregator gets a NPE. This issue is not
true for index & method calls, same fix applies.
Change-Id: I98eac3c8f7eba5300b30ff366ee227430726440c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135963
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
This makes it possible to use FutureOrCid in the VM and efficiently
test if type is FutureOr. This also makes it possible to use predicates
like IsTopType very early during VM bootstrapping (before reusable
handles are initialized). The latter is needed to correctly select
type testing stub for top types.
Change-Id: I4c482143c0ebaafa1c8e13e95dc6f20e3af7059a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136000
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
A compound node represents a logical OR ("this node is nullable if and
only if one or more of its components is nullable"). Therefore, if
*all* of the components of a compound node have non-null intent, we
should consider the compound node itself to have non-null intent.
This fixes a problem that was preventing the migration tool from
respecting a "/*!*/" hint applied to the type parameter of a typedef.
Change-Id: Iec2f9d6968378707ba692be7b97f750cf53a8b85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135786
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
It was literally only used by one test, and only used a single function
not already defined in minitest. That function was only used in one
place and wasn't very useful, so just refactored to not use it.
Change-Id: Ib51ac255233aa29bcaf19aaba16bc99d7eff724d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135965
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Added the following methods to the VM embedding API:
* Dart_GetNonNullableType
* Dart_GetNullableType
* Dart_TypeToNonNullable
* Dart_TypeToNullable
* Dart_IsLegacyType
* Dart_IsNonNullableType
* Dart_IsNullableType
Change-Id: I7de1a99179c4d16a0e6a040bb209de18db379436
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135484
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This change includes the following:
* Decision to use subtype range checks is revised to work regardless of
the NNBD mode.
* Handling of dynamic/Object/void is removed from SlowTypeTest stub
as we use TopTypeTypeTest stub for the top types. That handling was
unnecessary but harmless. However, in NNBD strong mode it becomes
incorrect for non-nullable Object.
* TypeTestingStubGenerator::OptimizedCodeForType now falls back to
TypeTestingStubGenerator::DefaultCodeForType instead of directly
using StubCode::DefaultTypeTest(). This refactoring is needed to
avoid duplicating a more complicated logic in
TypeTestingStubGenerator::DefaultCodeForType in the future.
Change-Id: I09a3f3d9844c02263cd2dac7922c1bdd5264ee55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135628
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This simplifies the existing code and will simplify the next change I
want to make.
Change-Id: I0acc67655dd78bf380f49cfdf2cb7643c7d595d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135882
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This is a reland of af4a3112c4
Original change's description:
> Reland "fix hanging of write on Windows"
>
> This is a reland of eb075dcc21
>
> Original change's description:
> > fix hanging of write on Windows
> >
> > When using File::Write(), Var size in int64_t is casted to DWORD(unsigned long). When Var size is out of DWORD range, casted value will be zero. Before calling into File::Write() on Windows, validate the size.
> >
> > Bug: https://github.com/dart-lang/sdk/issues/40339
> > Change-Id: I36fade62dfa3025f418405cb3e45c286dd6b7db1
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134440
> > Reviewed-by: Zach Anderson <zra@google.com>
> > Commit-Queue: Zichang Guo <zichangguo@google.com>
>
> Bug: https://github.com/dart-lang/sdk/issues/40339
> Change-Id: I5a07c58709c62b996a55a76272636602dc80e20d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134783
> Commit-Queue: Zichang Guo <zichangguo@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>
Bug: https://github.com/dart-lang/sdk/issues/40339
Change-Id: I78e4bd993271cdeac9db5a1d005ae5be0f2891c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135340
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
The final TryAllocateDataLocked will consider all free list buckets and a new page. These cases are all covered by the preceding TryAllocateSmallLock (free list small buckets) and TryAllocateDataBumpLocked (free list large buckets and new pages), so this retry will always fail.
Change-Id: I9ba3174d588085130273ee6e7920888d3abca0ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135581
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Fix instance checks for types that are internal to the type system.
Fixes: #40610
Change-Id: I0c6c1bb4d64f25a97c53bd64a3940cf3e9f45c88
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135580
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
This prevents them from being called dynamically.
Moreover, it prevents asFunction from being called on a non-NativeFunction type argument, simplifying the amount of manual checks.
Note that this CL had to change the CFE and analzyer, and their tests (including mock_sdk) as well.
This can potentially be a breaking change, as the extension methods are only visible when `dart:ffi` is imported, while methods on objects are always visible.
Issue: https://github.com/dart-lang/sdk/issues/35903
Change-Id: I1e291f154228d5d9a34b21a022088bf493f6557d
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,dart-sdk-linux-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,front-end-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-mac-debug-x64-try,analyzer-nnbd-linux-release-try,dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135463
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This also removes a hack in StackTrace::ToString() which was skipping
over the parent function (though this was handled only in some cases).
Issue https://github.com/dart-lang/sdk/issues/37668
Change-Id: Ic4232fdd05c998e2c6843339d77a75cbad2aaffd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135682
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
This reverts commit 40eaf81834.
Reason for revert: This CL seems to cause an OOM error in Flutter tests, the Flutter HHH bot also shows failures starting with this CL. Please see https://github.com/dart-lang/sdk/issues/40627 which has an ASAN dump indicating a double free.
Original change's description:
> [vm/concurrency] Remove redundant isolates list, ensure shutdown procedure waits until the isolates actually got deleted
>
> Issue https://github.com/dart-lang/sdk/issues/36097
>
> Change-Id: If24affbb838eff8d80e5d448eac7455b3ffcb3a1
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135062
> Commit-Queue: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Alexander Aprelev <aam@google.com>
TBR=kustermann@google.com,aam@google.com,rmacnak@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I7329a9cccc788e7ae2794639e0c76071fd4d9aa2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135792
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>