From 5b0692478273eecbfdefe7ee9a0e42fe589789b6 Mon Sep 17 00:00:00 2001 From: Lee Siwoo Date: Tue, 22 Oct 2013 20:29:18 +0900 Subject: [PATCH] Update change log and spec for wrt-plugins-tizen_0.4.74 --- packaging/wrt-plugins-tizen.spec | 2 +- src/Application/ApplicationController.cpp | 23 +++++++++++++ src/Application/JSApplication.cpp | 6 ++++ src/Application/JSApplicationInformation.cpp | 3 +- src/Application/JSApplicationManager.cpp | 30 +++++++++++++++++ src/Application/JSRequestedApplicationControl.cpp | 4 +++ src/Calendar/JSCalendar.cpp | 41 +++++++++++------------ src/Calendar/JSCalendarEvent.cpp | 4 +-- src/Calendar/JSCalendarItemProperties.cpp | 8 ++--- src/Calendar/JSCalendarManager.cpp | 16 ++++----- src/DataSync/DataSyncManager.cpp | 6 ++-- src/Power/JSPowerManager.cpp | 2 ++ 12 files changed, 105 insertions(+), 40 deletions(-) mode change 100644 => 100755 src/Application/ApplicationController.cpp mode change 100644 => 100755 src/Application/JSApplication.cpp mode change 100644 => 100755 src/Application/JSApplicationInformation.cpp mode change 100644 => 100755 src/Application/JSApplicationManager.cpp mode change 100644 => 100755 src/Application/JSRequestedApplicationControl.cpp diff --git a/packaging/wrt-plugins-tizen.spec b/packaging/wrt-plugins-tizen.spec index a31e333..1caa814 100755 --- a/packaging/wrt-plugins-tizen.spec +++ b/packaging/wrt-plugins-tizen.spec @@ -1,6 +1,6 @@ Name: wrt-plugins-tizen Summary: JavaScript plugins for WebRuntime -Version: 0.4.73 +Version: 0.4.74 Release: 0 Group: Development/Libraries License: Apache License, Version 2.0 diff --git a/src/Application/ApplicationController.cpp b/src/Application/ApplicationController.cpp old mode 100644 new mode 100755 index 2c1f3f4..c674eb3 --- a/src/Application/ApplicationController.cpp +++ b/src/Application/ApplicationController.cpp @@ -145,12 +145,14 @@ void ApplicationAsyncAnswerHandler::launch(const EventApplicationLaunchPtr &even Try { callbackManager->callOnSuccess(); + LoggerD("launch success callback called"); return; } Catch(Exception) { LoggerE("error during processing answer" << _rethrown_exception.GetMessage()); error = JSWebAPIErrorFactory::makeErrorObject(gContext, JSWebAPIErrorFactory::UNKNOWN_ERROR, "Internal error"); callbackManager->callOnError(error); + LoggerD("launch error callback called"); return; } } @@ -193,17 +195,20 @@ void ApplicationAsyncAnswerHandler::kill(const EventApplicationKillPtr &event) } callbackManager->callOnError(error); + LoggerD("kill error callback called"); return; } Try { callbackManager->callOnSuccess(); + LoggerD("kill success callback called"); return; } Catch(Exception) { LoggerE("error during processing answer" << _rethrown_exception.GetMessage()); error = JSWebAPIErrorFactory::makeErrorObject(gContext, JSWebAPIErrorFactory::UNKNOWN_ERROR, "Internal error"); callbackManager->callOnError(error); + LoggerD("kill error callback called"); return; } } @@ -243,17 +248,20 @@ void ApplicationAsyncAnswerHandler::launchAppControl(const EventApplicationLaunc } callbackManager->callOnError(error); + LoggerD("launchAppControl error callback called"); return; } Try { callbackManager->callOnSuccess(); + LoggerD("launchAppControl success callback called"); return; } Catch(Exception) { LoggerE("error during processing answer" << _rethrown_exception.GetMessage()); error = JSWebAPIErrorFactory::makeErrorObject(gContext, JSWebAPIErrorFactory::UNKNOWN_ERROR, "Internal error"); callbackManager->callOnError(error); + LoggerD("launchAppControl error callback called"); return; } } @@ -279,6 +287,7 @@ void ApplicationAsyncAnswerHandler::launchAppControlReply(const EventApplication if (ExceptionCodes::None != event->getExceptionCode()) { callbackManager->callOnError(); + LoggerD("launchAppControl reply failure callback called"); return; } @@ -294,9 +303,11 @@ void ApplicationAsyncAnswerHandler::launchAppControlReply(const EventApplication JSValueRef result = converter->toJSValueRef(*appControlDataArray); callbackManager->callOnSuccess(result); + LoggerD("launchAppControl reply return callback called"); return; } Catch(Exception) { callbackManager->callOnError(); + LoggerD("launchAppControl reply failure callback called"); return; } } @@ -336,6 +347,7 @@ void ApplicationAsyncAnswerHandler::findAppControl(const EventApplicationFindApp } callbackManager->callOnError(error); + LoggerD("findAppControl error callback called"); return; } @@ -350,12 +362,14 @@ void ApplicationAsyncAnswerHandler::findAppControl(const EventApplicationFindApp result[1] = converter.toJSValueRef(appControl); callbackManager->callOnSuccess(result, 2); + LoggerD("findAppControl success callback called"); return; } Catch(Exception) { LoggerE("error during processing answer" << _rethrown_exception.GetMessage()); error = JSWebAPIErrorFactory::makeErrorObject(gContext, JSWebAPIErrorFactory::UNKNOWN_ERROR, "Internal error"); callbackManager->callOnError(error); + LoggerD("findAppControl error callback called"); return; } } @@ -395,6 +409,7 @@ void ApplicationAsyncAnswerHandler::getAppsContext(const EventApplicationGetApps } callbackManager->callOnError(error); + LoggerD("getAppsContext error callback called"); return; } @@ -407,12 +422,14 @@ void ApplicationAsyncAnswerHandler::getAppsContext(const EventApplicationGetApps JSValueRef result = converter->toJSValueRef(appContextArray); callbackManager->callOnSuccess(result); + LoggerD("getAppsContext success callback called"); return; } Catch(Exception) { LoggerE("error during processing answer" << _rethrown_exception.GetMessage()); error = JSWebAPIErrorFactory::makeErrorObject(gContext, JSWebAPIErrorFactory::UNKNOWN_ERROR, "Internal error"); callbackManager->callOnError(error); + LoggerD("getAppsContext error callback called"); return; } } @@ -452,6 +469,7 @@ void ApplicationAsyncAnswerHandler::getAppsInfo(const EventApplicationGetAppsInf } callbackManager->callOnError(error); + LoggerD("getAppsInfo error callback called"); return; } @@ -463,12 +481,14 @@ void ApplicationAsyncAnswerHandler::getAppsInfo(const EventApplicationGetAppsInf JSValueRef result = converter.toJSValueRef(appInfoArray); callbackManager->callOnSuccess(result); + LoggerD("getAppsInfo success callback called"); return; } Catch(Exception) { LoggerE("error during processing answer" << _rethrown_exception.GetMessage()); error = JSWebAPIErrorFactory::makeErrorObject(gContext, JSWebAPIErrorFactory::UNKNOWN_ERROR, "Internal error"); callbackManager->callOnError(error); + LoggerD("getAppsInfo error callback called"); return; } } @@ -499,6 +519,7 @@ void ApplicationAsyncAnswerHandler::eventListener(const EventApplicationAppInfoE } JSValueRef result = converter.toJSValueRefFromApplicationInformation(appInfo); callbackManager->callOnInstalled(result); + LoggerD("AppInfoEvent oninstalled callback called"); } else if(event->getType() == EventApplicationAppInfoEventListener::OnUpdated) { @@ -510,6 +531,7 @@ void ApplicationAsyncAnswerHandler::eventListener(const EventApplicationAppInfoE } JSValueRef result = converter.toJSValueRefFromApplicationInformation(appInfo); callbackManager->callOnUpdated(result); + LoggerD("AppInfoEvent onupdated callback called"); } else if(event->getType() == EventApplicationAppInfoEventListener::OnUninstalled) { @@ -522,6 +544,7 @@ void ApplicationAsyncAnswerHandler::eventListener(const EventApplicationAppInfoE } JSValueRef result = converter.toJSValueRef(appId); callbackManager->callOnUninstalled(result); + LoggerD("AppInfoEvent onuninstalled callback called"); } else { diff --git a/src/Application/JSApplication.cpp b/src/Application/JSApplication.cpp old mode 100644 new mode 100755 index 15b57b6..349afef --- a/src/Application/JSApplication.cpp +++ b/src/Application/JSApplication.cpp @@ -120,6 +120,8 @@ JSValueRef JSApplication::exit(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { + LoggerD("exit called"); + TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); try { @@ -142,6 +144,8 @@ JSValueRef JSApplication::hide(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { + LoggerD("hide called"); + TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); try { @@ -165,6 +169,8 @@ JSValueRef JSApplication::getRequestedAppControl(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { + LoggerD("getRequestedAppControl called"); + TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); JSApplicationPriv *priv = static_cast(JSObjectGetPrivate(thisObject)); diff --git a/src/Application/JSApplicationInformation.cpp b/src/Application/JSApplicationInformation.cpp old mode 100644 new mode 100755 index 91e3a5a..ab0dcf1 --- a/src/Application/JSApplicationInformation.cpp +++ b/src/Application/JSApplicationInformation.cpp @@ -224,6 +224,8 @@ JSValueRef JSApplicationInformation::getPropertySize(JSContextRef context, JSStringRef propertyName, JSValueRef* exception) { + LoggerD("getPropertySize called"); + JSApplicationInformationPriv *priv = static_cast(JSObjectGetPrivate(object)); if (!priv) { LoggerE("Private object is not exists."); @@ -240,7 +242,6 @@ JSValueRef JSApplicationInformation::getPropertySize(JSContextRef context, try { CommonsJavaScript::Converter converter(context); - JSContextRef gContext = static_cast(JSObjectGetPrivate(object))->getContext(); if (!privateData->isInitialized()) { AppManagerWrapperSingleton::Instance().initializeAppInfo(privateData); diff --git a/src/Application/JSApplicationManager.cpp b/src/Application/JSApplicationManager.cpp old mode 100644 new mode 100755 index 66f916c..2f209c8 --- a/src/Application/JSApplicationManager.cpp +++ b/src/Application/JSApplicationManager.cpp @@ -148,6 +148,8 @@ JSValueRef JSApplicationManager::getCurrentApplication(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { + LoggerD("getCurrentApplication called"); + TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); try { @@ -176,6 +178,8 @@ JSValueRef JSApplicationManager::launch(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { + LoggerD("launch called"); + TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); TIME_TRACER_ITEM_BEGIN("launch(async)", 0); @@ -239,6 +243,8 @@ JSValueRef JSApplicationManager::kill(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { + LoggerD("kill called"); + TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); TIME_TRACER_ITEM_BEGIN("kill(async)", 0); @@ -302,6 +308,8 @@ JSValueRef JSApplicationManager::setUserAgent(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { + LoggerD("setUserAgent called"); + TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); try { @@ -332,6 +340,8 @@ JSValueRef JSApplicationManager::launchAppControl(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { + LoggerD("launchAppControl called"); + TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); TIME_TRACER_ITEM_BEGIN("launchAppControlReply", 0); TIME_TRACER_ITEM_BEGIN("launchAppControl(async)", 0); @@ -438,6 +448,8 @@ JSValueRef JSApplicationManager::findAppControl(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { + LoggerD("findAppControl called"); + TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); TIME_TRACER_ITEM_BEGIN("findAppControl(async)", 0); try { @@ -507,6 +519,8 @@ JSValueRef JSApplicationManager::getAppsContext(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { + LoggerD("getAppsContext called"); + TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); TIME_TRACER_ITEM_BEGIN("getAppsContext(async)", 0); @@ -564,6 +578,8 @@ JSValueRef JSApplicationManager::getAppContext(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { + LoggerD("getAppContext called"); + TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); try { @@ -593,6 +609,8 @@ JSValueRef JSApplicationManager::getAppsInfo(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { + LoggerD("getAppsInfo called"); + TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); TIME_TRACER_ITEM_BEGIN("getAppsInfo(async)", 0); @@ -650,6 +668,8 @@ JSValueRef JSApplicationManager::getAppInfo(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { + LoggerD("getAppInfo called"); + TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); try { @@ -684,6 +704,8 @@ JSValueRef JSApplicationManager::addAppInfoEventListener(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { + LoggerD("addAppInfoEventListener called"); + TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); try { @@ -761,6 +783,8 @@ JSValueRef JSApplicationManager::removeAppInfoEventListener(JSContextRef context const JSValueRef arguments[], JSValueRef* exception) { + LoggerD("removeAppInfoEventListener called"); + TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); try { @@ -817,6 +841,8 @@ JSValueRef JSApplicationManager::getAppCerts(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { + LoggerD("getAppCerts called"); + TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); try { @@ -856,6 +882,8 @@ JSValueRef JSApplicationManager::getAppSharedURI(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { + LoggerD("getAppSharedURI called"); + TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); try { @@ -884,6 +912,8 @@ JSValueRef JSApplicationManager::getAppMetaData(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { + LoggerD("getAppMetaData called"); + TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); try { diff --git a/src/Application/JSRequestedApplicationControl.cpp b/src/Application/JSRequestedApplicationControl.cpp old mode 100644 new mode 100755 index 53aeed1..91a1ad2 --- a/src/Application/JSRequestedApplicationControl.cpp +++ b/src/Application/JSRequestedApplicationControl.cpp @@ -185,6 +185,8 @@ JSValueRef JSRequestedApplicationControl::replyResult(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { + LoggerD("replyResult called"); + TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); JSRequestedApplicationControlPriv *priv = static_cast(JSObjectGetPrivate(thisObject)); @@ -227,6 +229,8 @@ JSValueRef JSRequestedApplicationControl::replyFailure(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { + LoggerD("replyFailure called"); + TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); JSRequestedApplicationControlPriv *priv = static_cast(JSObjectGetPrivate(thisObject)); diff --git a/src/Calendar/JSCalendar.cpp b/src/Calendar/JSCalendar.cpp index ee8328c..1673584 100755 --- a/src/Calendar/JSCalendar.cpp +++ b/src/Calendar/JSCalendar.cpp @@ -151,15 +151,14 @@ JSValueRef JSCalendar::add(JSContextRef context, CalendarPrivObject *privateObject = static_cast(JSObjectGetPrivate(thisObject)); - - TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_ADD); - Try { if (!privateObject) { ThrowMsg(ConversionException, "Object is null."); } + TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_ADD); + ICalendarPtr calendar = getCalendar(context, thisObject, NULL); if (argumentCount<1) { @@ -231,14 +230,14 @@ JSValueRef JSCalendar::addBatch(JSContextRef context, CalendarPrivObject *privateObject = static_cast(JSObjectGetPrivate(thisObject)); - TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_ADD_BATCH); - Try { if (!privateObject) { ThrowMsg(ConversionException, "Object is null."); } + TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_ADD_BATCH); + ICalendarPtr calendar = getCalendar(context, thisObject, NULL); JSContextRef globalContext = GlobalContextManager::getInstance()->getGlobalContext(context); @@ -313,14 +312,14 @@ JSValueRef JSCalendar::update(JSContextRef context, CalendarPrivObject *privateObject = static_cast(JSObjectGetPrivate(thisObject)); - TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_UPDATE); - Try { if (!privateObject) { ThrowMsg(ConversionException, "Object is null."); } + TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_UPDATE); + ICalendarPtr calendar = getCalendar(context, thisObject, exception); if (argumentCount<1) { @@ -399,14 +398,14 @@ JSValueRef JSCalendar::updateBatch(JSContextRef context, CalendarPrivObject *privateObject = static_cast(JSObjectGetPrivate(thisObject)); - TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_UPDATE_BATCH); - Try { if (!privateObject) { ThrowMsg(ConversionException, "Object is null."); } + TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_UPDATE_BATCH); + JSContextRef globalContext = GlobalContextManager::getInstance()->getGlobalContext(context); ICalendarPtr calendar = getCalendar(context, thisObject, exception); @@ -493,14 +492,14 @@ JSValueRef JSCalendar::remove(JSContextRef context, CalendarPrivObject *privateObject = static_cast(JSObjectGetPrivate(thisObject)); - TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_REMOVE); - Try { if (!privateObject) { ThrowMsg(ConversionException, "Object is null."); } + TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_REMOVE); + ICalendarPtr calendar = getCalendar(context, thisObject, exception); EventIdPtr itemId; @@ -585,14 +584,14 @@ JSValueRef JSCalendar::removeBatch(JSContextRef context, CalendarPrivObject *privateObject = static_cast(JSObjectGetPrivate(thisObject)); - TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_REMOVE_BATCH); - Try { if (!privateObject) { ThrowMsg(ConversionException, "Object is null."); } + TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_REMOVE_BATCH); + ICalendarPtr calendar = getCalendar(context, thisObject, exception); JSContextRef globalContext = GlobalContextManager::getInstance()->getGlobalContext(context); @@ -698,14 +697,14 @@ JSValueRef JSCalendar::find(JSContextRef context, CalendarPrivObject *privateObject = static_cast(JSObjectGetPrivate(thisObject)); - TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_FIND); - Try { if (!privateObject) { ThrowMsg(ConversionException, "Object is null."); } + TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_FIND); + ICalendarPtr calendar = getCalendar(context, thisObject, exception); JSContextRef globalContext = GlobalContextManager::getInstance()->getGlobalContext(context); @@ -804,14 +803,14 @@ JSValueRef JSCalendar::get(JSContextRef context, CalendarPrivObject *privateObject = static_cast(JSObjectGetPrivate(thisObject)); - TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_GET); - Try { if (!privateObject) { ThrowMsg(ConversionException, "Object is null."); } + TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_GET); + ICalendarPtr calendar = getCalendar(context, thisObject, exception); JSContextRef globalContext = GlobalContextManager::getInstance()->getGlobalContext(context); @@ -905,14 +904,14 @@ JSValueRef JSCalendar::addChangeListener(JSContextRef context, CalendarPrivObject *privateObject = static_cast(JSObjectGetPrivate(thisObject)); - TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_ADD_CHANGE_LISTENER); - Try { if (!privateObject) { ThrowMsg(ConversionException, "Object is null."); } + TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_ADD_CHANGE_LISTENER); + ICalendarPtr calendar = getCalendar(context, thisObject, exception); JSContextRef globalContext = GlobalContextManager::getInstance()->getGlobalContext(context); @@ -1021,14 +1020,14 @@ JSValueRef JSCalendar::removeChangeListener(JSContextRef context, CalendarPrivObject *privateObject = static_cast(JSObjectGetPrivate(thisObject)); - TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_REMOVE_CHANGE_LISTENER); - Try { if (!privateObject) { ThrowMsg(ConversionException, "Object is null."); } + TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_REMOVE_CHANGE_LISTENER); + ICalendarPtr calendar = getCalendar(context, thisObject, exception); JSContextRef globalContext = GlobalContextManager::getInstance()->getGlobalContext(context); diff --git a/src/Calendar/JSCalendarEvent.cpp b/src/Calendar/JSCalendarEvent.cpp index 6ff19c7..31219fd 100755 --- a/src/Calendar/JSCalendarEvent.cpp +++ b/src/Calendar/JSCalendarEvent.cpp @@ -284,14 +284,14 @@ JSValueRef JSCalendarEvent::expandRecurrence(JSContextRef context, CalendarEventPrivObject *privateObject = static_cast(JSObjectGetPrivate(thisObject)); - TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_EXPAND_RECURRENCE); - Try { if (!privateObject) { ThrowMsg(ConversionException, "Object is null."); } + TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_EXPAND_RECURRENCE); + CalendarEventPtr event = privateObject->getObject(); if (!event) { ThrowMsg(ConversionException, "Parameter conversion failed."); diff --git a/src/Calendar/JSCalendarItemProperties.cpp b/src/Calendar/JSCalendarItemProperties.cpp index 0391201..855e987 100755 --- a/src/Calendar/JSCalendarItemProperties.cpp +++ b/src/Calendar/JSCalendarItemProperties.cpp @@ -196,14 +196,14 @@ JSValueRef JSCalendarItemProperties::convertToString(JSContextRef context, CalendarItemPropertiesPrivObject *privateObject = static_cast(JSObjectGetPrivate(thisObject)); - TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_CONVERT_TO_STRING); - Try { if (!privateObject) { ThrowMsg(ConversionException, "Object is null."); } + TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_CONVERT_TO_STRING); + CalendarEventPtr item = privateObject->getObject(); if (!item) { ThrowMsg(ConversionException, "Parameter conversion failed."); @@ -274,14 +274,14 @@ JSValueRef JSCalendarItemProperties::clone(JSContextRef context, CalendarItemPropertiesPrivObject *privateObject = static_cast(JSObjectGetPrivate(thisObject)); - TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_CLONE); - Try { if (!privateObject) { ThrowMsg(ConversionException, "Object is null."); } + TIZEN_CHECK_ACCESS(context, exception, privateObject, CALENDAR_FUNCTION_API_CLONE); + CalendarEventPtr item = privateObject->getObject(); // item to copy if (!item) { ThrowMsg(ConversionException, "Parameter conversion failed."); diff --git a/src/Calendar/JSCalendarManager.cpp b/src/Calendar/JSCalendarManager.cpp index 86dbe9d..8d6ebfc 100755 --- a/src/Calendar/JSCalendarManager.cpp +++ b/src/Calendar/JSCalendarManager.cpp @@ -115,13 +115,13 @@ JSValueRef JSCalendarManager::getCalendars(JSContextRef context, TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); CalendarManagerPrivObject *privateObject = static_cast(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(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(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(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); diff --git a/src/DataSync/DataSyncManager.cpp b/src/DataSync/DataSyncManager.cpp index 2894ac8..9a635b6 100755 --- a/src/DataSync/DataSyncManager.cpp +++ b/src/DataSync/DataSyncManager.cpp @@ -600,7 +600,7 @@ void DataSyncManager::OnRequestReceived(const IEventUpdateProfilePtr &event) } ret = sync_agent_ds_update_profile(profile_h); - if (SYNC_AGENT_DS_SUCCESS!=ret) { + if (SYNC_AGENT_DS_SUCCESS!=ret && SYNC_AGENT_DS_SYNCHRONISING !=ret) { ThrowMsg(NotFoundException, "Platform error while updating a profile: "<(JSObjectGetPrivate(thisObject)); + PowerManager::getInstance()->removeScreenStateChangedCallback(thisPriv); TIME_TRACER_ITEM_END(__FUNCTION__, 0); return JSValueMakeUndefined(context); @@ -212,6 +213,7 @@ JSValueRef JSPowerManager::getScreenBrightness(JSContextRef context, try{ double brightness = PowerManager::getInstance()->getScreenBrightness(); + LoggerD("brightness : " << brightness); TIME_TRACER_ITEM_END(__FUNCTION__, 0); return JSUtil::toJSValueRef(context, brightness); }catch(const BasePlatformException& err){ -- 2.7.4