| Index: src/uri.h
|
| diff --git a/src/uri.h b/src/uri.h
|
| index ee1baeb5129fbd9a30aa8ea924ebee4da7fd61cc..81ec0c58cff93c4d896b97f5b83e64e78a5e96e8 100644
|
| --- a/src/uri.h
|
| +++ b/src/uri.h
|
| @@ -264,7 +264,8 @@ Handle<String> URIEscape::Escape(Isolate* isolate, Handle<String> string) {
|
| // We don't allow strings that are longer than a maximal length.
|
| ASSERT(String::kMaxLength < 0x7fffffff - 6); // Cannot overflow.
|
| if (escaped_length > String::kMaxLength) {
|
| - isolate->context()->mark_out_of_memory();
|
| + AllowHeapAllocation allocate_error_and_return;
|
| + isolate->ThrowInvalidStringLength();
|
| return Handle<String>::null();
|
| }
|
| }
|
|
|