Index: test/mjsunit/mjsunit.js |
diff --git a/test/mjsunit/mjsunit.js b/test/mjsunit/mjsunit.js |
index 5f03774d75dbc65bff248a477f00b5160505e4b6..a5f65e24e75cc6279a3650407134ab493fea85bc 100644 |
--- a/test/mjsunit/mjsunit.js |
+++ b/test/mjsunit/mjsunit.js |
@@ -371,13 +371,10 @@ var assertUnoptimized; |
throw new MjsUnitAssertionError(message); |
}; |
- |
- var OptimizationStatus; |
- try { |
- OptimizationStatus = |
- new Function("fun", "sync", "return %GetOptimizationStatus(fun, sync);"); |
- } catch (e) { |
- OptimizationStatus = function() { |
+ var OptimizationStatus = function(fun, sync_opt) { |
+ try { |
+ return eval("%GetOptimizationStatus(fun, sync_opt);"); |
+ } catch (e) { |
throw new Error("natives syntax not allowed"); |
} |
} |