Catch some opcodes which return directly from a script, bug 723099. r=dvander a=akeybl
authorBrian Hackett <bhackett1024@gmail.com>
Mon, 06 Feb 2012 11:22:35 -0800
changeset 88338 de903fa58268937a1d173592bdd3c433aa1558c8
parent 88337 f68ab5b1ce7afafce5dd920f205b889c2f7789fa
child 88339 01693365cd8501f4f76e71b2783fa14c03a4f32e
push idunknown
push userunknown
push dateunknown
reviewersdvander, akeybl
bugs723099
milestone12.0a2
Catch some opcodes which return directly from a script, bug 723099. r=dvander a=akeybl
js/src/jsanalyze.cpp
--- a/js/src/jsanalyze.cpp
+++ b/js/src/jsanalyze.cpp
@@ -1433,16 +1433,19 @@ ScriptAnalysis::analyzeSSA(JSContext *cx
                         checkExceptionTarget(cx, catchOffset, exceptionTargets);
                     }
                 }
             }
             break;
           }
 
           case JSOP_THROW:
+          case JSOP_RETURN:
+          case JSOP_STOP:
+          case JSOP_RETRVAL:
             mergeAllExceptionTargets(cx, values, exceptionTargets);
             break;
 
           default:;
         }
 
         uint32_t type = JOF_TYPE(js_CodeSpec[op].format);
         if (type == JOF_JUMP) {