Backed out changeset 5d8e56deff5a (bug 1063304) for suspicion of causing cppunit test failures

This commit is contained in:
Carsten "Tomcat" Book
2014-09-17 13:13:51 +02:00
parent 453a9cda38
commit 5ea78a4aa5
9 changed files with 54 additions and 45 deletions

View File

@@ -438,8 +438,6 @@
#if defined(MOZ_WIDGET_GONK) && defined(MOZ_B2G_RIL)
@BINPATH@/components/MmsService.js
@BINPATH@/components/MmsService.manifest
@BINPATH@/components/MobileConnectionService.js
@BINPATH@/components/MobileConnectionService.manifest
@BINPATH@/components/MobileMessageDatabaseService.js
@BINPATH@/components/MobileMessageDatabaseService.manifest
@BINPATH@/components/RadioInterfaceLayer.js
@@ -447,6 +445,8 @@
@BINPATH@/components/RILContentHelper.js
@BINPATH@/components/TelephonyService.js
@BINPATH@/components/TelephonyService.manifest
@BINPATH@/components/MobileConnectionGonkService.js
@BINPATH@/components/MobileConnectionGonkService.manifest
#endif // MOZ_WIDGET_GONK && MOZ_B2G_RIL
#ifndef MOZ_WIDGET_GONK

View File

@@ -20,7 +20,7 @@ namespace dom {
* The modules hold the reference of MobileConnectionCallback in OOP mode and
* non-OOP mode are different.
* - OOP mode: MobileConnectionRequestChild
* - non-OOP mode: MobileConnectionService
* - non-OOP mode: MobileConnectionGonkService
* The reference should be released after Notify*Success/Error is called.
*/
class MobileConnectionCallback MOZ_FINAL : public nsIMobileConnectionCallback

View File

@@ -14,10 +14,10 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
var RIL = {};
Cu.import("resource://gre/modules/ril_consts.js", RIL);
const GONK_MOBILECONNECTIONSERVICE_CONTRACTID =
"@mozilla.org/mobileconnection/gonkmobileconnectionservice;1";
const MOBILECONNECTIONGONKSERVICE_CONTRACTID =
"@mozilla.org/mobileconnection/mobileconnectiongonkservice;1";
const GONK_MOBILECONNECTIONSERVICE_CID =
const MOBILECONNECTIONGONKSERVICE_CID =
Components.ID("{05e20430-fe65-4984-8df9-a6a504b24a91}");
const MOBILENETWORKINFO_CID =
Components.ID("{a6c8416c-09b4-46d1-bf29-6520d677d085}");
@@ -44,7 +44,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "gRadioInterfaceLayer",
let DEBUG = RIL.DEBUG_RIL;
function debug(s) {
dump("MobileConnectionService: " + s + "\n");
dump("MobileConnectionGonkService: " + s + "\n");
}
function MobileNetworkInfo() {
@@ -293,7 +293,7 @@ MobileConnectionProvider.prototype = {
*/
_checkRoamingBetweenOperators: function(aNetworkInfo) {
// TODO: Bug 864489 - B2G RIL: use ipdl as IPC in MozIccManager
// Should get iccInfo from GonkIccProvider.
// Should get iccInfo from IccGonkProvider.
let iccInfo = this._radioInterface.rilContext.iccInfo;
let operator = aNetworkInfo.network;
let state = aNetworkInfo.state;
@@ -950,7 +950,7 @@ MobileConnectionProvider.prototype = {
},
};
function MobileConnectionService() {
function MobileConnectionGonkService() {
this._providers = [];
let numClients = gRadioInterfaceLayer.numRadioInterfaces;
@@ -966,15 +966,15 @@ function MobileConnectionService() {
debug("init complete");
}
MobileConnectionService.prototype = {
classID: GONK_MOBILECONNECTIONSERVICE_CID,
classInfo: XPCOMUtils.generateCI({classID: GONK_MOBILECONNECTIONSERVICE_CID,
contractID: GONK_MOBILECONNECTIONSERVICE_CONTRACTID,
classDescription: "MobileConnectionService",
interfaces: [Ci.nsIGonkMobileConnectionService,
MobileConnectionGonkService.prototype = {
classID: MOBILECONNECTIONGONKSERVICE_CID,
classInfo: XPCOMUtils.generateCI({classID: MOBILECONNECTIONGONKSERVICE_CID,
contractID: MOBILECONNECTIONGONKSERVICE_CONTRACTID,
classDescription: "MobileConnectionGonkService",
interfaces: [Ci.nsIMobileConnectionGonkService,
Ci.nsIMobileConnectionService],
flags: Ci.nsIClassInfo.SINGLETON}),
QueryInterface: XPCOMUtils.generateQI([Ci.nsIGonkMobileConnectionService,
QueryInterface: XPCOMUtils.generateQI([Ci.nsIMobileConnectionGonkService,
Ci.nsIMobileConnectionService,
Ci.nsIObserver]),
@@ -1286,7 +1286,7 @@ MobileConnectionService.prototype = {
},
/**
* nsIGonkMobileConnectionService interface.
* nsIMobileConnectionGonkService interface.
*/
notifyVoiceInfoChanged: function(aClientId, aVoiceInfo) {
if (DEBUG) {
@@ -1560,4 +1560,4 @@ MobileConnectionService.prototype = {
}
};
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([MobileConnectionService]);
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([MobileConnectionGonkService]);

View File

@@ -1,2 +1,2 @@
component {05e20430-fe65-4984-8df9-a6a504b24a91} MobileConnectionService.js
contract @mozilla.org/mobileconnection/gonkmobileconnectionservice;1 {05e20430-fe65-4984-8df9-a6a504b24a91}
component {05e20430-fe65-4984-8df9-a6a504b24a91} MobileConnectionGonkService.js
contract @mozilla.org/mobileconnection/mobileconnectiongonkservice;1 {05e20430-fe65-4984-8df9-a6a504b24a91}

View File

@@ -0,0 +1,21 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
XPIDL_SOURCES += [
'nsICellInfo.idl',
'nsIMobileCellInfo.idl',
'nsIMobileConnectionInfo.idl',
'nsIMobileConnectionService.idl',
'nsIMobileNetworkInfo.idl',
'nsINeighboringCellInfo.idl',
]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and CONFIG['MOZ_B2G_RIL']:
XPIDL_SOURCES += [
'nsIMobileConnectionGonkService.idl',
]
XPIDL_MODULE = 'dom_mobileconnection'

View File

@@ -5,12 +5,12 @@
#include "nsIMobileConnectionService.idl"
%{C++
#define GONK_MOBILECONNECTION_SERVICE_CONTRACTID \
"@mozilla.org/mobileconnection/gonkmobileconnectionservice;1"
#define NS_MOBILECONNECTION_GONK_SERVICE_CONTRACTID \
"@mozilla.org/mobileconnection/mobileconnectiongonkservice;1"
%}
[scriptable, uuid(e54fa0a4-d357-48ef-9a1e-ffc9705b44b1)]
interface nsIGonkMobileConnectionService : nsIMobileConnectionService
[scriptable, uuid(c5baceda-247a-4018-855d-ad5b00f2e4e2)]
interface nsIMobileConnectionGonkService : nsIMobileConnectionService
{
void notifyNetworkInfoChanged(in unsigned long clientId, in jsval networkInfo);

View File

@@ -4,6 +4,8 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DIRS += ['interfaces']
MOCHITEST_MANIFESTS += ['tests/mochitest/mochitest.ini']
EXPORTS.mozilla.dom += [
@@ -23,15 +25,6 @@ EXPORTS.mozilla.dom.mobileconnection += [
'ipc/MobileConnectionParent.h',
]
XPIDL_SOURCES += [
'interfaces/nsICellInfo.idl',
'interfaces/nsIMobileCellInfo.idl',
'interfaces/nsIMobileConnectionInfo.idl',
'interfaces/nsIMobileConnectionService.idl',
'interfaces/nsIMobileNetworkInfo.idl',
'interfaces/nsINeighboringCellInfo.idl',
]
SOURCES += [
'DOMMMIError.cpp',
'ipc/MobileConnectionChild.cpp',
@@ -52,12 +45,9 @@ IPDL_SOURCES += [
]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and CONFIG['MOZ_B2G_RIL']:
XPIDL_SOURCES += [
'gonk/nsIGonkMobileConnectionService.idl',
]
EXTRA_COMPONENTS += [
'gonk/MobileConnectionService.js',
'gonk/MobileConnectionService.manifest',
'gonk/MobileConnectionGonkService.js',
'gonk/MobileConnectionGonkService.manifest',
]
FAIL_ON_WARNINGS = True
@@ -65,5 +55,3 @@ FAIL_ON_WARNINGS = True
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'
XPIDL_MODULE = 'dom_mobileconnection'

View File

@@ -201,7 +201,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "gTelephonyService",
XPCOMUtils.defineLazyServiceGetter(this, "gMobileConnectionService",
"@mozilla.org/mobileconnection/mobileconnectionservice;1",
"nsIGonkMobileConnectionService");
"nsIMobileConnectionGonkService");
XPCOMUtils.defineLazyGetter(this, "WAP", function() {
let wap = {};
@@ -3002,8 +3002,8 @@ RadioInterface.prototype = {
this.clientId,
message.iccid ? message : null);
// In bug 864489, icc related code will be move to gonk IccProvider, we may
// need a better way to notify icc change to MobileConnectionService.
// In bug 864489, icc related code will be move to IccGonkProvider, we may
// need a better way to notify icc change to MobileConnectionGonkProvider.
gMobileConnectionService.notifyIccChanged(this.clientId,
message.iccid || null);

View File

@@ -130,7 +130,7 @@ using mozilla::system::nsVolumeService;
#include "mozilla/dom/mobileconnection/MobileConnectionIPCService.h"
using mozilla::dom::mobileconnection::MobileConnectionIPCService;
#ifdef MOZ_WIDGET_GONK
#include "nsIGonkMobileConnectionService.h"
#include "nsIMobileConnectionGonkService.h"
#endif
#endif
@@ -950,7 +950,7 @@ nsIMobileConnectionServiceConstructor(nsISupports *aOuter, REFNSIID aIID,
service = MobileConnectionIPCService::GetSingleton();
} else {
#ifdef MOZ_WIDGET_GONK
service = do_CreateInstance(GONK_MOBILECONNECTION_SERVICE_CONTRACTID);
service = do_CreateInstance(NS_MOBILECONNECTION_GONK_SERVICE_CONTRACTID);
#endif
}