Using a GC'ed context will cause a crash (#1969)
* Using a GC'ed context will cause a crash
This commit is contained in:
parent
d0ba40c33a
commit
015d001d5c
|
@ -17,6 +17,7 @@
|
|||
|
||||
### Bug fixes
|
||||
* React Native for Android now supports the Android Gradle Plugin 3.0 (#1742).
|
||||
* [Sync] Fixed a crash in subscription listeners (#1926).
|
||||
* [Sync] Classes used by the Object-level permission system are now automatically part of the schema for Query-based Realms (#1966).
|
||||
* [Sync] Fixed distinct queries with query-based sync (broken since v2.11.0).
|
||||
* Support parallel run of muliple iOS builds with React Native on the same CI machine.
|
||||
|
|
|
@ -763,7 +763,7 @@ void SubscriptionClass<T>::add_listener(ContextType ctx, ObjectType this_object,
|
|||
|
||||
ValueType arguments[2];
|
||||
arguments[0] = static_cast<ObjectType>(protected_this),
|
||||
arguments[1] = Value::from_number(ctx, static_cast<double>(subscription->state()));
|
||||
arguments[1] = Value::from_number(protected_ctx, static_cast<double>(subscription->state()));
|
||||
Function::callback(protected_ctx, protected_callback, protected_this, 2, arguments);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue