`.destroy()` is an important method in the lifecycle of a Node.js
Readable stream. It is typically called to reclaim the resources
(e.g., close file descriptor). The only situations where calling
it manually isn't necessary are when the following events are
emitted first:
- `end`: natural end of a stream
- `error`: stream terminated due to a failure
Prior to this commit the ended state was incorrectly tracked together
with a pending internal error. It led to situations where the request
could get aborted during a read and then get marked as ended (having
pending error).
With this change we disentangle pending "error" and "destroyed" cases to
always properly terminate an active Node.js Readable stream.
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
* avoid crash of operation on an invalid entry while erase set iterator.
Co-authored-by: bill.shen <shenyb32768@gmail.com>
* fix notification removal crash due to the nullptr presenter
Co-authored-by: bill.shen <shenyb32768@gmail.com>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: bill.shen <shenyb32768@gmail.com>
fix: active File System API permissions should reset on WebContents destruction
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
v8::Handle is an alias for v8::Local that "is kept around for historical
reasons" and is disabled when V8_IMMINENT_DEPRECATION_WARNING is defined
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
refactor: remove WindowListObserver::OnWindowRemove()
these have never been used
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
last caller removed in 67ba3040 (#37902)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
chore: remove unused typedef ElectronDownloadManagerDelegate::CreateDownloadPathCallback
use was removed in e3c580e9
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
On the Mac platform, OffScreenWebContentsView uses Automatic Reference
Counting (ARC) to handle the lifecycle of offScreenView_. However, this
private member variable is not initialized and its value is undefined.
In some cases, it is initialized to a garbage value, which may cause ARC
to release the value incorrectly, resulting in a crash.
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Jinli Wu <wujinli@bytedance.com>
fix: BrowserWindow.setBackgroundColor should work with transparency
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
The extension system is freed by the DestroyBrowserContextServices()
call in the destructor, so we need to zero out the pointer to avoid
a dangling raw_ptr error.
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* chore: expose system preferences to utility process
* chore: add tests, doc changes and module-list update
* relative link
* use @
* fix test
* chore: disable linux test
* kick
* noop on windows utility process
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: George Xu <33054982+georgexu99@users.noreply.github.com>
* chore: bump chromium in DEPS to 126.0.6468.2
* chore: bump chromium in DEPS to 126.0.6478.4
* chore: bump chromium in DEPS to 126.0.6478.9
* chore: bump chromium in DEPS to 126.0.6478.8
* 5492605: Migrate TODOs referencing old crbug IDs to the new issue tracker IDs | 5492605
(cherry picked from commit 01bbc6b9609954e6f5e8ed2d7c5864e6f2a7929b)
* 5513277: Move subresource-filter-ruleset to GCS | 5513277
(cherry picked from commit 284bbbdf86d640cfbe27831524a7cefa1f0ec344)
* 5512656: Remove CustomizeChromeSupportsChromeRefresh2023 | 5512656
(cherry picked from commit 41acddd97e2f4f79dba13a3916c1af46d47fa6f5)
* 5516009: Accept mouse events in inactive window for Top Chrome WebUIs | 5516009
(cherry picked from commit ffc88b3b2a7bee830a1e78b64afb6dfe6aff7347)
* 5376861: Change references to RWHVB in RWHIER and RenderWidgetTargeter to RWHVI. | 5376861
(cherry picked from commit 5a48cf6952f0c3fde8a4d2b717ac5b2d50d13671)
* 5490530: Use partition_alloc PA_BUILDFLAG(...) outside PA. #cleanup | 5490530
(cherry picked from commit 8deba32e729d3ded310be6645a27a78458046d69)
* 5296870: network: Allow trusted loaders to learn the sent request cookies. | 5296870
(cherry picked from commit 7aef2f0ad890bb778fa8843bd262daf6909c5f52)
* 5453438: Delegate delegated ink trails to RWHI from RWHIER. | 5453438
(cherry picked from commit 368eb3924a3b9b58430c7340b930254a3db6f1a3)
* chore: update patches
(cherry picked from commit 9d6dac074b0f173e43d8e587edbe7de1565de3d6)
* chore: update patches
(cherry picked from commit fb4134d68204ea85a095d496b31216905f801878)
* update patches
(cherry picked from commit 6f6fff5b0b08c4cccdbc98950f8cbb399caf6340)
* only disable enterprise_cloud_content_analysis
(cherry picked from commit 5426d227ee5f4ce60ed3f1c863fe506ee706e78b)
* 5403888: [api] support v8::Data in v8::TracedReference and v8::EmbedderGraph
5403888
(cherry picked from commit 2030447cf5bbce26b73e2e9b054dee38438f9fdd)
* chore: update patches
* chore: fixup patch
* 5465511: [api] Mark v8::ObjectTemplate::SetAccessor(..) for deprecation
5465511
* 5513528: Move service_provider_config files to components/enterprise/connectors/
5513528
* chore: bump chromium in DEPS to 126.0.6478.17
* chore: bump chromium in DEPS to 126.0.6478.26
* chore: update patches
* build: use Sha256Sum in script/sysroots.json
Xref: 5506275
(cherry picked from commit fccef2b6ba8769da9d8b1bd81fda5cc61b2086e0)
* fixup! build: use Sha256Sum in script/sysroots.json
`sync` succeeds now
(cherry picked from commit e71852729fbf3575d1bc37774deadddfebdeefb4)
* chore: cherry-pick Node.js patch for V8 API removal fix
Node.js PR: https://github.com/nodejs/node/pull/52996
V8 API Removal CL: 5539888
See the patch description for more details.
(cherry picked from commit ef0c441dbaa97478828ad481a39d0c2c93748729)
* chore: revert v8 deprecation
See patch message for more details.
5526611
(cherry picked from commit 6f03785eadea8d8629970c24393f0900fc3fa4af)
* chore: revert v8 removal
5497515
See patch message for more details.
(cherry picked from commit 4fd7f5bbb603b0461482fee027de7bfdbf02ceac)
* 5522321: [devtools] Support saving base64 encoded files via host bindings
5522321
(cherry picked from commit 4b5f43d7838062834de6d634033fe10af2f9d01a)
* fixup! 5465511: [api] Mark v8::ObjectTemplate::SetAccessor(..) for deprecation 5465511
(cherry picked from commit 368005f2b2f9195bcffb5325041e3ff1041a3830)
* 5514687: Reland "Add a secret handshake to the base::Feature constructor"
5514687
(cherry picked from commit 142c6e16b10496b3fffddc9924001fb94096852e)
* 5512176: Remove OnEnvironmentEstimationComplete()
5512176
(cherry picked from commit 1e20ffb24ef6d0b0aeec8c314393cb77631ab279)
* 5539888: [api] Remove several APIs deprecated in version 12.6
5539888
This commit essentially only removes the `only_terminate_in_safe_scope` isolate creation parameter. This undoes some work that was originally done in #35766.
(cherry picked from commit ceb6182b199e2471c64700203bf42b73052a38c6)
* 5492183: Extensions: CodeHealth: Give enums some class
5492183
(cherry picked from commit a11b8e637cdc0868b6152dd5b0ed3b582f446aa7)
* 5483406: [PEPC] Make PEPC permission subscription take into account device status
5483406
(cherry picked from commit fc93c876b481a988a6c1d5eb69d97035dc5ad64a)
* 5463431: iwa: Only create IsolatedWebAppURLLoaderFactory for subresources in IWAs
5463431
(cherry picked from commit fbfe3c998c8251f28b76c2703a3212b5b0175a84)
* 5502081: Migrate OnDisplayRemoved to OnDisplaysRemoved
5502081
(cherry picked from commit ccf9a5137efdf2ca18d9ee9851388338c26d036e)
* 5376861: Change references to RWHVB in RWHIER and RenderWidgetTargeter to RWHVI.
5376861
(cherry picked from commit fd3e6ce148b3c5ab27e234d28b9405933ba32b14)
* fixup! 5530163: [media] Use VideoFrame::Plane typed enum instead of nameless enum 5530163
(cherry picked from commit 9a900e734a8c08e534317ca4d7411bfadd9087f5)
* 5530163: [media] Use VideoFrame::Plane typed enum instead of nameless enum
5530163
(cherry picked from commit fd94de9736125c3121aed99f50f2702fc430ba26)
* 5466238: PDF Viewer: add metrics to record if PDF is opened with a11y
5466238
(cherry picked from commit 2abb5d1737083241b6b6a4c05d5982693e956a22)
* 5513740: Reland "[Extensions] Restructure extensions::ProcessMap"
5513740
(cherry picked from commit 11905a9840f1e8dce21cfdda1a23f328e8ff6a6a)
* 5498236: Make browser_tests force full async initialization for OSCrypt Async
5498236
(cherry picked from commit e00faacb58545c37cfbf8a38a0cbe4ccb9f9df06)
* fixup: only disable enterprise_cloud_content_analysis
The original commit a5480accc2, was due to this CL 5527572: Move Connectors prefs files to components/enterprise/connectors/ | 5527572
(cherry picked from commit b0e2a7eab6c0decf982f913a892d5dfdb2501084)
* chore: update patches
* fixup: 5539888: [api] Remove several APIs deprecated in version 12.6
(cherry picked from commit ae65fea668baad44cac7073cbe0a64bca36bccac)
* views: use CalculatePreferredSize(SizeBounds) in '/chrome/browser/ui/views/[frame, infobars, /test]'.
5493169
Needed because of 5504212: views: remove CalculatePreferredSize() | 5504212
* fixup: views: use CalculatePreferredSize(SizeBounds)
* 5499157: Enable kBlockMidiByDefault by default
5499157
* 5518756: Reland^2: [heap] Add shared trusted spaces
| 5518756ececfe7aea
* chore: bump chromium in DEPS to 126.0.6478.36
* chore: update patches
* chore: add currently-unused should_include_device_status arg to GetPermissionStatusForCurrentDocument()
Xref: 5545382
(cherry picked from commit bc35c93efd2d3301e33116d2dd09abaf8eddbf70)
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
Co-authored-by: VerteDinde <vertedinde@electronjs.org>
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: clavin <clavin@electronjs.org>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
The new activate API on macOS is pretty bad, we should just keep using
the old API. Similar to #42180. Restores non-panel behavior to pre-panel
support.
Notes: BrowserWindow.show() now correctly restores focus to inactive apps on macOS
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
* fix: calculate a hash for the Tag property of ToastNotification.
Co-authored-by: bill.shen <shenyb32768@gmail.com>
* fix: calculate a hash for the Tag property of ToastNotification.
Co-authored-by: bill.shen <shenyb32768@gmail.com>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: bill.shen <shenyb32768@gmail.com>