Oops. Forgot to throw *new* $EvalError.
authorolehougaard <olehougaard@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 14 Nov 2008 14:36:46 +0000 (14:36 +0000)
committerolehougaard <olehougaard@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 14 Nov 2008 14:36:46 +0000 (14:36 +0000)
Review URL: http://codereview.chromium.org/10749

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@760 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/v8natives.js

index 79518f7..f3c98a5 100644 (file)
@@ -106,8 +106,8 @@ function GlobalEval(x) {
   if (!IS_STRING(x)) return x;
 
   if (this !== %GlobalReceiver(global)) {
-    throw $EvalError('The "this" object passed to eval ' + 
-                     'must be the global object from which eval originated');
+    throw new $EvalError('The "this" object passed to eval must ' + 
+                         'be the global object from which eval originated');
   }
   
   var f = %CompileString(x, 0, true);