mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge m-i to m-c
This commit is contained in:
commit
445bf73f09
54
js/src/jit-test/tests/baseline/funcall.js
Normal file
54
js/src/jit-test/tests/baseline/funcall.js
Normal file
@ -0,0 +1,54 @@
|
||||
function test1() {
|
||||
var f = function() { return 1; };
|
||||
|
||||
for (var i=0; i<25; i++) {
|
||||
f.call();
|
||||
if (i > 20)
|
||||
f = Math.abs;
|
||||
}
|
||||
}
|
||||
test1();
|
||||
|
||||
var origCall = Function.prototype.call;
|
||||
|
||||
function test2() {
|
||||
var f = function() { return 1; };
|
||||
var c = 0;
|
||||
for (var i=0; i<25; i++) {
|
||||
f.call();
|
||||
if (i > 20)
|
||||
Function.prototype.call = function() { c++; };
|
||||
}
|
||||
assertEq(c, 3);
|
||||
}
|
||||
test2();
|
||||
Function.prototype.call = origCall;
|
||||
|
||||
function test3() {
|
||||
var f = function() { return 1; };
|
||||
for (var i=0; i<25; i++) {
|
||||
f.call();
|
||||
if (i > 20)
|
||||
Function.prototype.call = undefined;
|
||||
}
|
||||
}
|
||||
try {
|
||||
test3();
|
||||
assertEq(0, 1);
|
||||
} catch(e) {}
|
||||
|
||||
Function.prototype.call = origCall;
|
||||
|
||||
function test4() {
|
||||
var f = function(a, b, c) {
|
||||
assertEq(arguments.length, 1);
|
||||
assertEq(a, 1);
|
||||
assertEq(b, undefined);
|
||||
assertEq(c, undefined);
|
||||
return 1;
|
||||
};
|
||||
for (var i=0; i<25; i++) {
|
||||
f.call(null, 1);
|
||||
}
|
||||
}
|
||||
test4();
|
@ -671,6 +671,7 @@ ICStubCompiler::guardProfilingEnabled(MacroAssembler &masm, Register scratch, La
|
||||
kind == ICStub::Call_Native ||
|
||||
kind == ICStub::Call_ScriptedApplyArray ||
|
||||
kind == ICStub::Call_ScriptedApplyArguments ||
|
||||
kind == ICStub::Call_ScriptedFunCall ||
|
||||
kind == ICStub::GetProp_CallScripted ||
|
||||
kind == ICStub::GetProp_CallNative ||
|
||||
kind == ICStub::GetProp_CallDOMProxyNative ||
|
||||
@ -7807,6 +7808,39 @@ TryAttachFunApplyStub(JSContext *cx, ICCall_Fallback *stub, HandleScript script,
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
TryAttachFunCallStub(JSContext *cx, ICCall_Fallback *stub, HandleScript script, jsbytecode *pc,
|
||||
HandleValue thisv, bool *attached)
|
||||
{
|
||||
// Try to attach a stub for Function.prototype.call with scripted |this|.
|
||||
|
||||
*attached = false;
|
||||
if (!thisv.isObject() || !thisv.toObject().is<JSFunction>())
|
||||
return true;
|
||||
RootedFunction target(cx, &thisv.toObject().as<JSFunction>());
|
||||
|
||||
// Attach a stub if the script can be Baseline-compiled. We do this also
|
||||
// if the script is not yet compiled to avoid attaching a CallNative stub
|
||||
// that handles everything, even after the callee becomes hot.
|
||||
if (target->hasScript() && target->nonLazyScript()->canBaselineCompile() &&
|
||||
!stub->hasStub(ICStub::Call_ScriptedFunCall))
|
||||
{
|
||||
IonSpew(IonSpew_BaselineIC, " Generating Call_ScriptedFunCall stub");
|
||||
|
||||
ICCall_ScriptedFunCall::Compiler compiler(cx, stub->fallbackMonitorStub()->firstMonitorStub(),
|
||||
script->pcToOffset(pc));
|
||||
ICStub *newStub = compiler.getStub(compiler.getStubSpace(script));
|
||||
if (!newStub)
|
||||
return false;
|
||||
|
||||
*attached = true;
|
||||
stub->addNewStub(newStub);
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
GetTemplateObjectForNative(JSContext *cx, HandleScript script, jsbytecode *pc,
|
||||
Native native, const CallArgs &args, MutableHandleObject res)
|
||||
@ -7991,6 +8025,14 @@ TryAttachCallStub(JSContext *cx, ICCall_Fallback *stub, HandleScript script, jsb
|
||||
return true;
|
||||
}
|
||||
|
||||
if (op == JSOP_FUNCALL && fun->native() == js_fun_call) {
|
||||
bool attached;
|
||||
if (!TryAttachFunCallStub(cx, stub, script, pc, thisv, &attached))
|
||||
return false;
|
||||
if (attached)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (stub->nativeStubCount() >= ICCall_Fallback::MAX_NATIVE_STUBS) {
|
||||
IonSpew(IonSpew_BaselineIC,
|
||||
" Too many Call_Native stubs. TODO: add Call_AnyNative!");
|
||||
@ -8972,6 +9014,144 @@ ICCall_ScriptedApplyArguments::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
ICCall_ScriptedFunCall::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
{
|
||||
Label failure;
|
||||
GeneralRegisterSet regs(availableGeneralRegs(0));
|
||||
bool canUseTailCallReg = regs.has(BaselineTailCallReg);
|
||||
|
||||
Register argcReg = R0.scratchReg();
|
||||
JS_ASSERT(argcReg != ArgumentsRectifierReg);
|
||||
|
||||
regs.take(argcReg);
|
||||
regs.take(ArgumentsRectifierReg);
|
||||
regs.takeUnchecked(BaselineTailCallReg);
|
||||
|
||||
// Load the callee in R1.
|
||||
// Stack Layout: [ ..., CalleeVal, ThisVal, Arg0Val, ..., ArgNVal, +ICStackValueOffset+ ]
|
||||
BaseIndex calleeSlot(BaselineStackReg, argcReg, TimesEight, ICStackValueOffset + sizeof(Value));
|
||||
masm.loadValue(calleeSlot, R1);
|
||||
regs.take(R1);
|
||||
|
||||
// Ensure callee is js_fun_call.
|
||||
masm.branchTestObject(Assembler::NotEqual, R1, &failure);
|
||||
|
||||
Register callee = masm.extractObject(R1, ExtractTemp0);
|
||||
masm.branchTestObjClass(Assembler::NotEqual, callee, regs.getAny(), &JSFunction::class_,
|
||||
&failure);
|
||||
masm.loadPtr(Address(callee, JSFunction::offsetOfNativeOrScript()), callee);
|
||||
masm.branchPtr(Assembler::NotEqual, callee, ImmPtr(js_fun_call), &failure);
|
||||
|
||||
// Ensure |this| is a scripted function with JIT code.
|
||||
BaseIndex thisSlot(BaselineStackReg, argcReg, TimesEight, ICStackValueOffset);
|
||||
masm.loadValue(thisSlot, R1);
|
||||
|
||||
masm.branchTestObject(Assembler::NotEqual, R1, &failure);
|
||||
callee = masm.extractObject(R1, ExtractTemp0);
|
||||
|
||||
masm.branchTestObjClass(Assembler::NotEqual, callee, regs.getAny(), &JSFunction::class_,
|
||||
&failure);
|
||||
masm.branchIfFunctionHasNoScript(callee, &failure);
|
||||
masm.loadPtr(Address(callee, JSFunction::offsetOfNativeOrScript()), callee);
|
||||
|
||||
// Load the start of the target JitCode.
|
||||
Register code = regs.takeAny();
|
||||
masm.loadBaselineOrIonRaw(callee, code, SequentialExecution, &failure);
|
||||
|
||||
// We no longer need R1.
|
||||
regs.add(R1);
|
||||
|
||||
// Push a stub frame so that we can perform a non-tail call.
|
||||
enterStubFrame(masm, regs.getAny());
|
||||
if (canUseTailCallReg)
|
||||
regs.add(BaselineTailCallReg);
|
||||
|
||||
// Values are on the stack left-to-right. Calling convention wants them
|
||||
// right-to-left so duplicate them on the stack in reverse order.
|
||||
pushCallArguments(masm, regs, argcReg);
|
||||
|
||||
// Discard callee (function.call).
|
||||
masm.addPtr(Imm32(sizeof(Value)), StackPointer);
|
||||
|
||||
// Pop scripted callee (the original |this|).
|
||||
ValueOperand val = regs.takeAnyValue();
|
||||
masm.popValue(val);
|
||||
|
||||
// Decrement argc if argc > 0. If argc == 0, push |undefined| as |this|.
|
||||
Label zeroArgs, done;
|
||||
masm.branchTest32(Assembler::Zero, argcReg, argcReg, &zeroArgs);
|
||||
masm.sub32(Imm32(1), argcReg);
|
||||
masm.jump(&done);
|
||||
|
||||
masm.bind(&zeroArgs);
|
||||
masm.pushValue(UndefinedValue());
|
||||
masm.bind(&done);
|
||||
|
||||
// Unbox scripted callee.
|
||||
callee = masm.extractObject(val, ExtractTemp0);
|
||||
|
||||
Register scratch = regs.takeAny();
|
||||
EmitCreateStubFrameDescriptor(masm, scratch);
|
||||
|
||||
// Note that we use Push, not push, so that callIon will align the stack
|
||||
// properly on ARM.
|
||||
masm.Push(argcReg);
|
||||
masm.Push(callee);
|
||||
masm.Push(scratch);
|
||||
|
||||
// Handle arguments underflow.
|
||||
Label noUnderflow;
|
||||
masm.load16ZeroExtend(Address(callee, JSFunction::offsetOfNargs()), callee);
|
||||
masm.branch32(Assembler::AboveOrEqual, argcReg, callee, &noUnderflow);
|
||||
{
|
||||
// Call the arguments rectifier.
|
||||
JS_ASSERT(ArgumentsRectifierReg != code);
|
||||
JS_ASSERT(ArgumentsRectifierReg != argcReg);
|
||||
|
||||
JitCode *argumentsRectifier =
|
||||
cx->runtime()->jitRuntime()->getArgumentsRectifier(SequentialExecution);
|
||||
|
||||
masm.movePtr(ImmGCPtr(argumentsRectifier), code);
|
||||
masm.loadPtr(Address(code, JitCode::offsetOfCode()), code);
|
||||
masm.mov(argcReg, ArgumentsRectifierReg);
|
||||
}
|
||||
|
||||
masm.bind(&noUnderflow);
|
||||
|
||||
// If needed, update SPS Profiler frame entry.
|
||||
{
|
||||
Label skipProfilerUpdate;
|
||||
|
||||
// Need to avoid using ArgumentsRectifierReg and code register.
|
||||
GeneralRegisterSet availRegs = availableGeneralRegs(0);
|
||||
availRegs.take(ArgumentsRectifierReg);
|
||||
availRegs.take(code);
|
||||
Register scratch = availRegs.takeAny();
|
||||
Register pcIdx = availRegs.takeAny();
|
||||
|
||||
// Check if profiling is enabled.
|
||||
guardProfilingEnabled(masm, scratch, &skipProfilerUpdate);
|
||||
|
||||
// Update profiling entry before leaving function.
|
||||
masm.load32(Address(BaselineStubReg, ICCall_ScriptedFunCall::offsetOfPCOffset()), pcIdx);
|
||||
masm.spsUpdatePCIdx(&cx->runtime()->spsProfiler, pcIdx, scratch);
|
||||
|
||||
masm.bind(&skipProfilerUpdate);
|
||||
}
|
||||
|
||||
masm.callIon(code);
|
||||
|
||||
leaveStubFrame(masm, true);
|
||||
|
||||
// Enter type monitor IC to type-check result.
|
||||
EmitEnterTypeMonitorIC(masm);
|
||||
|
||||
masm.bind(&failure);
|
||||
EmitStubGuardFailure(masm);
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
DoubleValueToInt32ForSwitch(Value *v)
|
||||
{
|
||||
|
@ -326,6 +326,7 @@ class ICEntry
|
||||
_(Call_Native) \
|
||||
_(Call_ScriptedApplyArray) \
|
||||
_(Call_ScriptedApplyArguments) \
|
||||
_(Call_ScriptedFunCall) \
|
||||
\
|
||||
_(GetElem_Fallback) \
|
||||
_(GetElem_NativeSlot) \
|
||||
@ -738,6 +739,7 @@ class ICStub
|
||||
case Call_Native:
|
||||
case Call_ScriptedApplyArray:
|
||||
case Call_ScriptedApplyArguments:
|
||||
case Call_ScriptedFunCall:
|
||||
case UseCount_Fallback:
|
||||
case GetElem_NativeSlot:
|
||||
case GetElem_NativePrototypeSlot:
|
||||
@ -5582,6 +5584,57 @@ class ICCall_ScriptedApplyArguments : public ICMonitoredStub
|
||||
};
|
||||
};
|
||||
|
||||
// Handles calls of the form |fun.call(...)| where fun is a scripted function.
|
||||
class ICCall_ScriptedFunCall : public ICMonitoredStub
|
||||
{
|
||||
friend class ICStubSpace;
|
||||
|
||||
protected:
|
||||
uint32_t pcOffset_;
|
||||
|
||||
ICCall_ScriptedFunCall(JitCode *stubCode, ICStub *firstMonitorStub, uint32_t pcOffset)
|
||||
: ICMonitoredStub(ICStub::Call_ScriptedFunCall, stubCode, firstMonitorStub),
|
||||
pcOffset_(pcOffset)
|
||||
{}
|
||||
|
||||
public:
|
||||
static inline ICCall_ScriptedFunCall *New(ICStubSpace *space, JitCode *code,
|
||||
ICStub *firstMonitorStub, uint32_t pcOffset)
|
||||
{
|
||||
if (!code)
|
||||
return nullptr;
|
||||
return space->allocate<ICCall_ScriptedFunCall>(code, firstMonitorStub, pcOffset);
|
||||
}
|
||||
|
||||
static size_t offsetOfPCOffset() {
|
||||
return offsetof(ICCall_ScriptedFunCall, pcOffset_);
|
||||
}
|
||||
|
||||
// Compiler for this stub kind.
|
||||
class Compiler : public ICCallStubCompiler {
|
||||
protected:
|
||||
ICStub *firstMonitorStub_;
|
||||
uint32_t pcOffset_;
|
||||
bool generateStubCode(MacroAssembler &masm);
|
||||
|
||||
virtual int32_t getKey() const {
|
||||
return static_cast<int32_t>(kind);
|
||||
}
|
||||
|
||||
public:
|
||||
Compiler(JSContext *cx, ICStub *firstMonitorStub, uint32_t pcOffset)
|
||||
: ICCallStubCompiler(cx, ICStub::Call_ScriptedFunCall),
|
||||
firstMonitorStub_(firstMonitorStub),
|
||||
pcOffset_(pcOffset)
|
||||
{ }
|
||||
|
||||
ICStub *getStub(ICStubSpace *space) {
|
||||
return ICCall_ScriptedFunCall::New(space, getStubCode(), firstMonitorStub_,
|
||||
pcOffset_);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
// Stub for performing a TableSwitch, updating the IC's return address to jump
|
||||
// to whatever point the switch is branching to.
|
||||
class ICTableSwitch : public ICStub
|
||||
|
@ -62,7 +62,8 @@ NewObjectCache::newObjectFromHit(JSContext *cx, EntryIndex entry_, js::gc::Initi
|
||||
// Trigger an identical allocation to the one that notified us of OOM
|
||||
// so that we trigger the right kind of GC automatically.
|
||||
if (allowGC) {
|
||||
JSObject *obj = js::gc::AllocateObjectForCacheHit<allowGC>(cx, entry->kind, heap);
|
||||
mozilla::DebugOnly<JSObject *> obj =
|
||||
js::gc::AllocateObjectForCacheHit<allowGC>(cx, entry->kind, heap);
|
||||
JS_ASSERT(!obj);
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -292,7 +292,7 @@ SPSProfiler::allocProfileString(JSScript *script, JSFunction *maybeFun)
|
||||
return nullptr;
|
||||
|
||||
// Construct the descriptive string.
|
||||
size_t ret;
|
||||
DebugOnly<size_t> ret;
|
||||
if (hasAtom)
|
||||
ret = JS_snprintf(cstr, len + 1, "%hs (%s:%llu)", atom, filename, lineno);
|
||||
else
|
||||
|
@ -1 +1 @@
|
||||
NSPR_4_10_4_BETA4
|
||||
NSPR_4_10_4_RTM
|
||||
|
@ -50,6 +50,7 @@ MOZ_DEBUG_SYMBOLS = @MOZ_DEBUG_SYMBOLS@
|
||||
USE_CPLUS = @USE_CPLUS@
|
||||
USE_IPV6 = @USE_IPV6@
|
||||
USE_N32 = @USE_N32@
|
||||
USE_X32 = @USE_X32@
|
||||
USE_64 = @USE_64@
|
||||
ENABLE_STRIP = @ENABLE_STRIP@
|
||||
|
||||
|
@ -10,4 +10,3 @@
|
||||
*/
|
||||
|
||||
#error "Do not include this header file."
|
||||
|
||||
|
2
nsprpub/configure
vendored
2
nsprpub/configure
vendored
@ -6518,6 +6518,7 @@ fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
MAKEFILES="
|
||||
@ -6780,6 +6781,7 @@ s%@MOZ_DEBUG_SYMBOLS@%$MOZ_DEBUG_SYMBOLS%g
|
||||
s%@USE_CPLUS@%$USE_CPLUS%g
|
||||
s%@USE_IPV6@%$USE_IPV6%g
|
||||
s%@USE_N32@%$USE_N32%g
|
||||
s%@USE_X32@%$USE_X32%g
|
||||
s%@USE_64@%$USE_64%g
|
||||
s%@OBJECT_MODE@%$OBJECT_MODE%g
|
||||
s%@ENABLE_STRIP@%$ENABLE_STRIP%g
|
||||
|
@ -3161,6 +3161,7 @@ AC_SUBST(MOZ_DEBUG_SYMBOLS)
|
||||
AC_SUBST(USE_CPLUS)
|
||||
AC_SUBST(USE_IPV6)
|
||||
AC_SUBST(USE_N32)
|
||||
AC_SUBST(USE_X32)
|
||||
AC_SUBST(USE_64)
|
||||
AC_SUBST(OBJECT_MODE)
|
||||
AC_SUBST(ENABLE_STRIP)
|
||||
|
@ -248,9 +248,9 @@
|
||||
#define PR_ALIGN_OF_SHORT 2
|
||||
#define PR_ALIGN_OF_INT 4
|
||||
#define PR_ALIGN_OF_LONG 4
|
||||
#define PR_ALIGN_OF_INT64 4
|
||||
#define PR_ALIGN_OF_INT64 8
|
||||
#define PR_ALIGN_OF_FLOAT 4
|
||||
#define PR_ALIGN_OF_DOUBLE 4
|
||||
#define PR_ALIGN_OF_DOUBLE 8
|
||||
#define PR_ALIGN_OF_POINTER 4
|
||||
#define PR_ALIGN_OF_WORD 4
|
||||
|
||||
|
@ -31,11 +31,11 @@ PR_BEGIN_EXTERN_C
|
||||
** The format of the version string is
|
||||
** "<major version>.<minor version>[.<patch level>] [<Beta>]"
|
||||
*/
|
||||
#define PR_VERSION "4.10.4 Beta"
|
||||
#define PR_VERSION "4.10.4"
|
||||
#define PR_VMAJOR 4
|
||||
#define PR_VMINOR 10
|
||||
#define PR_VPATCH 4
|
||||
#define PR_BETA PR_TRUE
|
||||
#define PR_BETA PR_FALSE
|
||||
|
||||
/*
|
||||
** PRVersionCheck
|
||||
|
@ -1 +1 @@
|
||||
NSS_3_16_BETA5
|
||||
NSS_3_16_RTM
|
||||
|
@ -146,10 +146,6 @@ EXTRA_SHARED_LIBS += \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_TARGET), SunOS)
|
||||
OS_LIBS += -lbsm
|
||||
endif
|
||||
|
||||
else # USE_STATIC_LIBS
|
||||
# can't do this in manifest.mn because OS_ARCH isn't defined there.
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
|
@ -10,4 +10,3 @@
|
||||
*/
|
||||
|
||||
#error "Do not include this header file."
|
||||
|
||||
|
@ -369,6 +369,7 @@ AESKeyWrap_Decrypt(AESKeyWrapContext *cx, unsigned char *output,
|
||||
if (pOutputLen)
|
||||
*pOutputLen = outLen;
|
||||
} else {
|
||||
s = SECFailure;
|
||||
PORT_SetError(SEC_ERROR_BAD_DATA);
|
||||
if (pOutputLen)
|
||||
*pOutputLen = 0;
|
||||
|
@ -33,12 +33,12 @@
|
||||
* The format of the version string should be
|
||||
* "<major version>.<minor version>[.<patch level>[.<build number>]][ <ECC>][ <Beta>]"
|
||||
*/
|
||||
#define NSS_VERSION "3.16" _NSS_ECC_STRING _NSS_CUSTOMIZED " Beta"
|
||||
#define NSS_VERSION "3.16" _NSS_ECC_STRING _NSS_CUSTOMIZED
|
||||
#define NSS_VMAJOR 3
|
||||
#define NSS_VMINOR 16
|
||||
#define NSS_VPATCH 0
|
||||
#define NSS_VBUILD 0
|
||||
#define NSS_BETA PR_TRUE
|
||||
#define NSS_BETA PR_FALSE
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
|
@ -54,7 +54,7 @@ sec_pkcs12_new_asafe(PLArenaPool *poolp)
|
||||
if(asafe == NULL)
|
||||
goto loser;
|
||||
asafe->poolp = poolp;
|
||||
PORT_Memset(&asafe->old_baggage, 0, sizeof(SEC_PKCS7ContentInfo));
|
||||
PORT_Memset(&asafe->old_baggage, 0, sizeof(SEC_PKCS12Baggage_OLD));
|
||||
|
||||
PORT_ArenaUnmark(poolp, mark);
|
||||
return asafe;
|
||||
|
@ -61,7 +61,3 @@ endif
|
||||
ifeq ($(OS_TARGET),AIX)
|
||||
OS_LIBS += -lpthread
|
||||
endif
|
||||
|
||||
ifeq ($(OS_TARGET),SunOS)
|
||||
OS_LIBS += -lbsm
|
||||
endif
|
||||
|
@ -33,11 +33,6 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef SOLARIS
|
||||
#include <bsm/libbsm.h>
|
||||
#define AUE_FIPS_AUDIT 34444
|
||||
#endif
|
||||
|
||||
#ifdef LINUX
|
||||
#include <pthread.h>
|
||||
#include <dlfcn.h>
|
||||
@ -407,34 +402,6 @@ sftk_LogAuditMessage(NSSAuditSeverity severity, NSSAuditType auditType,
|
||||
PR_smprintf_free(message);
|
||||
}
|
||||
#endif /* LINUX */
|
||||
#ifdef SOLARIS
|
||||
{
|
||||
int rd;
|
||||
char *message = PR_smprintf("NSS " SOFTOKEN_LIB_NAME ": %s", msg);
|
||||
|
||||
if (!message) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* open the record descriptor */
|
||||
if ((rd = au_open()) == -1) {
|
||||
PR_smprintf_free(message);
|
||||
return;
|
||||
}
|
||||
|
||||
/* write the audit tokens to the audit record */
|
||||
if (au_write(rd, au_to_text(message))) {
|
||||
(void)au_close(rd, AU_TO_NO_WRITE, AUE_FIPS_AUDIT);
|
||||
PR_smprintf_free(message);
|
||||
return;
|
||||
}
|
||||
|
||||
/* close the record and send it to the audit trail */
|
||||
(void)au_close(rd, AU_TO_WRITE, AUE_FIPS_AUDIT);
|
||||
|
||||
PR_smprintf_free(message);
|
||||
}
|
||||
#endif /* SOLARIS */
|
||||
#else
|
||||
/* do nothing */
|
||||
#endif
|
||||
|
@ -55,7 +55,3 @@ EXTRA_SHARED_LIBS += \
|
||||
-lnspr4 \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_TARGET),SunOS)
|
||||
OS_LIBS += -lbsm
|
||||
endif
|
||||
|
@ -25,11 +25,11 @@
|
||||
* The format of the version string should be
|
||||
* "<major version>.<minor version>[.<patch level>[.<build number>]][ <ECC>][ <Beta>]"
|
||||
*/
|
||||
#define SOFTOKEN_VERSION "3.16" SOFTOKEN_ECC_STRING " Beta"
|
||||
#define SOFTOKEN_VERSION "3.16" SOFTOKEN_ECC_STRING
|
||||
#define SOFTOKEN_VMAJOR 3
|
||||
#define SOFTOKEN_VMINOR 16
|
||||
#define SOFTOKEN_VPATCH 0
|
||||
#define SOFTOKEN_VBUILD 0
|
||||
#define SOFTOKEN_BETA PR_TRUE
|
||||
#define SOFTOKEN_BETA PR_FALSE
|
||||
|
||||
#endif /* _SOFTKVER_H_ */
|
||||
|
@ -22,10 +22,6 @@ OPTIMIZER=
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OS_TARGET),SunOS)
|
||||
OS_LIBS += -lbsm
|
||||
endif
|
||||
|
||||
ifeq ($(OS_TARGET),Darwin)
|
||||
# These version numbers come from the -version-info 8:6:8 libtool option in
|
||||
# sqlite upstream's Makefile.in. (Given -version-info current:revision:age,
|
||||
|
@ -19,12 +19,12 @@
|
||||
* The format of the version string should be
|
||||
* "<major version>.<minor version>[.<patch level>[.<build number>]][ <Beta>]"
|
||||
*/
|
||||
#define NSSUTIL_VERSION "3.16 Beta"
|
||||
#define NSSUTIL_VERSION "3.16"
|
||||
#define NSSUTIL_VMAJOR 3
|
||||
#define NSSUTIL_VMINOR 16
|
||||
#define NSSUTIL_VPATCH 0
|
||||
#define NSSUTIL_VBUILD 0
|
||||
#define NSSUTIL_BETA PR_TRUE
|
||||
#define NSSUTIL_BETA PR_FALSE
|
||||
|
||||
SEC_BEGIN_PROTOS
|
||||
|
||||
|
@ -9,7 +9,7 @@ skip-if = buildapp == 'b2g'
|
||||
support-files = file_SpecialPowersFrame1.html
|
||||
[test_SpecialPowersPushPermissions.html]
|
||||
[test_SpecialPowersPushPrefEnv.html]
|
||||
[test_SimpleTestGetTestFileURL.html]
|
||||
[test_SimpletestGetTestFileURL.html]
|
||||
[test_SpecialPowersLoadChromeScript.html]
|
||||
support-files = SpecialPowersLoadChromeScript.js
|
||||
[test_bug816847.html]
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
var filename = "MyTestDataFile.txt";
|
||||
var url = SimpleTest.getTestFileURL(filename);
|
||||
is(url, document.location.href.replace(/test_SimpleTestGetTestFileURL\.html.*/, filename));
|
||||
is(url, document.location.href.replace(/test_SimpletestGetTestFileURL\.html.*/, filename));
|
||||
|
||||
</script>
|
||||
</pre>
|
@ -81,8 +81,8 @@ using mozilla::InjectCrashRunnable;
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
#include "mozilla/IOInterposer.h"
|
||||
#include "mozilla/mozalloc_oom.h"
|
||||
#include "mozilla/LateWriteChecks.h"
|
||||
#include "mozilla/WindowsDllBlocklist.h"
|
||||
|
||||
#if defined(XP_MACOSX)
|
||||
@ -913,7 +913,7 @@ static bool ShouldReport()
|
||||
|
||||
namespace {
|
||||
bool Filter(void* context) {
|
||||
mozilla::StopLateWriteChecks();
|
||||
mozilla::IOInterposer::Disable();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -2471,7 +2471,7 @@ OOPInitialized()
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
static bool ChildFilter(void *context) {
|
||||
mozilla::StopLateWriteChecks();
|
||||
mozilla::IOInterposer::Disable();
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
#include "IOInterposer.h"
|
||||
|
||||
#include "mozilla/Atomics.h"
|
||||
#include "mozilla/Mutex.h"
|
||||
#include "mozilla/StaticPtr.h"
|
||||
#include "mozilla/ThreadLocal.h"
|
||||
@ -23,8 +24,9 @@ namespace {
|
||||
/** Lists of Observers */
|
||||
struct ObserverLists {
|
||||
ObserverLists()
|
||||
: mObserverListsLock(PR_NewLock())
|
||||
, mIsEnabled(true)
|
||||
{
|
||||
mObserverListsLock = PR_NewLock();
|
||||
// We don't do MOZ_COUNT_CTOR(ObserverLists) as we will need to leak the
|
||||
// IO interposer when doing late-write checks, which uses IO interposing
|
||||
// to check for writes while static destructors are invoked.
|
||||
@ -38,6 +40,9 @@ struct ObserverLists {
|
||||
// during shutdown.
|
||||
PRLock* mObserverListsLock;
|
||||
|
||||
// Used for quickly disabling everything by IOInterposer::Disable()
|
||||
mozilla::Atomic<bool> mIsEnabled;
|
||||
|
||||
~ObserverLists()
|
||||
{
|
||||
PR_DestroyLock(mObserverListsLock);
|
||||
@ -185,6 +190,15 @@ IOInterposeObserver::IsMainThread()
|
||||
}
|
||||
}
|
||||
|
||||
/* static */ void
|
||||
IOInterposer::Disable()
|
||||
{
|
||||
if (!sObserverLists) {
|
||||
return;
|
||||
}
|
||||
sObserverLists->mIsEnabled = false;
|
||||
}
|
||||
|
||||
/* static */ void IOInterposer::Report(
|
||||
IOInterposeObserver::Observation& aObservation)
|
||||
{
|
||||
@ -254,6 +268,13 @@ IOInterposeObserver::IsMainThread()
|
||||
}
|
||||
}
|
||||
|
||||
/* static */ bool
|
||||
IOInterposer::IsObservedOperation(IOInterposeObserver::Operation aOp)
|
||||
{
|
||||
return sObserverLists && sObserverLists->mIsEnabled &&
|
||||
!!(sObservedOperations & aOp);
|
||||
}
|
||||
|
||||
/* static */ void IOInterposer::Register(IOInterposeObserver::Operation aOp,
|
||||
IOInterposeObserver* aObserver)
|
||||
{
|
||||
|
@ -195,6 +195,12 @@ public:
|
||||
*/
|
||||
static void Clear();
|
||||
|
||||
/**
|
||||
* This function immediately disables IOInterposer functionality in a fast,
|
||||
* thread-safe manner. Primarily for use by the crash reporter.
|
||||
*/
|
||||
static void Disable();
|
||||
|
||||
/**
|
||||
* Report IO to registered observers.
|
||||
* Notice that the reported operation must be either OpRead, OpWrite or
|
||||
@ -220,16 +226,9 @@ public:
|
||||
/**
|
||||
* Return whether or not an operation is observed. Reporters should not
|
||||
* report operations that are not being observed by anybody. This mechanism
|
||||
* allows us to not report IO when no observers are registered.
|
||||
* allows us to avoid reporting I/O when no observers are registered.
|
||||
*/
|
||||
static inline bool IsObservedOperation(IOInterposeObserver::Operation aOp) {
|
||||
// The quick reader may observe that no locks are being employed here,
|
||||
// hence, the result of the operations is truly undefined. However, most
|
||||
// computers will usually return either true or false, which is good enough.
|
||||
// If we occasionally report more or less IO than is being observed than
|
||||
// that is not a problem.
|
||||
return (sObservedOperations & aOp);
|
||||
}
|
||||
static bool IsObservedOperation(IOInterposeObserver::Operation aOp);
|
||||
|
||||
/**
|
||||
* Register IOInterposeObserver, the observer object will receive all
|
||||
@ -269,6 +268,7 @@ class IOInterposer MOZ_FINAL
|
||||
public:
|
||||
static inline void Init() {}
|
||||
static inline void Clear() {}
|
||||
static inline void Disable() {}
|
||||
static inline void Report(IOInterposeObserver::Observation& aOb) {}
|
||||
static inline void Register(IOInterposeObserver::Operation aOp,
|
||||
IOInterposeObserver* aObserver) {}
|
||||
|
Loading…
Reference in New Issue
Block a user