Bug 1143860 - Add column number to PCToLineNumber. (r=djvj)

This commit is contained in:
Shu-yu Guo 2015-03-20 20:48:30 -07:00
parent 21f9d98242
commit beffc5c636
3 changed files with 7 additions and 4 deletions

View File

@ -549,9 +549,9 @@ JS_GetCustomIteratorCount(JSContext *cx)
}
JS_FRIEND_API(unsigned)
JS_PCToLineNumber(JSScript *script, jsbytecode *pc)
JS_PCToLineNumber(JSScript *script, jsbytecode *pc, unsigned *columnp)
{
return PCToLineNumber(script, pc);
return PCToLineNumber(script, pc, columnp);
}
JS_FRIEND_API(bool)

View File

@ -80,7 +80,7 @@ JS_NondeterministicGetWeakMapKeys(JSContext *cx, JS::HandleObject obj, JS::Mutab
// Raw JSScript* because this needs to be callable from a signal handler.
extern JS_FRIEND_API(unsigned)
JS_PCToLineNumber(JSScript *script, jsbytecode *pc);
JS_PCToLineNumber(JSScript *script, jsbytecode *pc, unsigned *columnp = nullptr);
/*
* Determine whether the given object is backed by a DeadObjectProxy.

View File

@ -427,7 +427,10 @@ void ProfileBuffer::StreamSamplesToJSObject(JSStreamWriter& b, int aThreadId, JS
JS::ForEachTrackedOptimizationAttempt(rt, pc, attemptOp,
&optsScript, &optsPC);
b.EndArray();
b.NameValue("optsLine", JS_PCToLineNumber(optsScript, optsPC));
unsigned optsLine, optsColumn;
optsLine = JS_PCToLineNumber(optsScript, optsPC, &optsColumn);
b.NameValue("optsLine", optsLine);
b.NameValue("optsColumn", optsColumn);
}
}
}