Upgrade to new V8 APIs.

This commit is contained in:
Cheng Zhao 2014-06-28 19:31:23 +08:00
parent 91c7458ab8
commit c713deb1e8
5 changed files with 82 additions and 64 deletions

View file

@ -14,8 +14,8 @@ template<>
struct Converter<string16> {
static v8::Handle<v8::Value> ToV8(v8::Isolate* isolate,
const string16& val) {
return v8::String::New(reinterpret_cast<const uint16_t*>(val.data()),
val.size());
return MATE_STRING_NEW_FROM_UTF16(
isolate, reinterpret_cast<const uint16_t*>(val.data()), val.size());
}
static bool FromV8(v8::Isolate* isolate,
v8::Handle<v8::Value> val,