fixes for android

This commit is contained in:
Ari Lazier 2016-03-03 14:56:18 -08:00
parent 765fe03317
commit 641eb37b2c
2 changed files with 4 additions and 3 deletions

View File

@ -25,6 +25,7 @@
#include "js_init.h"
#include "shared_realm.hpp"
#include "realm_coordinator.hpp"
#if __arm__
#define HOOK_SIZE 8
@ -49,7 +50,7 @@ static JSGlobalContextRef create_context(JSContextGroupRef group, JSClassRef glo
swap_function();
// Clear cache from previous instances.
realm::Realm::s_global_cache.clear();
realm::_impl::RealmCoordinator::clear_all_caches();
RJSInitializeInContext(ctx);
realmContextInjected = true;

View File

@ -45,8 +45,8 @@ void List::verify_valid_row(size_t row_ndx, bool insertion) const
{
size_t size = m_link_view->size();
if (row_ndx > size || (!insertion && row_ndx == size)) {
throw std::out_of_range("Index " + std::to_string(row_ndx) + " is outside of range 0..." +
std::to_string(size) + ".");
throw std::out_of_range("Index " + to_string(row_ndx) + " is outside of range 0..." +
to_string(size) + ".");
}
}