Index: src/runtime/runtime-uri.cc |
diff --git a/src/runtime/runtime-uri.cc b/src/runtime/runtime-uri.cc |
index e64e9dcea7cb26d83affa4b61305f4351c2b6ed1..2729225fc39838cb1266f1b4c20ffd36aeb7d256 100644 |
--- a/src/runtime/runtime-uri.cc |
+++ b/src/runtime/runtime-uri.cc |
@@ -264,12 +264,10 @@ RUNTIME_FUNCTION(Runtime_URIEscape) { |
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, source, |
Object::ToString(isolate, input)); |
source = String::Flatten(source); |
- Handle<String> result; |
- ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
- isolate, result, source->IsOneByteRepresentationUnderneath() |
- ? URIEscape::Escape<uint8_t>(isolate, source) |
- : URIEscape::Escape<uc16>(isolate, source)); |
- return *result; |
+ RETURN_RESULT_OR_FAILURE(isolate, |
+ source->IsOneByteRepresentationUnderneath() |
+ ? URIEscape::Escape<uint8_t>(isolate, source) |
+ : URIEscape::Escape<uc16>(isolate, source)); |
} |
@@ -281,12 +279,10 @@ RUNTIME_FUNCTION(Runtime_URIUnescape) { |
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, source, |
Object::ToString(isolate, input)); |
source = String::Flatten(source); |
- Handle<String> result; |
- ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
- isolate, result, source->IsOneByteRepresentationUnderneath() |
- ? URIUnescape::Unescape<uint8_t>(isolate, source) |
- : URIUnescape::Unescape<uc16>(isolate, source)); |
- return *result; |
+ RETURN_RESULT_OR_FAILURE(isolate, |
+ source->IsOneByteRepresentationUnderneath() |
+ ? URIUnescape::Unescape<uint8_t>(isolate, source) |
+ : URIUnescape::Unescape<uc16>(isolate, source)); |
} |
} // namespace internal |