Commit 1a5ee30
Add JS_PromiseMarkAsHandled
Expose the existing internal js_promise_set_handled as a public API.
Embedders that consume a rejected promise through the C API (rather
than through a then() handler) currently have no way to tell the
engine the rejection was handled, so the host promise rejection
tracker reports it as unhandled. V8 exposes the same operation as
v8::Promise::MarkAsHandled.
Marking a rejected promise notifies the tracker once with is_handled
true; marking a pending promise suppresses the report if it rejects
later.1 parent 8ef0e71 commit 1a5ee30
3 files changed
Lines changed: 50 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
433 | 476 | | |
434 | 477 | | |
435 | 478 | | |
| |||
1250 | 1293 | | |
1251 | 1294 | | |
1252 | 1295 | | |
| 1296 | + | |
1253 | 1297 | | |
1254 | 1298 | | |
1255 | 1299 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55081 | 55081 | | |
55082 | 55082 | | |
55083 | 55083 | | |
| 55084 | + | |
| 55085 | + | |
| 55086 | + | |
| 55087 | + | |
| 55088 | + | |
55084 | 55089 | | |
55085 | 55090 | | |
55086 | 55091 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1132 | 1132 | | |
1133 | 1133 | | |
1134 | 1134 | | |
| 1135 | + | |
1135 | 1136 | | |
1136 | 1137 | | |
1137 | 1138 | | |
| |||
0 commit comments