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

Unified Diff: src/js/i18n.js

Issue 2587703002: [intl] Avoid modifying options bag from constructor (Closed)
Patch Set: Fix test expectations Created 4 years 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 | « src/contexts.h ('k') | test/cctest/interpreter/bytecode_expectations/CallRuntime.golden » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/i18n.js
diff --git a/src/js/i18n.js b/src/js/i18n.js
index b051b090bcee57af0da4a558eb4c79fa824ba426..c41d0a2caa51186c0ad935450fdc6e1a1697520a 100644
--- a/src/js/i18n.js
+++ b/src/js/i18n.js
@@ -1518,6 +1518,8 @@ function toDateTimeOptions(options, required, defaults) {
options = TO_OBJECT(options);
}
+ options = %object_create(options);
+
var needsDefault = true;
if ((required === 'date' || required === 'any') &&
(!IS_UNDEFINED(options.weekday) || !IS_UNDEFINED(options.year) ||
« no previous file with comments | « src/contexts.h ('k') | test/cctest/interpreter/bytecode_expectations/CallRuntime.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698