mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-11 06:46:03 +00:00
Rename RJSObjectSetProperty to RJSValidatedSetProperty
This commit is contained in:
parent
5a9ad4f2b9
commit
3858ede7c7
@ -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;
|
||||
}
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user