Commit 6f7cbc23 authored by jgruber's avatar jgruber Committed by Commit bot

Remove RETURN_RESULT macro

'RETURN_RESULT(isolate, call, type)' is equivalent to 'return call' in
all current use cases.

BUG=

Review-Url: https://codereview.chromium.org/2415993003
Cr-Commit-Position: refs/heads/master@{#40302}
parent b61baa9e
......@@ -60,9 +60,7 @@ MaybeHandle<JSRegExp> RegExpInitialize(Isolate* isolate,
}
// TODO(jgruber): We could avoid the flags back and forth conversions.
RETURN_RESULT(isolate,
JSRegExp::Initialize(regexp, pattern_string, flags_string),
JSRegExp);
return JSRegExp::Initialize(regexp, pattern_string, flags_string);
}
} // namespace
......
......@@ -118,16 +118,6 @@ class Interpreter;
#define RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, T) \
RETURN_VALUE_IF_SCHEDULED_EXCEPTION(isolate, MaybeHandle<T>())
#define RETURN_RESULT(isolate, call, T) \
do { \
Handle<T> __result__; \
if (!(call).ToHandle(&__result__)) { \
DCHECK((isolate)->has_pending_exception()); \
return MaybeHandle<T>(); \
} \
return __result__; \
} while (false)
#define RETURN_RESULT_OR_FAILURE(isolate, call) \
do { \
Handle<Object> __result__; \
......
......@@ -598,14 +598,14 @@ MaybeHandle<String> JSStackFrame::ToString() {
builder.AppendString(Handle<String>::cast(function_name));
} else {
AppendFileLocation(isolate_, this, &builder);
RETURN_RESULT(isolate_, builder.Finish(), String);
return builder.Finish();
}
builder.AppendCString(" (");
AppendFileLocation(isolate_, this, &builder);
builder.AppendCString(")");
RETURN_RESULT(isolate_, builder.Finish(), String);
return builder.Finish();
}
int JSStackFrame::GetPosition() const { return code_->SourcePosition(offset_); }
......@@ -734,7 +734,7 @@ MaybeHandle<String> AsmJsWasmStackFrame::ToString() {
if (IsNonEmptyString(function_name)) builder.AppendCString(")");
RETURN_RESULT(isolate_, builder.Finish(), String);
return builder.Finish();
}
FrameArrayIterator::FrameArrayIterator(Isolate* isolate,
......@@ -943,7 +943,7 @@ MaybeHandle<Object> ErrorUtils::FormatStackTrace(Isolate* isolate,
}
}
RETURN_RESULT(isolate, builder.Finish(), Object);
return builder.Finish();
}
Handle<String> MessageTemplate::FormatMessage(Isolate* isolate,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment