Browse Source

don't use native_mate/compat.h macros (#12984)

Milan Burda 7 years ago
parent
commit
850051463b
1 changed files with 3 additions and 2 deletions
  1. 3 2
      atom/common/native_mate_converters/string16_converter.h

+ 3 - 2
atom/common/native_mate_converters/string16_converter.h

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