jsminplus: Fix JSNode memory leak from 'continue' statements
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 29 Jun 2017 01:19:20 +0000 (18:19 -0700)
committerTimo Tijhof <krinklemail@gmail.com>
Thu, 29 Jun 2017 01:19:20 +0000 (18:19 -0700)
During parsing of scripts containing a 'continue' statement,
the JSNode for that statements, and all containing blocks (e.g. conditional
blocks, for-loop/white-loop statements , etc.) were being held
in memory indefinitely.

Bug: T31784
Change-Id: Id7006c264a470ba665434f6f275e49a1516b73ae

includes/libs/jsminplus.php

index 40f22c5..7feac7d 100644 (file)
@@ -973,8 +973,6 @@ class JSParser
                                        }
                                        while (!$ss[$i]->isLoop && ($tt != KEYWORD_BREAK || $ss[$i]->type != KEYWORD_SWITCH));
                                }
-
-                               $n->target = $ss[$i];
                        break;
 
                        case KEYWORD_TRY: