зеркало из https://github.com/mozilla/gecko-dev.git
Fix bug 60093
This commit is contained in:
Родитель
b9aa03d8cf
Коммит
86d5be2297
|
@ -241,8 +241,7 @@ public class Interpreter extends LabelTable {
|
|||
+ node.toString());
|
||||
}
|
||||
|
||||
private int generateICode(Node node, int iCodeTop)
|
||||
{
|
||||
private int generateICode(Node node, int iCodeTop) {
|
||||
int type = node.getType();
|
||||
Node child = node.getFirstChild();
|
||||
Node firstChild = child;
|
||||
|
@ -846,6 +845,7 @@ public class Interpreter extends LabelTable {
|
|||
set the stackDepth to 1 to account for the incoming
|
||||
exception object.
|
||||
*/
|
||||
boolean insertedEndTry = false;
|
||||
while (child != null) {
|
||||
if (catchTarget != null && lastChild == catchTarget) {
|
||||
itsStackDepth = 1;
|
||||
|
@ -860,11 +860,13 @@ public class Interpreter extends LabelTable {
|
|||
before that goto.
|
||||
*/
|
||||
Node nextSibling = child.getNextSibling();
|
||||
if (nextSibling == catchTarget ||
|
||||
nextSibling == finallyTarget)
|
||||
if (!insertedEndTry && nextSibling != null &&
|
||||
(nextSibling == catchTarget ||
|
||||
nextSibling == finallyTarget))
|
||||
{
|
||||
iCodeTop = addByte((byte) TokenStream.ENDTRY,
|
||||
iCodeTop);
|
||||
insertedEndTry = true;
|
||||
}
|
||||
iCodeTop = generateICode(child, iCodeTop);
|
||||
lastChild = child;
|
||||
|
|
|
@ -241,8 +241,7 @@ public class Interpreter extends LabelTable {
|
|||
+ node.toString());
|
||||
}
|
||||
|
||||
private int generateICode(Node node, int iCodeTop)
|
||||
{
|
||||
private int generateICode(Node node, int iCodeTop) {
|
||||
int type = node.getType();
|
||||
Node child = node.getFirstChild();
|
||||
Node firstChild = child;
|
||||
|
@ -846,6 +845,7 @@ public class Interpreter extends LabelTable {
|
|||
set the stackDepth to 1 to account for the incoming
|
||||
exception object.
|
||||
*/
|
||||
boolean insertedEndTry = false;
|
||||
while (child != null) {
|
||||
if (catchTarget != null && lastChild == catchTarget) {
|
||||
itsStackDepth = 1;
|
||||
|
@ -860,11 +860,13 @@ public class Interpreter extends LabelTable {
|
|||
before that goto.
|
||||
*/
|
||||
Node nextSibling = child.getNextSibling();
|
||||
if (nextSibling == catchTarget ||
|
||||
nextSibling == finallyTarget)
|
||||
if (!insertedEndTry && nextSibling != null &&
|
||||
(nextSibling == catchTarget ||
|
||||
nextSibling == finallyTarget))
|
||||
{
|
||||
iCodeTop = addByte((byte) TokenStream.ENDTRY,
|
||||
iCodeTop);
|
||||
insertedEndTry = true;
|
||||
}
|
||||
iCodeTop = generateICode(child, iCodeTop);
|
||||
lastChild = child;
|
||||
|
|
Загрузка…
Ссылка в новой задаче