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

Unified Diff: src/bootstrapper.cc

Issue 1983593002: [builtins] Move EncodeURI from runtime to builtins. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rename variables with underscores Created 4 years, 7 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 | « no previous file | src/builtins.h » ('j') | src/builtins.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 78a80ca3df32ca09a028ccfd76462347df076094..41d9e7b178104200ccf79da9415aeede4976de0a 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -2755,6 +2755,23 @@ bool Genesis::InstallNatives(GlobalContextType context_type) {
native_context()->set_string_function_prototype_map(
HeapObject::cast(string_function->initial_map()->prototype())->map());
+ // Install Global.encodeURI.
+ {
+ Handle<JSFunction> encode_uri = SimpleInstallFunction(
+ handle(native_context()->global_object()), "encodeURI",
+ Builtins::kGlobalEncodeURI, 1, false);
+ native_context()->set_global_encode_uri_fun(*encode_uri);
+ }
+
+ // Install Global.encodeURIComponent.
+ {
+ Handle<JSFunction> encode_uri_component = SimpleInstallFunction(
+ handle(native_context()->global_object()), "encodeURIComponent",
+ Builtins::kGlobalEncodeURIComponent, 1, false);
+ native_context()->set_global_encode_uri_component_fun(
+ *encode_uri_component);
+ }
+
// Install Global.eval.
{
Handle<JSFunction> eval = SimpleInstallFunction(
« no previous file with comments | « no previous file | src/builtins.h » ('j') | src/builtins.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698