[Cherry-Pick] Fix Support For SystraceSection (#4267) #4273
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses #4245, During deforking work I left a build logic typo which caused SysTraceSection to noop. When trying to reenable in deforked React Native, we end up having a compile error since stock Facebook code will pass doubles as an arg to SysTraceSection, and we will internally only accept string.
This was fixed in microsof/react-native by commenting out the SysTraceSection call that passed a double. A real solution is to allow our implementation of FbSystraceSection to accept non-string args and convert to strings, as Facebook's seemingly does.
Still need a plan to validate this.
Simplify things a bit
Solely rely on is_convertible
Constructable was sort of wrong before, because we're actually doing assignment, but even then we likely only want things that allow implicit conversions.
Microsoft Reviewers: Open in CodeFlow