OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #include "src/bootstrapper.h" | 5 #include "src/bootstrapper.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api-natives.h" | 8 #include "src/api-natives.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/extensions/externalize-string-extension.h" | 10 #include "src/extensions/externalize-string-extension.h" |
(...skipping 2806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2817 // and the String function has been set up. | 2817 // and the String function has been set up. |
2818 Handle<JSFunction> string_function(native_context()->string_function()); | 2818 Handle<JSFunction> string_function(native_context()->string_function()); |
2819 DCHECK(JSObject::cast( | 2819 DCHECK(JSObject::cast( |
2820 string_function->initial_map()->prototype())->HasFastProperties()); | 2820 string_function->initial_map()->prototype())->HasFastProperties()); |
2821 native_context()->set_string_function_prototype_map( | 2821 native_context()->set_string_function_prototype_map( |
2822 HeapObject::cast(string_function->initial_map()->prototype())->map()); | 2822 HeapObject::cast(string_function->initial_map()->prototype())->map()); |
2823 | 2823 |
2824 Handle<JSGlobalObject> global_object = | 2824 Handle<JSGlobalObject> global_object = |
2825 handle(native_context()->global_object()); | 2825 handle(native_context()->global_object()); |
2826 | 2826 |
| 2827 // Install Global.decodeURI. |
| 2828 SimpleInstallFunction(global_object, "decodeURI", Builtins::kGlobalDecodeURI, |
| 2829 1, false); |
| 2830 |
| 2831 // Install Global.decodeURIComponent. |
| 2832 SimpleInstallFunction(global_object, "decodeURIComponent", |
| 2833 Builtins::kGlobalDecodeURIComponent, 1, false); |
| 2834 |
2827 // Install Global.encodeURI. | 2835 // Install Global.encodeURI. |
2828 SimpleInstallFunction(global_object, "encodeURI", Builtins::kGlobalEncodeURI, | 2836 SimpleInstallFunction(global_object, "encodeURI", Builtins::kGlobalEncodeURI, |
2829 1, false); | 2837 1, false); |
2830 | 2838 |
2831 // Install Global.encodeURIComponent. | 2839 // Install Global.encodeURIComponent. |
2832 SimpleInstallFunction(global_object, "encodeURIComponent", | 2840 SimpleInstallFunction(global_object, "encodeURIComponent", |
2833 Builtins::kGlobalEncodeURIComponent, 1, false); | 2841 Builtins::kGlobalEncodeURIComponent, 1, false); |
2834 | 2842 |
2835 // Install Global.eval. | 2843 // Install Global.eval. |
2836 { | 2844 { |
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3779 } | 3787 } |
3780 | 3788 |
3781 | 3789 |
3782 // Called when the top-level V8 mutex is destroyed. | 3790 // Called when the top-level V8 mutex is destroyed. |
3783 void Bootstrapper::FreeThreadResources() { | 3791 void Bootstrapper::FreeThreadResources() { |
3784 DCHECK(!IsActive()); | 3792 DCHECK(!IsActive()); |
3785 } | 3793 } |
3786 | 3794 |
3787 } // namespace internal | 3795 } // namespace internal |
3788 } // namespace v8 | 3796 } // namespace v8 |
OLD | NEW |