diff --git a/dom/system/gonk/SystemWorkerManager.cpp b/dom/system/gonk/SystemWorkerManager.cpp index 1e760e891a6..ad3d015c1a1 100644 --- a/dom/system/gonk/SystemWorkerManager.cpp +++ b/dom/system/gonk/SystemWorkerManager.cpp @@ -254,6 +254,11 @@ SystemWorkerManager::Shutdown() StopRil(); mRILWorker = nsnull; + nsCOMPtr wifi(do_QueryInterface(mWifiWorker)); + if (wifi) { + wifi->Shutdown(); + wifi = nsnull; + } mWifiWorker = nsnull; nsCOMPtr obs = diff --git a/dom/wifi/nsIWifi.idl b/dom/wifi/nsIWifi.idl index 3dd3ec89ac9..f104335d44e 100644 --- a/dom/wifi/nsIWifi.idl +++ b/dom/wifi/nsIWifi.idl @@ -39,8 +39,12 @@ #include "nsIDOMDOMRequest.idl" #include "nsIDOMEvent.idl" -[scriptable, uuid(9DCE05BF-659C-4427-A050-0EAC3BB6C1C0)] +[scriptable, uuid(abb936bc-ba81-4c23-8dfa-3e5d96557044)] interface nsIWifi : nsISupports { + /** + * Shutdown the wifi system. + */ + void shutdown(); }; [scriptable, uuid(1509221f-470e-4445-b476-88e74fd5c617)]