Chromium Code Reviews| Index: src/api.cc |
| diff --git a/src/api.cc b/src/api.cc |
| index 304d880d3da3017f3f21a8a3b39b3ccc9456c09f..a683add29bff17877b4a2b26adb960e0650e983b 100644 |
| --- a/src/api.cc |
| +++ b/src/api.cc |
| @@ -5438,10 +5438,12 @@ inline Local<String> NewString(Isolate* v8_isolate, |
| ENTER_V8(isolate); |
| if (length == -1) length = StringLength(data); |
| // We do not expect this to fail. Change this if it does. |
|
Jakob Kummerow
2015/02/10 16:00:19
nit: outdated comment
|
| - i::Handle<i::String> result = NewString( |
| - isolate->factory(), |
| - type, |
| - i::Vector<const Char>(data, length)).ToHandleChecked(); |
| + EXCEPTION_PREAMBLE(isolate); |
| + i::Handle<i::String> result; |
| + has_pending_exception = |
| + !NewString(isolate->factory(), type, i::Vector<const Char>(data, length)) |
| + .ToHandle(&result); |
| + EXCEPTION_BAILOUT_CHECK(isolate, Local<String>()); |
| if (type == String::kUndetectableString) { |
| result->MarkAsUndetectable(); |
| } |