-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Make enums to work as part of data structures for C++ TurboModules codegen #36155
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Libraries/WebPerformance/EventCounts.js line 13 – 'rawToPerformanceEntryType' is defined but never used. (no-unused-vars)
|
Base commit: 11570e7 |
This pull request has been merged in 96fb708. |
…degen (facebook#36155) Summary: Pull Request resolved: facebook#36155 [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. Reviewed By: christophpurrer Differential Revision: D43292254 fbshipit-source-id: b2d6cf4a2d4d233b8cc403ecd02b5be16d5d91a7
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