Bug 621055: check interrupt flag in exception handlers, r=sstangl
authorAndrew Drake <adrake@mozilla.com>
Wed, 05 Jan 2011 17:13:28 -0800
changeset 60161 da8a898a7b3118ae84ccd9f7d3f2aad85a8b262d
parent 60160 9df93a2a40e565db6873e4eddf797565ec8dac40
child 60162 acab52f46625fa2d3095fd25a48ae0adf2cbffb5
push id17881
push usercleary@mozilla.com
push dateFri, 07 Jan 2011 19:57:21 +0000
treeherdermozilla-central@54576be62860 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssstangl
bugs621055
milestone2.0b9pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 621055: check interrupt flag in exception handlers, r=sstangl
js/src/methodjit/Compiler.cpp
--- a/js/src/methodjit/Compiler.cpp
+++ b/js/src/methodjit/Compiler.cpp
@@ -4881,18 +4881,22 @@ mjit::Compiler::jumpAndTrace(Jump j, jsb
 
 void
 mjit::Compiler::enterBlock(JSObject *obj)
 {
     // If this is an exception entry point, then jsl_InternalThrow has set
     // VMFrame::fp to the correct fp for the entry point. We need to copy
     // that value here to FpReg so that FpReg also has the correct sp.
     // Otherwise, we would simply be using a stale FpReg value.
-    if (analysis->getCode(PC).exceptionEntry)
+    // Additionally, we check the interrupt flag to allow interrupting
+    // deeply nested exception handling.
+    if (analysis->getCode(PC).exceptionEntry) {
         restoreFrameRegs(masm);
+        interruptCheckHelper();
+    }
 
     uint32 oldFrameDepth = frame.localSlots();
 
     /* For now, don't bother doing anything for this opcode. */
     frame.syncAndForgetEverything();
     masm.move(ImmPtr(obj), Registers::ArgReg1);
     uint32 n = js_GetEnterBlockStackDefs(cx, script, PC);
     INLINE_STUBCALL(stubs::EnterBlock);