-
Notifications
You must be signed in to change notification settings - Fork 68
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
CPLAT-13185 Fix JsBackedMap for Dart 2.12 #305
Conversation
Security InsightsThe items listed below may not capture all security relevant changes. Before providing a security review, be sure to review the entire PR for security impact. (1) Security relevant changes were detectedlib/src/react_client/private_utils.dart modifiedAction Items
Questions or Comments? Reach out on Slack: #support-infosec. |
Public API ChangesNo changes to the public API found for commit 32b58a7 Showing results for 32b58a7
Last edited UTC Feb 17 at 19:59:18 |
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.
Just one comment!
lib/src/context.dart
Outdated
|
||
/// A wrapper around a value that can't be stored in its raw form | ||
/// within a JS object (e.g., a Dart function). | ||
class _ContextValue { |
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.
Is this functionally any different than _JsBackedMapValue
? Could just combine them into a common utility if they're not different
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.
You're right, I was keeping them separate because I wasn't sure if they should be private. But it probably just makes more sense to add it to the utilities file. Updated in 32b58a7
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.
+1
+1 security |
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.
QA +1
@Workiva/release-management-pp
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.
+1 from RM
Motivation
Dart 2.12 includes changes to
setProperty
that disallow passing in Dart functions, since they are not callable by JS code. dart-lang/sdk@d683f33This breaks passing function props to Dart components, since
JsBackedMap
stores those values usingsetProperty
under the hood.This is the reason that react-dart dev builds are currently failing.
We can work around this issue by wrapping Dart functions in an object, which can be passed through without issue.
Changes
JsBackedMap
toContextHelpers
JsBackedMap
and context testsQA Steps