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

Side by Side Diff: src/objects/intl-objects.cc

Issue 2872873002: Work around for crbug.com/719609 (Closed)
Patch Set: Created 3 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 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 #ifndef V8_INTL_SUPPORT 5 #ifndef V8_INTL_SUPPORT
6 #error Internationalization is expected to be enabled. 6 #error Internationalization is expected to be enabled.
7 #endif // V8_INTL_SUPPORT 7 #endif // V8_INTL_SUPPORT
8 8
9 #include "src/objects/intl-objects.h" 9 #include "src/objects/intl-objects.h"
10 10
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 tz.getID(time_zone); 171 tz.getID(time_zone);
172 172
173 icu::UnicodeString canonical_time_zone; 173 icu::UnicodeString canonical_time_zone;
174 icu::TimeZone::getCanonicalID(time_zone, canonical_time_zone, status); 174 icu::TimeZone::getCanonicalID(time_zone, canonical_time_zone, status);
175 if (U_SUCCESS(status)) { 175 if (U_SUCCESS(status)) {
176 // In CLDR (http://unicode.org/cldr/trac/ticket/9943), Etc/UTC is made 176 // In CLDR (http://unicode.org/cldr/trac/ticket/9943), Etc/UTC is made
177 // a separate timezone ID from Etc/GMT even though they're still the same 177 // a separate timezone ID from Etc/GMT even though they're still the same
178 // timezone. We'd not have "Etc/GMT" here because we canonicalize it and 178 // timezone. We'd not have "Etc/GMT" here because we canonicalize it and
179 // other GMT-variants to "UTC" in intl.js and "UTC" is turned to "Etc/UTC" 179 // other GMT-variants to "UTC" in intl.js and "UTC" is turned to "Etc/UTC"
180 // by ICU before getting here. 180 // by ICU before getting here.
181 DCHECK(canonical_time_zone != UNICODE_STRING_SIMPLE("Etc/GMT")); 181 // TODO(jshin): Figure out the cause of crbug.com/719609 and re-enable
182 if (canonical_time_zone == UNICODE_STRING_SIMPLE("Etc/UTC")) { 182 // DCHECK(canonical_time_zone != UNICODE_STRING_SIMPLE("Etc/GMT")) .
183 if (canonical_time_zone == UNICODE_STRING_SIMPLE("Etc/UTC") ||
184 canonical_time_zone == UNICODE_STRING_SIMPLE("Etc/GMT")) {
183 JSObject::SetProperty(resolved, 185 JSObject::SetProperty(resolved,
184 factory->NewStringFromStaticChars("timeZone"), 186 factory->NewStringFromStaticChars("timeZone"),
185 factory->NewStringFromStaticChars("UTC"), SLOPPY) 187 factory->NewStringFromStaticChars("UTC"), SLOPPY)
186 .Assert(); 188 .Assert();
187 } else { 189 } else {
188 JSObject::SetProperty(resolved, 190 JSObject::SetProperty(resolved,
189 factory->NewStringFromStaticChars("timeZone"), 191 factory->NewStringFromStaticChars("timeZone"),
190 factory 192 factory
191 ->NewStringFromTwoByte(Vector<const uint16_t>( 193 ->NewStringFromTwoByte(Vector<const uint16_t>(
192 reinterpret_cast<const uint16_t*>( 194 reinterpret_cast<const uint16_t*>(
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 897
896 void V8BreakIterator::DeleteBreakIterator( 898 void V8BreakIterator::DeleteBreakIterator(
897 const v8::WeakCallbackInfo<void>& data) { 899 const v8::WeakCallbackInfo<void>& data) {
898 delete reinterpret_cast<icu::BreakIterator*>(data.GetInternalField(0)); 900 delete reinterpret_cast<icu::BreakIterator*>(data.GetInternalField(0));
899 delete reinterpret_cast<icu::UnicodeString*>(data.GetInternalField(1)); 901 delete reinterpret_cast<icu::UnicodeString*>(data.GetInternalField(1));
900 GlobalHandles::Destroy(reinterpret_cast<Object**>(data.GetParameter())); 902 GlobalHandles::Destroy(reinterpret_cast<Object**>(data.GetParameter()));
901 } 903 }
902 904
903 } // namespace internal 905 } // namespace internal
904 } // namespace v8 906 } // namespace v8
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