mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-07 12:15:51 +00:00
Bug 907791 - Suppress some AsmJS rooting non-hazards in the static analysis; r=bhackett
--HG-- extra : rebase_source : 4c4e371427aeb07cdf3fb478e10810204e1ece8c
This commit is contained in:
parent
264acde64b
commit
74e4750787
@ -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());
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -1400,6 +1400,7 @@ class AutoSuppressGC
|
||||
int32_t &suppressGC_;
|
||||
|
||||
public:
|
||||
AutoSuppressGC(JSRuntime *rt);
|
||||
AutoSuppressGC(JSContext *cx);
|
||||
AutoSuppressGC(JSCompartment *comp);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user