Reviewers: jochen,
Description:
Do not (eagerly) trigger exception in mjsunit.js.
[email protected]
Please review this at https://codereview.chromium.org/301673002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+4, -7 lines):
M test/mjsunit/mjsunit.js
Index: test/mjsunit/mjsunit.js
diff --git a/test/mjsunit/mjsunit.js b/test/mjsunit/mjsunit.js
index
5f03774d75dbc65bff248a477f00b5160505e4b6..ec39d0d94eaf21e474404132a69c726c4b92ec24
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);");
+ } catch (e) {
throw new Error("natives syntax not allowed");
}
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.