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

Unified Diff: src/runtime/runtime-regexp.cc

Issue 2442333002: [regexp] Mark functions MUST_USE_RESULT (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/regexp/regexp-utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-regexp.cc
diff --git a/src/runtime/runtime-regexp.cc b/src/runtime/runtime-regexp.cc
index 7a89448e11db71ec4ffb57a61b79aeeee48ca419..310139348311366d8a0f43b955a34c22e84118d7 100644
--- a/src/runtime/runtime-regexp.cc
+++ b/src/runtime/runtime-regexp.cc
@@ -1124,7 +1124,7 @@ static Object* SearchRegExpMultiple(Isolate* isolate, Handle<String> subject,
}
}
-MaybeHandle<String> StringReplaceNonGlobalRegExpWithFunction(
+MUST_USE_RESULT MaybeHandle<String> StringReplaceNonGlobalRegExpWithFunction(
Isolate* isolate, Handle<String> subject, Handle<JSRegExp> regexp,
Handle<Object> replace_obj) {
Factory* factory = isolate->factory();
@@ -1193,9 +1193,10 @@ MaybeHandle<String> StringReplaceNonGlobalRegExpWithFunction(
// Legacy implementation of RegExp.prototype[Symbol.replace] which
// doesn't properly call the underlying exec method.
-MaybeHandle<String> RegExpReplace(Isolate* isolate, Handle<JSRegExp> regexp,
- Handle<String> string,
- Handle<Object> replace_obj) {
+MUST_USE_RESULT MaybeHandle<String> RegExpReplace(Isolate* isolate,
+ Handle<JSRegExp> regexp,
+ Handle<String> string,
+ Handle<Object> replace_obj) {
Factory* factory = isolate->factory();
// TODO(jgruber): We need the even stricter guarantee of an unmodified
« no previous file with comments | « src/regexp/regexp-utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698