From 4e5d50d6ad6348530640593ea67a47c45ed193b2 Mon Sep 17 00:00:00 2001 From: Sai Teja Jammalamadaka Date: Mon, 9 Oct 2017 22:18:34 -0700 Subject: [PATCH] Issue #16159 - RCTImageStoreManager's priority Summary: RCTImageStoreManager and RCTBlobManager have the same priority, hence in certain cases, both are able to handle the request, but this causes non-deterministic behavior. Hence increased ImageStoreManager's Priority to 1 and thereby increasing RCTImageLoader's Priority to 2 to prevent similar issue of same priorities. Issue: #16159 Closes https://github.com/facebook/react-native/pull/16160 Differential Revision: D6017931 Pulled By: shergin fbshipit-source-id: 91f2737af4f2f97197734b696105e1cdc5683365 --- Libraries/Image/RCTImageLoader.m | 2 +- Libraries/Image/RCTImageStoreManager.m | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Libraries/Image/RCTImageLoader.m b/Libraries/Image/RCTImageLoader.m index 13d02b437c3cf2..7e57f481b2ecd9 100644 --- a/Libraries/Image/RCTImageLoader.m +++ b/Libraries/Image/RCTImageLoader.m @@ -66,7 +66,7 @@ - (void)setUp - (float)handlerPriority { - return 1; + return 2; } - (id)imageCache diff --git a/Libraries/Image/RCTImageStoreManager.m b/Libraries/Image/RCTImageStoreManager.m index 690258e6522cd2..d57971de6c8048 100644 --- a/Libraries/Image/RCTImageStoreManager.m +++ b/Libraries/Image/RCTImageStoreManager.m @@ -32,6 +32,11 @@ @implementation RCTImageStoreManager RCT_EXPORT_MODULE() +- (float)handlerPriority +{ + return 1; +} + - (void)removeImageForTag:(NSString *)imageTag withBlock:(void (^)())block { dispatch_async(_methodQueue, ^{