Commit 2097644f authored by yangguo@chromium.org's avatar yangguo@chromium.org

Do not (eagerly) trigger exception in mjsunit.js.

R=jochen@chromium.org

Review URL: https://codereview.chromium.org/301673002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21518 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 9678ff12
......@@ -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");
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment