Ensure jscWrapper is always non-null

Reviewed By: bnham

Differential Revision: D4231224

fbshipit-source-id: 3400a0c57f1014baa8a59210f33f262625854da8
This commit is contained in:
Pieter De Baets 2016-11-24 04:02:11 -08:00 committed by Facebook Github Bot
parent fc23784fe7
commit 23c9cf1db6

View File

@ -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;