ea6f873f97
* chore: bump chromium in DEPS to 109.0.5364.0 * chore: update patches * chore: bump chromium in DEPS to 109.0.5366.0 * chore: update patches * i3940364: Change PermissionType::WINDOW_PLACEMENT to WINDOW_MANAGEMENT https://chromium-review.googlesource.com/c/chromium/src/+/3940364 * 3866812: Change content::PluginList to only run on the UI thread. https://chromium-review.googlesource.com/c/chromium/src/+/3866812 * chore: bump chromium in DEPS to 109.0.5368.0 * [cleanup] Replace enable_basic_printing with enable_printing https://chromium-review.googlesource.com/c/chromium/src/+/3957357 * chore: update patches * 3956318: Desktop PWAs: Retire kWebAppWindowControlsOverlay flag https://chromium-review.googlesource.com/c/chromium/src/+/3956318 * fixup! Change content::PluginList to only run on the UI thread. (cherry picked from commit 7b5ec87d4ff5d34e7493b4fb46c40c0afeef2005) Co-Authored-By: Robo <hop2deep@gmail.com> * chore: bump chromium in DEPS to 109.0.5370.0 * 3956299: Quota: Cleanup QuotaPermissionContext https://chromium-review.googlesource.com/c/chromium/src/+/3956299 * chore: update patches * 3803867: Add Mojo interface to parse XML for OOP printer capabilities https://chromium-review.googlesource.com/c/chromium/src/+/3803867 * fixup: Add Mojo interface to parse XML for OOP printer capabilities * chore: bump chromium in DEPS to 109.0.5372.0 * chore: update patches * chore: bump chromium in DEPS to 109.0.5374.0 * chore: bump chromium in DEPS to 109.0.5376.0 * chore: bump chromium in DEPS to 109.0.5378.0 * chore: update patches * Quota: Cleanup kPersistent in BrowsingDataRemover https://chromium-review.googlesource.com/c/chromium/src/+/3964859 * 3955976: serial: Create DOMException with V8ThrowDOMException https://chromium-review.googlesource.com/c/chromium/src/+/3955976 * 3758405: Append trailer data to serialized messages. https://chromium-review.googlesource.com/c/chromium/src/+/3758405 * chore: revert clang roll This patch reverts https://chromium-review.googlesource.com/c/chromium/src/+/3967491 because that roll breaks the WOA build: https://crbug.com/1377819 * chore: update patches * chore: bump chromium in DEPS to 109.0.5380.0 * chore: update patches * 3859750: [linux/wayland] Added plumbing for the state of tiled edges. https://chromium-review.googlesource.com/c/chromium/src/+/3859750 Also 3970920: [linux/wayland] Fixed the tiled edges for the GTK frame. https://chromium-review.googlesource.com/c/chromium/src/+/3970920 * chore: bump chromium in DEPS to 109.0.5382.0 * chore: update patches * chore: revert Use accessibility.pkey when setting page access. https://chromium-review.googlesource.com/c/chromium/src/+/3949281 breaks our Linux builds run under Docker. This patch should be removed once https://chromium-review.googlesource.com/c/chromium/src/+/3949284 is merged. * 3976312: Roll clang llvmorg-16-init-8189-g97196a2d-2 : llvmorg-16-init-8697-g60809cd2-1 https://chromium-review.googlesource.com/c/chromium/src/+/3976312 * 3967841: [heap] Remove AllocationSpace::MAP_SPACE enum constant https://chromium-review.googlesource.com/c/v8/v8/+/3967841 * 3956131: [cleanup] Remove flag for Wasm threads & atomics https://chromium-review.googlesource.com/c/v8/v8/+/3956131 * chore: update docs for Quota: Cleanup kPersistent in BrowsingDataRemover https://chromium-review.googlesource.com/c/chromium/src/+/3964859 * test: fixup HID test for ARM CI Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@github.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: Jeremy Rose <jeremya@chromium.org> Co-authored-by: electron-patch-conflict-fixer[bot] <83340002+electron-patch-conflict-fixer[bot]@users.noreply.github.com>
51 lines
2.5 KiB
Diff
51 lines
2.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jeremy Apthorp <nornagon@nornagon.net>
|
|
Date: Wed, 4 Mar 2020 11:18:03 -0800
|
|
Subject: feat: add onclose to MessagePort
|
|
|
|
This adds the 'onclose' event to MessagePort. This is
|
|
[proposed](https://github.com/w3ctag/design-reviews/issues/269#issuecomment-407584290)
|
|
in w3c and has been discussed for years without conclusion. I'd like to
|
|
get this standardised, but in lieu of that, this makes MessagePort a
|
|
whole bunch more useful!
|
|
|
|
diff --git a/third_party/blink/renderer/core/messaging/message_port.cc b/third_party/blink/renderer/core/messaging/message_port.cc
|
|
index b38bbd1d14f6a0eb10412858fb4dc7f714aa3ede..5526dec4f134b265f5de5ff6820fe9c5119a3ed9 100644
|
|
--- a/third_party/blink/renderer/core/messaging/message_port.cc
|
|
+++ b/third_party/blink/renderer/core/messaging/message_port.cc
|
|
@@ -174,6 +174,7 @@ void MessagePort::close() {
|
|
Entangle(pipe.TakePort0());
|
|
}
|
|
closed_ = true;
|
|
+ DispatchEvent(*Event::Create(event_type_names::kClose));
|
|
}
|
|
|
|
void MessagePort::Entangle(MessagePortDescriptor port) {
|
|
diff --git a/third_party/blink/renderer/core/messaging/message_port.h b/third_party/blink/renderer/core/messaging/message_port.h
|
|
index 30d13d1e47e3acc7df6ce5c627fd7b3a32c3edc4..f9baba3c6d13992508da48a13c97bb10c8ec56e0 100644
|
|
--- a/third_party/blink/renderer/core/messaging/message_port.h
|
|
+++ b/third_party/blink/renderer/core/messaging/message_port.h
|
|
@@ -120,6 +120,13 @@ class CORE_EXPORT MessagePort : public EventTargetWithInlineData,
|
|
return GetAttributeEventListener(event_type_names::kMessageerror);
|
|
}
|
|
|
|
+ void setOnclose(EventListener* listener) {
|
|
+ SetAttributeEventListener(event_type_names::kClose, listener);
|
|
+ }
|
|
+ EventListener* onclose() {
|
|
+ return GetAttributeEventListener(event_type_names::kClose);
|
|
+ }
|
|
+
|
|
// A port starts out its life entangled, and remains entangled until it is
|
|
// closed or is cloned.
|
|
bool IsEntangled() const { return !closed_ && !IsNeutered(); }
|
|
diff --git a/third_party/blink/renderer/core/messaging/message_port.idl b/third_party/blink/renderer/core/messaging/message_port.idl
|
|
index 6fab27fcdf1c333739b6ffe88b3cc4eed3301ee4..3f1f181d9b8a66997136f870f55c97c08294b6eb 100644
|
|
--- a/third_party/blink/renderer/core/messaging/message_port.idl
|
|
+++ b/third_party/blink/renderer/core/messaging/message_port.idl
|
|
@@ -40,4 +40,5 @@
|
|
// event handlers
|
|
attribute EventHandler onmessage;
|
|
attribute EventHandler onmessageerror;
|
|
+ attribute EventHandler onclose;
|
|
};
|