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 var $errorToString; | 7 var $errorToString; |
8 var MakeError; | 8 var MakeError; |
9 var MakeEvalError; | 9 var MakeEvalError; |
10 var MakeRangeError; | 10 var MakeRangeError; |
(...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1010 // Define accessors first, as this may fail and throw. | 1010 // Define accessors first, as this may fail and throw. |
1011 ObjectDefineProperty(obj, 'stack', { get: StackTraceGetter, | 1011 ObjectDefineProperty(obj, 'stack', { get: StackTraceGetter, |
1012 set: StackTraceSetter, | 1012 set: StackTraceSetter, |
1013 configurable: true }); | 1013 configurable: true }); |
1014 %CollectStackTrace(obj, cons_opt ? cons_opt : captureStackTrace); | 1014 %CollectStackTrace(obj, cons_opt ? cons_opt : captureStackTrace); |
1015 }; | 1015 }; |
1016 | 1016 |
1017 GlobalError.captureStackTrace = captureStackTrace; | 1017 GlobalError.captureStackTrace = captureStackTrace; |
1018 | 1018 |
1019 utils.ExportToRuntime(function(to) { | 1019 utils.ExportToRuntime(function(to) { |
1020 to.Error = GlobalError; | 1020 to["error_function"] = GlobalError; |
1021 to.EvalError = GlobalEvalError; | 1021 to["eval_error_function"] = GlobalEvalError; |
1022 to.RangeError = GlobalRangeError; | 1022 to["get_stack_trace_line_fun"] = GetStackTraceLine; |
1023 to.ReferenceError = GlobalReferenceError; | 1023 to["make_error_function"] = MakeGenericError; |
1024 to.SyntaxError = GlobalSyntaxError; | 1024 to["message_get_column_number"] = GetColumnNumber; |
1025 to.TypeError = GlobalTypeError; | 1025 to["message_get_line_number"] = GetLineNumber; |
1026 to.URIError = GlobalURIError; | 1026 to["message_get_source_line"] = GetSourceLine; |
1027 to.GetStackTraceLine = GetStackTraceLine; | 1027 to["no_side_effect_to_string_fun"] = NoSideEffectToString; |
1028 to.NoSideEffectToString = NoSideEffectToString; | 1028 to["range_error_function"] = GlobalRangeError; |
1029 to.ToDetailString = ToDetailString; | 1029 to["reference_error_function"] = GlobalReferenceError; |
1030 to.MakeError = MakeGenericError; | 1030 to["stack_overflow_boilerplate"] = StackOverflowBoilerplate; |
1031 to.MessageGetLineNumber = GetLineNumber; | 1031 to["syntax_error_function"] = GlobalSyntaxError; |
1032 to.MessageGetColumnNumber = GetColumnNumber; | 1032 to["to_detail_string_fun"] = ToDetailString; |
1033 to.MessageGetSourceLine = GetSourceLine; | 1033 to["type_error_function"] = GlobalTypeError; |
1034 to.StackOverflowBoilerplate = StackOverflowBoilerplate; | 1034 to["uri_error_function"] = GlobalURIError; |
1035 }); | 1035 }); |
1036 | 1036 |
1037 }); | 1037 }); |
OLD | NEW |