Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Target new v8 from chromium 38 #369

Merged
merged 3 commits into from
Dec 8, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
17 changes: 15 additions & 2 deletions scripts/build_against_node_webkit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/database.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down
2 changes: 1 addition & 1 deletion src/statement.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down