Get rid of tabs in jsapi-tests and apply modelines everywhere. Whitespace only change. no_r=me.
authorJason Orendorff <jorendorff@mozilla.com>
Wed, 09 Jun 2010 14:34:18 -0500
changeset 47426 0254bc47933b5d6ef5e022b3bd73be4f06fd22f5
parent 47425 633d4ea174a8f63e7adcf3d092116261115199ab
child 47427 99ce939d454577b7d90fddc5ba670bf0be227661
push id14372
push userrsayre@mozilla.com
push dateWed, 14 Jul 2010 13:02:13 +0000
treeherdermozilla-central@c26c255bade9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone1.9.3a5pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Get rid of tabs in jsapi-tests and apply modelines everywhere. Whitespace only change. no_r=me.
js/src/jsapi-tests/selfTest.cpp
js/src/jsapi-tests/testContexts.cpp
js/src/jsapi-tests/testDebugger.cpp
js/src/jsapi-tests/testDefineGetterSetterNonEnumerable.cpp
js/src/jsapi-tests/testDefineProperty.cpp
js/src/jsapi-tests/testExtendedEq.cpp
js/src/jsapi-tests/testGCChunkAlloc.cpp
js/src/jsapi-tests/testIntString.cpp
js/src/jsapi-tests/testIsAboutToBeFinalized.cpp
js/src/jsapi-tests/testLookup.cpp
js/src/jsapi-tests/testNewObject.cpp
js/src/jsapi-tests/testPropCache.cpp
js/src/jsapi-tests/testSameValue.cpp
js/src/jsapi-tests/testSeal.cpp
js/src/jsapi-tests/testSetPropertyWithNativeGetterStubSetter.cpp
js/src/jsapi-tests/testTrap.cpp
js/src/jsapi-tests/testXDR.cpp
--- a/js/src/jsapi-tests/selfTest.cpp
+++ b/js/src/jsapi-tests/selfTest.cpp
@@ -1,8 +1,12 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sw=4 et tw=99:
+ */
+
 #include "tests.h"
 
 BEGIN_TEST(selfTest_NaNsAreSame)
 {
     jsvalRoot v1(cx), v2(cx);
     EVAL("0/0", v1.addr());  // NaN
     CHECK_SAME(v1, v1);
 
--- a/js/src/jsapi-tests/testContexts.cpp
+++ b/js/src/jsapi-tests/testContexts.cpp
@@ -1,8 +1,12 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sw=4 et tw=99:
+ */
+
 #include "tests.h"
 
 BEGIN_TEST(testContexts_IsRunning)
     {
         CHECK(JS_DefineFunction(cx, global, "chk", chk, 0, 0));
         EXEC("for (var i = 0; i < 9; i++) chk();");
         return true;
     }
@@ -33,47 +37,47 @@ struct ThreadData {
     JSRuntime *rt;
     JSObject *obj;
     const char *code;
     bool ok;
 };
 
 BEGIN_TEST(testContexts_bug561444)
     {
-	const char *code = "<a><b/></a>.b.@c = '';";
-	EXEC(code);
+        const char *code = "<a><b/></a>.b.@c = '';";
+        EXEC(code);
 
-	jsrefcount rc = JS_SuspendRequest(cx);
-	{
-	    ThreadData data = {rt, global, code, false};
-	    PRThread *thread = 
-		PR_CreateThread(PR_USER_THREAD, threadMain, &data,
-				PR_PRIORITY_NORMAL, PR_LOCAL_THREAD, PR_JOINABLE_THREAD, 0);
-	    CHECK(thread);
-	    PR_JoinThread(thread);
-	    CHECK(data.ok);
-	}
-	JS_ResumeRequest(cx, rc);
+        jsrefcount rc = JS_SuspendRequest(cx);
+        {
+            ThreadData data = {rt, global, code, false};
+            PRThread *thread = 
+                PR_CreateThread(PR_USER_THREAD, threadMain, &data,
+                                PR_PRIORITY_NORMAL, PR_LOCAL_THREAD, PR_JOINABLE_THREAD, 0);
+            CHECK(thread);
+            PR_JoinThread(thread);
+            CHECK(data.ok);
+        }
+        JS_ResumeRequest(cx, rc);
         return true;
     }
 
     static void threadMain(void *arg) {
-	ThreadData *d = (ThreadData *) arg;
+        ThreadData *d = (ThreadData *) arg;
 
-	JSContext *cx = JS_NewContext(d->rt, 8192);
-	if (!cx)
-	    return;
-	JS_BeginRequest(cx);
-	{
-	    jsvalRoot v(cx);
-	    if (!JS_EvaluateScript(cx, d->obj, d->code, strlen(d->code), __FILE__, __LINE__, v.addr()))
-		return;
-	}
-	JS_DestroyContext(cx);
-	d->ok = true;
+        JSContext *cx = JS_NewContext(d->rt, 8192);
+        if (!cx)
+            return;
+        JS_BeginRequest(cx);
+        {
+            jsvalRoot v(cx);
+            if (!JS_EvaluateScript(cx, d->obj, d->code, strlen(d->code), __FILE__, __LINE__, v.addr()))
+                return;
+        }
+        JS_DestroyContext(cx);
+        d->ok = true;
     }
 END_TEST(testContexts_bug561444)
 #endif
 
 BEGIN_TEST(testContexts_bug563735)
 {
     JSContext *cx2 = JS_NewContext(rt, 8192);
     CHECK(cx2);
@@ -92,26 +96,26 @@ BEGIN_TEST(testContexts_bug563735)
 END_TEST(testContexts_bug563735)
 
 BEGIN_TEST(testContexts_bug570764)
 {
     JSRuntime *rt2 = JS_NewRuntime(8L * 1024 * 1024);
     CHECK(rt2);
 
     {
-	// Create and destroy first context.
-	JSContext *cx2 = JS_NewContext(rt2, 8192);
-	CHECK(cx2);
-	JS_BeginRequest(cx2);
-	JSObject *obj = JS_NewGlobalObject(cx2, getGlobalClass());
-	CHECK(obj);
-	jsvalRoot objr(cx2, OBJECT_TO_JSVAL(obj));
-	JS_DestroyContext(cx2);
+        // Create and destroy first context.
+        JSContext *cx2 = JS_NewContext(rt2, 8192);
+        CHECK(cx2);
+        JS_BeginRequest(cx2);
+        JSObject *obj = JS_NewGlobalObject(cx2, getGlobalClass());
+        CHECK(obj);
+        jsvalRoot objr(cx2, OBJECT_TO_JSVAL(obj));
+        JS_DestroyContext(cx2);
 
-	// Create and destroy second context.
-	cx2 = JS_NewContext(rt2, 8192);
-	CHECK(cx2);
-	JS_DestroyContext(cx2);
+        // Create and destroy second context.
+        cx2 = JS_NewContext(rt2, 8192);
+        CHECK(cx2);
+        JS_DestroyContext(cx2);
     }
     JS_DestroyRuntime(rt2);
     return true;
 }
 END_TEST(testContexts_bug570764)
--- a/js/src/jsapi-tests/testDebugger.cpp
+++ b/js/src/jsapi-tests/testDebugger.cpp
@@ -1,8 +1,12 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sw=4 et tw=99:
+ */
+
 #include "tests.h"
 #include "jsdbgapi.h"
 
 static int callCount[2] = {0, 0};
 
 static void *
 callHook(JSContext *cx, JSStackFrame *fp, JSBool before, JSBool *ok, void *closure)
 {
--- a/js/src/jsapi-tests/testDefineGetterSetterNonEnumerable.cpp
+++ b/js/src/jsapi-tests/testDefineGetterSetterNonEnumerable.cpp
@@ -1,8 +1,12 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sw=4 et tw=99:
+ */
+
 #include "tests.h"
 #include "jsxdrapi.h"
 
 static JSBool
 native(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
 {
     return JS_TRUE;
 }
--- a/js/src/jsapi-tests/testDefineProperty.cpp
+++ b/js/src/jsapi-tests/testDefineProperty.cpp
@@ -1,10 +1,10 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set ts=4 sw=4 et tw=99:
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sw=4 et tw=99:
  */
 
 #include "tests.h"
 
 BEGIN_TEST(testDefineProperty_bug564344)
 {
     jsvalRoot x(cx);
     EVAL("function f() {}\n"
--- a/js/src/jsapi-tests/testExtendedEq.cpp
+++ b/js/src/jsapi-tests/testExtendedEq.cpp
@@ -1,10 +1,10 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set ts=4 sw=4 et tw=99:
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sw=4 et tw=99:
  *
  * This tests user-specified (via JSExtendedClass) equality operations on
  * trace.
  */
 
 #include "tests.h"
 
 static JSBool
--- a/js/src/jsapi-tests/testGCChunkAlloc.cpp
+++ b/js/src/jsapi-tests/testGCChunkAlloc.cpp
@@ -1,10 +1,10 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set ts=4 sw=4 et tw=99:
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sw=4 et tw=99:
  *
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/licenses/publicdomain/
  * Contributor: Igor Bukanov
  */
 
 #include "tests.h"
 #include "jsgcchunk.h"
--- a/js/src/jsapi-tests/testIntString.cpp
+++ b/js/src/jsapi-tests/testIntString.cpp
@@ -1,8 +1,12 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sw=4 et tw=99:
+ */
+
 #include "tests.h"
 
 BEGIN_TEST(testIntString_bug515273)
 {
     jsvalRoot v(cx);
     EVAL("'42';", v.addr());
 
     JSString *str = JSVAL_TO_STRING(v.value());
--- a/js/src/jsapi-tests/testIsAboutToBeFinalized.cpp
+++ b/js/src/jsapi-tests/testIsAboutToBeFinalized.cpp
@@ -1,8 +1,12 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sw=4 et tw=99:
+ */
+
 #include "tests.h"
 #include "jsstr.h"
 
 static JSGCCallback oldGCCallback;
 
 static void **checkPointers;
 static jsuint checkPointersLength;
 
--- a/js/src/jsapi-tests/testLookup.cpp
+++ b/js/src/jsapi-tests/testLookup.cpp
@@ -1,8 +1,12 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sw=4 et tw=99:
+ */
+
 #include "tests.h"
 #include "jsfun.h"  // for js::IsInternalFunctionObject
 
 BEGIN_TEST(testLookup_bug522590)
 {
     // Define a function that makes method-bearing objects.
     jsvalRoot x(cx);
     EXEC("function mkobj() { return {f: function () {return 2;}} }");
--- a/js/src/jsapi-tests/testNewObject.cpp
+++ b/js/src/jsapi-tests/testNewObject.cpp
@@ -1,10 +1,10 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set ts=4 sw=4 et tw=99:
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sw=4 et tw=99:
  */
 
 #include "tests.h"
 
 const size_t N = 1000;
 static jsval argv[N];
 
 static JSBool
--- a/js/src/jsapi-tests/testPropCache.cpp
+++ b/js/src/jsapi-tests/testPropCache.cpp
@@ -1,8 +1,12 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sw=4 et tw=99:
+ */
+
 #include "tests.h"
 
 static int g_counter;
 
 static JSBool
 CounterAdd(JSContext *cx, JSObject *obj, jsval idval, jsval *vp)
 {
     g_counter++;
--- a/js/src/jsapi-tests/testSameValue.cpp
+++ b/js/src/jsapi-tests/testSameValue.cpp
@@ -1,8 +1,12 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sw=4 et tw=99:
+ */
+
 #include "tests.h"
 
 BEGIN_TEST(testSameValue)
 {
     jsvalRoot v1(cx);
     jsvalRoot v2(cx);
 
     /*
--- a/js/src/jsapi-tests/testSeal.cpp
+++ b/js/src/jsapi-tests/testSeal.cpp
@@ -1,8 +1,12 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sw=4 et tw=99:
+ */
+
 #include "tests.h"
 
 BEGIN_TEST(testSeal_bug535703)
 {
     JSObject *obj = JS_NewObject(cx, NULL, NULL, NULL);
     CHECK(obj);
     JS_SealObject(cx, obj, JS_TRUE);  // don't crash
     return true;
--- a/js/src/jsapi-tests/testSetPropertyWithNativeGetterStubSetter.cpp
+++ b/js/src/jsapi-tests/testSetPropertyWithNativeGetterStubSetter.cpp
@@ -1,8 +1,12 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sw=4 et tw=99:
+ */
+
 #include "tests.h"
 #include "jsxdrapi.h"
 
 static JSBool
 nativeGet(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
 {
     *vp = INT_TO_JSVAL(17);
     return JS_TRUE;
--- a/js/src/jsapi-tests/testTrap.cpp
+++ b/js/src/jsapi-tests/testTrap.cpp
@@ -1,8 +1,12 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sw=4 et tw=99:
+ */
+
 #include "tests.h"
 #include "jsdbgapi.h"
 
 static int emptyTrapCallCount = 0;
 
 static JSTrapStatus
 EmptyTrapHandler(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval,
                  jsval closure)
--- a/js/src/jsapi-tests/testXDR.cpp
+++ b/js/src/jsapi-tests/testXDR.cpp
@@ -1,8 +1,12 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sw=4 et tw=99:
+ */
+
 #include "tests.h"
 #include "jsscript.h"
 #include "jsxdrapi.h"
 
 BEGIN_TEST(testXDR_bug506491)
 {
     const char *s =
         "function makeClosure(s, name, value) {\n"