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

Unified Diff: src/bootstrapper.cc

Issue 1709373002: Make Date.prototype.toGMTString an alias for Date.prototype.toUTCString (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix test Created 4 years, 10 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 | test/mjsunit/function-names.js » ('j') | no next file with comments »
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 3d30cced7ac0135095aa160a67df3bae61b26e31..df06945b9f52f29d65f922ae50729a4775ee962a 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1339,12 +1339,13 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
Builtins::kDatePrototypeToDateString, 0, false);
SimpleInstallFunction(prototype, "toTimeString",
Builtins::kDatePrototypeToTimeString, 0, false);
- SimpleInstallFunction(prototype, "toGMTString",
- Builtins::kDatePrototypeToUTCString, 0, false);
SimpleInstallFunction(prototype, "toISOString",
Builtins::kDatePrototypeToISOString, 0, false);
- SimpleInstallFunction(prototype, "toUTCString",
- Builtins::kDatePrototypeToUTCString, 0, false);
+ Handle<JSFunction> to_utc_string =
+ SimpleInstallFunction(prototype, "toUTCString",
+ Builtins::kDatePrototypeToUTCString, 0, false);
+ InstallFunction(prototype, to_utc_string,
+ factory->InternalizeUtf8String("toGMTString"), DONT_ENUM);
SimpleInstallFunction(prototype, "getDate", Builtins::kDatePrototypeGetDate,
0, true);
SimpleInstallFunction(prototype, "setDate", Builtins::kDatePrototypeSetDate,
« no previous file with comments | « no previous file | test/mjsunit/function-names.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698