mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-03 07:14:59 +08:00
Batch native method calls in 5ms increments
Reviewed By: @mkonicek Differential Revision: D2535803 fb-gh-sync-id: 8363a83d6966cfa4c2ea46358b10e4139333329f
This commit is contained in:
committed by
facebook-github-bot-4
parent
88a880b1fc
commit
e0b2c2e34e
@@ -11,12 +11,12 @@ namespace react {
|
||||
|
||||
class JSCExecutorFactory : public JSExecutorFactory {
|
||||
public:
|
||||
virtual std::unique_ptr<JSExecutor> createJSExecutor() override;
|
||||
virtual std::unique_ptr<JSExecutor> createJSExecutor(FlushImmediateCallback cb) override;
|
||||
};
|
||||
|
||||
class JSCExecutor : public JSExecutor {
|
||||
public:
|
||||
JSCExecutor();
|
||||
explicit JSCExecutor(FlushImmediateCallback flushImmediateCallback);
|
||||
~JSCExecutor() override;
|
||||
virtual void executeApplicationScript(
|
||||
const std::string& script,
|
||||
@@ -31,11 +31,13 @@ public:
|
||||
virtual bool supportsProfiling() override;
|
||||
virtual void startProfiler(const std::string &titleString) override;
|
||||
virtual void stopProfiler(const std::string &titleString, const std::string &filename) override;
|
||||
|
||||
|
||||
void flushQueueImmediate(std::string queueJSON);
|
||||
void installNativeHook(const char *name, JSObjectCallAsFunctionCallback callback);
|
||||
|
||||
private:
|
||||
JSGlobalContextRef m_context;
|
||||
FlushImmediateCallback m_flushImmediateCallback;
|
||||
};
|
||||
|
||||
} }
|
||||
|
||||
Reference in New Issue
Block a user