#define WRT_STORAGE_EVENT_PROPERTY_STORAGE_AREA "storageArea"
#define CATCH_EXCEPTION_CONVERSION \
- Catch(Commons::ConversionException) {\
- LogError("Error on conversion");\
- return JSDOMExceptionFactory::\
- UnknownException.make(context, exception);\
+ Catch(Commons::ConversionException) { \
+ LogError("Error on conversion"); \
+ return JSDOMExceptionFactory:: \
+ UnknownException.make(context, exception); \
}
#define CATCH_EXCEPTION_NULL_PTR \
- Catch(Commons::NullPointerException) {\
- LogError("Error on pointer, null value");\
- return JSDOMExceptionFactory::\
- UnknownException.make(context, exception);\
+ Catch(Commons::NullPointerException) { \
+ LogError("Error on pointer, null value"); \
+ return JSDOMExceptionFactory:: \
+ UnknownException.make(context, exception); \
}
#define CATCH_EXCEPTION_PLATFORM_ERROR \
- Catch(Commons::PlatformException){\
- LogError("PlatformException occured");\
- return JSDOMExceptionFactory::\
- UnknownException.make(context, exception);\
+ Catch(Commons::PlatformException){ \
+ LogError("PlatformException occured"); \
+ return JSDOMExceptionFactory:: \
+ UnknownException.make(context, exception); \
}
#define CATCH_EXCEPTION_SECURITY \
- Catch(Commons::SecurityException){\
- LogError("Security exception occured");\
- return JSDOMExceptionFactory::\
- SecurityException.make(context, exception);\
+ Catch(Commons::SecurityException){ \
+ LogError("Security exception occured"); \
+ return JSDOMExceptionFactory:: \
+ SecurityException.make(context, exception); \
}
namespace WrtPlugins {
{ 0, 0, 0, 0 }
};
-const JSClassRef JSStorageEvent::getClassRef()
+JSClassRef JSStorageEvent::getClassRef()
{
if (!m_jsClassRef) {
m_jsClassRef = JSClassCreate(&m_classInfo);
return &m_classInfo;
}
-JSClassRef JSStorageEvent::m_jsClassRef = JSClassCreate(JSStorageEvent::getClassInfo());
+JSClassRef JSStorageEvent::m_jsClassRef = JSClassCreate(
+ JSStorageEvent::getClassInfo());
-void JSStorageEvent::initialize(JSContextRef context,
+void JSStorageEvent::initialize(JSContextRef /*context*/,
JSObjectRef object)
{
LogDebug("entered");
delete priv;
LogDebug("private object is realised");
-
}
JSValueRef JSStorageEvent::getKey(
- JSContextRef context,
- JSObjectRef object,
- JSStringRef propertyName,
- JSValueRef* exception)
+ JSContextRef context,
+ JSObjectRef object,
+ JSStringRef /*propertyName*/,
+ JSValueRef* exception)
{
LogDebug("entered");
Converter converter(context);
return converter.toJSValueRef(getPrivateObject(object)->getKey());
-
}
CATCH_EXCEPTION_CONVERSION
CATCH_EXCEPTION_NULL_PTR
CATCH_EXCEPTION_PLATFORM_ERROR
- CATCH_EXCEPTION_SECURITY
+ CATCH_EXCEPTION_SECURITY
}
JSValueRef JSStorageEvent::getOldValue(
- JSContextRef context,
- JSObjectRef object,
- JSStringRef propertyName,
- JSValueRef* exception)
+ JSContextRef context,
+ JSObjectRef object,
+ JSStringRef /*propertyName*/,
+ JSValueRef* exception)
{
LogDebug("entered");
DPL::OptionalString oldValue = getPrivateObject(object)->getOldValue();
- if(!oldValue) {
+ if (!oldValue) {
return JSValueMakeNull(context);
} else {
return converter.toJSValueRef(DPL::ToUTF8String(*oldValue));
}
-
}
CATCH_EXCEPTION_CONVERSION
CATCH_EXCEPTION_NULL_PTR
CATCH_EXCEPTION_PLATFORM_ERROR
- CATCH_EXCEPTION_SECURITY
+ CATCH_EXCEPTION_SECURITY
}
JSValueRef JSStorageEvent::getNewValue(
- JSContextRef context,
- JSObjectRef object,
- JSStringRef propertyName,
- JSValueRef* exception)
+ JSContextRef context,
+ JSObjectRef object,
+ JSStringRef /*propertyName*/,
+ JSValueRef* exception)
{
LogDebug("entered");
DPL::OptionalString newValue = getPrivateObject(object)->getNewValue();
- if(!newValue) {
+ if (!newValue) {
return JSValueMakeNull(context);
} else {
return converter.toJSValueRef(DPL::ToUTF8String(*newValue));
}
-
}
CATCH_EXCEPTION_CONVERSION
CATCH_EXCEPTION_NULL_PTR
CATCH_EXCEPTION_PLATFORM_ERROR
- CATCH_EXCEPTION_SECURITY
+ CATCH_EXCEPTION_SECURITY
}
JSValueRef JSStorageEvent::getUrl(
- JSContextRef context,
- JSObjectRef object,
- JSStringRef propertyName,
- JSValueRef* exception)
+ JSContextRef context,
+ JSObjectRef object,
+ JSStringRef /*propertyName*/,
+ JSValueRef* exception)
{
LogDebug("entered");
Converter converter(context);
return converter.toJSValueRef(getPrivateObject(object)->getUrl());
-
}
CATCH_EXCEPTION_CONVERSION
- CATCH_EXCEPTION_NULL_PTR
+ CATCH_EXCEPTION_NULL_PTR
}
JSValueRef JSStorageEvent::getStorageArea(
- JSContextRef context,
- JSObjectRef object,
- JSStringRef propertyName,
- JSValueRef* exception)
+ JSContextRef context,
+ JSObjectRef /*object*/,
+ JSStringRef /*propertyName*/,
+ JSValueRef* exception)
{
LogDebug("entered");
CATCH_EXCEPTION_CONVERSION
CATCH_EXCEPTION_NULL_PTR
CATCH_EXCEPTION_PLATFORM_ERROR
- CATCH_EXCEPTION_SECURITY
+ CATCH_EXCEPTION_SECURITY
}
IStorageEventPtr JSStorageEvent::getPrivateObject(JSObjectRef arg)
#undef CATCH_EXCEPTION_NULL_PTR
#undef CATCH_EXCEPTION_PLATFORM_ERROR
#undef CATCH_EXCEPTION_SECURITY
-
}
}