[Extensions] Fix couple of ProcessManager UaF issues
Worker can legitimately fail to start, this CL clears worker's PendingTasks when that happens. In addition to this, this CL makes ServiceWorkerTaskQueue factory dependent on ProcessManager factory as pending tasks can call out to ProcessManager (courtesy of https://crbug.com/1019161#c16) upon ServiceWorkerTaskQueue's destruction. This CL adds a test for this ensuring a worker's pending_tasks_ is cleared when start worker failure is seen. The test rejects a service worker's install event to trigger the failure. Bug: 1019161 Test: See bug description for repro steps Change-Id: I384ec0d2830f07fb3b50632ee806e77fd33b7dcb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2103306 Commit-Queue: Istiaque Ahmed <lazyboy@chromium.org> Reviewed-by:Devlin <rdevlin.cronin@chromium.org> Cr-Commit-Position: refs/heads/master@{#751925}
Showing
Please register or sign in to comment