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

Side by Side Diff: src/js/i18n.js

Issue 2412533002: [i18n] Avoid name conflicts caused by naive minifier (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 // ECMAScript 402 API implementation. 5 // ECMAScript 402 API implementation.
6 6
7 /** 7 /**
8 * Intl object is a single object that has some named properties, 8 * Intl object is a single object that has some named properties,
9 * all of which are constructors. 9 * all of which are constructors.
10 */ 10 */
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 // property on each JSFunction instance created here, rather 69 // property on each JSFunction instance created here, rather
70 // than (as utils.InstallGetter would) on the SharedFunctionInfo 70 // than (as utils.InstallGetter would) on the SharedFunctionInfo
71 // associated with all functions returned from AddBoundMethod. 71 // associated with all functions returned from AddBoundMethod.
72 var getter = ANONYMOUS_FUNCTION(function() { 72 var getter = ANONYMOUS_FUNCTION(function() {
73 if (!%IsInitializedIntlObjectOfType(this, type)) { 73 if (!%IsInitializedIntlObjectOfType(this, type)) {
74 throw %make_type_error(kMethodCalledOnWrongObject, methodName); 74 throw %make_type_error(kMethodCalledOnWrongObject, methodName);
75 } 75 }
76 if (IS_UNDEFINED(this[internalName])) { 76 if (IS_UNDEFINED(this[internalName])) {
77 var boundMethod; 77 var boundMethod;
78 if (IS_UNDEFINED(length) || length === 2) { 78 if (IS_UNDEFINED(length) || length === 2) {
79 boundMethod = ANONYMOUS_FUNCTION((x, y) => implementation(this, x, y)); 79 boundMethod = ANONYMOUS_FUNCTION((fst, snd) => implementation(this, fst, snd));
Yang 2016/10/12 04:56:55 can we keep the 80-char limit?
jgruber 2016/10/12 06:55:08 Done.
80 } else if (length === 1) { 80 } else if (length === 1) {
81 boundMethod = ANONYMOUS_FUNCTION(x => implementation(this, x)); 81 boundMethod = ANONYMOUS_FUNCTION(fst => implementation(this, fst));
82 } else { 82 } else {
83 boundMethod = ANONYMOUS_FUNCTION((...args) => { 83 boundMethod = ANONYMOUS_FUNCTION((...args) => {
84 // DateTimeFormat.format needs to be 0 arg method, but can still 84 // DateTimeFormat.format needs to be 0 arg method, but can still
85 // receive an optional dateValue param. If one was provided, pass it 85 // receive an optional dateValue param. If one was provided, pass it
86 // along. 86 // along.
87 if (args.length > 0) { 87 if (args.length > 0) {
88 return implementation(this, args[0]); 88 return implementation(this, args[0]);
89 } else { 89 } else {
90 return implementation(this); 90 return implementation(this);
91 } 91 }
(...skipping 2176 matching lines...) Expand 10 before | Expand all | Expand 10 after
2268 } 2268 }
2269 ); 2269 );
2270 2270
2271 %FunctionRemovePrototype(FormatDateToParts); 2271 %FunctionRemovePrototype(FormatDateToParts);
2272 2272
2273 utils.Export(function(to) { 2273 utils.Export(function(to) {
2274 to.FormatDateToParts = FormatDateToParts; 2274 to.FormatDateToParts = FormatDateToParts;
2275 }); 2275 });
2276 2276
2277 }) 2277 })
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698