Bug 907791 - Suppress some AsmJS rooting non-hazards in the static analysis; r=bhackett

--HG--
extra : rebase_source : edd1c5544b791c258d31ec5d64334f52bbd5aed1
This commit is contained in:
Terrence Cole 2013-08-21 12:43:22 -07:00
parent d1d2cbd06c
commit 19ee63650c
3 changed files with 9 additions and 0 deletions

View File

@ -1276,6 +1276,8 @@ class MOZ_STACK_CLASS ModuleCompiler
}
bool failName(ParseNode *pn, const char *fmt, PropertyName *name) {
// This function is invoked without the caller properly rooting its locals.
gc::AutoSuppressGC suppress(name->runtimeFromMainThread());
JSAutoByteString bytes;
if (AtomToPrintableString(cx_, name, &bytes))
failf(pn, fmt, bytes.ptr());

View File

@ -5150,6 +5150,12 @@ AutoMaybeTouchDeadZones::~AutoMaybeTouchDeadZones()
runtime->gcManipulatingDeadZones = manipulatingDeadZones;
}
AutoSuppressGC::AutoSuppressGC(JSRuntime *rt)
: suppressGC_(rt->mainThread.suppressGC)
{
suppressGC_++;
}
AutoSuppressGC::AutoSuppressGC(ExclusiveContext *cx)
: suppressGC_(cx->perThreadData->suppressGC)
{

View File

@ -1400,6 +1400,7 @@ class AutoSuppressGC
int32_t &suppressGC_;
public:
AutoSuppressGC(JSRuntime *rt);
AutoSuppressGC(ExclusiveContext *cx);
AutoSuppressGC(JSCompartment *comp);