Backout 212d9fcab778, 67c738a47561, a5cdc792975d, 6538d5d3c8d4 since suspects for OSX64 m-oth permaorange

This commit is contained in:
Marco Bonardo 2011-10-13 12:44:31 +02:00
parent bdba754913
commit 5de41a86a2
13 changed files with 4 additions and 132 deletions

View File

@ -42,7 +42,6 @@ DEPTH = ../..
topsrcdir = @top_srcdir@
VPATH = @srcdir@
srcdir = @srcdir@
relativesrcdir = js/jsd
include $(DEPTH)/config/autoconf.mk
@ -56,7 +55,6 @@ LIBXUL_LIBRARY = 1
MODULE_NAME = JavaScript_Debugger
EXPORT_LIBRARY = 1
XPCSHELL_TESTS = test
# REQUIRES = java js

View File

@ -1,39 +0,0 @@
// Bug 689101 - if the binary layout of jsval does not match between C and C++
// code, then calls to functions returning jsval may get compiled differently
// than the callee, resulting in parameters being shifted over by one.
//
// An example is where on Windows, calling jsdValue.getWrappedValue() will
// return a random floating point number instead of an object.
//
// This test must be run with debugging already enabled
function run_test() {
const Cc = Components.classes;
const Ci = Components.interfaces;
const DebuggerService = Cc["@mozilla.org/js/jsd/debugger-service;1"];
const jsdIDebuggerService = Ci.jsdIDebuggerService;
var jsd = DebuggerService.getService(jsdIDebuggerService);
do_check_true(jsd.isOn);
var n = 0;
function f() {
n++;
}
jsd.enumerateScripts({ enumerateScript: function(script) {
script.setBreakpoint(0);
} });
jsd.breakpointHook = function(frame, type, dummy) {
var scope = frame.scope;
var parent = scope.jsParent; // Probably does not need to be called
var wrapped = scope.getWrappedValue();
// Do not try to print 'wrapped'; it may be an internal Call object
// that will crash when you toString it. Different bug.
do_check_eq(typeof(wrapped), "object");
return Ci.jsdIExecutionHook.RETURN_CONTINUE;
};
f();
}

View File

@ -1,6 +0,0 @@
[DEFAULT]
head =
tail =
[test_jsval_retval.js]
debug = 1

View File

@ -87,14 +87,10 @@ CPPSRCS = \
testThreads.cpp \
testTrap.cpp \
testUTF8.cpp \
testValueABI.cpp \
testVersion.cpp \
testXDR.cpp \
$(NULL)
CSRCS = \
valueABI.c
# Disabled: an entirely unrelated test seems to cause this to fail. Moreover,
# given the test's dependence on interactions between the compiler, the GC, and
# conservative stack scanning, the fix isn't obvious: more investigation

View File

@ -1,35 +0,0 @@
#include "tests.h"
/*
* Bug 689101 - jsval is technically a non-POD type because it has a private
* data member. On gcc, this doesn't seem to matter. On MSVC, this prevents
* returning a jsval from a function between C and C++ because it will use a
* retparam in C++ and a direct return value in C.
*/
extern "C" {
extern JSBool
C_ValueToObject(JSContext *cx, jsval v, JSObject **obj);
extern jsval
C_GetEmptyStringValue(JSContext *cx);
}
BEGIN_TEST(testValueABI)
{
JSObject* obj = JS_GetGlobalObject(cx);
jsval v = OBJECT_TO_JSVAL(obj);
obj = NULL;
CHECK(C_ValueToObject(cx, v, &obj));
JSBool equal;
CHECK(JS_StrictlyEqual(cx, v, OBJECT_TO_JSVAL(obj), &equal));
CHECK(equal);
v = C_GetEmptyStringValue(cx);
CHECK(JSVAL_IS_STRING(v));
return true;
}
END_TEST(testValueABI)

View File

@ -1,12 +0,0 @@
#include "jsapi.h"
JSBool C_ValueToObject(JSContext *cx, jsval v, JSObject **obj)
{
return JS_ValueToObject(cx, v, obj);
}
jsval
C_GetEmptyStringValue(JSContext *cx)
{
return JS_GetEmptyStringValue(cx);
}

