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 2799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2810 // and the String function has been set up. | 2810 // and the String function has been set up. |
2811 Handle<JSFunction> string_function(native_context()->string_function()); | 2811 Handle<JSFunction> string_function(native_context()->string_function()); |
2812 DCHECK(JSObject::cast( | 2812 DCHECK(JSObject::cast( |
2813 string_function->initial_map()->prototype())->HasFastProperties()); | 2813 string_function->initial_map()->prototype())->HasFastProperties()); |
2814 native_context()->set_string_function_prototype_map( | 2814 native_context()->set_string_function_prototype_map( |
2815 HeapObject::cast(string_function->initial_map()->prototype())->map()); | 2815 HeapObject::cast(string_function->initial_map()->prototype())->map()); |
2816 | 2816 |
2817 Handle<JSGlobalObject> global_object = | 2817 Handle<JSGlobalObject> global_object = |
2818 handle(native_context()->global_object()); | 2818 handle(native_context()->global_object()); |
2819 | 2819 |
| 2820 // Install Global.decodeURI. |
| 2821 SimpleInstallFunction(global_object, "decodeURI", Builtins::kGlobalDecodeURI, |
| 2822 1, false); |
| 2823 |
| 2824 // Install Global.decodeURIComponent. |
| 2825 SimpleInstallFunction(global_object, "decodeURIComponent", |
| 2826 Builtins::kGlobalDecodeURIComponent, 1, false); |
| 2827 |
2820 // Install Global.encodeURI. | 2828 // Install Global.encodeURI. |
2821 SimpleInstallFunction(global_object, "encodeURI", Builtins::kGlobalEncodeURI, | 2829 SimpleInstallFunction(global_object, "encodeURI", Builtins::kGlobalEncodeURI, |
2822 1, false); | 2830 1, false); |
2823 | 2831 |
2824 // Install Global.encodeURIComponent. | 2832 // Install Global.encodeURIComponent. |
2825 SimpleInstallFunction(global_object, "encodeURIComponent", | 2833 SimpleInstallFunction(global_object, "encodeURIComponent", |
2826 Builtins::kGlobalEncodeURIComponent, 1, false); | 2834 Builtins::kGlobalEncodeURIComponent, 1, false); |
2827 | 2835 |
2828 // Install Global.eval. | 2836 // Install Global.eval. |
2829 { | 2837 { |
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3772 } | 3780 } |
3773 | 3781 |
3774 | 3782 |
3775 // Called when the top-level V8 mutex is destroyed. | 3783 // Called when the top-level V8 mutex is destroyed. |
3776 void Bootstrapper::FreeThreadResources() { | 3784 void Bootstrapper::FreeThreadResources() { |
3777 DCHECK(!IsActive()); | 3785 DCHECK(!IsActive()); |
3778 } | 3786 } |
3779 | 3787 |
3780 } // namespace internal | 3788 } // namespace internal |
3781 } // namespace v8 | 3789 } // namespace v8 |
OLD | NEW |