Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 var stack; | |
| 6 var f = new Function('1 + reference_error //@ sourceURL=evaltest'); | |
| 7 try { | |
| 8 f(); | |
| 9 } catch (e) { | |
| 10 stack = e.stack; | |
| 11 } | |
| 12 assertTrue(stack.indexOf("at eval (evaltest:1:5)") > 0); | |
| 13 | |
| 14 var g = new Function('\n 1 + reference_error //@ sourceURL=evaltest'); | |
|
aandrey
2014/11/11 10:07:38
I meant:
var g = eval('(function () {\n 1 + refer
| |
| 15 try { | |
| 16 g(); | |
| 17 } catch (e) { | |
| 18 stack = e.stack; | |
| 19 } | |
| 20 assertTrue(stack.indexOf("at eval (evaltest:2:6)") > 0); | |
| OLD | NEW |