Explicitly handle null props in bindings

Reviewed By: fkgozali, mdvacca

Differential Revision: D7080813

fbshipit-source-id: 7c9706df719a39e11a3d99c2de38af992b62dabf
This commit is contained in:
Sebastian Markbage 2018-02-26 19:42:07 -08:00 committed by Facebook Github Bot
parent 3756d41de1
commit 84ad5d3d3c
3 changed files with 3 additions and 0 deletions

View File

@ -139,6 +139,7 @@ struct JSCWrapper {
JSC_WRAPPER_METHOD(JSValueToObject);
JSC_WRAPPER_METHOD(JSValueToStringCopy);
JSC_WRAPPER_METHOD(JSValueUnprotect);
JSC_WRAPPER_METHOD(JSValueIsNull);
// Sampling profiler
JSC_WRAPPER_METHOD(JSSamplingProfilerEnabled);

View File

@ -122,6 +122,7 @@ jsc_poison(JSStringCopyCFString JSStringCreateWithCharacters JSStringCreateWithC
#define JSC_JSValueToObject(...) __jsc_wrapper(JSValueToObject, __VA_ARGS__)
#define JSC_JSValueToStringCopy(...) __jsc_wrapper(JSValueToStringCopy, __VA_ARGS__)
#define JSC_JSValueUnprotect(...) __jsc_wrapper(JSValueUnprotect, __VA_ARGS__)
#define JSC_JSValueIsNull(...) __jsc_wrapper(JSValueIsNull, __VA_ARGS__)
jsc_poison(JSValueCreateJSONString JSValueGetType JSValueGetTypedArrayType JSValueIsArray
JSValueIsBoolean JSValueIsDate JSValueIsEqual JSValueIsInstanceOfConstructor

View File

@ -119,6 +119,7 @@ const JSCWrapper* systemJSCWrapper() {
.JSValueToObject = JSValueToObject,
.JSValueToStringCopy = JSValueToStringCopy,
.JSValueUnprotect = JSValueUnprotect,
.JSValueIsNull = JSValueIsNull,
.JSSamplingProfilerEnabled = JSSamplingProfilerEnabled,
.JSPokeSamplingProfiler =