-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recursively pass invoker into ::toJS data structures for generated C+…
…+ modules Summary: While working on D42008409 I found out that codegen for pure C++ modules doesn't work with container types that are nested inside generated data structures, which happens because they don't have a specialization of `bridging::toJS` that wouldn't pass the `invoker` instance through. It looks like an easiest option would be just to use `invoker` in codegen for `toJS` as well, which this diff does. Note that I also experimented with removing `invoker` from being used in the `::toJS` specializations for containers altogether (see D42008410), as there doesn't seem to be a single use case when `invoker` would be ever needed in any `::toJS` specialization (and imagining such a scenario would be a stretch, tbh - why a conversion function would invoke anything running on JS side, given that invoker provides no return values anyway?..) But since I am still not 100% about the invoker purpose there, I went with the codegen change. Changelog: [Internal] Reviewed By: christophpurrer Differential Revision: D42008724 fbshipit-source-id: 6302d3ceacdfc8fed296ee1ef1a985f7273c2261
- Loading branch information
1 parent
fc3565c
commit 963e45a
Showing
2 changed files
with
55 additions
and
46 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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