Skip to content

Commit

Permalink
Add additional dawn and v8 patches
Browse files Browse the repository at this point in the history
  • Loading branch information
jasnell committed Apr 29, 2024
1 parent a0a8131 commit 5b55a35
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 1 deletion.
5 changes: 4 additions & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ git_repository(
build_file = "//:build/BUILD.dawn",
commit = "c5169ef5b9982e17a8caddd1218aa0ad5e24a4e3",
remote = "https://dawn.googlesource.com/dawn.git",
patches = ["//:patches/dawn/0001-Add-iomanip.patch"],
patch_args = ["-p1"],
repo_mapping = {
"@abseil_cpp": "@com_google_absl",
},
Expand Down Expand Up @@ -461,7 +463,8 @@ http_archive(
"//:patches/v8/0013-increase-visibility-of-virtual-method.patch",
"//:patches/v8/0014-Add-ValueSerializer-SetTreatFunctionsAsHostObjects.patch",
"//:patches/v8/0015-Set-torque-generator-path-to-external-v8.-This-allow.patch",
"//:patches/v8/0016-Modify-where-to-look-for-fp16-dependency.-This-depen.patch"
"//:patches/v8/0016-Modify-where-to-look-for-fp16-dependency.-This-depen.patch",
"//:patches/v8/0017-Fixup-RunMicrotask-to-restore-async-context-on-termi.patch",
],
integrity = "sha256-C6bsXXbKgeCxmG1VNO/LScaPq0HVlmofpVHJ5kswoLg=",
strip_prefix = "v8-12.4.254.11",
Expand Down
17 changes: 17 additions & 0 deletions patches/dawn/0001-Add-iomanip.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
From 37bc132e418017ff70e5c5a4562c457c2064f49b Mon Sep 17 00:00:00 2001
From: James M Snell <[email protected]>
Date: Mon, 29 Apr 2024 13:22:55 -0700
Subject: Add iomanip


diff --git a/src/dawn/native/stream/ByteVectorSink.cpp b/src/dawn/native/stream/ByteVectorSink.cpp
--- a/src/dawn/native/stream/ByteVectorSink.cpp
+++ b/src/dawn/native/stream/ByteVectorSink.cpp
@@ -27,6 +27,7 @@

#include "dawn/native/stream/ByteVectorSink.h"

+#include <iomanip>
#include "dawn/native/stream/Stream.h"

namespace dawn::native::stream {
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: James M Snell <[email protected]>
Date: Thu, 18 Apr 2024 13:31:01 -0700
Subject: Fixup RunMicrotask to restore async context on terminate execution


diff --git a/src/execution/microtask-queue.cc b/src/execution/microtask-queue.cc
index 0dda78af32572981be90e4d86fc789167e97b247..f85be4bcf1641c5d6454c1c90dfd90170027c5a8 100644
--- a/src/execution/microtask-queue.cc
+++ b/src/execution/microtask-queue.cc
@@ -188,6 +188,11 @@ int MicrotaskQueue::RunMicrotasks(Isolate* isolate) {
processed_microtask_count);
}

+#ifdef V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA
+ isolate->isolate_data()->set_continuation_preserved_embedder_data(
+ *continuation_preserved_embedder_data);
+#endif // V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA
+
if (isolate->is_execution_terminating()) {
DCHECK(isolate->has_exception());
DCHECK(maybe_result.is_null());
@@ -201,11 +206,6 @@ int MicrotaskQueue::RunMicrotasks(Isolate* isolate) {
return -1;
}

-#ifdef V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA
- isolate->isolate_data()->set_continuation_preserved_embedder_data(
- *continuation_preserved_embedder_data);
-#endif // V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA
-
DCHECK_EQ(0, size());
OnCompleted(isolate);

0 comments on commit 5b55a35

Please sign in to comment.