| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 fileLocation += ":" + columnNumber; | 824 fileLocation += ":" + columnNumber; |
| 825 } | 825 } |
| 826 } | 826 } |
| 827 } | 827 } |
| 828 } | 828 } |
| 829 if (!fileLocation) { | 829 if (!fileLocation) { |
| 830 fileLocation = "unknown source"; | 830 fileLocation = "unknown source"; |
| 831 } | 831 } |
| 832 var line = ""; | 832 var line = ""; |
| 833 var functionName = frame.getFunction().name; | 833 var functionName = frame.getFunction().name; |
| 834 var methodName = frame.getMethodName(); | |
| 835 var addPrefix = true; | 834 var addPrefix = true; |
| 836 var isConstructor = frame.isConstructor(); | 835 var isConstructor = frame.isConstructor(); |
| 837 var isMethodCall = !(frame.isToplevel() || isConstructor); | 836 var isMethodCall = !(frame.isToplevel() || isConstructor); |
| 838 if (isMethodCall) { | 837 if (isMethodCall) { |
| 838 var methodName = frame.getMethodName(); |
| 839 line += frame.getTypeName() + "."; | 839 line += frame.getTypeName() + "."; |
| 840 if (functionName) { | 840 if (functionName) { |
| 841 line += functionName; | 841 line += functionName; |
| 842 if (methodName && (methodName != functionName)) { | 842 if (methodName && (methodName != functionName)) { |
| 843 line += " [as " + methodName + "]"; | 843 line += " [as " + methodName + "]"; |
| 844 } | 844 } |
| 845 } else { | 845 } else { |
| 846 line += methodName || "<anonymous>"; | 846 line += methodName || "<anonymous>"; |
| 847 } | 847 } |
| 848 } else if (isConstructor) { | 848 } else if (isConstructor) { |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 979 return this.name + ": " + FormatMessage({ type: type, args: this.arguments }
); | 979 return this.name + ": " + FormatMessage({ type: type, args: this.arguments }
); |
| 980 } | 980 } |
| 981 var message = this.message; | 981 var message = this.message; |
| 982 return this.name + (message ? (": " + message) : ""); | 982 return this.name + (message ? (": " + message) : ""); |
| 983 }, DONT_ENUM); | 983 }, DONT_ENUM); |
| 984 | 984 |
| 985 | 985 |
| 986 // Boilerplate for exceptions for stack overflows. Used from | 986 // Boilerplate for exceptions for stack overflows. Used from |
| 987 // Top::StackOverflow(). | 987 // Top::StackOverflow(). |
| 988 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); | 988 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); |
| OLD | NEW |