From 24dd539cdd0daba04b41d28e3b7da2d7c61c01b7 Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Thu, 27 Apr 2017 22:17:25 -0700 Subject: [PATCH] Promise fix in NativeHTTPRequest --- lime/_backend/native/NativeHTTPRequest.hx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lime/_backend/native/NativeHTTPRequest.hx b/lime/_backend/native/NativeHTTPRequest.hx index 5fea0fa76..71ae68853 100644 --- a/lime/_backend/native/NativeHTTPRequest.hx +++ b/lime/_backend/native/NativeHTTPRequest.hx @@ -386,14 +386,16 @@ class NativeHTTPRequest { private static function threadPool_onComplete (state:Dynamic):Void { - state.promise.complete (state.result); + var promise:Promise = state.promise; + promise.complete (state.result); } private static function threadPool_onError (state:Dynamic):Void { - state.promise.error (state.error); + var promise:Promise = state.promise; + promise.error (state.error); }