| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1737352 commit 89c1bbd
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -36,7 +36,7 @@ | |||
| 36 | 36 | ||
| 37 | 37 | # Reset this number to 0 on major V8 upgrades. | |
| 38 | 38 | # Increment by one for each non-official patch applied to deps/v8. | |
| 39 | - 'v8_embedder_string': '-node.81', | ||
| 39 | + 'v8_embedder_string': '-node.82', | ||
| 40 | 40 | ||
| 41 | 41 | ##### V8 defaults for Node.js ##### | |
| 42 | 42 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -545,7 +545,15 @@ void NativeContext::RunPromiseHook(PromiseHookType type, | |||
| 545 | 545 | ||
| 546 | 546 | Handle<Object> receiver = isolate->global_proxy(); | |
| 547 | 547 | ||
| 548 | - if (Execution::Call(isolate, hook, receiver, argc, argv).is_null()) { | ||
| 548 | + StackLimitCheck check(isolate); | ||
| 549 | + bool failed = false; | ||
| 550 | + if (check.HasOverflowed()) { | ||
| 551 | + isolate->StackOverflow(); | ||
| 552 | + failed = true; | ||
| 553 | + } else { | ||
| 554 | + failed = Execution::Call(isolate, hook, receiver, argc, argv).is_null(); | ||
| 555 | + } | ||
| 556 | + if (failed) { | ||
| 549 | 557 | DCHECK(isolate->has_pending_exception()); | |
| 550 | 558 | Handle<Object> exception(isolate->pending_exception(), isolate); | |
| 551 | 559 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -273,3 +273,11 @@ exceptions(); | |||
| 273 | 273 | ||
| 274 | 274 | d8.promise.setHooks(); | |
| 275 | 275 | })(); | |
| 276 | + | ||
| 277 | + (function overflow(){ | ||
| 278 | + d8.promise.setHooks(() => { new Promise(()=>{}) }); | ||
| 279 | + // Trigger overflow from JS code: | ||
| 280 | + Promise.all([Promise.resolve(1)]); | ||
| 281 | + %PerformMicrotaskCheckpoint(); | ||
| 282 | + d8.promise.setHooks(); | ||
| 283 | + }); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments