Bug 892426 - Add an additional temp-Register to SetElementIC. r=jandem
Bug 867856 - Fix intermittent timeout of bug743094.js test case. r=h4writer
Bug 887334 - Remove AutoSwitchCompartment. r=luke

This thing is...yikes.
Bug 887334 - Rejigger the string manipulation in OnJSContextNew to avoid depending on being in a compartment. r=luke

The current code makes calls that assume (implicitly, via assertions) that |cx|
is in a compartment, which isn't a valid assumption going forward.
Bug 887334 - Null-check compartment() in JS_GetGlobalForScopeChain(). r=luke

cx->global() assumes a non-null compartment(). When we fix up various bugs
related to being in a compartment when we shouldn't be, we start to crash here.
Fix it.
Bug 887334 - Move faulty JSAutoRequest in initSelfHosting. r=luke

The call to JS_SetGlobalObject causes cx->compartment_ to be set to the self-
hosting global, which means that the JSAutoCompartment picks up that compartment
as the 'previous' compartment. So despite the attempt to restore things with
JS_SetGlobalObject at the end of the function, the JSAutoCompartment destructor
actually ends up leaving cx in the self-hosting global's compartment at the end
of this function. Moving the JSAutoCompartment construction above the call to
JS_SetGlobalObject fixes the problem.
Bug 887334 - Add a JSCompartment* to AutoCompartment and use it in JS_NewGlobalObject. r=luke

This gets rid of the wonky setCompartment usage in that function.
Bug 887334 - Don't rethrow in quickstubs if there's already an exception pending. r=luke
Bug 887334 - Use the new AutoCompartment overload for the atoms compartment and remove AutoEnterAtomsCompartment. r=bhackett

We have to do some temporary hackiness to deal with some of the new PJS work.
This patch stays as true to the old world as possible, so that we can more
easily backport it.
Bug 887334 - Add a JSAutoCompartment to AutoCxPusher. r=luke,gabor

This should hopefully take care of any cases where consumers expect to be in
the default compartment.
Bug 887334 - Enter a compartment between manual calls to JS_{Save,Restore}FrameChain. r=luke

The stuff in nsXBLProtoImplMethod is doing the same thing, so let's just have
it call into nsJSUtils.
Bug 887334 - Miscellaneous JSAutoCompartments. r=luke
Bug 887334 - Fix JSAPI test harness to not fail when the initial compartment is null. r=luke

I don't know why it's done this way, but it sure needs to change.
Bug 887334 - Enter a compartment in indexedDB's ThreadLocalJSRuntime. r=bent
Bug 887334 - Conditionally enter a compartment in WorkerPrivate::DoRunLoop. r=mrbkap
Bug 887334 - Push a JSContext in nsGlobalWindow::SecurityCheckURL. r=gabor
Bug 887334 - Stop setting the compartment to defaultCompartmentObject_->compartment(). r=luke

With this change, defaultCompartmentObject_ is just an opaque (though traced)
piece of embedder state on the cx.
Bug 887334 - Require cx->compartment() to be null when destroying a context. r=luke

If it's non-null, that means we've got a JSAutoCompartment on the stack, which
is going to run into trouble when it tries to restore the old compartment on
the now-dead cx.
Bug 887334 - Reorder some bookkeeping and assert in setCompartment that both the old and new compartments are marked as entered. r=luke