From d9f546cf87988ecb39bccd7d9300d42c51c8fd1a Mon Sep 17 00:00:00 2001 From: Logan Smyth Date: Mon, 28 Oct 2019 08:27:54 +0000 Subject: [PATCH] Bug 1570178 - Part 4: Support setting onPop when the frame is not live. r=jimb Since we're now allowing onStep when not live, it makes sense to do the same for onPop, and since it does not have any implementation details preventing setting it while the frame is dead, we might as well. Differential Revision: https://phabricator.services.mozilla.com/D50432 --HG-- extra : moz-landing-system : lando --- js/src/debugger/Frame.cpp | 6 +- .../binast/lazy/debug/Frame-onPop-07.binjs | Bin 1420 -> 0 bytes .../binast/nonlazy/debug/Frame-onPop-07.binjs | Bin 1419 -> 0 bytes js/src/jit-test/tests/debug/Frame-onPop-07.js | 30 -------- .../debug/Frame-onPop-assign-function.js | 48 +++++++++++++ .../debug/Frame-onPop-assign-generator.js | 68 ++++++++++++++++++ 6 files changed, 119 insertions(+), 33 deletions(-) delete mode 100644 js/src/jit-test/tests/binast/lazy/debug/Frame-onPop-07.binjs delete mode 100644 js/src/jit-test/tests/binast/nonlazy/debug/Frame-onPop-07.binjs delete mode 100644 js/src/jit-test/tests/debug/Frame-onPop-07.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-assign-function.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-assign-generator.js diff --git a/js/src/debugger/Frame.cpp b/js/src/debugger/Frame.cpp index 617a45678e00..e712711bc1b0 100644 --- a/js/src/debugger/Frame.cpp +++ b/js/src/debugger/Frame.cpp @@ -1042,8 +1042,6 @@ OnPopHandler* DebuggerFrame::onPopHandler() const { } void DebuggerFrame::setOnPopHandler(JSContext* cx, OnPopHandler* handler) { - MOZ_ASSERT(isLive()); - OnPopHandler* prior = onPopHandler(); if (handler == prior) { return; @@ -1232,7 +1230,9 @@ bool DebuggerFrame::CallData::ToNative(JSContext* cx, unsigned argc, // These methods do not require liveness. bool checkLive = MyMethod != &CallData::liveGetter && MyMethod != &CallData::onStepGetter && - MyMethod != &CallData::onStepSetter; + MyMethod != &CallData::onStepSetter && + MyMethod != &CallData::onPopGetter && + MyMethod != &CallData::onPopSetter; RootedDebuggerFrame frame(cx, DebuggerFrame::check(cx, args.thisv(), checkLive)); diff --git a/js/src/jit-test/tests/binast/lazy/debug/Frame-onPop-07.binjs b/js/src/jit-test/tests/binast/lazy/debug/Frame-onPop-07.binjs deleted file mode 100644 index 5b8598bc80e1a2be14c7084c8b175a32ec9888b6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1420 zcmZWoZA%+L5FVFnIF1mGAR&YxN05+e5D^hkE1DRsqNy0$FVe#1vbk(~*-iI0YFhex z`uqA1I=jhvX}vEu`#kgV%=C)ohIZ)i#ae3~w5Ohc|58UyiJ`xEOE|Wm&hcxn_#SEh%G0MV4V}LG-l3 zfDCV(CJ9rT4bE5?Q^f{dI%WpskuX9s&)p2Xrz&DPt6Kj=6{r1}&6A*1Dc1kTq=NOd zSSyy{w_YeG%(G@QC2pz0`q+XcgA~SGa{wErYLi#Nn8q*plHK#E z2#v5TxGjao7L(>R{V{t@r?c!%$4v1si`!qm4V1VT)qE;zr%KT!g|)PYmYfPZ-K|$h zVw*co@mra2qjX8Wxs{!i?}ds_^hGTDG`5kYHr3&%9n)#T_RU00DfE7IhvhS>>8--K zD?KaYh+Y=1zSxhHGzBYN_LOxUeCU5=;nG6n=Q?WlYG&)dh17bQcGJ+A+8}a7x#3P;{#mtUM1`2M64; z2UeNy!Ij}0)MtrZBXJ)GU?duOV8o&PqVKI7?2?^T2S?#HyQyEi@ZboFq4cX$5ql@FNET+fdGc-_Xey$m^1o!5zC zNy4S5XUCqVnvK!F+NN=w;XB5_!#g(auSV8dTnxB~vaGweTr)-EmXtB0BFoTR7JG{9Y#9$X?ND#vNh2C$5SiYc|-Yaap z(z7!5V!3hk#e$?pLs;pum#pgGQ~w(aS2iL)*HL>^Gt0ls6?~oyaFMgnr{3ekb@!^5 zJ%)EqEB8zliSk1;@x-Tg4?8~y&&4uw*)xsFFqbf$8}uXcnva=?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