Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Commit

Permalink
Merge tracemonkey to mozilla-central.
Browse files Browse the repository at this point in the history
  • Loading branch information
sayrer committed Apr 5, 2010
2 parents b92b5b0 + 7631cca commit 7776a80
Show file tree
Hide file tree
Showing 467 changed files with 12,806 additions and 10,574 deletions.
Expand Up @@ -202,7 +202,8 @@ function compareJSON(aNodeJSON_1, aNodeJSON_2) {
const SKIP_PROPS = ["dateAdded", "lastModified", "id"];

function compareObjects(obj1, obj2) {
do_check_eq(obj1.__count__, obj2.__count__);
function count(o) { var n = 0; for (let p in o) n++; return n; }
do_check_eq(count(obj1), count(obj2));
for (let prop in obj1) {
// Skip everchanging values.
if (SKIP_PROPS.indexOf(prop) != -1)
Expand Down
66 changes: 15 additions & 51 deletions configure.in
Expand Up @@ -6997,6 +6997,17 @@ if test -n "$MOZ_TRACEVIS"; then
AC_DEFINE(MOZ_TRACEVIS)
fi

dnl ========================================================
dnl = Use GCTimer
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(gctimer,
[ --enable-gctimer Enable GC timer (default=no)],
MOZ_GCTIMER=1,
MOZ_GCTIMER= )
if test -n "$MOZ_GCTIMER"; then
AC_DEFINE(MOZ_GCTIMER)
fi

dnl ========================================================
dnl = Use Valgrind
dnl ========================================================
Expand Down Expand Up @@ -8128,9 +8139,6 @@ if test "$BUILD_CTYPES"; then
if test "$OS_ARCH" = "WINCE" -a `echo $OS_TEST | grep -ic arm` = 1; then
# Disable ctypes for arm/wince.
BUILD_CTYPES=
elif test "$_MSC_VER" && test -z $AS; then
# Disable ctypes if we're on MSVC and MASM is unavailable.
AC_MSG_ERROR([No suitable assembler found. An assembler is required to build js-ctypes. You may --disable-ctypes to avoid this. If you are building with MS Visual Studio 8 Express, you may download the MASM 8.0 package, upgrade to Visual Studio 9 Express, or install the Vista SDK.])
else
AC_DEFINE(BUILD_CTYPES)
fi
Expand Down Expand Up @@ -8721,6 +8729,10 @@ fi
dist=$MOZ_BUILD_ROOT/dist
ac_configure_args="$_SUBDIR_CONFIG_ARGS"
ac_configure_args="$ac_configure_args --enable-threadsafe"
if test "$BUILD_CTYPES"; then
# Build js-ctypes on the platforms we can.
ac_configure_args="$ac_configure_args --enable-ctypes"
fi
if test -z "$MOZ_NATIVE_NSPR"; then
ac_configure_args="$ac_configure_args --with-nspr-cflags='$NSPR_CFLAGS'"
ac_configure_args="$ac_configure_args --with-nspr-libs='$NSPR_LIBS'"
Expand All @@ -8737,54 +8749,6 @@ fi
AC_OUTPUT_SUBDIRS(js/src)
ac_configure_args="$_SUBDIR_CONFIG_ARGS"

# Build jsctypes on the platforms we can.
if test "$BUILD_CTYPES"; then
# Run the libffi 'configure' script.
ac_configure_args="--disable-shared --enable-static --disable-raw-api"
if test "$MOZ_DEBUG"; then
ac_configure_args="$ac_configure_args --enable-debug"
fi
if test "$DSO_PIC_CFLAGS"; then
ac_configure_args="$ac_configure_args --with-pic"
fi
if test "$CROSS_COMPILE"; then
case "$target" in
*-mingw*)
ac_configure_args="$ac_configure_args --build=$build --host=${target_cpu}-${target_os} HOST_CC=\"$HOST_CC\" CC=\"$CC\""
;;
*)
ac_configure_args="$ac_configure_args --build=$build --host=$target HOST_CC=\"$HOST_CC\" CC=\"$CC\""
;;
esac
fi
if test "$_MSC_VER"; then
# Use a wrapper script for cl and ml that looks more like gcc.
# autotools can't quite handle an MSVC build environment yet.
ac_configure_args="$ac_configure_args LD=link CPP=\"cl -nologo -EP\" SHELL=sh.exe"
case "${target_cpu}" in
x86_64)
# Need target since MSYS tools into mozilla-build may be 32bit
ac_configure_args="$ac_configure_args CC=\"$_topsrcdir/js/ctypes/libffi/msvcc.sh -m64\" --build=$build --host=$target"
;;
*)
ac_configure_args="$ac_configure_args CC=$_topsrcdir/js/ctypes/libffi/msvcc.sh"
;;
esac
fi
if test "$SOLARIS_SUNPRO_CC"; then
# Always use gcc for libffi on Solaris
ac_configure_args="$ac_configure_args CC=gcc"
fi

# Use a separate cache file for libffi, since it does things differently
# from our configure.
old_cache_file=$cache_file
cache_file=js/ctypes/libffi/config.cache
AC_OUTPUT_SUBDIRS(js/ctypes/libffi)
cache_file=$old_cache_file
ac_configure_args="$_SUBDIR_CONFIG_ARGS"
fi

fi # COMPILE_ENVIRONMENT && !LIBXUL_SDK_DIR

dnl Prevent the regeneration of autoconf.mk forcing rebuilds of the world
Expand Down
6 changes: 3 additions & 3 deletions content/base/src/nsContentUtils.cpp
Expand Up @@ -5407,7 +5407,7 @@ class CloneStackFrame
jsval source;
jsval clone;
jsval temp;
JSAutoIdArray ids;
js::AutoIdArray ids;
jsuint index;

private:
Expand All @@ -5425,7 +5425,7 @@ class CloneStackFrame
}

CloneStackFrame* prevFrame;
JSAutoTempValueRooter tvrVals;
js::AutoArrayRooter tvrVals;
};

class CloneStack
Expand Down Expand Up @@ -5691,7 +5691,7 @@ nsContentUtils::CreateStructuredClone(JSContext* cx,
}

jsval output = OBJECT_TO_JSVAL(obj);
JSAutoTempValueRooter tvr(cx, output);
js::AutoValueRooter tvr(cx, output);

CloneStack stack(cx);
if (!stack.Push(val, OBJECT_TO_JSVAL(obj),
Expand Down
18 changes: 9 additions & 9 deletions content/canvas/src/CustomQS_Canvas2D.h
Expand Up @@ -50,7 +50,7 @@ Canvas2D_SetStyleHelper(JSContext *cx, JSObject *obj, jsval id, jsval *vp,
XPC_QS_ASSERT_CONTEXT_OK(cx);
nsIDOMCanvasRenderingContext2D *self;
xpc_qsSelfRef selfref;
JSAutoTempValueRooter tvr(cx);
js::AutoValueRooter tvr(cx);
if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.addr(), nsnull))
return JS_FALSE;

Expand Down Expand Up @@ -179,14 +179,14 @@ nsIDOMCanvasRenderingContext2D_CreateImageData(JSContext *cx, uintN argc, jsval

// create the fast typed array; it's initialized to 0 by default
JSObject *darray = js_CreateTypedArray(cx, js::TypedArray::TYPE_UINT8_CLAMPED, len);
JSAutoTempValueRooter rd(cx, darray);
js::AutoValueRooter rd(cx, darray);
if (!darray)
return JS_FALSE;

// Do JS_NewObject after CreateTypedArray, so that gc will get
// triggered here if necessary
JSObject *result = JS_NewObject(cx, NULL, NULL, NULL);
JSAutoTempValueRooter rr(cx, result);
js::AutoValueRooter rr(cx, result);
if (!result)
return JS_FALSE;

Expand All @@ -212,7 +212,7 @@ nsIDOMCanvasRenderingContext2D_GetImageData(JSContext *cx, uintN argc, jsval *vp

nsIDOMCanvasRenderingContext2D *self;
xpc_qsSelfRef selfref;
JSAutoTempValueRooter tvr(cx);
js::AutoValueRooter tvr(cx);
if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.addr(), nsnull))
return JS_FALSE;

Expand Down Expand Up @@ -246,7 +246,7 @@ nsIDOMCanvasRenderingContext2D_GetImageData(JSContext *cx, uintN argc, jsval *vp

// create the fast typed array
JSObject *darray = js_CreateTypedArray(cx, js::TypedArray::TYPE_UINT8_CLAMPED, len);
JSAutoTempValueRooter rd(cx, darray);
js::AutoValueRooter rd(cx, darray);
if (!darray)
return JS_FALSE;

Expand All @@ -260,7 +260,7 @@ nsIDOMCanvasRenderingContext2D_GetImageData(JSContext *cx, uintN argc, jsval *vp
// Do JS_NewObject after CreateTypedArray, so that gc will get
// triggered here if necessary
JSObject *result = JS_NewObject(cx, NULL, NULL, NULL);
JSAutoTempValueRooter rr(cx, result);
js::AutoValueRooter rr(cx, result);
if (!result)
return JS_FALSE;

Expand All @@ -286,7 +286,7 @@ nsIDOMCanvasRenderingContext2D_PutImageData(JSContext *cx, uintN argc, jsval *vp

nsIDOMCanvasRenderingContext2D *self;
xpc_qsSelfRef selfref;
JSAutoTempValueRooter tvr(cx);
js::AutoValueRooter tvr(cx);
if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.addr(), nsnull))
return JS_FALSE;

Expand All @@ -308,7 +308,7 @@ nsIDOMCanvasRenderingContext2D_PutImageData(JSContext *cx, uintN argc, jsval *vp
JSObject *darray;

// grab width, height, and the dense array from the dataObject
JSAutoTempValueRooter tv(cx);
js::AutoValueRooter tv(cx);

if (!JS_GetProperty(cx, dataObject, "width", tv.addr()) ||
!JS_ValueToECMAInt32(cx, tv.value(), &wi))
Expand All @@ -329,7 +329,7 @@ nsIDOMCanvasRenderingContext2D_PutImageData(JSContext *cx, uintN argc, jsval *vp
return JS_FALSE;
darray = JSVAL_TO_OBJECT(tv.value());

JSAutoTempValueRooter tsrc_tvr(cx);
js::AutoValueRooter tsrc_tvr(cx);

js::TypedArray *tsrc = NULL;
if (darray->getClass() == &js::TypedArray::fastClasses[js::TypedArray::TYPE_UINT8] ||
Expand Down
30 changes: 15 additions & 15 deletions content/canvas/src/CustomQS_WebGL.h
Expand Up @@ -68,7 +68,7 @@ nsICanvasRenderingContextWebGL_BufferData(JSContext *cx, uintN argc, jsval *vp)

nsICanvasRenderingContextWebGL *self;
xpc_qsSelfRef selfref;
JSAutoTempValueRooter tvr(cx);
js::AutoValueRooter tvr(cx);
if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.addr(), nsnull))
return JS_FALSE;

Expand Down Expand Up @@ -134,7 +134,7 @@ nsICanvasRenderingContextWebGL_BufferSubData(JSContext *cx, uintN argc, jsval *v

nsICanvasRenderingContextWebGL *self;
xpc_qsSelfRef selfref;
JSAutoTempValueRooter tvr(cx);
js::AutoValueRooter tvr(cx);
if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.addr(), nsnull))
return JS_FALSE;

Expand Down Expand Up @@ -204,7 +204,7 @@ nsICanvasRenderingContextWebGL_TexImage2D(JSContext *cx, uintN argc, jsval *vp)

nsICanvasRenderingContextWebGL *self;
xpc_qsSelfRef selfref;
JSAutoTempValueRooter tvr(cx);
js::AutoValueRooter tvr(cx);
if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.addr(), nsnull))
return JS_FALSE;

Expand Down Expand Up @@ -306,7 +306,7 @@ nsICanvasRenderingContextWebGL_TexSubImage2D(JSContext *cx, uintN argc, jsval *v

nsICanvasRenderingContextWebGL *self;
xpc_qsSelfRef selfref;
JSAutoTempValueRooter tvr(cx);
js::AutoValueRooter tvr(cx);
if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.addr(), nsnull))
return JS_FALSE;

Expand Down Expand Up @@ -407,7 +407,7 @@ helper_nsICanvasRenderingContextWebGL_Uniform_x_iv(JSContext *cx, uintN argc, js

nsICanvasRenderingContextWebGL *self;
xpc_qsSelfRef selfref;
JSAutoTempValueRooter tvr(cx);
js::AutoValueRooter tvr(cx);
if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.addr(), nsnull))
return JS_FALSE;

Expand All @@ -427,7 +427,7 @@ helper_nsICanvasRenderingContextWebGL_Uniform_x_iv(JSContext *cx, uintN argc, js

JSObject *arg1 = JSVAL_TO_OBJECT(argv[1]);

JSAutoTempValueRooter obj_tvr(cx);
js::AutoValueRooter obj_tvr(cx);

js::TypedArray *wa = 0;

Expand Down Expand Up @@ -477,7 +477,7 @@ helper_nsICanvasRenderingContextWebGL_Uniform_x_fv(JSContext *cx, uintN argc, js

nsICanvasRenderingContextWebGL *self;
xpc_qsSelfRef selfref;
JSAutoTempValueRooter tvr(cx);
js::AutoValueRooter tvr(cx);
if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.addr(), nsnull))
return JS_FALSE;

