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) #if defined(MOZ_WIDGET_GONK) && defined(MOZ_B2G_RIL)
@BINPATH@/components/MmsService.js @BINPATH@/components/MmsService.js
@BINPATH@/components/MmsService.manifest @BINPATH@/components/MmsService.manifest
@BINPATH@/components/MobileConnectionService.js
@BINPATH@/components/MobileConnectionService.manifest
@BINPATH@/components/MobileMessageDatabaseService.js @BINPATH@/components/MobileMessageDatabaseService.js
@BINPATH@/components/MobileMessageDatabaseService.manifest @BINPATH@/components/MobileMessageDatabaseService.manifest
@BINPATH@/components/RadioInterfaceLayer.js @BINPATH@/components/RadioInterfaceLayer.js
@@ -447,6 +445,8 @@
@BINPATH@/components/RILContentHelper.js @BINPATH@/components/RILContentHelper.js
@BINPATH@/components/TelephonyService.js @BINPATH@/components/TelephonyService.js
@BINPATH@/components/TelephonyService.manifest @BINPATH@/components/TelephonyService.manifest
@BINPATH@/components/MobileConnectionGonkService.js
@BINPATH@/components/MobileConnectionGonkService.manifest
#endif // MOZ_WIDGET_GONK && MOZ_B2G_RIL #endif // MOZ_WIDGET_GONK && MOZ_B2G_RIL
#ifndef MOZ_WIDGET_GONK #ifndef MOZ_WIDGET_GONK

View File

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

View File

