-
Notifications
You must be signed in to change notification settings - Fork 29
#3180. Add tests for ObjectToJSBoxedDartObject
#3291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing worth checking for: what happens if we call toJSBox
on an ExternalDartReference
? I suspect we're inconsistent there in some cases. :) dart2wasm will always throw while ddc/dart2js will throw only if the original value in the ExternalDartReference
were to throw.
I'm not sure we actually have a good fix for that as we would need to distinguish the result of toExternalReference
from the original object, and I don't see a good way of doing that with dart2js/ddc unless we wrap the value (defeating the original purpose of performance).
LibTest/js_interop/ObjectToJSBoxedDartObject/toJSBox_A01_t02.dart
Outdated
Show resolved
Hide resolved
LibTest/js_interop/ObjectToJSBoxedDartObject/toJSBox_A01_t03.dart
Outdated
Show resolved
Hide resolved
Extension type Descriptions updated. PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extension type ExternalDartReference doesn't implement Object and therefore doesn't have toJsBox getter, defined as member of extension on Object.
Ha! That ended up being convenient. :)
@eernstg can we land this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I think it would be helpful to add a few words to a description, then land it.
LibTest/js_interop/ObjectToJSBoxedDartObject/toJSBox_A01_t01.dart
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
2025-08-29 [email protected] dart-lang/co19#3180. Add tests for `ObjectToJSBoxedDartObject` (dart-lang/co19#3291) 2025-08-29 [email protected] Fixes dart-lang/co19#3292. Ignore some analyzer warnings, add issue numbers (dart-lang/co19#3295) 2025-08-29 [email protected] dart-lang/co19#3180. Fix delete_A01_t06.dart to work in both strict/non-strict modes (dart-lang/co19#3290) 2025-08-28 [email protected] dart-lang/co19#3292. Update assertions for `reachability_switch_*` tests (dart-lang/co19#3293) 2025-08-27 [email protected] dart-lang/co19#3180. Add tests for `JSObjectUnsafeUtilExtension` (dart-lang/co19#3289) 2025-08-26 [email protected] dart-lang/co19#3180. Add JSFunctionUnsafeUtilExtension tests (dart-lang/co19#3285) 2025-08-26 [email protected] dart-lang/co19#3180. Add `callMethod` and `callMethodVarArgs` tests (dart-lang/co19#3288) 2025-08-25 [email protected] dart-lang/co19#3180. Add tests for `createJSInteropWrapper()` function (dart-lang/co19#3283) Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try,dart2js-minified-linux-d8-try Change-Id: I8188f94fcf0ffbfbb4c117abb80676f9675fb06e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/447721 Reviewed-by: Erik Ernst <[email protected]> Commit-Queue: Erik Ernst <[email protected]> Reviewed-by: Ivan Inozemtsev <[email protected]>
No description provided.