aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-10-06 10:33:50 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-10-06 10:33:50 -0700
commit800ec1f87be63eda668e0fbde373200ccc88710c (patch)
tree694aebf8057cf47a1da0d0c58f2c5799e986ca10
parent4091984a0c897c53b09de5a7caf64f9819a9be6e (diff)
look for metadata in js optimizer starting at the end
-rw-r--r--tools/js-optimizer.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js
index 10aeda4d..e5e0d287 100644
--- a/tools/js-optimizer.js
+++ b/tools/js-optimizer.js
@@ -3840,8 +3840,8 @@ arguments_ = arguments_.filter(function (arg) {
var src = read(arguments_[0]);
var ast = srcToAst(src);
//printErr(JSON.stringify(ast)); throw 1;
-generatedFunctions = src.indexOf(GENERATED_FUNCTIONS_MARKER) >= 0;
-var extraInfoStart = src.indexOf('// EXTRA_INFO:')
+generatedFunctions = src.lastIndexOf(GENERATED_FUNCTIONS_MARKER) >= 0;
+var extraInfoStart = src.lastIndexOf('// EXTRA_INFO:')
if (extraInfoStart > 0) extraInfo = JSON.parse(src.substr(extraInfoStart + 14));
//printErr(JSON.stringify(extraInfo));