Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1274)

Unified Diff: test/mjsunit/mjsunit.js

Issue 301673002: Do not (eagerly) trigger exception in mjsunit.js. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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");
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698