projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[dali_1.4.26] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git]
/
plugins
/
dali-script-v8
/
src
/
utils
/
v8-utils.cpp
diff --git
a/plugins/dali-script-v8/src/utils/v8-utils.cpp
b/plugins/dali-script-v8/src/utils/v8-utils.cpp
index
b77d458
..
ce656c0
100644
(file)
--- a/
plugins/dali-script-v8/src/utils/v8-utils.cpp
+++ b/
plugins/dali-script-v8/src/utils/v8-utils.cpp
@@
-87,7
+87,7
@@
void LogError(const v8::FunctionCallbackInfo< v8::Value >& args)
output += *utf8_value;
output +="\n";
}
output += *utf8_value;
output +="\n";
}
- DALI_LOG_ERROR_NOFN( "JavaScript: %s",output.c_str() );
+ DALI_LOG_ERROR_NOFN( "JavaScript: %s
\n
",output.c_str() );
}
void GetFileContents(const std::string &fileName, std::string& contents)
}
void GetFileContents(const std::string &fileName, std::string& contents)
@@
-378,8
+378,6
@@
std::string PropertyNameToJavaScriptName(const std::string& hyphenatedName)
return ret;
}
return ret;
}
-
-
void ScriptError( const char* function, v8::Isolate* isolate, std::string errorString )
{
v8::EscapableHandleScope scope( isolate);
void ScriptError( const char* function, v8::Isolate* isolate, std::string errorString )
{
v8::EscapableHandleScope scope( isolate);
@@
-393,6
+391,12
@@
void ScriptError( const char* function, v8::Isolate* isolate, std::string errorS
isolate->ThrowException( v8::String::NewFromUtf8( isolate, errorMsg.c_str()) );
}
isolate->ThrowException( v8::String::NewFromUtf8( isolate, errorMsg.c_str()) );
}
+void ScriptWarning( const char* function, std::string warningString )
+{
+ std::string warningMsg = std::string(function) + std::string("(), ") + warningString;
+ DALI_LOG_WARNING("%s \n", warningMsg.c_str() );
+}
+
bool IsBooleanPrimitiveOrObject( const v8::Local<v8::Value>& value )
{
return ( value->IsBoolean() || value->IsBooleanObject());
bool IsBooleanPrimitiveOrObject( const v8::Local<v8::Value>& value )
{
return ( value->IsBoolean() || value->IsBooleanObject());
@@
-504,6
+508,13
@@
Property::Value GetPropertyValueFromObject( bool& found, v8::Isolate* isolate, c
v8::Local<v8::Int32> v = value->ToInt32();
return Dali::Property::Value(static_cast<int>(v->Value()));
}
v8::Local<v8::Int32> v = value->ToInt32();
return Dali::Property::Value(static_cast<int>(v->Value()));
}
+ else if( value->IsString() )
+ {
+ found = true;
+ std::string valueString = V8Utils::v8StringToStdString( value );
+ return Dali::Property::Value(valueString);
+ }
+
return daliPropertyValue;
}
return daliPropertyValue;
}