Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(701)

Side by Side Diff: src/messages.js

Issue 1306993003: Call JS functions via native context instead of js builtins object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/json.js ('k') | src/object-observe.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 captureStackTrace = function captureStackTrace(obj, cons_opt) { 1018 captureStackTrace = function captureStackTrace(obj, cons_opt) {
1019 // Define accessors first, as this may fail and throw. 1019 // Define accessors first, as this may fail and throw.
1020 ObjectDefineProperty(obj, 'stack', { get: StackTraceGetter, 1020 ObjectDefineProperty(obj, 'stack', { get: StackTraceGetter,
1021 set: StackTraceSetter, 1021 set: StackTraceSetter,
1022 configurable: true }); 1022 configurable: true });
1023 %CollectStackTrace(obj, cons_opt ? cons_opt : captureStackTrace); 1023 %CollectStackTrace(obj, cons_opt ? cons_opt : captureStackTrace);
1024 }; 1024 };
1025 1025
1026 GlobalError.captureStackTrace = captureStackTrace; 1026 GlobalError.captureStackTrace = captureStackTrace;
1027 1027
1028 utils.ExportToRuntime(function(to) { 1028 %InstallToContext([
1029 to["error_function"] = GlobalError; 1029 "error_function", GlobalError,
1030 to["eval_error_function"] = GlobalEvalError; 1030 "eval_error_function", GlobalEvalError,
1031 to["get_stack_trace_line_fun"] = GetStackTraceLine; 1031 "get_stack_trace_line_fun", GetStackTraceLine,
1032 to["make_error_function"] = MakeGenericError; 1032 "make_error_function", MakeGenericError,
1033 to["message_get_column_number"] = GetColumnNumber; 1033 "make_range_error", MakeRangeError,
1034 to["message_get_line_number"] = GetLineNumber; 1034 "make_type_error", MakeTypeError,
1035 to["message_get_source_line"] = GetSourceLine; 1035 "message_get_column_number", GetColumnNumber,
1036 to["no_side_effect_to_string_fun"] = NoSideEffectToString; 1036 "message_get_line_number", GetLineNumber,
1037 to["range_error_function"] = GlobalRangeError; 1037 "message_get_source_line", GetSourceLine,
1038 to["reference_error_function"] = GlobalReferenceError; 1038 "no_side_effect_to_string_fun", NoSideEffectToString,
1039 to["stack_overflow_boilerplate"] = StackOverflowBoilerplate; 1039 "range_error_function", GlobalRangeError,
1040 to["syntax_error_function"] = GlobalSyntaxError; 1040 "reference_error_function", GlobalReferenceError,
1041 to["to_detail_string_fun"] = ToDetailString; 1041 "stack_overflow_boilerplate", StackOverflowBoilerplate,
1042 to["type_error_function"] = GlobalTypeError; 1042 "syntax_error_function", GlobalSyntaxError,
1043 to["uri_error_function"] = GlobalURIError; 1043 "to_detail_string_fun", ToDetailString,
1044 }); 1044 "type_error_function", GlobalTypeError,
1045 "uri_error_function", GlobalURIError,
1046 ]);
1045 1047
1046 }); 1048 });
OLDNEW
« no previous file with comments | « src/json.js ('k') | src/object-observe.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698