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

Unified Diff: src/i18n.cc

Issue 958053003: Removed funky Maybe constructor and made fields private. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « src/hydrogen-representation-changes.cc ('k') | src/ic/ic-state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/i18n.cc
diff --git a/src/i18n.cc b/src/i18n.cc
index 69fa9ca89583c45dcfd2e1a709894dc9baf3224a..9dfdd63f5bc266ca57cf7227dc590025cd440bfb 100644
--- a/src/i18n.cc
+++ b/src/i18n.cc
@@ -395,8 +395,8 @@ void SetResolvedNumberSettings(Isolate* isolate,
Handle<String> key =
factory->NewStringFromStaticChars("minimumSignificantDigits");
Maybe<bool> maybe = JSReceiver::HasOwnProperty(resolved, key);
- CHECK(maybe.has_value);
- if (maybe.value) {
+ CHECK(maybe.IsJust());
+ if (maybe.FromJust()) {
JSObject::SetProperty(
resolved, factory->NewStringFromStaticChars("minimumSignificantDigits"),
factory->NewNumberFromInt(number_format->getMinimumSignificantDigits()),
@@ -405,8 +405,8 @@ void SetResolvedNumberSettings(Isolate* isolate,
key = factory->NewStringFromStaticChars("maximumSignificantDigits");
maybe = JSReceiver::HasOwnProperty(resolved, key);
- CHECK(maybe.has_value);
- if (maybe.value) {
+ CHECK(maybe.IsJust());
+ if (maybe.FromJust()) {
JSObject::SetProperty(
resolved, factory->NewStringFromStaticChars("maximumSignificantDigits"),
factory->NewNumberFromInt(number_format->getMaximumSignificantDigits()),
@@ -725,8 +725,8 @@ icu::SimpleDateFormat* DateFormat::UnpackDateFormat(
Handle<String> key =
isolate->factory()->NewStringFromStaticChars("dateFormat");
Maybe<bool> maybe = JSReceiver::HasOwnProperty(obj, key);
- CHECK(maybe.has_value);
- if (maybe.value) {
+ CHECK(maybe.IsJust());
+ if (maybe.FromJust()) {
return reinterpret_cast<icu::SimpleDateFormat*>(
obj->GetInternalField(0));
}
@@ -805,8 +805,8 @@ icu::DecimalFormat* NumberFormat::UnpackNumberFormat(
Handle<String> key =
isolate->factory()->NewStringFromStaticChars("numberFormat");
Maybe<bool> maybe = JSReceiver::HasOwnProperty(obj, key);
- CHECK(maybe.has_value);
- if (maybe.value) {
+ CHECK(maybe.IsJust());
+ if (maybe.FromJust()) {
return reinterpret_cast<icu::DecimalFormat*>(obj->GetInternalField(0));
}
@@ -866,8 +866,8 @@ icu::Collator* Collator::UnpackCollator(Isolate* isolate,
Handle<JSObject> obj) {
Handle<String> key = isolate->factory()->NewStringFromStaticChars("collator");
Maybe<bool> maybe = JSReceiver::HasOwnProperty(obj, key);
- CHECK(maybe.has_value);
- if (maybe.value) {
+ CHECK(maybe.IsJust());
+ if (maybe.FromJust()) {
return reinterpret_cast<icu::Collator*>(obj->GetInternalField(0));
}
@@ -931,8 +931,8 @@ icu::BreakIterator* BreakIterator::UnpackBreakIterator(Isolate* isolate,
Handle<String> key =
isolate->factory()->NewStringFromStaticChars("breakIterator");
Maybe<bool> maybe = JSReceiver::HasOwnProperty(obj, key);
- CHECK(maybe.has_value);
- if (maybe.value) {
+ CHECK(maybe.IsJust());
+ if (maybe.FromJust()) {
return reinterpret_cast<icu::BreakIterator*>(obj->GetInternalField(0));
}
« no previous file with comments | « src/hydrogen-representation-changes.cc ('k') | src/ic/ic-state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698