view nodejs/run.sh @ 1416:c60a978f98b1

Fix issue of seg. fault at xnjsmb_coord_invalidate_subtree(). It caused by _xnjsmb_coord_clone_from_subtree_mod() does not create an JS wrapper object every descendants of the subtree. We do not provide any method for traveling tree. So, it is fine to clone a subtree without creating wrapper objects for descendants. So, we check if an object own a JS wrapper object before invalidating it.
author Thinker K.F. Li <thinker@codemud.net>
date Wed, 06 Apr 2011 17:52:38 +0800
parents bced6fe39856
children
line wrap: on
line source

#!/bin/sh

ABS=`realpath $0`
if [ -z "$SRCDIR" ]; then
    SRCDIR=`dirname $ABS`/..
fi
if [ -z "$BUILDDIR" ]; then
    BUILDDIR=`dirname $ABS`/..
fi

NODE_PATH=${BUILDDIR}/nodejs/objs/default:${SRCDIR}/nodejs:$NODE_PATH
export NODE_PATH

LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${BUILDDIR}/src/.libs/
export LD_LIBRARY_PATH

DIR=`dirname $1`
FNAME=`basename $1`

if [ -z "$DEBUG" ]; then
    cd $DIR; node $FNAME
else
    # DEBUG
    cd $DIR; gdb -args node $FNAME
fi