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

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: separated context slot lookup 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
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 998 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 captureStackTrace = function captureStackTrace(obj, cons_opt) { 1009 captureStackTrace = function captureStackTrace(obj, cons_opt) {
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 %InstallToContext([
1020 to["error_function"] = GlobalError; 1020 "error_function", GlobalError,
1021 to["eval_error_function"] = GlobalEvalError; 1021 "eval_error_function", GlobalEvalError,
1022 to["get_stack_trace_line_fun"] = GetStackTraceLine; 1022 "get_stack_trace_line_fun", GetStackTraceLine,
1023 to["make_error_function"] = MakeGenericError; 1023 "make_error_function", MakeGenericError,
1024 to["message_get_column_number"] = GetColumnNumber; 1024 "make_range_error", MakeRangeError,
1025 to["message_get_line_number"] = GetLineNumber; 1025 "make_type_error", MakeTypeError,
1026 to["message_get_source_line"] = GetSourceLine; 1026 "message_get_column_number", GetColumnNumber,
1027 to["no_side_effect_to_string_fun"] = NoSideEffectToString; 1027 "message_get_line_number", GetLineNumber,
1028 to["range_error_function"] = GlobalRangeError; 1028 "message_get_source_line", GetSourceLine,
1029 to["reference_error_function"] = GlobalReferenceError; 1029 "no_side_effect_to_string_fun", NoSideEffectToString,
1030 to["stack_overflow_boilerplate"] = StackOverflowBoilerplate; 1030 "range_error_function", GlobalRangeError,
1031 to["syntax_error_function"] = GlobalSyntaxError; 1031 "reference_error_function", GlobalReferenceError,
1032 to["to_detail_string_fun"] = ToDetailString; 1032 "stack_overflow_boilerplate", StackOverflowBoilerplate,
1033 to["type_error_function"] = GlobalTypeError; 1033 "syntax_error_function", GlobalSyntaxError,
1034 to["uri_error_function"] = GlobalURIError; 1034 "to_detail_string_fun", ToDetailString,
1035 }); 1035 "type_error_function", GlobalTypeError,
1036 "uri_error_function", GlobalURIError,
1037 ]);
1036 1038
1037 }); 1039 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698