mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-19 07:26:26 +00:00
Bug 902720 - Clean up GetTopIonJSScript to use ThreadSafeContext. (r=jandem)
This commit is contained in:
parent
b78f82127c
commit
3097bf0869
@ -1660,13 +1660,8 @@ GetPropertyParIC::update(ForkJoinSlice *slice, size_t cacheIndex,
|
||||
HandleObject obj, MutableHandleValue vp)
|
||||
{
|
||||
AutoFlushCache afc("GetPropertyParCache");
|
||||
PerThreadData *pt = slice->perThreadData;
|
||||
|
||||
const SafepointIndex *safepointIndex;
|
||||
void *returnAddr;
|
||||
RootedScript topScript(pt, GetTopIonJSScript(pt, &safepointIndex, &returnAddr));
|
||||
IonScript *ion = topScript->parallelIonScript();
|
||||
|
||||
IonScript *ion = GetTopIonJSScript(slice)->parallelIonScript();
|
||||
GetPropertyParIC &cache = ion->getCache(cacheIndex).toGetPropertyPar();
|
||||
|
||||
// Grab the property early, as the pure path is fast anyways and doesn't
|
||||
@ -2798,13 +2793,8 @@ GetElementParIC::update(ForkJoinSlice *slice, size_t cacheIndex, HandleObject ob
|
||||
HandleValue idval, MutableHandleValue vp)
|
||||
{
|
||||
AutoFlushCache afc("GetElementParCache");
|
||||
PerThreadData *pt = slice->perThreadData;
|
||||
|
||||
const SafepointIndex *safepointIndex;
|
||||
void *returnAddr;
|
||||
RootedScript topScript(pt, GetTopIonJSScript(pt, &safepointIndex, &returnAddr));
|
||||
IonScript *ion = topScript->parallelIonScript();
|
||||
|
||||
IonScript *ion = GetTopIonJSScript(slice)->parallelIonScript();
|
||||
GetElementParIC &cache = ion->getCache(cacheIndex).toGetElementPar();
|
||||
|
||||
// Try to get the element early, as the pure path doesn't need a lock. If
|
||||
|
@ -317,9 +317,10 @@ GetTopIonJSScript(PerThreadData *pt, const SafepointIndex **safepointIndexOut, v
|
||||
}
|
||||
|
||||
inline JSScript *
|
||||
GetTopIonJSScript(JSContext *cx, const SafepointIndex **safepointIndexOut, void **returnAddrOut)
|
||||
GetTopIonJSScript(ThreadSafeContext *cx, const SafepointIndex **safepointIndexOut = NULL,
|
||||
void **returnAddrOut = NULL)
|
||||
{
|
||||
return GetTopIonJSScript(&cx->mainThread(), safepointIndexOut, returnAddrOut);
|
||||
return GetTopIonJSScript(cx->perThreadData, safepointIndexOut, returnAddrOut);
|
||||
}
|
||||
|
||||
} // namespace ion
|
||||
@ -336,11 +337,6 @@ GetTopIonJSScript(JSContext *cx, const SafepointIndex **safepointIndexOut, void
|
||||
namespace js {
|
||||
namespace ion {
|
||||
|
||||
JSScript *
|
||||
GetTopIonJSScript(JSContext *cx,
|
||||
const SafepointIndex **safepointIndexOut = NULL,
|
||||
void **returnAddrOut = NULL);
|
||||
|
||||
void
|
||||
GetPcScript(JSContext *cx, JSScript **scriptRes, jsbytecode **pcRes);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user