Remove needless weakSelf from executeApplicationScript

Reviewed By: javache

Differential Revision: D3542798

fbshipit-source-id: bf3fe15c78b55691176aecf209210a6f35f98862
This commit is contained in:
Adam Ernst 2016-07-11 13:14:21 -07:00 коммит произвёл Facebook Github Bot 8
Родитель 8fb6111fa5
Коммит 5e89baa7a0
1 изменённых файлов: 5 добавлений и 7 удалений

Просмотреть файл

@ -690,25 +690,23 @@ static void installBasicSynchronousHooksOnContext(JSContext *context)
script = nullTerminatedScript;
}
__weak RCTJSCExecutor *weakSelf = self;
[self executeBlockOnJavaScriptQueue:RCTProfileBlock((^{
RCTJSCExecutor *strongSelf = weakSelf;
if (!strongSelf || !strongSelf.isValid) {
if (!self.isValid) {
return;
}
[strongSelf->_performanceLogger markStartForTag:RCTPLScriptExecution];
[self->_performanceLogger markStartForTag:RCTPLScriptExecution];
JSValueRef jsError = NULL;
RCTJSCWrapper *jscWrapper = strongSelf->_jscWrapper;
RCTJSCWrapper *jscWrapper = self->_jscWrapper;
JSStringRef execJSString = jscWrapper->JSStringCreateWithUTF8CString((const char *)script.bytes);
JSStringRef bundleURL = jscWrapper->JSStringCreateWithUTF8CString(sourceURL.absoluteString.UTF8String);
JSGlobalContextRef ctx = strongSelf->_context.context.JSGlobalContextRef;
JSGlobalContextRef ctx = self->_context.context.JSGlobalContextRef;
JSValueRef result = jscWrapper->JSEvaluateScript(ctx, execJSString, NULL, bundleURL, 0, &jsError);
jscWrapper->JSStringRelease(bundleURL);
jscWrapper->JSStringRelease(execJSString);
[strongSelf->_performanceLogger markStopForTag:RCTPLScriptExecution];
[self->_performanceLogger markStopForTag:RCTPLScriptExecution];
if (onComplete) {
NSError *error;