[apps] Remove the poincare circuit breaker on emscripten

This commit is contained in:
Léa Saviot
2018-11-28 10:59:44 +01:00
committed by EmilieNumworks
parent a3ff266635
commit 3b81f9bedc

View File

@@ -73,7 +73,19 @@ AppsContainer::AppsContainer() :
m_usbConnectedSnapshot()
{
m_emptyBatteryWindow.setFrame(KDRect(0, 0, Ion::Display::Width, Ion::Display::Height));
#if __EMSCRIPTEN__
/* AppsContainer::poincareCircuitBreaker uses Ion::Keyboard::scan(), which
* calls emscripten_sleep. If we set the poincare circuit breaker, we would
* need to whitelist all the methods that might be in the call stack when
* poincareCircuitBreaker is run. This means either whitelisting all Epsilon
* (which makes bigger files to download and slower execution), or
* whitelisting all the symbols (that's a big amount of symbols to find and
* quite painy to maintain).
* We just remove the circuit breaker for now.
* TODO: Put the Poincare circuit breaker back on epsilon's web emulator */
#else
Poincare::Expression::setCircuitBreaker(AppsContainer::poincareCircuitBreaker);
#endif
Ion::Storage::sharedStorage()->setDelegate(this);
}