diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-08-01 12:55:04 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-08-01 12:55:04 (GMT) |
commit | 3df6c9c6630f3b3b9b0876ae5bc8f2d12a15b253 (patch) | |
tree | 41f234c33e1e04015ef92a6b94212d9c7e97ad72 /src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCAttr.cpp | |
parent | 720bbe5c1b8c0789b5c7ad9ffca33e52bf77f1da (diff) | |
download | uscxml-3df6c9c6630f3b3b9b0876ae5bc8f2d12a15b253.zip uscxml-3df6c9c6630f3b3b9b0876ae5bc8f2d12a15b253.tar.gz uscxml-3df6c9c6630f3b3b9b0876ae5bc8f2d12a15b253.tar.bz2 |
Bug fixes and version bump
- New calendar invoker
- Fixed memory leaks with JavaScriptCore
- Compiles on windows again
- Beautified source code indentation
Diffstat (limited to 'src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCAttr.cpp')
-rw-r--r-- | src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCAttr.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCAttr.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCAttr.cpp index 4de0efa..6ceb642 100644 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCAttr.cpp +++ b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCAttr.cpp @@ -22,8 +22,11 @@ JSStaticFunction JSCAttr::staticFunctions[] = { JSValueRef JSCAttr::nameAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { struct JSCAttrPrivate* privData = (struct JSCAttrPrivate*)JSObjectGetPrivate(object); + JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getName().c_str()); - return JSValueMakeString(ctx, stringRef); + JSValueRef retVal = JSValueMakeString(ctx, stringRef); + JSStringRelease(stringRef); + return retVal; } @@ -36,8 +39,11 @@ JSValueRef JSCAttr::specifiedAttrGetter(JSContextRef ctx, JSObjectRef object, JS JSValueRef JSCAttr::valueAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { struct JSCAttrPrivate* privData = (struct JSCAttrPrivate*)JSObjectGetPrivate(object); + JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getValue().c_str()); - return JSValueMakeString(ctx, stringRef); + JSValueRef retVal = JSValueMakeString(ctx, stringRef); + JSStringRelease(stringRef); + return retVal; } |