dart-sdk/tests/lib/js
Nicholas Shahan 3c75002cee [ddc] Stop modifying the native JavaScript Object prototype
With this change the Dart Core Object members (`.hashCode`, 
`.runtimeType`, `.noSuchMethod()`, `.toString()`, and 
`operator ==`) are no longer installed onto the native JavaScript
Object prototype. This is done because the Object prototype will be 
sealed as a security precaution in some environments to avoid 
prototype pollution exploits.

This means that dispatching to these APIs will change when the 
compiler cannot know if the receiver may be null or a value from 
JavaScript interop. In those cases a call to a helper method is 
inserted instead. The helpers will probe for the API on the value, 
call it if available or execute a default version.

NOTE: Many other native JavaScript prototypes are still modified. This
change is only for the Object prototype.

Issue: https://github.com/dart-lang/sdk/issues/49670

Change-Id: Iddb3a48e790dd414aa3254d729535c4408e99b3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310971
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-08-10 19:45:59 +00:00
..
export [dart:js_util] Handle type parameters in export/mocks. 2023-08-04 21:45:29 +00:00
extends_test [pkg:js] Add tests for inheritance type checks/casts and subtyping 2021-07-13 20:02:49 +00:00
js_util [ddc] Seal the native Object prototype in test infra 2023-08-10 19:45:59 +00:00
native_as_js_classes_static_test [pkg:js] Add @staticInterop annotation to package:js 2021-10-06 19:04:02 +00:00
static_interop_test [ddc] Stop modifying the native JavaScript Object prototype 2023-08-10 19:45:59 +00:00
subtyping_test [pkg:js] Add subtyping tests with liveness 2021-07-13 18:51:34 +00:00
array_test.dart Fixed various typos in a lot of files 2022-07-25 12:21:59 +00:00
constructor_parameters_static_test.dart [dart:js_interop] Apply param errors to inline classes 2023-05-22 21:50:51 +00:00
datetime_roundtrip_test.dart
extends_static_test.dart [package:js] Add static errors for invalid extends 2020-10-28 16:04:15 +00:00
external_extension_members_test.dart [pkg:js] Lower external @staticInterop and extension members using invocation-level semantics 2023-05-09 23:12:58 +00:00
external_member_static_test.dart [package:js] Add checks for external keyword 2020-09-25 23:30:34 +00:00
external_nonjs_static_test.dart [dart:js_interop] Allow interop inline classes to elide @JS 2023-06-13 23:27:23 +00:00
external_static_test.dart [dart:js_interop] Allow interop inline classes to elide @JS 2023-06-13 23:27:23 +00:00
implements_static_test.dart [pkg:js] Add tests for classes that implement JS interfaces 2020-11-18 01:22:39 +00:00
instanceof_test.dart
is_check_and_as_cast_test.dart [pkg:js] Test runtime is checks 2021-07-13 01:28:55 +00:00
js_annotation_static_test.dart [package:js] Remove stale TODOs from static error tests 2020-08-19 22:04:58 +00:00
method_call_on_object_test.dart [ddc] Fix method call on object without prototype 2020-07-31 01:29:44 +00:00
mock_test.dart Change js_mock_test to not use native types 2020-12-10 01:38:26 +00:00
no_library_annotation_test.dart [ddc] Do not require a @JS annotation at the library level. 2021-01-20 22:11:23 +00:00
null_test.dart
object_apis_interop_values_test.dart [ddc] Stop modifying the native JavaScript Object prototype 2023-08-10 19:45:59 +00:00
object_apis_utils.dart [js] Add Dart Object API tests for interop objects 2023-08-10 19:44:00 +00:00
operator_static_test.dart [dart:js_interop] Disallow external operators using static interop 2023-05-22 21:50:51 +00:00
parameters_static_test.dart [dart:js_interop] Apply param errors to inline classes 2023-05-22 21:50:51 +00:00
parameters_test.dart
prototype_access_test.dart
static_class_member_static_test.dart [jsinterop] Add static check for JSName of static class members. 2022-06-03 17:02:26 +00:00
trust_types_annotation_test.dart [package:js] Add @trustTypes annotation. 2022-04-20 15:24:18 +00:00
trust_types_test.dart [package:js] Add @trustTypes annotation. 2022-04-20 15:24:18 +00:00