Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions nvdaHelper/vbufBackends/gecko_ia2/gecko_ia2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1476,6 +1476,12 @@ void GeckoVBufBackend_t::renderThread_initialize() {
void GeckoVBufBackend_t::renderThread_terminate() {
unregisterWinEventHook(renderThread_winEventProcHook);
VBufBackend_t::renderThread_terminate();
// The backend holds a reference to the root accessible of the document.
// This must be specifically released here, in the UI thread where it was created.
// See https://issues.chromium.org/issues/41487612
if (this->rootDocAcc) {
this->rootDocAcc.Release();
}
}

void GeckoVBufBackend_t::render(VBufStorage_buffer_t* buffer, int docHandle, int ID, VBufStorage_controlFieldNode_t* oldNode) {
Expand All @@ -1502,6 +1508,18 @@ GeckoVBufBackend_t::GeckoVBufBackend_t(int docHandle, int ID): VBufBackend_t(doc
}

GeckoVBufBackend_t::~GeckoVBufBackend_t() {
// The backend holds a reference to the root accessible of the document.
// This must be specifically released in the UI thread where it was created.
// See https://issues.chromium.org/issues/41487612
// In most cases this will be released in renderThread_terminate.
// However in the unlikely case terminate can't run,
// we must detach and leak the COM pointer here.
// Otherwise it would be automatically deleted along with the backend which would cause a crash,
// as the COM object would be released from within an RPC worker thread.
nhAssert(!rootDocAcc);
if (this->rootDocAcc) {
this->rootDocAcc.Detach();
}
}

VBufBackend_t* GeckoVBufBackend_t_createInstance(int docHandle, int ID) {
Expand Down
1 change: 1 addition & 0 deletions user_docs/en/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ A warning message will inform you if you try writing to a non-empty directory. (
* NVDA will correctly announce radio and checkbox menu items when first entering sub-menus in Google Chrome and Mozilla Firefox. (#14550)
* NVDA's browse mode find functionality is now more accurate when the page contains emojis. (#16317, @LeonarddeR)
* In Mozilla Firefox, NVDA now correctly reports the current character, word and line when the cursor is at the insertion point at the end of a line. (#3156, @jcsteh)
* No longer cause Google Chrome to crash when closing a document or exiting Chrome. (#16893)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michaelDCurran or @seanbudd, I am reviewing the translation of this item.

Translating this sentence sounds a bit strange because grammatically, the subject is missing in this sentence.

Said otherwise, I wonder, what (or who) no longer causes Chrome to crash? Is it NVDA?

Or maybe I haven't understood the sentence correctly...

* NVDA will announce correctly the autocomplete suggestions in Eclipse and other Eclipse-based environments on Windows 11. (#16416, @thgcode)
* Improved reliability of automatic text readout, particularly in terminal applications. (#15850, #16027, @Danstiv)
* NVDA will correctly announce selection changes when editing a cell's text in Microsoft Excel. (#15843)
Expand Down