[ReactNative] Ensure JS calls scheduled by a deallocated context don't fire

This commit is contained in:
Tadeu Zagallo committed 2015-04-20 02:03:22 -08:00
1 parent 0b21df4a34
commit 0e67e33534
6 files changed
+76 -35

No files matched your search

+2 -2
View File
@@ -140,9 +140,9 @@
sourceCodeModule.scriptURL = scriptURL;
sourceCodeModule.scriptText = rawText;
[_bridge enqueueApplicationScript:rawText url:scriptURL onComplete:^(NSError *_error) {
[_bridge enqueueApplicationScript:rawText url:scriptURL onComplete:^(NSError *scriptError) {
dispatch_async(dispatch_get_main_queue(), ^{
onComplete(_error);
onComplete(scriptError);
});
}];
}];