View File

@ -663,16 +663,6 @@ class Value
#endif
}
#ifndef _MSC_VER
/* To make jsval binary compatible when linking across C and C++ with MSVC,
* JS::Value needs to be POD. Otherwise, jsval will be passed in memory
* in C++ but by value in C (bug 645111).
*/
private:
#endif
jsval_layout data;
private:
void staticAssertions() {
JS_STATIC_ASSERT(sizeof(JSValueType) == 1);
@ -682,6 +672,8 @@ class Value
JS_STATIC_ASSERT(sizeof(Value) == 8);
}
jsval_layout data;
friend jsval_layout (::JSVAL_TO_IMPL)(Value);
friend Value (::IMPL_TO_JSVAL)(jsval_layout l);
} JSVAL_ALIGNMENT;

View File

@ -1225,9 +1225,6 @@ ProcessArgs(JSContext *cx, JSObject *obj, char **argv, int argc)
case 'x':
JS_ToggleOptions(cx, JSOPTION_XML);
break;
case 'd':
xpc_ActivateDebugMode();
break;
case 'P':
if (JS_GET_CLASS(cx, JS_GetPrototype(cx, obj)) != &global_class) {
JSObject *gobj;

View File

@ -2661,14 +2661,6 @@ fail:
gDesiredDebugMode = gDebugMode = JS_FALSE;
}
NS_EXPORT_(void)
xpc_ActivateDebugMode()
{
XPCJSRuntime* rt = nsXPConnect::GetRuntimeInstance();
nsXPConnect::GetXPConnect()->SetDebugModeWhenPossible(true);
nsXPConnect::CheckForDebugMode(rt->GetJSRuntime());
}
/* JSContext Pop (); */
NS_IMETHODIMP
nsXPConnect::Pop(JSContext * *_retval)

View File

@ -580,8 +580,6 @@ public:
return gReportAllJSExceptions > 0;
}
static void CheckForDebugMode(JSRuntime *rt);
protected:
nsXPConnect();
@ -611,6 +609,7 @@ private:
static PRUint32 gReportAllJSExceptions;
static JSBool gDebugMode;
static JSBool gDesiredDebugMode;
static inline void CheckForDebugMode(JSRuntime *rt);
public:
static nsIScriptSecurityManager *gScriptSecurityManager;

View File

@ -182,11 +182,6 @@ xpc_UnmarkGrayObject(JSObject *obj)
xpc_UnmarkGrayObjectRecursive(obj);
}
// No JS can be on the stack when this is called. Probably only useful from
// xpcshell.
NS_EXPORT_(void)
xpc_ActivateDebugMode();
class nsIMemoryMultiReporterCallback;
namespace mozilla {

View File

@ -502,15 +502,11 @@ class XPCShellTests(object):
# The test file will have to be loaded after the head files.
cmdT = self.buildCmdTestFile(name)
args = self.xpcsRunArgs
if 'debug' in test:
args.insert(0, '-d')
try:
self.log.info("TEST-INFO | %s | running test ..." % name)
startTime = time.time()
proc = self.launchProcess(cmdH + cmdT + args,
proc = self.launchProcess(cmdH + cmdT + self.xpcsRunArgs,
stdout=pStdout, stderr=pStderr, env=self.env, cwd=testdir)
# Allow user to kill hung subprocess with SIGINT w/o killing this script

View File

@ -47,7 +47,6 @@ skip-if = os == "android"
[include:netwerk/test/unit/xpcshell.ini]
[include:netwerk/test/httpserver/test/xpcshell.ini]
[include:js/ductwork/debugger/tests/xpcshell.ini]
[include:js/jsd/test/xpcshell.ini]
[include:js/jetpack/tests/unit/xpcshell.ini]
[include:js/src/xpconnect/tests/unit/xpcshell.ini]
[include:modules/libjar/test/unit/xpcshell.ini]