Skip to content

Commit 8f1aaf9

Browse files
committed
Fix marcuswestin#41 - remove __block to avoid losing callbackId. See http://developer.apple.com/library/ios/#documentation/cocoa/conceptual/Blocks/Articles/bxVariables.html "Types of variables" marcuswestin#3 and marcuswestin#4 - we want callbackId to be non-mutable, const
1 parent 4f58e82 commit 8f1aaf9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

WebViewJavascriptBridgeAbstract/WebViewJavascriptBridgeAbstract.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ - (void)_flushMessageQueue {
111111
[self.responseCallbacks removeObjectForKey:responseId];
112112
} else {
113113
WVJBResponseCallback responseCallback = NULL;
114-
__block NSString* callbackId = message[@"callbackId"];
114+
NSString* callbackId = message[@"callbackId"];
115115
if (callbackId) {
116116
responseCallback = ^(id responseData) {
117117
NSDictionary* msg = @{ @"responseId":callbackId, @"responseData":responseData };

0 commit comments

Comments
 (0)