OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 // ------------------------------------------------------------------- | 5 // ------------------------------------------------------------------- |
6 | 6 |
7 (function(global, utils) { | 7 (function(global, utils) { |
8 | 8 |
9 %CheckIsBootstrapping(); | 9 %CheckIsBootstrapping(); |
10 | 10 |
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
843 } | 843 } |
844 } | 844 } |
845 lines.push(" at " + line); | 845 lines.push(" at " + line); |
846 } | 846 } |
847 return %_Call(ArrayJoin, lines, "\n"); | 847 return %_Call(ArrayJoin, lines, "\n"); |
848 } | 848 } |
849 | 849 |
850 | 850 |
851 function GetTypeName(receiver, requireConstructor) { | 851 function GetTypeName(receiver, requireConstructor) { |
852 if (IS_NULL_OR_UNDEFINED(receiver)) return null; | 852 if (IS_NULL_OR_UNDEFINED(receiver)) return null; |
| 853 if (%_IsJSProxy(receiver)) { |
| 854 return "Proxy"; |
| 855 }; |
853 var constructor = receiver.constructor; | 856 var constructor = receiver.constructor; |
854 if (!constructor) { | 857 if (!constructor) { |
855 return requireConstructor ? null : | 858 return requireConstructor ? null : |
856 %_Call(NoSideEffectsObjectToString, receiver); | 859 %_Call(NoSideEffectsObjectToString, receiver); |
857 } | 860 } |
858 var constructorName = constructor.name; | 861 var constructorName = constructor.name; |
859 if (!constructorName) { | 862 if (!constructorName) { |
860 return requireConstructor ? null : | 863 return requireConstructor ? null : |
861 %_Call(NoSideEffectsObjectToString, receiver); | 864 %_Call(NoSideEffectsObjectToString, receiver); |
862 } | 865 } |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1031 utils.Export(function(to) { | 1034 utils.Export(function(to) { |
1032 to.ErrorToString = ErrorToString; | 1035 to.ErrorToString = ErrorToString; |
1033 to.MakeError = MakeError; | 1036 to.MakeError = MakeError; |
1034 to.MakeRangeError = MakeRangeError; | 1037 to.MakeRangeError = MakeRangeError; |
1035 to.MakeSyntaxError = MakeSyntaxError; | 1038 to.MakeSyntaxError = MakeSyntaxError; |
1036 to.MakeTypeError = MakeTypeError; | 1039 to.MakeTypeError = MakeTypeError; |
1037 to.MakeURIError = MakeURIError; | 1040 to.MakeURIError = MakeURIError; |
1038 }); | 1041 }); |
1039 | 1042 |
1040 }); | 1043 }); |
OLD | NEW |