mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
Bug 1514488 - Check if IPC still opens before sending classify result. r=baku
The crash happens when parent process tries to send classify result to the content process while the IPC connection is already closed. The only case that we needs IPC for classification is for Flash classification, but flash classification is moved to parent process after Bug 1514202. Although right now there is no consumer for the IPC version of nsUrlClassifierDBService::AsyncClassifyLocalWithFeatures, we should still fix this bug. Differential Revision: https://phabricator.services.mozilla.com/D16362 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
24d3ea5ce2
commit
53158f3fcb
@ -161,6 +161,7 @@ mozilla::ipc::IPCResult URLClassifierLocalParent::StartClassify(
|
||||
NS_IMETHODIMP
|
||||
URLClassifierLocalParent::OnClassifyComplete(
|
||||
const nsTArray<RefPtr<nsIUrlClassifierFeatureResult>>& aResults) {
|
||||
if (mIPCOpen) {
|
||||
nsTArray<URLClassifierLocalResult> ipcResults;
|
||||
for (nsIUrlClassifierFeatureResult* result : aResults) {
|
||||
URLClassifierLocalResult* ipcResult = ipcResults.AppendElement();
|
||||
@ -174,5 +175,6 @@ URLClassifierLocalParent::OnClassifyComplete(
|
||||
}
|
||||
|
||||
Unused << Send__delete__(this, ipcResults);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user