Bug 1475968: Ignore wasm frames in a DebugModeOSRVolatileFrameIter; r=jandem

--HG--
extra : rebase_source : 953e27a7b8a36ebfcf32ceb07152fe64e19826b8
extra : amend_source : c535e1c4e60a13344150e31d31403e7306854cb4
This commit is contained in:
Benjamin Bouvier 2018-07-16 18:28:50 +02:00
Родитель f3162b921c
Коммит 1b4d23db0a
4 изменённых файлов: 22 добавлений и 5 удалений

Просмотреть файл

@ -0,0 +1,15 @@
g = newGlobal();
g.parent = this;
g.eval("(" + function() {
Debugger(parent).onExceptionUnwind = function(frame) {
frame.older
}
} + ")()");
let o = {};
let func = wasmEvalText(`
(module (import $imp "" "inc") (func) (func $start (call $imp)) (start $start) (export "" $start))
`, { "": { inc: function() { o = o.set; } } }).exports[""];
assertErrorMessage(func, TypeError, /is undefined/);

Просмотреть файл

@ -1182,6 +1182,9 @@ DebugModeOSRVolatileJitFrameIter::forwardLiveIterators(JSContext* cx,
uint8_t* oldAddr, uint8_t* newAddr)
{
DebugModeOSRVolatileJitFrameIter* iter;
for (iter = cx->liveVolatileJitFrameIter_; iter; iter = iter->prev)
for (iter = cx->liveVolatileJitFrameIter_; iter; iter = iter->prev) {
if (iter->isWasm())
continue;
iter->asJSJit().exchangeReturnAddressIfMatch(oldAddr, newAddr);
}
}

Просмотреть файл

@ -82,7 +82,7 @@ class DebugModeOSRVolatileStub
};
//
// A JitFrameIter that updates internal JSJitFrameIter in case of
// A frame iterator that updates internal JSJitFrameIter in case of
// recompilation of an on-stack baseline script.
//

Просмотреть файл

@ -1915,9 +1915,8 @@ class InterpreterFrameIterator
// asJSJit() and asWasm(), but the user has to be careful not to have those be
// used after JitFrameIter leaves the scope or the operator++ is called.
//
// TODO(bug 1360211) In particular, this can handle the transition from wasm to
// ion and from ion to wasm, since these will be interleaved in the same
// JitActivation.
// In particular, this can handle the transition from wasm to jit and from jit
// to wasm, since these can be interleaved in the same JitActivation.
class JitFrameIter
{
protected: