Update change log and spec for wrt-plugins-tizen_0.4.74
[framework/web/wrt-plugins-tizen.git] / src / Calendar / JSCalendarManager.cpp
index 86dbe9d..8d6ebfc 100755 (executable)
@@ -115,13 +115,13 @@ JSValueRef JSCalendarManager::getCalendars(JSContextRef context,
        TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
     CalendarManagerPrivObject *privateObject = static_cast<CalendarManagerPrivObject*>(JSObjectGetPrivate(thisObject));
 
-    TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_GET_CALENDARS);
-
     Try {
         if (!privateObject) {
             ThrowMsg(ConversionException, "Object is null.");
         }
 
+               TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_GET_CALENDARS);
+
         CalendarConverter converter(context);
 
         JSContextRef globalContext = GlobalContextManager::getInstance()->getGlobalContext(context);
@@ -187,13 +187,13 @@ JSValueRef JSCalendarManager::getDefaultCalendar(JSContextRef context,
        TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
     CalendarManagerPrivObject *privateObject = static_cast<CalendarManagerPrivObject*>(JSObjectGetPrivate(thisObject));
 
-    TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_GET_DEFAULT_CALENDAR);
-
     Try {
         if (!privateObject) {
             ThrowMsg(ConversionException, "Object is null.");
         }
 
+               TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_GET_DEFAULT_CALENDAR);
+
                // Global context should be passed to the calendar object.
         JSContextRef globalContext = GlobalContextManager::getInstance()->getGlobalContext(context);
 
@@ -261,13 +261,13 @@ JSValueRef JSCalendarManager::getUnifiedCalendar(JSContextRef context,
        TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
     CalendarManagerPrivObject *privateObject = static_cast<CalendarManagerPrivObject*>(JSObjectGetPrivate(thisObject));
 
-    TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_GET_UNIFIED_CALENDAR);
-
     Try {
         if (!privateObject) {
             ThrowMsg(ConversionException, "Object is null.");
         }
 
+           TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_GET_UNIFIED_CALENDAR);
+
                // Global context should be passed to the calendar object.
         JSContextRef globalContext = GlobalContextManager::getInstance()->getGlobalContext(context);
 
@@ -335,13 +335,13 @@ JSValueRef JSCalendarManager::getCalendar(JSContextRef context,
        TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
     CalendarManagerPrivObject *privateObject = static_cast<CalendarManagerPrivObject*>(JSObjectGetPrivate(thisObject));
 
-    TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_GET_CALENDAR);
-
     Try {
         if (!privateObject) {
             ThrowMsg(ConversionException, "Object is null.");
         }
 
+               TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_GET_CALENDAR);
+
                // Global context should be passed to the calendar object.
         JSContextRef globalContext = GlobalContextManager::getInstance()->getGlobalContext(context);