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

Unified Diff: src/runtime/runtime-debug.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/runtime/runtime-array.cc ('k') | src/runtime/runtime-object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-debug.cc
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc
index d765f9a432a53d5b51bce03cbc56e61e92327020..9d69294fea88da0512ec20a7945e42796e7a762e 100644
--- a/src/runtime/runtime-debug.cc
+++ b/src/runtime/runtime-debug.cc
@@ -913,8 +913,8 @@ static bool SetLocalVariableValue(Isolate* isolate, JavaScriptFrame* frame,
Handle<JSObject> ext(JSObject::cast(function_context->extension()));
Maybe<bool> maybe = JSReceiver::HasProperty(ext, variable_name);
- DCHECK(maybe.has_value);
- if (maybe.value) {
+ DCHECK(maybe.IsJust());
+ if (maybe.FromJust()) {
// We don't expect this to do anything except replacing
// property value.
Runtime::SetObjectProperty(isolate, ext, variable_name, new_value,
@@ -996,8 +996,8 @@ static bool SetClosureVariableValue(Isolate* isolate, Handle<Context> context,
if (context->has_extension()) {
Handle<JSObject> ext(JSObject::cast(context->extension()));
Maybe<bool> maybe = JSReceiver::HasProperty(ext, variable_name);
- DCHECK(maybe.has_value);
- if (maybe.value) {
+ DCHECK(maybe.IsJust());
+ if (maybe.FromJust()) {
// We don't expect this to do anything except replacing property value.
Runtime::DefineObjectProperty(ext, variable_name, new_value, NONE)
.Assert();
@@ -2113,8 +2113,8 @@ MUST_USE_RESULT static MaybeHandle<JSObject> MaterializeArgumentsObject(
if (!function->shared()->is_function()) return target;
Maybe<bool> maybe = JSReceiver::HasOwnProperty(
target, isolate->factory()->arguments_string());
- if (!maybe.has_value) return MaybeHandle<JSObject>();
- if (maybe.value) return target;
+ if (!maybe.IsJust()) return MaybeHandle<JSObject>();
+ if (maybe.FromJust()) return target;
// FunctionGetArguments can't throw an exception.
Handle<JSObject> arguments =
« no previous file with comments | « src/runtime/runtime-array.cc ('k') | src/runtime/runtime-object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698