mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Simplify Catalyst handleMemoryPressure
Reviewed By: cwdick Differential Revision: D5200555 fbshipit-source-id: 86f12acca33ece265d3482ba52de9afcc83173cd
This commit is contained in:
committed by
Facebook Github Bot
parent
e2dff82160
commit
83faa4b608
@@ -201,23 +201,13 @@ void NativeToJsBridge::stopProfiler(const std::string& title, const std::string&
|
||||
});
|
||||
}
|
||||
|
||||
void NativeToJsBridge::handleMemoryPressureUiHidden() {
|
||||
#ifdef WITH_JSC_MEMORY_PRESSURE
|
||||
void NativeToJsBridge::handleMemoryPressure(int pressureLevel) {
|
||||
runOnExecutorQueue([=] (JSExecutor* executor) {
|
||||
executor->handleMemoryPressureUiHidden();
|
||||
});
|
||||
}
|
||||
|
||||
void NativeToJsBridge::handleMemoryPressureModerate() {
|
||||
runOnExecutorQueue([=] (JSExecutor* executor) {
|
||||
executor->handleMemoryPressureModerate();
|
||||
});
|
||||
}
|
||||
|
||||
void NativeToJsBridge::handleMemoryPressureCritical() {
|
||||
runOnExecutorQueue([=] (JSExecutor* executor) {
|
||||
executor->handleMemoryPressureCritical();
|
||||
executor->handleMemoryPressure(pressureLevel);
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
void NativeToJsBridge::destroy() {
|
||||
// All calls made through runOnExecutorQueue have an early exit if
|
||||
|
||||
Reference in New Issue
Block a user