@@ -14,10 +14,10 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
var RIL = {}; var RIL = {};
Cu.import("resource://gre/modules/ril_consts.js", RIL); Cu.import("resource://gre/modules/ril_consts.js", RIL);
const GONK_MOBILECONNECTIONSERVICE_CONTRACTID = const MOBILECONNECTIONGONKSERVICE_CONTRACTID =
"@mozilla.org/mobileconnection/gonkmobileconnectionservice;1"; "@mozilla.org/mobileconnection/mobileconnectiongonkservice;1";
const GONK_MOBILECONNECTIONSERVICE_CID = const MOBILECONNECTIONGONKSERVICE_CID =
Components.ID("{05e20430-fe65-4984-8df9-a6a504b24a91}"); Components.ID("{05e20430-fe65-4984-8df9-a6a504b24a91}");
const MOBILENETWORKINFO_CID = const MOBILENETWORKINFO_CID =
Components.ID("{a6c8416c-09b4-46d1-bf29-6520d677d085}"); Components.ID("{a6c8416c-09b4-46d1-bf29-6520d677d085}");
@@ -44,7 +44,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "gRadioInterfaceLayer",
let DEBUG = RIL.DEBUG_RIL; let DEBUG = RIL.DEBUG_RIL;
function debug(s) { function debug(s) {
dump("MobileConnectionService: " + s + "\n"); dump("MobileConnectionGonkService: " + s + "\n");
} }
function MobileNetworkInfo() { function MobileNetworkInfo() {
@@ -293,7 +293,7 @@ MobileConnectionProvider.prototype = {
*/ */
_checkRoamingBetweenOperators: function(aNetworkInfo) { _checkRoamingBetweenOperators: function(aNetworkInfo) {
// TODO: Bug 864489 - B2G RIL: use ipdl as IPC in MozIccManager // 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 iccInfo = this._radioInterface.rilContext.iccInfo;
let operator = aNetworkInfo.network; let operator = aNetworkInfo.network;
let state = aNetworkInfo.state; let state = aNetworkInfo.state;
@@ -950,7 +950,7 @@ MobileConnectionProvider.prototype = {
}, },
}; };
function MobileConnectionService() { function MobileConnectionGonkService() {
this._providers = []; this._providers = [];
let numClients = gRadioInterfaceLayer.numRadioInterfaces; let numClients = gRadioInterfaceLayer.numRadioInterfaces;
@@ -966,15 +966,15 @@ function MobileConnectionService() {
debug("init complete"); debug("init complete");
} }
MobileConnectionService.prototype = { MobileConnectionGonkService.prototype = {
classID: GONK_MOBILECONNECTIONSERVICE_CID, classID: MOBILECONNECTIONGONKSERVICE_CID,
classInfo: XPCOMUtils.generateCI({classID: GONK_MOBILECONNECTIONSERVICE_CID, classInfo: XPCOMUtils.generateCI({classID: MOBILECONNECTIONGONKSERVICE_CID,
contractID: GONK_MOBILECONNECTIONSERVICE_CONTRACTID, contractID: MOBILECONNECTIONGONKSERVICE_CONTRACTID,
classDescription: "MobileConnectionService", classDescription: "MobileConnectionGonkService",
interfaces: [Ci.nsIGonkMobileConnectionService, interfaces: [Ci.nsIMobileConnectionGonkService,
Ci.nsIMobileConnectionService], Ci.nsIMobileConnectionService],
flags: Ci.nsIClassInfo.SINGLETON}), flags: Ci.nsIClassInfo.SINGLETON}),
QueryInterface: XPCOMUtils.generateQI([Ci.nsIGonkMobileConnectionService, QueryInterface: XPCOMUtils.generateQI([Ci.nsIMobileConnectionGonkService,
Ci.nsIMobileConnectionService, Ci.nsIMobileConnectionService,
Ci.nsIObserver]), Ci.nsIObserver]),
@@ -1286,7 +1286,7 @@ MobileConnectionService.prototype = {
}, },
/** /**
* nsIGonkMobileConnectionService interface. * nsIMobileConnectionGonkService interface.
*/ */
notifyVoiceInfoChanged: function(aClientId, aVoiceInfo) { notifyVoiceInfoChanged: function(aClientId, aVoiceInfo) {
if (DEBUG) { 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 component {05e20430-fe65-4984-8df9-a6a504b24a91} MobileConnectionGonkService.js
contract @mozilla.org/mobileconnection/gonkmobileconnectionservice;1 {05e20430-fe65-4984-8df9-a6a504b24a91} 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" #include "nsIMobileConnectionService.idl"
%{C++ %{C++
#define GONK_MOBILECONNECTION_SERVICE_CONTRACTID \ #define NS_MOBILECONNECTION_GONK_SERVICE_CONTRACTID \
"@mozilla.org/mobileconnection/gonkmobileconnectionservice;1" "@mozilla.org/mobileconnection/mobileconnectiongonkservice;1"
%} %}
[scriptable, uuid(e54fa0a4-d357-48ef-9a1e-ffc9705b44b1)] [scriptable, uuid(c5baceda-247a-4018-855d-ad5b00f2e4e2)]
interface nsIGonkMobileConnectionService : nsIMobileConnectionService interface nsIMobileConnectionGonkService : nsIMobileConnectionService
{ {
void notifyNetworkInfoChanged(in unsigned long clientId, in jsval networkInfo); 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 # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
DIRS += ['interfaces']
MOCHITEST_MANIFESTS += ['tests/mochitest/mochitest.ini'] MOCHITEST_MANIFESTS += ['tests/mochitest/mochitest.ini']
EXPORTS.mozilla.dom += [ EXPORTS.mozilla.dom += [
@@ -23,15 +25,6 @@ EXPORTS.mozilla.dom.mobileconnection += [
'ipc/MobileConnectionParent.h', 'ipc/MobileConnectionParent.h',
] ]
XPIDL_SOURCES += [
'interfaces/nsICellInfo.idl',
'interfaces/nsIMobileCellInfo.idl',
'interfaces/nsIMobileConnectionInfo.idl',
'interfaces/nsIMobileConnectionService.idl',
'interfaces/nsIMobileNetworkInfo.idl',
'interfaces/nsINeighboringCellInfo.idl',
]
SOURCES += [ SOURCES += [
'DOMMMIError.cpp', 'DOMMMIError.cpp',
'ipc/MobileConnectionChild.cpp', 'ipc/MobileConnectionChild.cpp',
@@ -52,12 +45,9 @@ IPDL_SOURCES += [
] ]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and CONFIG['MOZ_B2G_RIL']: if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and CONFIG['MOZ_B2G_RIL']:
XPIDL_SOURCES += [
'gonk/nsIGonkMobileConnectionService.idl',
]
EXTRA_COMPONENTS += [ EXTRA_COMPONENTS += [
'gonk/MobileConnectionService.js', 'gonk/MobileConnectionGonkService.js',
'gonk/MobileConnectionService.manifest', 'gonk/MobileConnectionGonkService.manifest',
] ]
FAIL_ON_WARNINGS = True FAIL_ON_WARNINGS = True
@@ -65,5 +55,3 @@ FAIL_ON_WARNINGS = True
include('/ipc/chromium/chromium-config.mozbuild') include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul' FINAL_LIBRARY = 'xul'
XPIDL_MODULE = 'dom_mobileconnection'

View File

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

View File

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