Rename RJSObjectSetProperty to RJSValidatedSetProperty

This commit is contained in:
Scott Kyle 2016-02-29 12:37:28 -08:00
parent 5a9ad4f2b9
commit 3858ede7c7
2 changed files with 5 additions and 5 deletions

View File

@ -76,16 +76,16 @@ JSObjectRef RJSConstructorCreate(JSContextRef ctx) {
JSPropertyAttributes attributes = kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete;
JSObjectRef listConstructor = JSObjectMakeConstructor(ctx, RJSListClass(), UncallableConstructor);
RJSObjectSetProperty(ctx, realmObject, listString, listConstructor, attributes);
RJSValidatedSetProperty(ctx, realmObject, listString, listConstructor, attributes);
JSObjectRef resultsContructor = JSObjectMakeConstructor(ctx, RJSResultsClass(), UncallableConstructor);
RJSObjectSetProperty(ctx, realmObject, resultsString, resultsContructor, attributes);
RJSValidatedSetProperty(ctx, realmObject, resultsString, resultsContructor, attributes);
JSObjectRef typesObject = JSObjectMake(ctx, RJSRealmTypeClass(), NULL);
RJSObjectSetProperty(ctx, realmObject, typeString, typesObject, attributes);
RJSValidatedSetProperty(ctx, realmObject, typeString, typesObject, attributes);
JSObjectRef clearTestStateFunction = JSObjectMakeFunctionWithCallback(ctx, clearTestStateString, ClearTestState);
RJSObjectSetProperty(ctx, realmObject, clearTestStateString, clearTestStateFunction, attributes);
RJSValidatedSetProperty(ctx, realmObject, clearTestStateString, clearTestStateFunction, attributes);
return realmObject;
}

View File

@ -201,7 +201,7 @@ static inline size_t RJSValidatedListLength(JSContextRef ctx, JSObjectRef object
return RJSValidatedValueToNumber(ctx, lengthValue);
}
static inline void RJSObjectSetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSPropertyAttributes attributes = 0) {
static inline void RJSValidatedSetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSPropertyAttributes attributes = 0) {
JSValueRef exception = NULL;
JSObjectSetProperty(ctx, object, propertyName, value, attributes, &exception);
if (exception) {