mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-14 15:37:55 +00:00
Bug 686571 - Check for jit->pcLengths before using (r=bhackett)
This commit is contained in:
parent
72b02dfde4
commit
e479aadc29
@ -2224,13 +2224,14 @@ inline uint32 frameCountersOffset(JSContext *cx)
|
||||
LookupStatus
|
||||
BaseIC::disable(JSContext *cx, const char *reason, void *stub)
|
||||
{
|
||||
if (cx->hasRunOption(JSOPTION_PCCOUNT)) {
|
||||
JITScript *jit = cx->fp()->jit();
|
||||
if (jit->pcLengths) {
|
||||
uint32 offset = frameCountersOffset(cx);
|
||||
cx->fp()->jit()->pcLengths[offset].picsLength = 0;
|
||||
jit->pcLengths[offset].picsLength = 0;
|
||||
}
|
||||
|
||||
spew(cx, "disabled", reason);
|
||||
Repatcher repatcher(cx->fp()->jit());
|
||||
Repatcher repatcher(jit);
|
||||
repatcher.relink(slowPathCall, FunctionPtr(stub));
|
||||
return Lookup_Uncacheable;
|
||||
}
|
||||
@ -2238,9 +2239,10 @@ BaseIC::disable(JSContext *cx, const char *reason, void *stub)
|
||||
void
|
||||
BaseIC::updatePCCounters(JSContext *cx, Assembler &masm)
|
||||
{
|
||||
if (cx->hasRunOption(JSOPTION_PCCOUNT)) {
|
||||
JITScript *jit = cx->fp()->jit();
|
||||
if (jit->pcLengths) {
|
||||
uint32 offset = frameCountersOffset(cx);
|
||||
cx->fp()->jit()->pcLengths[offset].picsLength += masm.size();
|
||||
jit->pcLengths[offset].picsLength += masm.size();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user