This source file includes following definitions.
- stringToV8Value
- doubleToV8Value
- setV8ObjectPropertyAsString
- setV8ObjectPropertyAsNumber
#include "config.h"
#include "core/animation/AnimationTestHelper.h"
#include "bindings/v8/V8Binding.h"
namespace WebCore {
v8::Handle<v8::Value> stringToV8Value(String string)
{
return v8::Handle<v8::Value>::Cast(v8String(v8::Isolate::GetCurrent(), string));
}
v8::Handle<v8::Value> doubleToV8Value(double number)
{
return v8::Handle<v8::Value>::Cast(v8::Number::New(v8::Isolate::GetCurrent(), number));
}
void setV8ObjectPropertyAsString(v8::Handle<v8::Object> object, String name, String value)
{
object->Set(stringToV8Value(name), stringToV8Value(value));
}
void setV8ObjectPropertyAsNumber(v8::Handle<v8::Object> object, String name, double value)
{
object->Set(stringToV8Value(name), doubleToV8Value(value));
}
}