| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b6a31f0 commit 7efb311
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -496,18 +496,19 @@ void StringSlice(const FunctionCallbackInfo<Value>& args) { | |||
| 496 | 496 | size_t length = end - start; | |
| 497 | 497 | ||
| 498 | 498 | Local<Value> error; | |
| 499 | - MaybeLocal<Value> ret = | ||
| 499 | + MaybeLocal<Value> maybe_ret = | ||
| 500 | 500 | StringBytes::Encode(isolate, | |
| 501 | 501 | buffer.data() + start, | |
| 502 | 502 | length, | |
| 503 | 503 | encoding, | |
| 504 | 504 | &error); | |
| 505 | - if (ret.IsEmpty()) { | ||
| 505 | + Local<Value> ret; | ||
| 506 | + if (!maybe_ret.ToLocal(&ret)) { | ||
| 506 | 507 | CHECK(!error.IsEmpty()); | |
| 507 | 508 | isolate->ThrowException(error); | |
| 508 | 509 | return; | |
| 509 | 510 | } | |
| 510 | - args.GetReturnValue().Set(ret.ToLocalChecked()); | ||
| 511 | + args.GetReturnValue().Set(ret); | ||
| 511 | 512 | } | |
| 512 | 513 | ||
| 513 | 514 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments