Files
Samuel Attard 08c729bdf3 fix: cppgc WebContents stack follow-ups (#54163)
* fix: throw a clear error from a Session made inert at shutdown

Build Session's template with gin_helper::ObjectTemplateBuilder so a call on
a wrapper the MicrotasksRunner has invalidated throws "Object has been
destroyed" instead of gin's "Illegal invocation". Report the result of the
shutdown-order spec through stdout, since app.exit() cannot change the exit
code once the dispose pass is running.

* fix: dispose the MicrotasksRunner when startup exits early

When toolkit initialisation fails (e.g. no display) content never runs
PostMainMessageLoopRun(), so ~JavascriptEnvironment destroyed the runner
after the isolate had been disposed and with observers still registered.

* fix: emit debugger 'detach' for contents disposed at quit

The lifecycle client is disposed before its WebContents now, so notify the
Debugger when that detaches an attached client instead of dropping the
event.

* fix: do not wrap a collected WebContents that is awaiting teardown

Between the wrapper being collected and the deferred NativeLifecycle
teardown the content::WebContents is still alive; FromOrCreate() minted a
second, remote wrapper for it and emitted web-contents-created. Return null
for that window instead.

* chore: do not alias an owned MicrotasksRunner observer with a raw_ptr

* fix: identify Electron wrappers by WrapperInfo in the serializer

Unwrapping foreign API wrappers with Electron's tag range trips a V8 DCHECK
in is_debug builds; unwrap with the generic range and check the type info,
as gin does.

* fix: let BluetoothChooser settle requests when its wrapper is gone

* docs: add the ObjectTemplateBuilder include to the creating-api sample
2026-09-21 18:59:13 +09:00
..