From 23c9cf1db61ad85f7f6eabdc78318fe264c2bd2d Mon Sep 17 00:00:00 2001 From: Pieter De Baets Date: Thu, 24 Nov 2016 04:02:11 -0800 Subject: [PATCH] Ensure jscWrapper is always non-null Reviewed By: bnham Differential Revision: D4231224 fbshipit-source-id: 3400a0c57f1014baa8a59210f33f262625854da8 --- ReactCommon/jschelpers/JSCWrapper.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/ReactCommon/jschelpers/JSCWrapper.cpp b/ReactCommon/jschelpers/JSCWrapper.cpp index d0354376139..27942a5b06f 100644 --- a/ReactCommon/jschelpers/JSCWrapper.cpp +++ b/ReactCommon/jschelpers/JSCWrapper.cpp @@ -60,6 +60,7 @@ const JSCWrapper* customJSCWrapper() { void setCustomJSCWrapper(const JSCWrapper* wrapper) { #if USE_GLOG + CHECK(wrapper != nullptr) << "Can't set null wrapper"; CHECK(s_customWrapper == nullptr) << "Can't set custom JSC wrapper multiple times"; #endif s_customWrapper = wrapper;