mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-12 03:35:30 +08:00
Support sync loading of the initial bundle/source
Reviewed By: javache Differential Revision: D3897521 fbshipit-source-id: a4f234c7003a5f4be952d315eb62f382836e24dc
This commit is contained in:
committed by
Facebook Github Bot 7
parent
51df83d7d5
commit
6071e8ca2c
@@ -44,9 +44,12 @@ public:
|
||||
class JsToNativeBridge;
|
||||
|
||||
// This class manages calls from native code to JS. It also manages
|
||||
// executors and their threads. This part is used by both bridges for
|
||||
// now, but further refactorings should separate the bridges more
|
||||
// fully #11247981.
|
||||
// executors and their threads. All functions here can be called from
|
||||
// any thread.
|
||||
//
|
||||
// Except for loadApplicationScriptSync(), all void methods will queue
|
||||
// work to run on the jsQueue passed to the ctor, and return
|
||||
// immediately.
|
||||
class NativeToJsBridge {
|
||||
public:
|
||||
friend class JsToNativeBridge;
|
||||
@@ -86,6 +89,10 @@ public:
|
||||
std::unique_ptr<JSModulesUnbundle> unbundle,
|
||||
std::unique_ptr<const JSBigString> startupCode,
|
||||
std::string sourceURL);
|
||||
void loadApplicationSync(
|
||||
std::unique_ptr<JSModulesUnbundle> unbundle,
|
||||
std::unique_ptr<const JSBigString> startupCode,
|
||||
std::string sourceURL);
|
||||
|
||||
/**
|
||||
* Similar to loading a "bundle", but instead of passing js source this method accepts
|
||||
|
||||
Reference in New Issue
Block a user