-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Move ScriptStore and RuntimeHolder from RN to RNW. #3577
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
Conversation
tudorms
left a comment
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.
![]()
| #include <jsi/jsi.h> | ||
| #include <memory> | ||
|
|
||
| namespace facebook { |
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.
{ [](start = 19, length = 1)
(nit) why not use latest faceboo::jsi syntax for namespaces?
| namespace facebook { | ||
| namespace jsi { | ||
|
|
||
| // An instance of this interface is expected to |
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.
// [](start = 0, length = 2)
(nit) We should have proper documetation standard at least for new code, eg, doxygen. So comments would be:
//!
| // a. lazily create a JSI Runtime on the first call to getRuntime | ||
| // b. subsequent calls to getRuntime should return the Runtime created in (a) | ||
|
|
||
| // Note :: All calls to getRuntime() should happen on the same thread unless you are sure that |
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.
the same thread [](start = 54, length = 15)
(nit) do we care to have code that asserts this?
| // JSI::Runtime implementation must be provided an instance on this interface to enable version sensitive capabilities | ||
| // such as usage of pre-prepared javascript script. Alternatively, this entity can be used to directly provide the | ||
| // Javascript buffer and rich metadata to the JSI::Runtime instance. | ||
| struct ScriptStore { |
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.
ScriptStore [](start = 7, length = 11)
Aren't we planning to get rid of this per discussion last week?
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.
Yes. This PR is just moving RuntimeHolde.h and ScriptStore.h from RN to RNW and I am planning on making more changes here. I'll also fix the nit comments then.
In reply to: 341760394 [](ancestors = 341760394)
| #include <jsi/RuntimeHolder.h> | ||
| #include <jsi/ScriptStore.h> | ||
| #include <JSI/Shared/RuntimeHolder.h> | ||
| #include <jsi/Shared/ScriptStore.h> |
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.
jsi/ [](start = 10, length = 4)
(nit) please be consistent in casing
NikoAri
left a comment
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.
![]()
This PR moves ScriptStore and RuntimeHolder from RN to RNW. See also microsoft/react-native-macos#185.
Microsoft Reviewers: Open in CodeFlow