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

Unified 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, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/json.js ('k') | src/object-observe.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/messages.js
diff --git a/src/messages.js b/src/messages.js
index a0176d34a24c0b1aa449dc5f35f62fd8f19317ae..b930a38b4c4bc24ef8b96cbc59c3179ae4d202b7 100644
--- a/src/messages.js
+++ b/src/messages.js
@@ -1025,22 +1025,24 @@ captureStackTrace = function captureStackTrace(obj, cons_opt) {
GlobalError.captureStackTrace = captureStackTrace;
-utils.ExportToRuntime(function(to) {
- to["error_function"] = GlobalError;
- to["eval_error_function"] = GlobalEvalError;
- to["get_stack_trace_line_fun"] = GetStackTraceLine;
- to["make_error_function"] = MakeGenericError;
- to["message_get_column_number"] = GetColumnNumber;
- to["message_get_line_number"] = GetLineNumber;
- to["message_get_source_line"] = GetSourceLine;
- to["no_side_effect_to_string_fun"] = NoSideEffectToString;
- to["range_error_function"] = GlobalRangeError;
- to["reference_error_function"] = GlobalReferenceError;
- to["stack_overflow_boilerplate"] = StackOverflowBoilerplate;
- to["syntax_error_function"] = GlobalSyntaxError;
- to["to_detail_string_fun"] = ToDetailString;
- to["type_error_function"] = GlobalTypeError;
- to["uri_error_function"] = GlobalURIError;
-});
+%InstallToContext([
+ "error_function", GlobalError,
+ "eval_error_function", GlobalEvalError,
+ "get_stack_trace_line_fun", GetStackTraceLine,
+ "make_error_function", MakeGenericError,
+ "make_range_error", MakeRangeError,
+ "make_type_error", MakeTypeError,
+ "message_get_column_number", GetColumnNumber,
+ "message_get_line_number", GetLineNumber,
+ "message_get_source_line", GetSourceLine,
+ "no_side_effect_to_string_fun", NoSideEffectToString,
+ "range_error_function", GlobalRangeError,
+ "reference_error_function", GlobalReferenceError,
+ "stack_overflow_boilerplate", StackOverflowBoilerplate,
+ "syntax_error_function", GlobalSyntaxError,
+ "to_detail_string_fun", ToDetailString,
+ "type_error_function", GlobalTypeError,
+ "uri_error_function", GlobalURIError,
+]);
});
« 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