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
This commit is contained in:
parent
9678ff12c6
commit
2097644fcf
@ -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");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user