OLD | NEW |
---|---|
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 var thrower = { [Symbol.toPrimitive]: () => FAIL }; | 5 var thrower = { [Symbol.toPrimitive]: () => FAIL }; |
6 | 6 |
7 // Tests that a native conversion function is included in the | 7 // Tests that a native conversion function is included in the |
8 // stack trace. | 8 // stack trace. |
9 function testTraceNativeConversion(nativeFunc) { | 9 function testTraceNativeConversion(nativeFunc) { |
10 var nativeFuncName = nativeFunc.name; | 10 var nativeFuncName = nativeFunc.name; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
59 testBuiltinInStackTrace("Math.fround(thrower);", "at Math.fround"); | 59 testBuiltinInStackTrace("Math.fround(thrower);", "at Math.fround"); |
60 testBuiltinInStackTrace("Math.imul(thrower);", "at Math.imul"); | 60 testBuiltinInStackTrace("Math.imul(thrower);", "at Math.imul"); |
61 | 61 |
62 // As above, but function passed as an argument and then called. | 62 // As above, but function passed as an argument and then called. |
63 testBuiltinInStackTrace("((f, x) => f(x))(Math.max, thrower);", "at max"); | 63 testBuiltinInStackTrace("((f, x) => f(x))(Math.max, thrower);", "at max"); |
64 testBuiltinInStackTrace("((f, x) => f(x))(Math.min, thrower);", "at min"); | 64 testBuiltinInStackTrace("((f, x) => f(x))(Math.min, thrower);", "at min"); |
65 testBuiltinInStackTrace("((f, x) => f(x))(Math.acos, thrower);", "at acos"); | 65 testBuiltinInStackTrace("((f, x) => f(x))(Math.acos, thrower);", "at acos"); |
66 testBuiltinInStackTrace("((f, x) => f(x))(Math.asin, thrower);", "at asin"); | 66 testBuiltinInStackTrace("((f, x) => f(x))(Math.asin, thrower);", "at asin"); |
67 testBuiltinInStackTrace("((f, x) => f(x))(Math.fround, thrower);", "at fround"); | 67 testBuiltinInStackTrace("((f, x) => f(x))(Math.fround, thrower);", "at fround"); |
68 testBuiltinInStackTrace("((f, x) => f(x))(Math.imul, thrower);", "at imul"); | 68 testBuiltinInStackTrace("((f, x) => f(x))(Math.imul, thrower);", "at imul"); |
69 | |
70 // Assembler builtins. | |
Benedikt Meurer
2016/07/04 16:45:37
Can you move these to regress-5173? This way it's
jgruber
2016/07/07 11:50:52
Done.
| |
71 testBuiltinInStackTrace("Number(thrower);", "at Number"); | |
72 testBuiltinInStackTrace("new Number(thrower);", "at new Number"); | |
73 testBuiltinInStackTrace("String(thrower);", "at String"); | |
74 testBuiltinInStackTrace("new String(thrower);", "at new String"); | |
OLD | NEW |