diff --git a/ReactCommon/jschelpers/JSCHelpers.cpp b/ReactCommon/jschelpers/JSCHelpers.cpp index 2f7331d415bbcd..e691d2d1ea9dbb 100644 --- a/ReactCommon/jschelpers/JSCHelpers.cpp +++ b/ReactCommon/jschelpers/JSCHelpers.cpp @@ -147,17 +147,8 @@ void JSException::buildMessage(JSContextRef ctx, JSValueRef exn, JSStringRef sou namespace ExceptionHandling { -#if __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wglobal-constructors" -#endif - PlatformErrorExtractor platformErrorExtractor; -#if __clang__ -#pragma clang diagnostic pop -#endif - } JSObjectRef makeFunction( diff --git a/ReactCommon/jschelpers/JSCHelpers.h b/ReactCommon/jschelpers/JSCHelpers.h index f88319791c65c5..45e69191888c4d 100644 --- a/ReactCommon/jschelpers/JSCHelpers.h +++ b/ReactCommon/jschelpers/JSCHelpers.h @@ -51,7 +51,7 @@ namespace ExceptionHandling { // method@filename[:line[:column]] std::string stack; }; - using PlatformErrorExtractor = std::function; + typedef ExtractedEror(*PlatformErrorExtractor)(const std::exception &ex, const char *context); extern PlatformErrorExtractor platformErrorExtractor; }