diff --git a/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.cpp b/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.cpp index e8a948e48cf9..a8f06a9a1e9f 100644 --- a/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.cpp +++ b/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.cpp @@ -685,7 +685,7 @@ BluetoothHfpManager::HandleVolumeChanged(nsISupports* aSubject) // The string that we're interested in will be a JSON string that looks like: // {"key":"volumeup", "value":10} // {"key":"volumedown", "value":2} - RootedDictionary setting(nsContentUtils::RootingCx()); + RootedDictionary setting(RootingCx()); if (!WrappedJSToDictionary(aSubject, setting)) { return; } @@ -751,7 +751,7 @@ BluetoothHfpManager::HandleVoiceConnectionChanged(uint32_t aClientId) mService = service; // Signal - JS::Rooted value(dom::GetJSRuntime()); + JS::Rooted value(dom::RootingCx()); voiceInfo->GetRelSignalStrength(&value); if (value.isNumber()) { mSignal = (int)ceil(value.toNumber() / 20.0); diff --git a/dom/bluetooth/bluez/BluetoothHfpManager.cpp b/dom/bluetooth/bluez/BluetoothHfpManager.cpp index f7e88e2f352a..812d7ff5fd92 100644 --- a/dom/bluetooth/bluez/BluetoothHfpManager.cpp +++ b/dom/bluetooth/bluez/BluetoothHfpManager.cpp @@ -582,7 +582,7 @@ BluetoothHfpManager::HandleVolumeChanged(nsISupports* aSubject) // {"key":"volumedown", "value":2} RootedDictionary - setting(nsContentUtils::RootingCx()); + setting(RootingCx()); if (!WrappedJSToDictionary(aSubject, setting)) { return; @@ -641,7 +641,7 @@ BluetoothHfpManager::HandleVoiceConnectionChanged(uint32_t aClientId) } UpdateCIND(CINDType::SERVICE, service); - JS::Rooted value(dom::GetJSRuntime()); + JS::Rooted value(dom::RootingCx()); voiceInfo->GetRelSignalStrength(&value); if (value.isNumber()) { uint8_t signal = ceil(value.toNumber() / 20.0); diff --git a/dom/bluetooth/common/BluetoothReplyRunnable.cpp b/dom/bluetooth/common/BluetoothReplyRunnable.cpp index 6891e6d7902c..013d2b1818a9 100644 --- a/dom/bluetooth/common/BluetoothReplyRunnable.cpp +++ b/dom/bluetooth/common/BluetoothReplyRunnable.cpp @@ -93,7 +93,7 @@ BluetoothReplyRunnable::Run() MOZ_ASSERT(NS_IsMainThread()); MOZ_ASSERT(mReply); - JS::Rooted v(nsContentUtils::RootingCx(), JS::UndefinedValue()); + JS::Rooted v(RootingCx(), JS::UndefinedValue()); nsresult rv; if (mReply->type() != BluetoothReply::TBluetoothReplySuccess) { diff --git a/dom/bluetooth/common/BluetoothService.cpp b/dom/bluetooth/common/BluetoothService.cpp index d16ad7adacdc..dc49a5490e82 100644 --- a/dom/bluetooth/common/BluetoothService.cpp +++ b/dom/bluetooth/common/BluetoothService.cpp @@ -549,7 +549,7 @@ BluetoothService::HandleSettingsChanged(nsISupports* aSubject) // The string that we're interested in will be a JSON string that looks like: // {"key":"bluetooth.enabled","value":true} - RootedDictionary setting(nsContentUtils::RootingCx()); + RootedDictionary setting(RootingCx()); if (!WrappedJSToDictionary(aSubject, setting)) { return NS_OK; } diff --git a/dom/fmradio/FMRadioService.cpp b/dom/fmradio/FMRadioService.cpp index 9f906083a75e..742dbedd3400 100644 --- a/dom/fmradio/FMRadioService.cpp +++ b/dom/fmradio/FMRadioService.cpp @@ -796,7 +796,7 @@ FMRadioService::Observe(nsISupports* aSubject, // The string that we're interested in will be a JSON string looks like: // {"key":"airplaneMode.enabled","value":true} - RootedDictionary setting(nsContentUtils::RootingCx()); + RootedDictionary setting(RootingCx()); if (!WrappedJSToDictionary(aSubject, setting)) { return NS_OK; } diff --git a/dom/system/gonk/AudioManager.cpp b/dom/system/gonk/AudioManager.cpp index cce411b6f111..9e25770bcfa9 100644 --- a/dom/system/gonk/AudioManager.cpp +++ b/dom/system/gonk/AudioManager.cpp @@ -596,7 +596,7 @@ AudioManager::Observe(nsISupports* aSubject, // To process the volume control on each volume categories according to // change of settings else if (!strcmp(aTopic, MOZ_SETTINGS_CHANGE_ID)) { - RootedDictionary setting(nsContentUtils::RootingCx()); + RootedDictionary setting(RootingCx()); if (!WrappedJSToDictionary(aSubject, setting)) { return NS_OK; } @@ -1135,7 +1135,7 @@ AudioManager::MaybeUpdateVolumeSettingToDatabase(bool aForce) } // Send events to update the Gaia volumes - JS::Rooted value(nsContentUtils::RootingCx()); + JS::Rooted value(RootingCx()); uint32_t volume = 0; for (uint32_t idx = 0; idx < MOZ_ARRAY_LENGTH(gVolumeData); ++idx) { int32_t streamType = gVolumeData[idx].mStreamType; diff --git a/dom/system/gonk/AutoMounterSetting.cpp b/dom/system/gonk/AutoMounterSetting.cpp index 7517c448377c..606bcce04dca 100644 --- a/dom/system/gonk/AutoMounterSetting.cpp +++ b/dom/system/gonk/AutoMounterSetting.cpp @@ -132,7 +132,7 @@ AutoMounterSetting::AutoMounterSetting() nsCOMPtr lock; settingsService->CreateLock(nullptr, getter_AddRefs(lock)); nsCOMPtr callback = new SettingsServiceCallback(); - JS::Rooted value(nsContentUtils::RootingCx()); + JS::Rooted value(RootingCx()); value.setInt32(AUTOMOUNTER_DISABLE); lock->Set(UMS_MODE, value, callback, nullptr); value.setInt32(mStatus); @@ -209,7 +209,7 @@ public: settingsService->CreateLock(nullptr, getter_AddRefs(lock)); // lock may be null if this gets called during shutdown. if (lock) { - JS::Rooted value(nsContentUtils::RootingCx(), + JS::Rooted value(RootingCx(), JS::Int32Value(mStatus)); lock->Set(UMS_STATUS, value, nullptr, nullptr); } @@ -247,7 +247,7 @@ AutoMounterSetting::Observe(nsISupports* aSubject, // The string that we're interested in will be a JSON string that looks like: // {"key":"ums.autoMount","value":true} - RootedDictionary setting(nsContentUtils::RootingCx()); + RootedDictionary setting(RootingCx()); if (!WrappedJSToDictionary(aSubject, setting)) { return NS_OK; } diff --git a/dom/system/gonk/GonkGPSGeolocationProvider.cpp b/dom/system/gonk/GonkGPSGeolocationProvider.cpp index e272f1fbfa00..c20fd69c84d0 100644 --- a/dom/system/gonk/GonkGPSGeolocationProvider.cpp +++ b/dom/system/gonk/GonkGPSGeolocationProvider.cpp @@ -1170,7 +1170,7 @@ GonkGPSGeolocationProvider::Observe(nsISupports* aSubject, if (!strcmp(aTopic, kMozSettingsChangedTopic)) { // Read changed setting value - RootedDictionary setting(nsContentUtils::RootingCx()); + RootedDictionary setting(RootingCx()); if (!WrappedJSToDictionary(aSubject, setting)) { return NS_OK; }