Using a GC'ed context will cause a crash (#1969)

* Using a GC'ed context will cause a crash
This commit is contained in:
Kenneth Geisshirt 2018-08-17 11:24:08 +02:00 committed by GitHub
parent d0ba40c33a
commit 015d001d5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -17,6 +17,7 @@
### Bug fixes ### Bug fixes
* React Native for Android now supports the Android Gradle Plugin 3.0 (#1742). * 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] 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). * [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. * Support parallel run of muliple iOS builds with React Native on the same CI machine.

View File

@ -763,7 +763,7 @@ void SubscriptionClass<T>::add_listener(ContextType ctx, ObjectType this_object,
ValueType arguments[2]; ValueType arguments[2];
arguments[0] = static_cast<ObjectType>(protected_this), 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); Function::callback(protected_ctx, protected_callback, protected_this, 2, arguments);
}); });