Default new contexts to a NULL compartment (bug 623800, r=dmandelin).

This commit is contained in:
Andreas Gal 2011-01-13 14:11:15 -08:00
parent 66315defbc
commit 5f17a91711
2 changed files with 1 additions and 5 deletions

View File

@ -1992,7 +1992,7 @@ DSTOffsetCache::DSTOffsetCache()
JSContext::JSContext(JSRuntime *rt)
: runtime(rt),
compartment(rt->defaultCompartment),
compartment(NULL),
regs(NULL),
busyArrays(thisInInitializer())
{}

View File

@ -7589,10 +7589,6 @@ disable_debugger_exceptions() { }
void
SetMaxCodeCacheBytes(JSContext* cx, uint32 bytes)
{
#ifdef DEBUG
TraceMonitor* tm = &JS_TRACE_MONITOR(cx);
JS_ASSERT(tm->codeAlloc && tm->dataAlloc && tm->traceAlloc);
#endif
if (bytes > 1 G)
bytes = 1 G;
if (bytes < 128 K)