test/script/basic/NASHORN-296.js

Print this page

        

@@ -31,11 +31,11 @@
 function test(name) {
     try {
         load({ script: 'throw new Error()', name: name });
     } catch(e) {
         // normalize windows path separator to URL style
-        var actual = e.stack[0].fileName;
+        var actual = e.getStackTrace()[0].fileName;
         if (actual !== name) {
             fail("expected file name to be " + name +
                  ", actually got file name " + actual);
         }
     }

@@ -46,8 +46,8 @@
 
 // test filename without file:/ prefix
 try {
     throw new Error();
 } catch (e) {
-    test(e.stack[0].fileName.substring(6));
+    test(e.getStackTrace()[0].fileName.substring(6));
 }