Commit cb994d76 by Dane Springmeyer

Merge pull request #369 from bwin/target-new-v8-from-chromium-38

Target new v8 from chromium 38
parents 5b3c5d2c ccdf4f12
......@@ -20,6 +20,8 @@ env:
- NODE_WEBKIT="0.8.6" TARGET_ARCH="x64"
- NODE_WEBKIT="0.10.5" TARGET_ARCH="ia32"
- NODE_WEBKIT="0.10.5" TARGET_ARCH="x64"
- NODE_WEBKIT="0.11.0" TARGET_ARCH="ia32"
- NODE_WEBKIT="0.11.0" TARGET_ARCH="x64"
global:
- secure: PifMOSnn+mWR1RUptXse+fLvWiTrzg0R/mazO7RWhXHWBKv0uAJ/qV3dI0GIRBLtjG10Iy+tT5RNh1TIbBzB9Y67wMcGvylUPG1+3EOKoBMEPnOD9AgCEQw4SOXfGPx0cq2N6ueSKieCgu1yKN9Wq7XCbE+zTk/DiRNIdLirVoo=
- secure: cc4esJY1vPXL31IeumAJoKWDDO2BTGFiltwfO1jbTbiV7QT911QUjTUasxXIVpOaHNCpxSTyevPwwTWfzt2EtF92Lli+qhQ2bbzMiDSBZstSrHdAe62Ai2M1oYYUwk/0cABB/2nO9uRyYwITCxpTSNzZBrYhn3C29WqBhPeVDmM=
......
......@@ -43,13 +43,26 @@ else
tar xf ${NW_DOWNLOAD}.tar.gz
export PATH=$(pwd)/${NW_DOWNLOAD}:${PATH}
if [[ "${TARGET_ARCH}" == 'ia32' ]]; then
# for nw >= 0.11.0 on ia32 we need gcc/g++ 4.8
IFS='.' read -a NODE_WEBKIT_VERSION <<< "${NODE_WEBKIT}"
if test ${NODE_WEBKIT_VERSION[0]} -ge 0 -a ${NODE_WEBKIT_VERSION[1]} -ge 11; then
# travis-ci runs ubuntu 12.04, so we need this ppa for gcc/g++ 4.8
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
CC=gcc-4.8
CXX=g++-4.8
COMPILER_PACKAGES="gcc-4.8-multilib g++-4.8-multilib"
else
CC=gcc-4.6
CXX=g++-4.6
COMPILER_PACKAGES="gcc-multilib g++-multilib"
fi
# need to update to avoid 404 for linux-libc-dev_3.2.0-64.97_amd64.deb
sudo apt-get update
# prepare packages for 32-bit builds on Linux
sudo apt-get -y install gcc-multilib g++-multilib libx11-6:i386 libnotify4:i386 libxtst6:i386 libcap2:i386 libglib2.0-0:i386 libgtk2.0-0:i386 libatk1.0-0:i386 libgdk-pixbuf2.0-0:i386 libcairo2:i386 libfreetype6:i386 libfontconfig1:i386 libxcomposite1:i386 libasound2:i386 libxdamage1:i386 libxext6:i386 libxfixes3:i386 libnss3:i386 libnspr4:i386 libgconf-2-4:i386 libexpat1:i386 libdbus-1-3:i386 libudev0:i386
sudo apt-get -y install $COMPILER_PACKAGES libx11-6:i386 libnotify4:i386 libxtst6:i386 libcap2:i386 libglib2.0-0:i386 libgtk2.0-0:i386 libatk1.0-0:i386 libgdk-pixbuf2.0-0:i386 libcairo2:i386 libfreetype6:i386 libfontconfig1:i386 libxcomposite1:i386 libasound2:i386 libxdamage1:i386 libxext6:i386 libxfixes3:i386 libnss3:i386 libnspr4:i386 libgconf-2-4:i386 libexpat1:i386 libdbus-1-3:i386 libudev0:i386
# also use ldd to find out if some necessary apt-get is missing
ldd $(pwd)/${NW_DOWNLOAD}/nw
CC=gcc-4.6 CXX=g++-4.6 npm install --build-from-source ${GYP_ARGS}
npm install --build-from-source ${GYP_ARGS}
else
npm install --build-from-source ${GYP_ARGS}
fi
......
......@@ -131,8 +131,8 @@ NAN_METHOD(Database::New) {
Database* db = new Database();
db->Wrap(args.This());
args.This()->Set(NanNew("filename"), args[0]->ToString(), ReadOnly);
args.This()->Set(NanNew("mode"), NanNew<Integer>(mode), ReadOnly);
args.This()->ForceSet(NanNew("filename"), args[0]->ToString(), ReadOnly);
args.This()->ForceSet(NanNew("mode"), NanNew<Integer>(mode), ReadOnly);
// Start opening the database.
OpenBaton* baton = new OpenBaton(db, callback, *filename, mode);
......
......@@ -56,14 +56,14 @@ const char* sqlite_authorizer_string(int type);
#define DEFINE_CONSTANT_INTEGER(target, constant, name) \
(target)->Set( \
(target)->ForceSet( \
NanNew(#name), \
NanNew<Integer>(constant), \
static_cast<PropertyAttribute>(ReadOnly | DontDelete) \
);
#define DEFINE_CONSTANT_STRING(target, constant, name) \
(target)->Set( \
(target)->ForceSet( \
NanNew(#name), \
NanNew(constant), \
static_cast<PropertyAttribute>(ReadOnly | DontDelete) \
......
......@@ -102,7 +102,7 @@ NAN_METHOD(Statement::New) {
Database* db = ObjectWrap::Unwrap<Database>(args[0]->ToObject());
Local<String> sql = Local<String>::Cast(args[1]);
args.This()->Set(NanNew("sql"), sql, ReadOnly);
args.This()->ForceSet(NanNew("sql"), sql, ReadOnly);
Statement* stmt = new Statement(db);
stmt->Wrap(args.This());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment