Chromium Code Reviews
DescriptionShutdown Service Workers before the profile is destroyed
This fixes a crash when closing an incognito browser window that used
Service Workers.
Service Workers keep render process hosts alive. Service Workers are
shutdown during the destruction of a profile (in ~StoragePartitionImpl).
If the shutdown causes render process hosts to die, ExtensionService
(and possibly other clients) receive a
NOTIFICATION_RENDERER_PROCESS_TERMINATED and try to access the
half-destroyed profile, causing a crash.
We don't see this in a non-incognito window since the main profile is
not destroyed until after browser shutdown, and we had special code to
shutdown Service Workers there.
This patch changes the special Service Worker shutdown code to happen
before a profile is destroyed.
BUG=419290
Committed: https://crrev.com/41f417516ab894faa1ebfe33cd6197cb072f1bf7
Cr-Commit-Position: refs/heads/master@{#301800}
Patch Set 1 #
Total comments: 7
Patch Set 2 : MaybeSendNotification #Patch Set 3 : ios build fix #
Total comments: 4
Patch Set 4 : sync #Patch Set 5 : review comments #
Total comments: 2
Patch Set 6 : sync #Messages
Total messages: 20 (4 generated)
|