Skip to content

Commit 81ed4f3

Browse files
Merge pull request #1051 from lightpanda-io/explicit_microtask
Set Isolate Microtask to Explicit
2 parents 16656f6 + c9ac1ea commit 81ed4f3

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

src/browser/polyfill/fetch.zig

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,4 @@ test "Browser.fetch" {
2828
// all events have been resolved.
2929
.{ "ok", "true" },
3030
}, .{});
31-
32-
try runner.testCases(&.{
33-
.{
34-
\\ var ok2 = false;
35-
\\ const request2 = new Request("http://127.0.0.1:9582/loader");
36-
\\ (async function () { resp = await fetch(request2); ok2 = resp.ok; }());
37-
\\ false;
38-
,
39-
"false",
40-
},
41-
// all events have been resolved.
42-
.{ "ok2", "true" },
43-
}, .{});
4431
}

src/runtime/js.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ pub fn Env(comptime State: type, comptime WebApis: type) type {
198198
// This is the callback that runs whenever a module is dynamically imported.
199199
isolate.setHostImportModuleDynamicallyCallback(JsContext.dynamicModuleCallback);
200200
isolate.setPromiseRejectCallback(promiseRejectCallback);
201+
isolate.setMicrotasksPolicy(v8.c.kExplicit);
201202

202203
isolate.enter();
203204
errdefer isolate.exit();

0 commit comments

Comments
 (0)