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

@ -1,14 +1,14 @@
// Copyright (c) 2014 GitHub, Inc. All rights reserved.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
// This file is generated by script/bootstrap.py, you should never modify it
// by hand.
#ifndef ATOM_COMMON_CHROME_VERSION_H_
#define ATOM_COMMON_CHROME_VERSION_H_
#define CHROME_VERSION_STRING "31.0.1650.57"
#define CHROME_VERSION "v" CHROME_VERSION_STRING
#endif // ATOM_COMMON_CHROME_VERSION_H_
// Copyright (c) 2014 GitHub, Inc. All rights reserved.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
// This file is generated by script/bootstrap.py, you should never modify it
// by hand.
#ifndef ATOM_COMMON_CHROME_VERSION_H_
#define ATOM_COMMON_CHROME_VERSION_H_
#define CHROME_VERSION_STRING "35.0.1916.153"
#define CHROME_VERSION "v" CHROME_VERSION_STRING
#endif // ATOM_COMMON_CHROME_VERSION_H_

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,

View file

@ -10,13 +10,17 @@
#undef CHECK
#undef CHECK_EQ
#undef CHECK_NE
#undef CHECK_GE
#undef CHECK_GT
#undef CHECK_LE
#undef CHECK_LT
#undef DISALLOW_COPY_AND_ASSIGN
#undef debug_string // This is defined in OS X 10.9 SDK in AssertMacros.h.
#include "vendor/node/src/env.h"
#include "vendor/node/src/env-inl.h"
#include "vendor/node/src/node.h"
#include "vendor/node/src/node_buffer.h"
#include "vendor/node/src/node_internals.h"
using node::node_isolate;
namespace atom {
// Defined in node_bindings.cc.