| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3e7238e commit ec0f0ef
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.78', | ||
| 39 | + 'v8_embedder_string': '-node.79', | ||
| 40 | 40 | ||
| 41 | 41 | ##### V8 defaults for Node.js ##### | |
| 42 | 42 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -103,7 +103,7 @@ macro NewPromiseRejectReactionJobTask(implicit context: Context)( | |||
| 103 | 103 | transitioning macro RunContextPromiseHookInit(implicit context: Context)( | |
| 104 | 104 | promise: JSPromise, parent: Object) { | |
| 105 | 105 | const nativeContext: NativeContext = LoadNativeContext(context); | |
| 106 | - const hook = Cast<JSFunction>( | ||
| 106 | + const hook = Cast<Callable>( | ||
| 107 | 107 | nativeContext[NativeContextSlot::PROMISE_HOOK_INIT_FUNCTION_INDEX]) | |
| 108 | 108 | otherwise return; | |
| 109 | 109 | const parentObject = Is<JSPromise>(parent) ? Cast<JSPromise>(parent) | |
@@ -168,7 +168,7 @@ transitioning macro RunContextPromiseHook(implicit context: Context)( | |||
| 168 | 168 | promiseOrCapability: JSPromise|PromiseCapability|Undefined, flags: uint32) { | |
| 169 | 169 | if (!IsContextPromiseHookEnabled(flags)) return; | |
| 170 | 170 | const nativeContext: NativeContext = LoadNativeContext(context); | |
| 171 | - const hook = Cast<JSFunction>(nativeContext[slot]) otherwise return; | ||
| 171 | + const hook = Cast<Callable>(nativeContext[slot]) otherwise return; | ||
| 172 | 172 | ||
| 173 | 173 | let promise: JSPromise; | |
| 174 | 174 | typeswitch (promiseOrCapability) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -252,3 +252,13 @@ exceptions(); | |||
| 252 | 252 | } | |
| 253 | 253 | __f_16(async () => { await Promise.resolve()}); | |
| 254 | 254 | })(); | |
| 255 | + | ||
| 256 | + (function boundFunction() { | ||
| 257 | + function hook() {}; | ||
| 258 | + const bound = hook.bind(this); | ||
| 259 | + d8.promise.setHooks(bound, bound, bound, bound); | ||
| 260 | + Promise.resolve(); | ||
| 261 | + Promise.reject(); | ||
| 262 | + %PerformMicrotaskCheckpoint(); | ||
| 263 | + d8.promise.setHooks(); | ||
| 264 | + })(); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments