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

--HG--
extra : rebase_source : 4c4e371427aeb07cdf3fb478e10810204e1ece8c
This commit is contained in:
Terrence Cole 2013-08-21 12:43:22 -07:00
parent 264acde64b
commit 74e4750787
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

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

View File

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