![electron-roller[bot]](/assets/img/avatar_default.png)
* chore: bump chromium in DEPS to 134.0.6998.1 * chore: bump chromium in DEPS to 134.0.6998.5 * chore: bump chromium in DEPS to 134.0.6998.3 * chore: bump chromium to 134.0.6988.0 (main) (#45334) * chore: bump chromium in DEPS to 134.0.6976.0 * chore: update mas_avoid_private_macos_api_usage.patch.patch6171046
process_info_mac.cc -> process_info_mac.mm * chore: update build_do_not_depend_on_packed_resource_integrity.patch6196857
* chore: update feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch6182296
6183404
6187853
A lot changed in the upstream implementation. There's a good chance I got this wrong as threading has changed and moved some variables into globals. * chore: remove build_remove_vr_directx_helpers_dependency.patch6186102
This landed upstream * chore: e patches all * chore: update net::CookieInclusionStatus::ExclusionReason enum6183252
6185544
* chore: update content::WebAuthenticationDelegate import6189769
* Revert "chore: disable focus handling test due to win32/ia32 regression" This reverts commit 1a57ba5d59848d0c841ddda59c9299a4f957452a. * chore: bump chromium in DEPS to 134.0.6978.0 * chore: bump chromium in DEPS to 134.0.6980.0 * chore: bump chromium in DEPS to 134.0.6982.0 * chore: bump chromium in DEPS to 134.0.6984.0 * 6196281: Allow direct embedder IsPdfInternalPluginAllowedOrigin() interaction6196281
* 6196283: Delete PdfInternalPluginDelegate6196283
* chore: update patches * chore: bump chromium in DEPS to 134.0.6986.0 * chore: update patches * 6205762: Support option to use window.showSaveFilePicker() in PDF attachment code6205762
See also: * https://issues.chromium.org/issues/373852607 * 5939153: [PDF] Add PdfUseShowSaveFilePicker feature flag |5939153
* 6205761: Delete spurious Ink-specific code in pdf_viewer.ts |6205761
* 6209609: Remove WebVector: Automatic changes6209609
* 6205488: UI: make QT5 optional6205488
* 6178281: Rename pak files from branding strings6178281
* fixup! 6209609: Remove WebVector: Automatic changes6209609
* 6193249: Switch from safe_browsing::EventResult to enterprise_connectors:EventResult6193249
* 6197457: Remove Pause/ResumeReadingBodyFromNet IPCs6197457
* 6191230: Record total time spent on a picture in picture window6191230
* chore: bump chromium in DEPS to 134.0.6988.0 * chore: update patches * 6215440: Remove base/ranges/.6215440
* Disable unsafe buffers error Not sure what changed, but we're now seeing unsafe buffer errors in Chromium code, at least when using reclient. Will update this comment if we find out the cause. * 6187853: SelectFileDialogLinuxPortal: Use dbus_xdg::Request and DbusType6187853
* fix `setDisplayMediaRequestHandler` test Given how this test is written, I would expect this assertion to be false. It seems the oppositue was true before, but that was also acknowledged to be suprising. Seems that the underlying implementation is now fixed and works as expected. * fixup! 6187853: SelectFileDialogLinuxPortal: Use dbus_xdg::Request and DbusType6187853
* chore: udpate patches * Multiple PRS:6185544
|6183252
* fix: cast enum class to numeric type * fix: add 1 to MAX_EXCLUSION_REASON because enum values are zero-based, and we want the total count of reasons. * Reapply "chore: disable focus handling test due to win32/ia32 regression" This reverts commit 760b1a519b5919b483c66bc3096eeefb4d7011f4. * refactor: use ExclusionReasonBitset::kValueCount for size --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Samuel Maddock <smaddock@slack-corp.com> Co-authored-by: clavin <clavin@electronjs.org> Co-authored-by: alice <alice@makenotion.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> (cherry picked from commit213165a467
) --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
76 lines
3.8 KiB
Diff
76 lines
3.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Samuel Attard <marshallofsound@electronjs.org>
|
|
Date: Wed, 8 Mar 2023 13:04:21 -0800
|
|
Subject: refactor: expose HostImportModuleDynamically and
|
|
HostGetImportMetaProperties to embedders
|
|
|
|
This is so that Electron can blend Blink's and Node's implementations of these isolate handlers.
|
|
|
|
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
|
index d57eea97fcdff4c4008ea0d03259349ac27a49b8..351ea787052200013b7b14a460dc900ffae010c1 100644
|
|
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
|
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
|
@@ -634,7 +634,9 @@ bool WasmJSPromiseIntegrationEnabledCallback(v8::Local<v8::Context> context) {
|
|
execution_context);
|
|
}
|
|
|
|
-v8::MaybeLocal<v8::Promise> HostImportModuleDynamically(
|
|
+}
|
|
+
|
|
+v8::MaybeLocal<v8::Promise> V8Initializer::HostImportModuleDynamically(
|
|
v8::Local<v8::Context> context,
|
|
v8::Local<v8::Data> v8_host_defined_options,
|
|
v8::Local<v8::Value> v8_referrer_resource_url,
|
|
@@ -712,7 +714,7 @@ v8::MaybeLocal<v8::Promise> HostImportModuleDynamically(
|
|
}
|
|
|
|
// https://html.spec.whatwg.org/C/#hostgetimportmetaproperties
|
|
-void HostGetImportMetaProperties(v8::Local<v8::Context> context,
|
|
+void V8Initializer::HostGetImportMetaProperties(v8::Local<v8::Context> context,
|
|
v8::Local<v8::Module> module,
|
|
v8::Local<v8::Object> meta) {
|
|
v8::Isolate* isolate = context->GetIsolate();
|
|
@@ -759,9 +761,6 @@ std::ostream& operator<<(std::ostream& os, const PrintV8OOM& oom_details) {
|
|
return os;
|
|
}
|
|
|
|
-} // namespace
|
|
-
|
|
-// static
|
|
void V8Initializer::InitializeV8Common(v8::Isolate* isolate) {
|
|
// Set up garbage collection before setting up anything else as V8 may trigger
|
|
// GCs during Blink setup.
|
|
@@ -781,9 +780,9 @@ void V8Initializer::InitializeV8Common(v8::Isolate* isolate) {
|
|
isolate->SetWasmJSPIEnabledCallback(WasmJSPromiseIntegrationEnabledCallback);
|
|
isolate->SetSharedArrayBufferConstructorEnabledCallback(
|
|
SharedArrayBufferConstructorEnabledCallback);
|
|
- isolate->SetHostImportModuleDynamicallyCallback(HostImportModuleDynamically);
|
|
+ isolate->SetHostImportModuleDynamicallyCallback(V8Initializer::HostImportModuleDynamically);
|
|
isolate->SetHostInitializeImportMetaObjectCallback(
|
|
- HostGetImportMetaProperties);
|
|
+ V8Initializer::HostGetImportMetaProperties);
|
|
isolate->SetIsJSApiWrapperNativeErrorCallback(IsDOMExceptionWrapper);
|
|
isolate->SetMetricsRecorder(std::make_shared<V8MetricsRecorder>(isolate));
|
|
|
|
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.h b/third_party/blink/renderer/bindings/core/v8/v8_initializer.h
|
|
index be5df8f98c3f7e308d79d43c1811a16c644b6158..5c25a3bb7f04ea74ee8587b158e125f4aa651912 100644
|
|
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.h
|
|
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.h
|
|
@@ -85,6 +85,17 @@ class CORE_EXPORT V8Initializer {
|
|
static void PromiseRejectHandlerInMainThread(v8::PromiseRejectMessage data);
|
|
static void ExceptionPropagationCallback(v8::ExceptionPropagationMessage);
|
|
|
|
+ static v8::MaybeLocal<v8::Promise> HostImportModuleDynamically(
|
|
+ v8::Local<v8::Context> context,
|
|
+ v8::Local<v8::Data> v8_host_defined_options,
|
|
+ v8::Local<v8::Value> v8_referrer_resource_url,
|
|
+ v8::Local<v8::String> v8_specifier,
|
|
+ v8::Local<v8::FixedArray> v8_import_assertions);
|
|
+
|
|
+ static void HostGetImportMetaProperties(v8::Local<v8::Context> context,
|
|
+ v8::Local<v8::Module> module,
|
|
+ v8::Local<v8::Object> meta);
|
|
+
|
|
static void WasmAsyncResolvePromiseCallback(
|
|
v8::Isolate* isolate,
|
|
v8::Local<v8::Context> context,
|