Files
electron/patches/node/src_adapt_to_v8_exception_api_change.patch
electron-roller[bot] 9d0e6d09f0 chore: bump chromium to 119.0.6043.0 (main) (#40045)
* chore: bump chromium in DEPS to 119.0.6036.0

* chore: bump chromium in DEPS to 119.0.6037.0

* chore: bump chromium in DEPS to 119.0.6039.0

* chore: bump chromium in DEPS to 119.0.6041.0

* chore: update chromium patches

* 4765230: Move //content/browser/renderer_host/event_with_latency_info.h to //content/common/input | https://chromium-review.googlesource.com/c/chromium/src/+/4765230

* 4890325: ScopedRunLoopTimeout: add custom timeout callback handler for testing | https://chromium-review.googlesource.com/c/chromium/src/+/4890325

* chore: update all patches

* chore: bump chromium in DEPS to 119.0.6043.0

* 4898682: [api] Add Error.cause to V8 API

https://chromium-review.googlesource.com/c/v8/v8/+/4898682

* 4837192: Plumb origin through for drags.

https://chromium-review.googlesource.com/c/chromium/src/+/4837192

* Prevent content analysis on web pages that don't accept drag and drop.

https://chromium-review.googlesource.com/c/chromium/src/+/4814086

* Make getting displayed notifications work with notification attribution.

https://chromium-review.googlesource.com/c/chromium/src/+/4738935

* 4898682: [api] Add Error.cause to V8 API

https://chromium-review.googlesource.com/c/v8/v8/+/4898682

* lib,test: do not hardcode Buffer.kMaxLength

https://github.com/nodejs/node/pull/49876

* chore: remove Goma warning from mksnapshot_args

* 4776412: Remove Windows-specific wstring variants of StringPrintf() etc.

https://chromium-review.googlesource.com/c/chromium/src/+/4776412

* [dPWA] Prevent WebAppInstallInfo from being included on Android

https://chromium-review.googlesource.com/c/chromium/src/+/4886594

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: VerteDinde <vertedinde@electronjs.org>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2023-10-02 18:01:07 -04:00

39 lines
1.7 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: John Kleinschmidt <jkleinsc@electronjs.org>
Date: Mon, 2 Oct 2023 10:59:53 -0400
Subject: src: adapt to v8::Exception API change
4898682: [api] Add Error.cause to V8 API | https://chromium-review.googlesource.com/c/v8/v8/+/4898682
Cherry picked fix from https://github.com/nodejs/node-v8/commit/675f411677c28a10a2f03d4b3ef14c2284c33587
diff --git a/src/env-inl.h b/src/env-inl.h
index debd982c75805c51ea7d01229b9d635550060503..103dc6711e71e15da640edc5e017bc638ddc6ad1 100644
--- a/src/env-inl.h
+++ b/src/env-inl.h
@@ -730,10 +730,10 @@ inline void Environment::ThrowRangeError(const char* errmsg) {
}
inline void Environment::ThrowError(
- v8::Local<v8::Value> (*fun)(v8::Local<v8::String>),
+ v8::Local<v8::Value> (*fun)(v8::Local<v8::String>, v8::Local<v8::Value>),
const char* errmsg) {
v8::HandleScope handle_scope(isolate());
- isolate()->ThrowException(fun(OneByteString(isolate(), errmsg)));
+ isolate()->ThrowException(fun(OneByteString(isolate(), errmsg), {}));
}
inline void Environment::ThrowErrnoException(int errorno,
diff --git a/src/env.h b/src/env.h
index 45a9a7811b4abe1effb6acf2c89a772a7c2256c9..36e8e7d960a95a9040ad963c79a7f66c89233c87 100644
--- a/src/env.h
+++ b/src/env.h
@@ -956,7 +956,7 @@ class Environment : public MemoryRetainer {
inline void RemoveHeapSnapshotNearHeapLimitCallback(size_t heap_limit);
private:
- inline void ThrowError(v8::Local<v8::Value> (*fun)(v8::Local<v8::String>),
+ inline void ThrowError(v8::Local<v8::Value> (*fun)(v8::Local<v8::String>, v8::Local<v8::Value>),
const char* errmsg);
std::list<binding::DLib> loaded_addons_;