| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 827ae05 commit 1a104ba
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.12', | ||
| 39 | + 'v8_embedder_string': '-node.13', | ||
| 40 | 40 | ||
| 41 | 41 | ##### V8 defaults for Node.js ##### | |
| 42 | 42 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -134,39 +134,39 @@ transitioning macro RunContextPromiseHookResolve(implicit context: Context)( | |||
| 134 | 134 | ||
| 135 | 135 | @export | |
| 136 | 136 | transitioning macro RunContextPromiseHookBefore(implicit context: Context)( | |
| 137 | - promiseOrCapability: JSPromise|PromiseCapability) { | ||
| 137 | + promiseOrCapability: JSPromise|PromiseCapability|Undefined) { | ||
| 138 | 138 | RunContextPromiseHook( | |
| 139 | 139 | ContextSlot::PROMISE_HOOK_BEFORE_FUNCTION_INDEX, promiseOrCapability, | |
| 140 | 140 | PromiseHookFlags()); | |
| 141 | 141 | } | |
| 142 | 142 | ||
| 143 | 143 | @export | |
| 144 | 144 | transitioning macro RunContextPromiseHookBefore(implicit context: Context)( | |
| 145 | - promiseOrCapability: JSPromise|PromiseCapability, flags: uint32) { | ||
| 145 | + promiseOrCapability: JSPromise|PromiseCapability|Undefined, flags: uint32) { | ||
| 146 | 146 | RunContextPromiseHook( | |
| 147 | 147 | ContextSlot::PROMISE_HOOK_BEFORE_FUNCTION_INDEX, promiseOrCapability, | |
| 148 | 148 | flags); | |
| 149 | 149 | } | |
| 150 | 150 | ||
| 151 | 151 | @export | |
| 152 | 152 | transitioning macro RunContextPromiseHookAfter(implicit context: Context)( | |
| 153 | - promiseOrCapability: JSPromise|PromiseCapability) { | ||
| 153 | + promiseOrCapability: JSPromise|PromiseCapability|Undefined) { | ||
| 154 | 154 | RunContextPromiseHook( | |
| 155 | 155 | ContextSlot::PROMISE_HOOK_AFTER_FUNCTION_INDEX, promiseOrCapability, | |
| 156 | 156 | PromiseHookFlags()); | |
| 157 | 157 | } | |
| 158 | 158 | ||
| 159 | 159 | @export | |
| 160 | 160 | transitioning macro RunContextPromiseHookAfter(implicit context: Context)( | |
| 161 | - promiseOrCapability: JSPromise|PromiseCapability, flags: uint32) { | ||
| 161 | + promiseOrCapability: JSPromise|PromiseCapability|Undefined, flags: uint32) { | ||
| 162 | 162 | RunContextPromiseHook( | |
| 163 | 163 | ContextSlot::PROMISE_HOOK_AFTER_FUNCTION_INDEX, promiseOrCapability, | |
| 164 | 164 | flags); | |
| 165 | 165 | } | |
| 166 | 166 | ||
| 167 | 167 | transitioning macro RunContextPromiseHook(implicit context: Context)( | |
| 168 | 168 | slot: Slot<NativeContext, Undefined|JSFunction>, | |
| 169 | - promiseOrCapability: JSPromise|PromiseCapability, flags: uint32) { | ||
| 169 | + promiseOrCapability: JSPromise|PromiseCapability|Undefined, flags: uint32) { | ||
| 170 | 170 | if (!IsContextPromiseHookEnabled(flags)) return; | |
| 171 | 171 | const maybeHook = *NativeContextSlot(slot); | |
| 172 | 172 | if (IsUndefined(maybeHook)) return; | |
@@ -181,6 +181,9 @@ transitioning macro RunContextPromiseHook(implicit context: Context)( | |||
| 181 | 181 | case (capability: PromiseCapability): { | |
| 182 | 182 | promise = Cast<JSPromise>(capability.promise) otherwise return; | |
| 183 | 183 | } | |
| 184 | + case (Undefined): { | ||
| 185 | + return; | ||
| 186 | + } | ||
| 184 | 187 | } | |
| 185 | 188 | ||
| 186 | 189 | try { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,7 @@ | |||
| 1 | 1 | // Copyright 2020 the V8 project authors. All rights reserved. | |
| 2 | 2 | // Use of this source code is governed by a BSD-style license that can be | |
| 3 | 3 | // found in the LICENSE file. | |
| 4 | - // | ||
| 4 | + | ||
| 5 | 5 | // Flags: --allow-natives-syntax --opt --no-always-opt --no-stress-opt --deopt-every-n-times=0 --ignore-unhandled-promises | |
| 6 | 6 | ||
| 7 | 7 | let log = []; | |
@@ -242,3 +242,13 @@ optimizerBailout(async () => { | |||
| 242 | 242 | }); | |
| 243 | 243 | basicTest(); | |
| 244 | 244 | exceptions(); | |
| 245 | + | ||
| 246 | + (function regress1126309() { | ||
| 247 | + function __f_16(test) { | ||
| 248 | + test(); | ||
| 249 | + d8.promise.setHooks( undefined, () => {}); | ||
| 250 | + %PerformMicrotaskCheckpoint(); | ||
| 251 | + d8.promise.setHooks(); | ||
| 252 | + } | ||
| 253 | + __f_16(async () => { await Promise.resolve()}); | ||
| 254 | + })(); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments