Bug 1294463 - Followup 1292892, remove nsContentUtils::RootingCx() r=jandem

MozReview-Commit-ID: 8p8rDw8tG3l
This commit is contained in:
Alexandre Lissy 2016-08-11 18:12:33 +02:00
parent 2dba4a33c9
commit 54158acc9a
8 changed files with 13 additions and 13 deletions

View File

@ -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<dom::SettingChangeNotification> setting(nsContentUtils::RootingCx());
RootedDictionary<dom::SettingChangeNotification> setting(RootingCx());
if (!WrappedJSToDictionary(aSubject, setting)) {
return;
}
@ -751,7 +751,7 @@ BluetoothHfpManager::HandleVoiceConnectionChanged(uint32_t aClientId)
mService = service;
// Signal
JS::Rooted<JS::Value> value(dom::GetJSRuntime());
JS::Rooted<JS::Value> value(dom::RootingCx());
voiceInfo->GetRelSignalStrength(&value);
if (value.isNumber()) {
mSignal = (int)ceil(value.toNumber() / 20.0);

View File

@ -582,7 +582,7 @@ BluetoothHfpManager::HandleVolumeChanged(nsISupports* aSubject)
// {"key":"volumedown", "value":2}
RootedDictionary<dom::SettingChangeNotification>
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<JS::Value> value(dom::GetJSRuntime());
JS::Rooted<JS::Value> value(dom::RootingCx());
voiceInfo->GetRelSignalStrength(&value);
if (value.isNumber()) {
uint8_t signal = ceil(value.toNumber() / 20.0);

View File

@ -93,7 +93,7 @@ BluetoothReplyRunnable::Run()
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(mReply);
JS::Rooted<JS::Value> v(nsContentUtils::RootingCx(), JS::UndefinedValue());
JS::Rooted<JS::Value> v(RootingCx(), JS::UndefinedValue());
nsresult rv;
if (mReply->type() != BluetoothReply::TBluetoothReplySuccess) {

View File

@ -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<SettingChangeNotification> setting(nsContentUtils::RootingCx());
RootedDictionary<SettingChangeNotification> setting(RootingCx());
if (!WrappedJSToDictionary(aSubject, setting)) {
return NS_OK;
}

View File

@ -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<dom::SettingChangeNotification> setting(nsContentUtils::RootingCx());
RootedDictionary<dom::SettingChangeNotification> setting(RootingCx());
if (!WrappedJSToDictionary(aSubject, setting)) {
return NS_OK;
}

View File

@ -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<dom::SettingChangeNotification> setting(nsContentUtils::RootingCx());
RootedDictionary<dom::SettingChangeNotification> 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<JS::Value> value(nsContentUtils::RootingCx());
JS::Rooted<JS::Value> value(RootingCx());
uint32_t volume = 0;
for (uint32_t idx = 0; idx < MOZ_ARRAY_LENGTH(gVolumeData); ++idx) {
int32_t streamType = gVolumeData[idx].mStreamType;

View File

@ -132,7 +132,7 @@ AutoMounterSetting::AutoMounterSetting()
nsCOMPtr<nsISettingsServiceLock> lock;
settingsService->CreateLock(nullptr, getter_AddRefs(lock));
nsCOMPtr<nsISettingsServiceCallback> callback = new SettingsServiceCallback();
JS::Rooted<JS::Value> value(nsContentUtils::RootingCx());
JS::Rooted<JS::Value> 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<JS::Value> value(nsContentUtils::RootingCx(),
JS::Rooted<JS::Value> 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<SettingChangeNotification> setting(nsContentUtils::RootingCx());
RootedDictionary<SettingChangeNotification> setting(RootingCx());
if (!WrappedJSToDictionary(aSubject, setting)) {
return NS_OK;
}

View File

@ -1170,7 +1170,7 @@ GonkGPSGeolocationProvider::Observe(nsISupports* aSubject,
if (!strcmp(aTopic, kMozSettingsChangedTopic)) {
// Read changed setting value
RootedDictionary<SettingChangeNotification> setting(nsContentUtils::RootingCx());
RootedDictionary<SettingChangeNotification> setting(RootingCx());
if (!WrappedJSToDictionary(aSubject, setting)) {
return NS_OK;
}