From 87c88b746aa3066a4c72d3287ff6cc1091ff2951 Mon Sep 17 00:00:00 2001 From: blagoev Date: Mon, 11 Sep 2017 15:28:05 +0300 Subject: [PATCH] better naming for private properties --- src/js_sync.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/js_sync.hpp b/src/js_sync.hpp index 80fc1fcb..ff5ca7ee 100644 --- a/src/js_sync.hpp +++ b/src/js_sync.hpp @@ -365,8 +365,8 @@ void SessionClass::add_progress_notification(ContextType ctx, FunctionType, O auto syncSession = create_object>(ctx, new WeakSession(session)); PropertyAttributes attributes = ReadOnly | DontEnum | DontDelete; - Object::set_property(ctx, callback_function, "syncSession", syncSession, attributes); - Object::set_property(ctx, callback_function, "registrationToken", Value::from_number(protected_ctx, registrationToken), attributes); + Object::set_property(ctx, callback_function, "_syncSession", syncSession, attributes); + Object::set_property(ctx, callback_function, "_registrationToken", Value::from_number(protected_ctx, registrationToken), attributes); } } @@ -374,13 +374,13 @@ template void SessionClass::remove_progress_notification(ContextType ctx, FunctionType, ObjectType this_object, size_t argc, const ValueType arguments[], ReturnValue &return_value) { validate_argument_count(argc, 1); auto callback_function = Value::validated_to_function(ctx, arguments[0], "callback"); - auto syncSessionProp = Object::get_property(ctx, callback_function, "syncSession"); + auto syncSessionProp = Object::get_property(ctx, callback_function, "_syncSession"); if (Value::is_undefined(ctx, syncSessionProp) || Value::is_null(ctx, syncSessionProp)) { return; } auto syncSession = Value::validated_to_object(ctx, syncSessionProp); - auto registrationToken = Object::get_property(ctx, callback_function, "registrationToken"); + auto registrationToken = Object::get_property(ctx, callback_function, "_registrationToken"); if (auto session = get_internal>(syncSession)->lock()) { auto reg = Value::validated_to_number(ctx, registrationToken);