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

Side by Side Diff: test/mjsunit/stack-traces.js

Issue 15859010: Add support for //# sourceURL similar to deprecated //@ sourceURL one. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 7 years, 6 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 unified diff | Download patch
« no previous file with comments | « test/mjsunit/regress/regress-1853.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 function testEval() { 57 function testEval() {
58 eval("function Doo() { FAIL; }; Doo();"); 58 eval("function Doo() { FAIL; }; Doo();");
59 } 59 }
60 60
61 function testNestedEval() { 61 function testNestedEval() {
62 var x = "FAIL"; 62 var x = "FAIL";
63 eval("function Outer() { eval('function Inner() { eval(x); }'); Inner(); }; Ou ter();"); 63 eval("function Outer() { eval('function Inner() { eval(x); }'); Inner(); }; Ou ter();");
64 } 64 }
65 65
66 function testEvalWithSourceURL() { 66 function testEvalWithSourceURL() {
67 eval("function Doo() { FAIL; }; Doo();\n//@ sourceURL=res://name"); 67 eval("function Doo() { FAIL; }; Doo();\n//# sourceURL=res://name");
68 } 68 }
69 69
70 function testNestedEvalWithSourceURL() { 70 function testNestedEvalWithSourceURL() {
71 var x = "FAIL"; 71 var x = "FAIL";
72 var innerEval = 'function Inner() { eval(x); }\n//@ sourceURL=res://inner-eval '; 72 var innerEval = 'function Inner() { eval(x); }\n//@ sourceURL=res://inner-eval ';
73 eval("function Outer() { eval(innerEval); Inner(); }; Outer();\n//@ sourceURL= res://outer-eval"); 73 eval("function Outer() { eval(innerEval); Inner(); }; Outer();\n//# sourceURL= res://outer-eval");
74 } 74 }
75 75
76 function testValue() { 76 function testValue() {
77 Number.prototype.causeError = function () { FAIL; }; 77 Number.prototype.causeError = function () { FAIL; };
78 (1).causeError(); 78 (1).causeError();
79 } 79 }
80 80
81 function testConstructor() { 81 function testConstructor() {
82 function Plonk() { FAIL; } 82 function Plonk() { FAIL; }
83 new Plonk(); 83 new Plonk();
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 message = e.message; 320 message = e.message;
321 } 321 }
322 322
323 assertEquals("abc", message); 323 assertEquals("abc", message);
324 324
325 // Test that modifying Error.prepareStackTrace by itself works. 325 // Test that modifying Error.prepareStackTrace by itself works.
326 Error.prepareStackTrace = function() { Error.prepareStackTrace = "custom"; }; 326 Error.prepareStackTrace = function() { Error.prepareStackTrace = "custom"; };
327 new Error(); 327 new Error();
328 328
329 assertEquals("custom", Error.prepareStackTrace); 329 assertEquals("custom", Error.prepareStackTrace);
OLDNEW
« no previous file with comments | « test/mjsunit/regress/regress-1853.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698