namespace WrtDeviceApis {
namespace CommonsJavaScript {
-
using namespace WrtDeviceApis::Commons;
-
bool JSUtils::hasProperty(JSStaticValue* properties,
- JSStringRef name)
+ JSStringRef name)
{
JSStaticValue* property = properties;
while (property->name) {
}
JSValueRef JSUtils::getJSProperty(JSContextRef context,
- JSValueRef jsValue,
- const std::string &name,
- JSValueRef *exception)
+ JSValueRef jsValue,
+ const std::string &name,
+ JSValueRef *exception)
{
ScopedJSStringRef jsPropName(JSStringCreateWithUTF8CString(name.c_str()));
Converter converter(context);
}
JSValueRef JSUtils::getJSProperty(JSContextRef context,
- JSObjectRef object,
- const std::string& name)
+ JSObjectRef object,
+ const std::string& name)
{
Converter converter(context);
Try {
}
}
}
- Catch(ConversionException) {
- }
+ Catch(ConversionException) {}
return NULL;
}
JSValueRef JSUtils::getJSPropertyOrUndefined(JSContextRef context,
- JSObjectRef object,
- const std::string& name)
+ JSObjectRef object,
+ const std::string& name)
{
Converter converter(context);
Try {
return JSObjectGetProperty(context, object, propName.get(), NULL);
}
}
- Catch(ConversionException) {
- }
+ Catch(ConversionException) {}
return JSValueMakeUndefined(context);
}
} // CommonsJavaScript