Expand All @@ -497,7 +497,7 @@ helper_nsICanvasRenderingContextWebGL_Uniform_x_fv(JSContext *cx, uintN argc, js

JSObject *arg1 = JSVAL_TO_OBJECT(argv[1]);

JSAutoTempValueRooter obj_tvr(cx);
js::AutoValueRooter obj_tvr(cx);

js::TypedArray *wa = 0;

Expand Down Expand Up @@ -547,7 +547,7 @@ helper_nsICanvasRenderingContextWebGL_UniformMatrix_x_fv(JSContext *cx, uintN ar

nsICanvasRenderingContextWebGL *self;
xpc_qsSelfRef selfref;
JSAutoTempValueRooter tvr(cx);
js::AutoValueRooter tvr(cx);
if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.addr(), nsnull))
return JS_FALSE;

Expand All @@ -571,7 +571,7 @@ helper_nsICanvasRenderingContextWebGL_UniformMatrix_x_fv(JSContext *cx, uintN ar

JSObject *arg2 = JSVAL_TO_OBJECT(argv[2]);

JSAutoTempValueRooter obj_tvr(cx);
js::AutoValueRooter obj_tvr(cx);

js::TypedArray *wa = 0;

Expand Down Expand Up @@ -618,7 +618,7 @@ helper_nsICanvasRenderingContextWebGL_VertexAttrib_x_fv(JSContext *cx, uintN arg

nsICanvasRenderingContextWebGL *self;
xpc_qsSelfRef selfref;
JSAutoTempValueRooter tvr(cx);
js::AutoValueRooter tvr(cx);
if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.addr(), nsnull))
return JS_FALSE;

Expand All @@ -638,7 +638,7 @@ helper_nsICanvasRenderingContextWebGL_VertexAttrib_x_fv(JSContext *cx, uintN arg

JSObject *arg1 = JSVAL_TO_OBJECT(argv[1]);

JSAutoTempValueRooter obj_tvr(cx);
js::AutoValueRooter obj_tvr(cx);

js::TypedArray *wa = 0;

Expand Down Expand Up @@ -780,7 +780,7 @@ helper_nsICanvasRenderingContextWebGL_Uniform_x_iv_tn(JSContext *cx, JSObject *o
return JSVAL_VOID;
}

JSAutoTempValueRooter obj_tvr(cx);
js::AutoValueRooter obj_tvr(cx);

js::TypedArray *wa = 0;

Expand Down Expand Up @@ -835,7 +835,7 @@ helper_nsICanvasRenderingContextWebGL_Uniform_x_fv_tn(JSContext *cx, JSObject *o
return JSVAL_VOID;
}

JSAutoTempValueRooter obj_tvr(cx);
js::AutoValueRooter obj_tvr(cx);

js::TypedArray *wa = 0;

Expand Down Expand Up @@ -890,7 +890,7 @@ helper_nsICanvasRenderingContextWebGL_UniformMatrix_x_fv_tn(JSContext *cx, JSObj
return JSVAL_VOID;
}

JSAutoTempValueRooter obj_tvr(cx);
js::AutoValueRooter obj_tvr(cx);

js::TypedArray *wa = 0;

Expand Down
3 changes: 2 additions & 1 deletion dom/base/nsDOMClassInfo.cpp
Expand Up @@ -41,6 +41,7 @@
#include "jsapi.h"
#include "jsprvtd.h" // we are using private JS typedefs...
#include "jscntxt.h"
#include "jsobj.h"
#include "jsdbgapi.h"

#include "nscore.h"
Expand Down Expand Up @@ -1469,7 +1470,7 @@ jsval nsDOMClassInfo::sJava_id = JSVAL_VOID;
jsval nsDOMClassInfo::sPackages_id = JSVAL_VOID;

static const JSClass *sObjectClass = nsnull;
const JSClass *nsDOMClassInfo::sXPCNativeWrapperClass = nsnull;
JSPropertyOp nsDOMClassInfo::sXPCNativeWrapperGetPropertyOp = nsnull;

/**
* Set our JSClass pointer for the Object class
Expand Down

0 comments on commit 7776a80

Please sign in to comment.