Make enums to work as part of data structures for C++ TurboModules codegen#36155
Closed
rshest wants to merge 4 commits into
Closed
Make enums to work as part of data structures for C++ TurboModules codegen#36155rshest wants to merge 4 commits into
rshest wants to merge 4 commits into
Conversation
…ok#36116) Summary: Pull Request resolved: facebook#36116 [Changelog][Internal] Add a minimal/reference JavaScript implementation for NativePerformanceObserver - the purpose is both unit testing (JS and native sides separately) and potentially shimming the part of functionality that is not dependent on native side. This is both a setup for adding general unit tests for the Performance* APIs, but also to be able to do non-trivial changes on JS side for WebPerformance (such as in (D43154319). Differential Revision: https://internalfb.com/D43167392 fbshipit-source-id: 5050042d4923a87c87d4e8e99ba1ef6b3f264649
Summary: [Changelog][Internal] By [the W3C standard](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver/observe), `PerformanceObserver.observer` can optionally take a `durationThreshold` option, so that only entries with duration larger than the threshold are reported. This diff adds support for this on the RN side. NOTE: The standard suggests that default value for this is 104s. I left it at 0 for now, as for the RN use cases t may be to too high (needs discussion). Differential Revision: https://internalfb.com/D43154319 fbshipit-source-id: 884ca22b62daf241d1b98facc58958dab1797633
Summary: [Changelog][Internal] Implements EventCounts API (`Performance.eventCounts`) for Web Performance, according to the W3C standard: https://www.w3.org/TR/event-timing/#eventcounts Differential Revision: https://internalfb.com/D43285073 fbshipit-source-id: e86b719305201fc7be7f6de9b65a1d321d58d140
…degen Summary: [Changelog][Internal] The PR facebook#36030 (diff D42884147 (facebook@ceb1d0d)) added support for enum types in JS to C++ bridging in C++ TurboModules. This only worked for enums as argument types for exposed methods, but not for the cases when enums are members of complex data structures that are also exposed through a codegen. This diff fixes this problem, so that codegen now correctly works both with enum types as method arguments, but also as data structure members. Some part of the change is the same as D42008724 (facebook@963e45a), but there are also some changes related to the types, that were required. Differential Revision: D43292254 fbshipit-source-id: 50066dc89c495ba3cad23a26024ac485d03dc9d9
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D43292254 |
|
|
||
| import NativePerformanceObserver from './NativePerformanceObserver'; | ||
| import {warnNoNativePerformanceObserver} from './PerformanceObserver'; | ||
| import {rawToPerformanceEntryType} from './RawPerformanceEntry'; |
There was a problem hiding this comment.
⚠️ Libraries/WebPerformance/EventCounts.js line 13 – 'rawToPerformanceEntryType' is defined but never used. (no-unused-vars)
|
Base commit: 11570e7 |
Contributor
|
This pull request has been merged in 96fb708. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary:
[Changelog][Internal]
The PR #36030 (diff D42884147 (ceb1d0d)) added support for enum types in JS to C++ bridging in C++ TurboModules.
This only worked for enums as argument types for exposed methods, but not for the cases when enums are members of complex data structures that are also exposed through a codegen.
This diff fixes this problem, so that codegen now correctly works both with enum types as method arguments, but also as data structure members.
Some part of the change is the same as D42008724 (963e45a), but there are also some changes related to the types, that were required.
Differential Revision: D43292254