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, |
+]); |
}); |