Merge mozilla-central to fx-team
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Tue, 13 May 2014 12:48:23 +0200
changeset 203185 c39c8b18c459b3b7271858fd9692861cdadc5641
parent 203184 e462187d68661e938e60fe5387e70dd748a9dc5c (current diff)
parent 203173 7f5a8526b55aeeb07fea96d216b01ebe301b754c (diff)
child 203186 c04b92e485406f9bbd43c4852120e5896b17e27c
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone32.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge mozilla-central to fx-team
content/mathml/content/crashtests/462929-1.html
content/mathml/content/crashtests/770710-1.html
content/mathml/content/crashtests/crashtests.list
content/mathml/content/src/moz.build
content/mathml/content/src/nsMathMLElement.cpp
content/mathml/content/src/nsMathMLElement.h
content/mathml/content/src/nsMathMLElementFactory.cpp
content/svg/content/moz.build
content/svg/content/src/DOMSVGAnimatedLengthList.cpp
content/svg/content/src/DOMSVGAnimatedLengthList.h
content/svg/content/src/DOMSVGAnimatedNumberList.cpp
content/svg/content/src/DOMSVGAnimatedNumberList.h
content/svg/content/src/DOMSVGLength.cpp
content/svg/content/src/DOMSVGLength.h
content/svg/content/src/DOMSVGLengthList.cpp
content/svg/content/src/DOMSVGLengthList.h
content/svg/content/src/DOMSVGNumber.cpp
content/svg/content/src/DOMSVGNumber.h
content/svg/content/src/DOMSVGNumberList.cpp
content/svg/content/src/DOMSVGNumberList.h
content/svg/content/src/DOMSVGPathSeg.cpp
content/svg/content/src/DOMSVGPathSeg.h
content/svg/content/src/DOMSVGPathSegList.cpp
content/svg/content/src/DOMSVGPathSegList.h
content/svg/content/src/DOMSVGPoint.cpp
content/svg/content/src/DOMSVGPoint.h
content/svg/content/src/DOMSVGPointList.cpp
content/svg/content/src/DOMSVGPointList.h
content/svg/content/src/DOMSVGStringList.cpp
content/svg/content/src/DOMSVGStringList.h
content/svg/content/src/DOMSVGTransformList.cpp
content/svg/content/src/DOMSVGTransformList.h
content/svg/content/src/SVGAElement.cpp
content/svg/content/src/SVGAElement.h
content/svg/content/src/SVGAltGlyphElement.cpp
content/svg/content/src/SVGAltGlyphElement.h
content/svg/content/src/SVGAngle.cpp
content/svg/content/src/SVGAngle.h
content/svg/content/src/SVGAnimateElement.cpp
content/svg/content/src/SVGAnimateElement.h
content/svg/content/src/SVGAnimateMotionElement.cpp
content/svg/content/src/SVGAnimateMotionElement.h
content/svg/content/src/SVGAnimateTransformElement.cpp
content/svg/content/src/SVGAnimateTransformElement.h
content/svg/content/src/SVGAnimatedAngle.cpp
content/svg/content/src/SVGAnimatedAngle.h
content/svg/content/src/SVGAnimatedBoolean.cpp
content/svg/content/src/SVGAnimatedBoolean.h
content/svg/content/src/SVGAnimatedEnumeration.cpp
content/svg/content/src/SVGAnimatedEnumeration.h
content/svg/content/src/SVGAnimatedInteger.cpp
content/svg/content/src/SVGAnimatedInteger.h
content/svg/content/src/SVGAnimatedLength.cpp
content/svg/content/src/SVGAnimatedLength.h
content/svg/content/src/SVGAnimatedLengthList.cpp
content/svg/content/src/SVGAnimatedLengthList.h
content/svg/content/src/SVGAnimatedNumber.cpp
content/svg/content/src/SVGAnimatedNumber.h
content/svg/content/src/SVGAnimatedNumberList.cpp
content/svg/content/src/SVGAnimatedNumberList.h
content/svg/content/src/SVGAnimatedPathSegList.cpp
content/svg/content/src/SVGAnimatedPathSegList.h
content/svg/content/src/SVGAnimatedPointList.cpp
content/svg/content/src/SVGAnimatedPointList.h
content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp
content/svg/content/src/SVGAnimatedPreserveAspectRatio.h
content/svg/content/src/SVGAnimatedRect.cpp
content/svg/content/src/SVGAnimatedRect.h
content/svg/content/src/SVGAnimatedString.cpp
content/svg/content/src/SVGAnimatedString.h
content/svg/content/src/SVGAnimatedTransformList.cpp
content/svg/content/src/SVGAnimatedTransformList.h
content/svg/content/src/SVGAnimationElement.cpp
content/svg/content/src/SVGAnimationElement.h
content/svg/content/src/SVGAttrValueWrapper.cpp
content/svg/content/src/SVGAttrValueWrapper.h
content/svg/content/src/SVGCircleElement.cpp
content/svg/content/src/SVGCircleElement.h
content/svg/content/src/SVGClipPathElement.cpp
content/svg/content/src/SVGClipPathElement.h
content/svg/content/src/SVGComponentTransferFunctionElement.h
content/svg/content/src/SVGContentUtils.cpp
content/svg/content/src/SVGContentUtils.h
content/svg/content/src/SVGDefsElement.cpp
content/svg/content/src/SVGDefsElement.h
content/svg/content/src/SVGDescElement.cpp
content/svg/content/src/SVGDescElement.h
content/svg/content/src/SVGElementFactory.cpp
content/svg/content/src/SVGElementFactory.h
content/svg/content/src/SVGEllipseElement.cpp
content/svg/content/src/SVGEllipseElement.h
content/svg/content/src/SVGFEBlendElement.cpp
content/svg/content/src/SVGFEBlendElement.h
content/svg/content/src/SVGFEColorMatrixElement.cpp
content/svg/content/src/SVGFEColorMatrixElement.h
content/svg/content/src/SVGFEComponentTransferElement.cpp
content/svg/content/src/SVGFEComponentTransferElement.h
content/svg/content/src/SVGFECompositeElement.cpp
content/svg/content/src/SVGFECompositeElement.h
content/svg/content/src/SVGFEConvolveMatrixElement.cpp
content/svg/content/src/SVGFEConvolveMatrixElement.h
content/svg/content/src/SVGFEDiffuseLightingElement.cpp
content/svg/content/src/SVGFEDiffuseLightingElement.h
content/svg/content/src/SVGFEDisplacementMapElement.cpp
content/svg/content/src/SVGFEDisplacementMapElement.h
content/svg/content/src/SVGFEDistantLightElement.cpp
content/svg/content/src/SVGFEDistantLightElement.h
content/svg/content/src/SVGFEDropShadowElement.cpp
content/svg/content/src/SVGFEDropShadowElement.h
content/svg/content/src/SVGFEFloodElement.cpp
content/svg/content/src/SVGFEFloodElement.h
content/svg/content/src/SVGFEGaussianBlurElement.cpp
content/svg/content/src/SVGFEGaussianBlurElement.h
content/svg/content/src/SVGFEImageElement.cpp
content/svg/content/src/SVGFEImageElement.h
content/svg/content/src/SVGFEMergeElement.cpp
content/svg/content/src/SVGFEMergeElement.h
content/svg/content/src/SVGFEMergeNodeElement.cpp
content/svg/content/src/SVGFEMergeNodeElement.h
content/svg/content/src/SVGFEMorphologyElement.cpp
content/svg/content/src/SVGFEMorphologyElement.h
content/svg/content/src/SVGFEOffsetElement.cpp
content/svg/content/src/SVGFEOffsetElement.h
content/svg/content/src/SVGFEPointLightElement.cpp
content/svg/content/src/SVGFEPointLightElement.h
content/svg/content/src/SVGFESpecularLightingElement.cpp
content/svg/content/src/SVGFESpecularLightingElement.h
content/svg/content/src/SVGFESpotLightElement.cpp
content/svg/content/src/SVGFESpotLightElement.h
content/svg/content/src/SVGFETileElement.cpp
content/svg/content/src/SVGFETileElement.h
content/svg/content/src/SVGFETurbulenceElement.cpp
content/svg/content/src/SVGFETurbulenceElement.h
content/svg/content/src/SVGFilterElement.cpp
content/svg/content/src/SVGFilterElement.h
content/svg/content/src/SVGForeignObjectElement.cpp
content/svg/content/src/SVGForeignObjectElement.h
content/svg/content/src/SVGFragmentIdentifier.cpp
content/svg/content/src/SVGFragmentIdentifier.h
content/svg/content/src/SVGGElement.cpp
content/svg/content/src/SVGGElement.h
content/svg/content/src/SVGGradientElement.cpp
content/svg/content/src/SVGGradientElement.h
content/svg/content/src/SVGGraphicsElement.cpp
content/svg/content/src/SVGGraphicsElement.h
content/svg/content/src/SVGIFrameElement.cpp
content/svg/content/src/SVGIFrameElement.h
content/svg/content/src/SVGIRect.h
content/svg/content/src/SVGImageElement.cpp
content/svg/content/src/SVGImageElement.h
content/svg/content/src/SVGIntegerPairSMILType.cpp
content/svg/content/src/SVGIntegerPairSMILType.h
content/svg/content/src/SVGLength.cpp
content/svg/content/src/SVGLength.h
content/svg/content/src/SVGLengthList.cpp
content/svg/content/src/SVGLengthList.h
content/svg/content/src/SVGLengthListSMILType.cpp
content/svg/content/src/SVGLengthListSMILType.h
content/svg/content/src/SVGLineElement.cpp
content/svg/content/src/SVGLineElement.h
content/svg/content/src/SVGMPathElement.cpp
content/svg/content/src/SVGMPathElement.h
content/svg/content/src/SVGMarkerElement.cpp
content/svg/content/src/SVGMarkerElement.h
content/svg/content/src/SVGMaskElement.cpp
content/svg/content/src/SVGMaskElement.h
content/svg/content/src/SVGMatrix.cpp
content/svg/content/src/SVGMatrix.h
content/svg/content/src/SVGMetadataElement.cpp
content/svg/content/src/SVGMetadataElement.h
content/svg/content/src/SVGMotionSMILAnimationFunction.cpp
content/svg/content/src/SVGMotionSMILAnimationFunction.h
content/svg/content/src/SVGMotionSMILAttr.cpp
content/svg/content/src/SVGMotionSMILAttr.h
content/svg/content/src/SVGMotionSMILPathUtils.cpp
content/svg/content/src/SVGMotionSMILPathUtils.h
content/svg/content/src/SVGMotionSMILType.cpp
content/svg/content/src/SVGMotionSMILType.h
content/svg/content/src/SVGNumberList.cpp
content/svg/content/src/SVGNumberList.h
content/svg/content/src/SVGNumberListSMILType.cpp
content/svg/content/src/SVGNumberListSMILType.h
content/svg/content/src/SVGNumberPairSMILType.cpp
content/svg/content/src/SVGNumberPairSMILType.h
content/svg/content/src/SVGOrientSMILType.cpp
content/svg/content/src/SVGOrientSMILType.h
content/svg/content/src/SVGPathData.cpp
content/svg/content/src/SVGPathData.h
content/svg/content/src/SVGPathElement.cpp
content/svg/content/src/SVGPathElement.h
content/svg/content/src/SVGPathSegListSMILType.cpp
content/svg/content/src/SVGPathSegListSMILType.h
content/svg/content/src/SVGPathSegUtils.cpp
content/svg/content/src/SVGPathSegUtils.h
content/svg/content/src/SVGPatternElement.cpp
content/svg/content/src/SVGPatternElement.h
content/svg/content/src/SVGPoint.h
content/svg/content/src/SVGPointList.cpp
content/svg/content/src/SVGPointList.h
content/svg/content/src/SVGPointListSMILType.cpp
content/svg/content/src/SVGPointListSMILType.h
content/svg/content/src/SVGPolygonElement.cpp
content/svg/content/src/SVGPolygonElement.h
content/svg/content/src/SVGPolylineElement.cpp
content/svg/content/src/SVGPolylineElement.h
content/svg/content/src/SVGPreserveAspectRatio.cpp
content/svg/content/src/SVGPreserveAspectRatio.h
content/svg/content/src/SVGRect.cpp
content/svg/content/src/SVGRect.h
content/svg/content/src/SVGRectElement.cpp
content/svg/content/src/SVGRectElement.h
content/svg/content/src/SVGSVGElement.cpp
content/svg/content/src/SVGSVGElement.h
content/svg/content/src/SVGScriptElement.cpp
content/svg/content/src/SVGScriptElement.h
content/svg/content/src/SVGSetElement.cpp
content/svg/content/src/SVGSetElement.h
content/svg/content/src/SVGStopElement.cpp
content/svg/content/src/SVGStopElement.h
content/svg/content/src/SVGStringList.cpp
content/svg/content/src/SVGStringList.h
content/svg/content/src/SVGStyleElement.cpp
content/svg/content/src/SVGStyleElement.h
content/svg/content/src/SVGSwitchElement.cpp
content/svg/content/src/SVGSwitchElement.h
content/svg/content/src/SVGSymbolElement.cpp
content/svg/content/src/SVGSymbolElement.h
content/svg/content/src/SVGTSpanElement.cpp
content/svg/content/src/SVGTSpanElement.h
content/svg/content/src/SVGTagList.h
content/svg/content/src/SVGTests.cpp
content/svg/content/src/SVGTests.h
content/svg/content/src/SVGTextContentElement.cpp
content/svg/content/src/SVGTextContentElement.h
content/svg/content/src/SVGTextElement.cpp
content/svg/content/src/SVGTextElement.h
content/svg/content/src/SVGTextPathElement.cpp
content/svg/content/src/SVGTextPathElement.h
content/svg/content/src/SVGTextPositioningElement.cpp
content/svg/content/src/SVGTextPositioningElement.h
content/svg/content/src/SVGTitleElement.cpp
content/svg/content/src/SVGTitleElement.h
content/svg/content/src/SVGTransform.cpp
content/svg/content/src/SVGTransform.h
content/svg/content/src/SVGTransformList.cpp
content/svg/content/src/SVGTransformList.h
content/svg/content/src/SVGTransformListParser.cpp
content/svg/content/src/SVGTransformListParser.h
content/svg/content/src/SVGTransformListSMILType.cpp
content/svg/content/src/SVGTransformListSMILType.h
content/svg/content/src/SVGTransformableElement.cpp
content/svg/content/src/SVGTransformableElement.h
content/svg/content/src/SVGUseElement.cpp
content/svg/content/src/SVGUseElement.h
content/svg/content/src/SVGViewBoxSMILType.cpp
content/svg/content/src/SVGViewBoxSMILType.h
content/svg/content/src/SVGViewElement.cpp
content/svg/content/src/SVGViewElement.h
content/svg/content/src/SVGZoomEvent.cpp
content/svg/content/src/SVGZoomEvent.h
content/svg/content/src/crashtests/307322-1.svg
content/svg/content/src/crashtests/327705-1.svg
content/svg/content/src/crashtests/336994-1.html
content/svg/content/src/crashtests/344888-1.svg
content/svg/content/src/crashtests/345445-1.svg
content/svg/content/src/crashtests/360836-1.svg
content/svg/content/src/crashtests/367357-1.xhtml
content/svg/content/src/crashtests/369051-1.svg
content/svg/content/src/crashtests/369249-1.svg
content/svg/content/src/crashtests/369291-1.svg
content/svg/content/src/crashtests/369291-2.svg
content/svg/content/src/crashtests/369568-1.svg
content/svg/content/src/crashtests/372046-1.svg
content/svg/content/src/crashtests/372046-2.svg
content/svg/content/src/crashtests/374882-1.svg
content/svg/content/src/crashtests/380101-1.svg
content/svg/content/src/crashtests/381777-1.svg
content/svg/content/src/crashtests/383685-1.svg
content/svg/content/src/crashtests/385096.html
content/svg/content/src/crashtests/385554-1.html
content/svg/content/src/crashtests/385554-2.xul
content/svg/content/src/crashtests/388712-1.svg
content/svg/content/src/crashtests/395616-1.html
content/svg/content/src/crashtests/396618-1.html
content/svg/content/src/crashtests/397017-1.html
content/svg/content/src/crashtests/397551-1.svg
content/svg/content/src/crashtests/397704-1.svg
content/svg/content/src/crashtests/398926-both-different.svg
content/svg/content/src/crashtests/398926-both-same.svg
content/svg/content/src/crashtests/398926-fill.svg
content/svg/content/src/crashtests/398926-stroke.svg
content/svg/content/src/crashtests/405639-1.svg
content/svg/content/src/crashtests/406361-1.html
content/svg/content/src/crashtests/409811-1.html
content/svg/content/src/crashtests/410659-1.svg
content/svg/content/src/crashtests/410659-2.svg
content/svg/content/src/crashtests/410659-3.svg
content/svg/content/src/crashtests/412104-1.svg
content/svg/content/src/crashtests/413174-1.svg
content/svg/content/src/crashtests/414188-1.svg
content/svg/content/src/crashtests/427325-1.svg
content/svg/content/src/crashtests/428228-1.svg
content/svg/content/src/crashtests/428841-1.svg
content/svg/content/src/crashtests/435209-1.svg
content/svg/content/src/crashtests/436418-mpathRoot-1.svg
content/svg/content/src/crashtests/448244-1.svg
content/svg/content/src/crashtests/466576-1.xhtml
content/svg/content/src/crashtests/499879-1.svg
content/svg/content/src/crashtests/535691-1.svg
content/svg/content/src/crashtests/539167-1.svg
content/svg/content/src/crashtests/573316-1.svg
content/svg/content/src/crashtests/579356-1.svg
content/svg/content/src/crashtests/579356-2.svg
content/svg/content/src/crashtests/595608-1.svg
content/svg/content/src/crashtests/601251-1.html
content/svg/content/src/crashtests/601406-1.svg
content/svg/content/src/crashtests/603145-1.svg
content/svg/content/src/crashtests/613899-1.svg
content/svg/content/src/crashtests/613899-2.svg
content/svg/content/src/crashtests/719779-1.svg
content/svg/content/src/crashtests/723441-1.html
content/svg/content/src/crashtests/723441-resource.svg
content/svg/content/src/crashtests/751515-1.svg
content/svg/content/src/crashtests/761507-1.svg
content/svg/content/src/crashtests/831561.html
content/svg/content/src/crashtests/837450-1.svg
content/svg/content/src/crashtests/842463-1.html
content/svg/content/src/crashtests/847138-1.svg
content/svg/content/src/crashtests/864509.svg
content/svg/content/src/crashtests/880544-1.svg
content/svg/content/src/crashtests/880544-2.svg
content/svg/content/src/crashtests/880544-3.svg
content/svg/content/src/crashtests/880544-4.svg
content/svg/content/src/crashtests/880544-5.svg
content/svg/content/src/crashtests/898915-1.svg
content/svg/content/src/crashtests/crashtests.list
content/svg/content/src/crashtests/zero-size-image.svg
content/svg/content/src/moz.build
content/svg/content/src/nsISVGPoint.cpp
content/svg/content/src/nsISVGPoint.h
content/svg/content/src/nsSVGAngle.cpp
content/svg/content/src/nsSVGAngle.h
content/svg/content/src/nsSVGAnimatedTransformList.cpp
content/svg/content/src/nsSVGAnimatedTransformList.h
content/svg/content/src/nsSVGAttrTearoffTable.h
content/svg/content/src/nsSVGBoolean.cpp
content/svg/content/src/nsSVGBoolean.h
content/svg/content/src/nsSVGClass.cpp
content/svg/content/src/nsSVGClass.h
content/svg/content/src/nsSVGDataParser.cpp
content/svg/content/src/nsSVGDataParser.h
content/svg/content/src/nsSVGElement.cpp
content/svg/content/src/nsSVGElement.h
content/svg/content/src/nsSVGEnum.cpp
content/svg/content/src/nsSVGEnum.h
content/svg/content/src/nsSVGFeatures.cpp
content/svg/content/src/nsSVGFeatures.h
content/svg/content/src/nsSVGFeaturesList.h
content/svg/content/src/nsSVGFilters.cpp
content/svg/content/src/nsSVGFilters.h
content/svg/content/src/nsSVGInteger.cpp
content/svg/content/src/nsSVGInteger.h
content/svg/content/src/nsSVGIntegerPair.cpp
content/svg/content/src/nsSVGIntegerPair.h
content/svg/content/src/nsSVGLength2.cpp
content/svg/content/src/nsSVGLength2.h
content/svg/content/src/nsSVGNumber2.cpp
content/svg/content/src/nsSVGNumber2.h
content/svg/content/src/nsSVGNumberPair.cpp
content/svg/content/src/nsSVGNumberPair.h
content/svg/content/src/nsSVGPathDataParser.cpp
content/svg/content/src/nsSVGPathDataParser.h
content/svg/content/src/nsSVGPathGeometryElement.cpp
content/svg/content/src/nsSVGPathGeometryElement.h
content/svg/content/src/nsSVGPolyElement.cpp
content/svg/content/src/nsSVGPolyElement.h
content/svg/content/src/nsSVGString.cpp
content/svg/content/src/nsSVGString.h
content/svg/content/src/nsSVGTransform.cpp
content/svg/content/src/nsSVGTransform.h
content/svg/content/src/nsSVGViewBox.cpp
content/svg/content/src/nsSVGViewBox.h
content/svg/content/test/MutationEventChecker.js
content/svg/content/test/a_href_destination.svg
content/svg/content/test/a_href_helper_01.svg
content/svg/content/test/a_href_helper_02_03.svg
content/svg/content/test/a_href_helper_04.svg
content/svg/content/test/animated-svg-image-helper.html
content/svg/content/test/animated-svg-image-helper.svg
content/svg/content/test/bbox-helper.svg
content/svg/content/test/bounds-helper.svg
content/svg/content/test/dataTypes-helper.svg
content/svg/content/test/fragments-helper.svg
content/svg/content/test/getCTM-helper.svg
content/svg/content/test/getSubStringLength-helper.svg
content/svg/content/test/matrixUtils.js
content/svg/content/test/mochitest.ini
content/svg/content/test/pointer-events.js
content/svg/content/test/scientific-helper.svg
content/svg/content/test/selectSubString-helper.svg
content/svg/content/test/switch-helper.svg
content/svg/content/test/test_SVGLengthList-2.xhtml
content/svg/content/test/test_SVGLengthList.xhtml
content/svg/content/test/test_SVGMatrix.xhtml
content/svg/content/test/test_SVGNumberList.xhtml
content/svg/content/test/test_SVGPathSegList.xhtml
content/svg/content/test/test_SVGPointList.xhtml
content/svg/content/test/test_SVGStringList.xhtml
content/svg/content/test/test_SVGStyleElement.xhtml
content/svg/content/test/test_SVGTransformList.xhtml
content/svg/content/test/test_SVGTransformListAddition.xhtml
content/svg/content/test/test_SVGUnitTypes.html
content/svg/content/test/test_SVG_namespace_ids.html
content/svg/content/test/test_SVGxxxList.xhtml
content/svg/content/test/test_SVGxxxListIndexing.xhtml
content/svg/content/test/test_a_href_01.xhtml
content/svg/content/test/test_a_href_02.xhtml
content/svg/content/test/test_animLengthObjectIdentity.xhtml
content/svg/content/test/test_animLengthReadonly.xhtml
content/svg/content/test/test_animLengthUnits.xhtml
content/svg/content/test/test_bbox-with-invalid-viewBox.xhtml
content/svg/content/test/test_bbox.xhtml
content/svg/content/test/test_bounds.html
content/svg/content/test/test_bug872812.html
content/svg/content/test/test_dataTypes.html
content/svg/content/test/test_dataTypesModEvents.html
content/svg/content/test/test_fragments.html
content/svg/content/test/test_getCTM.html
content/svg/content/test/test_getElementById.xhtml
content/svg/content/test/test_getSubStringLength.xhtml
content/svg/content/test/test_hasFeature.xhtml
content/svg/content/test/test_lang.xhtml
content/svg/content/test/test_length.xhtml
content/svg/content/test/test_lengthParsing.html
content/svg/content/test/test_non-scaling-stroke.html
content/svg/content/test/test_nonAnimStrings.xhtml
content/svg/content/test/test_onerror.xhtml
content/svg/content/test/test_pathAnimInterpolation.xhtml
content/svg/content/test/test_pathSeg.xhtml
content/svg/content/test/test_pointAtLength.xhtml
content/svg/content/test/test_pointer-events-1a.xhtml
content/svg/content/test/test_pointer-events-1b.xhtml
content/svg/content/test/test_pointer-events-2.xhtml
content/svg/content/test/test_pointer-events-3.xhtml
content/svg/content/test/test_pointer-events-4.xhtml
content/svg/content/test/test_pointer-events-5.xhtml
content/svg/content/test/test_scientific.html
content/svg/content/test/test_selectSubString.xhtml
content/svg/content/test/test_stroke-linecap-hit-testing.xhtml
content/svg/content/test/test_switch.xhtml
content/svg/content/test/test_text.html
content/svg/content/test/test_text_2.html
content/svg/content/test/test_text_dirty.html
content/svg/content/test/test_text_lengthAdjust.html
content/svg/content/test/test_text_scaled.html
content/svg/content/test/test_text_selection.html
content/svg/content/test/test_text_update.html
content/svg/content/test/test_transform.xhtml
content/svg/content/test/test_transformParsing.html
content/svg/content/test/test_valueAsString.xhtml
content/svg/content/test/test_valueLeaks.xhtml
content/svg/content/test/test_viewport.html
content/svg/content/test/test_zoom.xhtml
content/svg/content/test/text-helper-scaled.svg
content/svg/content/test/text-helper-selection.svg
content/svg/content/test/text-helper.svg
content/svg/content/test/viewport-helper.svg
content/svg/content/test/zoom-helper.svg
content/svg/document/src/SVGDocument.cpp
content/svg/document/src/SVGDocument.h
content/svg/document/src/moz.build
content/svg/moz.build
content/xml/content/crashtest/420429.xul
content/xml/content/crashtest/453278-frame.xml
content/xml/content/crashtest/453278.html
content/xml/content/crashtest/803586.xhtml
content/xml/content/src/CDATASection.cpp
content/xml/content/src/CDATASection.h
content/xml/content/src/ProcessingInstruction.cpp
content/xml/content/src/ProcessingInstruction.h
content/xml/content/src/XMLStylesheetProcessingInstruction.cpp
content/xml/content/src/XMLStylesheetProcessingInstruction.h
content/xml/content/src/htmlmathml-f.ent
content/xml/content/src/moz.build
content/xml/content/src/nsXMLElement.cpp
content/xml/content/src/nsXMLElement.h
content/xml/document/crashtests/136896-1.xml
content/xml/document/crashtests/185285-1.xml
content/xml/document/crashtests/382636-1.xml
content/xml/document/crashtests/382636-2.svg
content/xml/document/crashtests/382636-3.xhtml
content/xml/document/crashtests/382636-4.xul
content/xml/document/crashtests/431703-1.xhtml
content/xml/document/crashtests/crashtests.list
content/xml/document/crashtests/tree.gif
content/xml/document/public/nsIXMLContentSink.h
content/xml/document/resources/XMLMonoPrint.css
content/xml/document/resources/XMLPrettyPrint.css
content/xml/document/resources/XMLPrettyPrint.xml
content/xml/document/resources/XMLPrettyPrint.xsl
content/xml/document/resources/jar.mn
content/xml/document/resources/moz.build
content/xml/document/src/XMLDocument.cpp
content/xml/document/src/XMLDocument.h
content/xml/document/src/nsXMLContentSink.cpp
content/xml/document/src/nsXMLContentSink.h
content/xml/document/src/nsXMLFragmentContentSink.cpp
content/xml/document/src/nsXMLPrettyPrinter.cpp
content/xml/document/src/nsXMLPrettyPrinter.h
content/xml/document/test/file_bug293347.xml
content/xml/document/test/file_bug293347xslt.xml
content/xml/document/test/mochitest.ini
content/xml/document/test/moz.build
content/xml/document/test/test_bug232004.xhtml
content/xml/document/test/test_bug293347.html
content/xml/document/test/test_bug343870.xhtml
content/xml/document/test/test_bug355213.xhtml
content/xml/document/test/test_bug392338.html
content/xml/document/test/test_bug399502.xhtml
content/xml/document/test/test_bug445330.html
content/xml/document/test/test_bug691215.html
content/xml/document/test/test_viewport.xhtml
content/xml/tests/books/bethlehem.gif
content/xml/tests/books/bill.gif
content/xml/tests/books/books.js
content/xml/tests/books/books.xml
content/xml/tests/books/charing.gif
content/xml/tests/books/classic.css
content/xml/tests/books/common.css
content/xml/tests/books/kerouac.gif
content/xml/tests/books/list.css
content/xml/tests/books/road.gif
content/xml/tests/books/welville.gif
content/xml/tests/docbook.css
content/xml/tests/docbooktest.xml
content/xml/tests/flamer.gif
content/xml/tests/load/display.css
content/xml/tests/load/display.xml
content/xml/tests/load/load.html
content/xml/tests/load/loadauth.html
content/xml/tests/load/loaddisplay.html
content/xml/tests/load/test.xml
content/xml/tests/script.xml
content/xml/tests/simple.xml
content/xml/tests/toc/book.css
content/xml/tests/toc/irslogo.gif
content/xml/tests/toc/minus.gif
content/xml/tests/toc/plus.gif
content/xml/tests/toc/rights.xml
content/xml/tests/toc/toc.css
content/xml/tests/toc/toc.js
content/xml/tests/xlink/auto.xml
content/xml/tests/xlink/link.css
content/xml/tests/xlink/manual.xml
content/xml/tests/xmlbase/xmlbase.css
content/xml/tests/xmlbase/xmlbase.xml
dom/mobileconnection/interfaces/nsIDOMMobileConnection.idl
gfx/layers/LayerUtils.cpp
--- a/b2g/app/b2g.js
+++ b/b2g/app/b2g.js
@@ -72,17 +72,17 @@ pref("network.protocol-handler.warn-exte
 // link clicks inside the browser before failing over to the system handlers.
 pref("network.protocol-handler.expose.rtsp", true);
 
 /* http prefs */
 pref("network.http.pipelining", true);
 pref("network.http.pipelining.ssl", true);
 pref("network.http.proxy.pipelining", true);
 pref("network.http.pipelining.maxrequests" , 6);
-pref("network.http.keep-alive.timeout", 600);
+pref("network.http.keep-alive.timeout", 109);
 pref("network.http.max-connections", 20);
 pref("network.http.max-persistent-connections-per-server", 6);
 pref("network.http.max-persistent-connections-per-proxy", 20);
 
 // Keep the old default of accepting all cookies,
 // no matter if you already visited the website or not
 pref("network.cookie.cookieBehavior", 0);
 
--- a/b2g/components/ActivitiesGlue.js
+++ b/b2g/components/ActivitiesGlue.js
@@ -55,17 +55,17 @@ ActivitiesDialog.prototype = {
     });
 
     SystemAppProxy.dispatchEvent(detail);
   },
 
   chooseActivity: function ap_chooseActivity(aOptions, aActivities, aCallback) {
     // B2G does not have an alternate activity system, make no choice and return.
     if (aActivities.length === 0) {
-      aCallback(Ci.nsIActivityUIGlueCallback.WEBAPPS_ACTIVITY, -1);
+      aCallback.handleEvent(Ci.nsIActivityUIGlueCallback.WEBAPPS_ACTIVITY, -1);
       return;
     }
 
     this.activities.push({
       name: aOptions.name,
       list: aActivities,
       callback: aCallback
     });
--- a/b2g/config/emulator-ics/sources.xml
+++ b/b2g/config/emulator-ics/sources.xml
@@ -14,17 +14,17 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="2a165bebfa19b11b697837409f9550dd2917c46c">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
-  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="2f89c43e798ccba631025bedc47a1fb24e830cf2"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="de1c755411949b50ae395b42e124af215ed9b702"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="30f87e602509415be4f69493c23cba1912f91ef5"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="ca283b9db2b151d465cfd2e19346cf58fe89e413"/>
   <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="d5800c36b2d5822fc3fe1899b9280401de466e1e"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="3512d982f336887a73283bb8d1147a8f7b822077"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
--- a/b2g/config/emulator-jb/sources.xml
+++ b/b2g/config/emulator-jb/sources.xml
@@ -12,17 +12,17 @@
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="e6383e6e785cc3ea237e902beb1092f9aa88e29d">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="2f89c43e798ccba631025bedc47a1fb24e830cf2"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="de1c755411949b50ae395b42e124af215ed9b702"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="30f87e602509415be4f69493c23cba1912f91ef5"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="3512d982f336887a73283bb8d1147a8f7b822077"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <!-- Stock Android things -->
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="5c45f43419d5582949284eee9cef0c43d866e03b"/>
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="3748b4168e7bd8d46457d4b6786003bc6a5223ce"/>
@@ -126,11 +126,11 @@
   <!-- Emulator specific things -->
   <project name="android-development" path="development" remote="b2g" revision="dab55669da8f48b6e57df95d5af9f16b4a87b0b1"/>
   <project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="3a9a17613cc685aa232432566ad6cc607eab4ec1"/>
   <project name="device_generic_goldfish" path="device/generic/goldfish" remote="b2g" revision="c3ee0c875393607430086f942950d1b3f496ab0e"/>
   <project name="platform/external/libnfc-nci" path="external/libnfc-nci" revision="7d33aaf740bbf6c7c6e9c34a92b371eda311b66b"/>
   <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="e16b5c17131d2296101b24c87887c9ccf057649f"/>
   <project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="0e56e450367cd802241b27164a2979188242b95f"/>
   <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="bc70af75eac79073c4c935bf1f71c0cb10e821b7"/>
-  <project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="683f93486878469c2de912d175956845c2b919d6"/>
+  <project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="b0bc602eeaabc308a3a9e913ec3a22ad3696364e"/>
   <project name="android-sdk" path="sdk" remote="b2g" revision="8b1365af38c9a653df97349ee53a3f5d64fd590a"/>
 </manifest>
--- a/b2g/config/emulator-kk/sources.xml
+++ b/b2g/config/emulator-kk/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="65fba428f8d76336b33ddd9e15900357953600ba">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="2f89c43e798ccba631025bedc47a1fb24e830cf2"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="de1c755411949b50ae395b42e124af215ed9b702"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="30f87e602509415be4f69493c23cba1912f91ef5"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="3512d982f336887a73283bb8d1147a8f7b822077"/>
   <!-- Stock Android things -->
--- a/b2g/config/emulator/sources.xml
+++ b/b2g/config/emulator/sources.xml
@@ -14,17 +14,17 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="2a165bebfa19b11b697837409f9550dd2917c46c">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
-  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="2f89c43e798ccba631025bedc47a1fb24e830cf2"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="de1c755411949b50ae395b42e124af215ed9b702"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="30f87e602509415be4f69493c23cba1912f91ef5"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="ca283b9db2b151d465cfd2e19346cf58fe89e413"/>
   <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="d5800c36b2d5822fc3fe1899b9280401de466e1e"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="3512d982f336887a73283bb8d1147a8f7b822077"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
--- a/b2g/config/flame/sources.xml
+++ b/b2g/config/flame/sources.xml
@@ -13,17 +13,17 @@
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="e6383e6e785cc3ea237e902beb1092f9aa88e29d">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="2f89c43e798ccba631025bedc47a1fb24e830cf2"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="de1c755411949b50ae395b42e124af215ed9b702"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="30f87e602509415be4f69493c23cba1912f91ef5"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="3512d982f336887a73283bb8d1147a8f7b822077"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <!-- Stock Android things -->
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="e95b4ce22c825da44d14299e1190ea39a5260bde"/>
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="471afab478649078ad7c75ec6b252481a59e19b8"/>
@@ -136,12 +136,12 @@
   <project name="platform/hardware/qcom/camera" path="hardware/qcom/camera" revision="81afa7f775b7559da52f468150d1fe090c3fbdc5"/>
   <project name="platform/hardware/qcom/display" path="hardware/qcom/display" revision="e38444b6ce12c7c25883272a439800376d5308eb"/>
   <project name="platform/hardware/qcom/gps" path="hardware/qcom/gps" revision="5dc48bd46f9589653f8bf297be5d73676f2e2867"/>
   <project name="platform/hardware/qcom/media" path="hardware/qcom/media" revision="8a0d0b0d9889ef99c4c6317c810db4c09295f15a"/>
   <project name="platform/hardware/qcom/wlan" path="hardware/qcom/wlan" revision="2208fa3537ace873b8f9ec2355055761c79dfd5f"/>
   <project name="platform/hardware/ril" path="hardware/ril" revision="c4e2ac95907a5519a0e09f01a0d8e27fec101af0"/>
   <project name="platform/system/bluetooth" path="system/bluetooth" revision="e1eb226fa3ad3874ea7b63c56a9dc7012d7ff3c2"/>
   <project name="platform/system/core" path="system/core" revision="bbf7212289fc8311e43f9d11e10788e310d36a08"/>
-  <project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="683f93486878469c2de912d175956845c2b919d6"/>
+  <project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="b0bc602eeaabc308a3a9e913ec3a22ad3696364e"/>
   <project name="platform/system/qcom" path="system/qcom" revision="1cdab258b15258b7f9657da70e6f06ebd5a2fc25"/>
   <project name="platform/vendor/qcom/msm8610" path="device/qcom/msm8610" revision="4ae5df252123591d5b941191790e7abed1bce5a4"/>
 </manifest>
--- a/b2g/config/gaia.json
+++ b/b2g/config/gaia.json
@@ -1,9 +1,9 @@
 {
     "git": {
         "git_revision": "", 
         "remote": "", 
         "branch": ""
     }, 
-    "revision": "c244070248a9c226a6fabc45f9de5dd10d7f4d6f", 
+    "revision": "d37aa6da234abefd5227511661ec6a365c1cfb84", 
     "repo_path": "/integration/gaia-central"
 }
--- a/b2g/config/hamachi/sources.xml
+++ b/b2g/config/hamachi/sources.xml
@@ -12,17 +12,17 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="b2g/ics_strawberry" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="2a165bebfa19b11b697837409f9550dd2917c46c">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
-  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="2f89c43e798ccba631025bedc47a1fb24e830cf2"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="de1c755411949b50ae395b42e124af215ed9b702"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="30f87e602509415be4f69493c23cba1912f91ef5"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="3512d982f336887a73283bb8d1147a8f7b822077"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
   <project name="platform/bionic" path="bionic" revision="d2eb6c7b6e1bc7643c17df2d9d9bcb1704d0b9ab"/>
--- a/b2g/config/helix/sources.xml
+++ b/b2g/config/helix/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <default remote="caf" revision="b2g/ics_strawberry" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="2a165bebfa19b11b697837409f9550dd2917c46c">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
-  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="2f89c43e798ccba631025bedc47a1fb24e830cf2"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="de1c755411949b50ae395b42e124af215ed9b702"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="30f87e602509415be4f69493c23cba1912f91ef5"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
   <project name="platform/bionic" path="bionic" revision="d2eb6c7b6e1bc7643c17df2d9d9bcb1704d0b9ab"/>
--- a/b2g/config/inari/sources.xml
+++ b/b2g/config/inari/sources.xml
@@ -14,17 +14,17 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="ics_chocolate_rb4.2" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="2a165bebfa19b11b697837409f9550dd2917c46c">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
-  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="2f89c43e798ccba631025bedc47a1fb24e830cf2"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="de1c755411949b50ae395b42e124af215ed9b702"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="30f87e602509415be4f69493c23cba1912f91ef5"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="3512d982f336887a73283bb8d1147a8f7b822077"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
   <project name="platform/bionic" path="bionic" revision="cd5dfce80bc3f0139a56b58aca633202ccaee7f8"/>
--- a/b2g/config/leo/sources.xml
+++ b/b2g/config/leo/sources.xml
@@ -12,17 +12,17 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="b2g/ics_strawberry" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="2a165bebfa19b11b697837409f9550dd2917c46c">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
-  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="2f89c43e798ccba631025bedc47a1fb24e830cf2"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="de1c755411949b50ae395b42e124af215ed9b702"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="30f87e602509415be4f69493c23cba1912f91ef5"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="3512d982f336887a73283bb8d1147a8f7b822077"/>
   <project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
--- a/b2g/config/mako/sources.xml
+++ b/b2g/config/mako/sources.xml
@@ -12,17 +12,17 @@
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="e6383e6e785cc3ea237e902beb1092f9aa88e29d">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="2f89c43e798ccba631025bedc47a1fb24e830cf2"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="de1c755411949b50ae395b42e124af215ed9b702"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="30f87e602509415be4f69493c23cba1912f91ef5"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="3512d982f336887a73283bb8d1147a8f7b822077"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <!-- Stock Android things -->
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="5c45f43419d5582949284eee9cef0c43d866e03b"/>
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="3748b4168e7bd8d46457d4b6786003bc6a5223ce"/>
@@ -122,17 +122,17 @@
   <project name="platform/system/netd" path="system/netd" revision="56112dd7b811301b718d0643a82fd5cac9522073"/>
   <project name="platform/system/security" path="system/security" revision="f48ff68fedbcdc12b570b7699745abb6e7574907"/>
   <project name="platform/system/vold" path="system/vold" revision="8de05d4a52b5a91e7336e6baa4592f945a6ddbea"/>
   <default remote="caf" revision="refs/tags/android-4.3_r2.1" sync-j="4"/>
   <!-- Nexus 4 specific things -->
   <project name="device-mako" path="device/lge/mako" remote="b2g" revision="78d17f0c117f0c66dd55ee8d5c5dde8ccc93ecba"/>
   <project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="3a9a17613cc685aa232432566ad6cc607eab4ec1"/>
   <project name="device/lge/mako-kernel" path="device/lge/mako-kernel" revision="d1729e53d71d711c8fde25eab8728ff2b9b4df0e"/>
-  <project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="683f93486878469c2de912d175956845c2b919d6"/>
+  <project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="b0bc602eeaabc308a3a9e913ec3a22ad3696364e"/>
   <project name="platform/external/libnfc-nci" path="external/libnfc-nci" revision="7d33aaf740bbf6c7c6e9c34a92b371eda311b66b"/>
   <project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="0e56e450367cd802241b27164a2979188242b95f"/>
   <project name="platform/hardware/broadcom/wlan" path="hardware/broadcom/wlan" revision="0e1929fa3aa38bf9d40e9e953d619fab8164c82e"/>
   <project name="platform/hardware/qcom/audio" path="hardware/qcom/audio" revision="b0a528d839cfd9d170d092fe3743b5252b4243a6"/>
   <project name="platform/hardware/qcom/bt" path="hardware/qcom/bt" revision="380945eaa249a2dbdde0daa4c8adb8ca325edba6"/>
   <project name="platform/hardware/qcom/display" path="hardware/qcom/display" revision="6f3b0272cefaffeaed2a7d2bb8f633059f163ddc"/>
   <project name="platform/hardware/qcom/keymaster" path="hardware/qcom/keymaster" revision="16da8262c997a5a0d797885788a64a0771b26910"/>
   <project name="platform/hardware/qcom/media" path="hardware/qcom/media" revision="689b476ba3eb46c34b81343295fe144a0e81a18e"/>
--- a/b2g/config/wasabi/sources.xml
+++ b/b2g/config/wasabi/sources.xml
@@ -12,17 +12,17 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="ics_chocolate_rb4.2" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="2a165bebfa19b11b697837409f9550dd2917c46c">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
-  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="2f89c43e798ccba631025bedc47a1fb24e830cf2"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="de1c755411949b50ae395b42e124af215ed9b702"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="30f87e602509415be4f69493c23cba1912f91ef5"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="3512d982f336887a73283bb8d1147a8f7b822077"/>
   <project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
--- a/build/pgo/server-locations.txt
+++ b/build/pgo/server-locations.txt
@@ -78,16 +78,17 @@ http://example.com:80                pri
 http://www.example.com:80            privileged
 http://test1.example.com:80          privileged
 http://test2.example.com:80          privileged
 http://sub1.test1.example.com:80     privileged
 http://sub1.test2.example.com:80     privileged
 http://sub2.test1.example.com:80     privileged
 http://sub2.test2.example.com:80     privileged
 http://noxul.example.com:80          privileged,noxul
+http://example.net:80                privileged
 
 https://example.com:443                privileged
 https://test1.example.com:443          privileged
 https://test2.example.com:443          privileged
 https://sub1.test1.example.com:443     privileged
 https://sub1.test2.example.com:443     privileged
 https://sub2.test1.example.com:443     privileged
 https://sub2.test2.example.com:443     privileged
--- a/content/media/plugins/MediaPluginReader.cpp
+++ b/content/media/plugins/MediaPluginReader.cpp
@@ -319,17 +319,31 @@ bool MediaPluginReader::DecodeAudioData(
 
 nsresult MediaPluginReader::Seek(int64_t aTarget, int64_t aStartTime, int64_t aEndTime, int64_t aCurrentTime)
 {
   NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
 
   mVideoQueue.Reset();
   mAudioQueue.Reset();
 
-  mAudioSeekTimeUs = mVideoSeekTimeUs = aTarget;
+  if (mHasAudio && mHasVideo) {
+    // The decoder seeks/demuxes audio and video streams separately. So if
+    // we seek both audio and video to aTarget, the audio stream can typically
+    // seek closer to the seek target, since typically every audio block is
+    // a sync point, whereas for video there are only keyframes once every few
+    // seconds. So if we have both audio and video, we must seek the video
+    // stream to the preceeding keyframe first, get the stream time, and then
+    // seek the audio stream to match the video stream's time. Otherwise, the
+    // audio and video streams won't be in sync after the seek.
+    mVideoSeekTimeUs = aTarget;
+    const VideoData* v = DecodeToFirstVideoData();
+    mAudioSeekTimeUs = v ? v->mTime : aTarget;
+  } else {
+    mAudioSeekTimeUs = mVideoSeekTimeUs = aTarget;
+  }
 
   return NS_OK;
 }
 
 MediaPluginReader::ImageBufferCallback::ImageBufferCallback(mozilla::layers::ImageContainer *aImageContainer) :
   mImageContainer(aImageContainer)
 {
 }
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -139,20 +139,16 @@
 
 #include "nsIDOMMobileMessageManager.h"
 #include "nsIDOMMozSmsMessage.h"
 #include "nsIDOMMozMmsMessage.h"
 #include "nsIDOMSmsFilter.h"
 #include "nsIDOMSmsSegmentInfo.h"
 #include "nsIDOMMozMobileMessageThread.h"
 
-#ifdef MOZ_B2G_RIL
-#include "nsIDOMMobileConnection.h"
-#endif // MOZ_B2G_RIL
-
 #ifdef MOZ_B2G_FM
 #include "FMRadio.h"
 #endif
 
 #include "nsIDOMGlobalObjectConstructor.h"
 #include "nsDebug.h"
 
 #include "mozilla/dom/BindingUtils.h"
@@ -408,21 +404,16 @@ static nsDOMClassInfoData sClassInfoData
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
   NS_DEFINE_CLASSINFO_DATA(MozSmsSegmentInfo, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
   NS_DEFINE_CLASSINFO_DATA(MozMobileMessageThread, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
-#ifdef MOZ_B2G_RIL
-  NS_DEFINE_CLASSINFO_DATA(MozMobileConnection, nsDOMGenericSH,
-                           DOM_DEFAULT_SCRIPTABLE_FLAGS)
-#endif
-
   NS_DEFINE_CLASSINFO_DATA(CSSFontFaceRule, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
   NS_DEFINE_CHROME_ONLY_CLASSINFO_DATA(ContentFrameMessageManager, nsEventTargetSH,
                                        DOM_DEFAULT_SCRIPTABLE_FLAGS |
                                        nsIXPCScriptable::IS_GLOBAL_OBJECT)
   NS_DEFINE_CHROME_ONLY_CLASSINFO_DATA(ChromeMessageBroadcaster, nsDOMGenericSH,
                                        DOM_DEFAULT_SCRIPTABLE_FLAGS)
@@ -1045,23 +1036,16 @@ nsDOMClassInfo::Init()
   DOM_CLASSINFO_MAP_BEGIN(MozSmsSegmentInfo, nsIDOMMozSmsSegmentInfo)
      DOM_CLASSINFO_MAP_ENTRY(nsIDOMMozSmsSegmentInfo)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(MozMobileMessageThread, nsIDOMMozMobileMessageThread)
      DOM_CLASSINFO_MAP_ENTRY(nsIDOMMozMobileMessageThread)
   DOM_CLASSINFO_MAP_END
 
-#ifdef MOZ_B2G_RIL
-  DOM_CLASSINFO_MAP_BEGIN(MozMobileConnection, nsIDOMMozMobileConnection)
-     DOM_CLASSINFO_MAP_ENTRY(nsIDOMMozMobileConnection)
-     DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
-  DOM_CLASSINFO_MAP_END
-#endif // MOZ_B2G_RIL
-
   DOM_CLASSINFO_MAP_BEGIN(CSSFontFaceRule, nsIDOMCSSFontFaceRule)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSFontFaceRule)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(ContentFrameMessageManager, nsISupports)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
     DOM_CLASSINFO_MAP_ENTRY(nsIMessageListenerManager)
     DOM_CLASSINFO_MAP_ENTRY(nsIMessageSender)
--- a/dom/base/nsDOMClassInfoClasses.h
+++ b/dom/base/nsDOMClassInfoClasses.h
@@ -68,20 +68,16 @@ DOMCI_CLASS(ModalContentWindow)
 
 DOMCI_CLASS(MozMobileMessageManager)
 DOMCI_CLASS(MozSmsMessage)
 DOMCI_CLASS(MozMmsMessage)
 DOMCI_CLASS(MozSmsFilter)
 DOMCI_CLASS(MozSmsSegmentInfo)
 DOMCI_CLASS(MozMobileMessageThread)
 
-#ifdef MOZ_B2G_RIL
-DOMCI_CLASS(MozMobileConnection)
-#endif
-
 // @font-face in CSS
 DOMCI_CLASS(CSSFontFaceRule)
 
 DOMCI_CLASS(ContentFrameMessageManager)
 DOMCI_CLASS(ChromeMessageBroadcaster)
 DOMCI_CLASS(ChromeMessageSender)
 
 DOMCI_CLASS(MozCSSKeyframeRule)
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -812,21 +812,37 @@ DOMInterfaces = {
 'MozIcc': {
     'nativeType': 'mozilla::dom::Icc',
 },
 
 'MozIccManager': {
     'nativeType': 'mozilla::dom::IccManager',
 },
 
+'MozMobileCellInfo': {
+    'nativeType': 'mozilla::dom::MobileCellInfo',
+},
+
+'MozMobileConnection': {
+    'nativeType': 'mozilla::dom::MobileConnection',
+},
+
 'MozMobileConnectionArray': {
     'nativeType': 'mozilla::dom::MobileConnectionArray',
     'resultNotAddRefed': [ 'item' ]
 },
 
+'MozMobileConnectionInfo': {
+    'nativeType': 'mozilla::dom::MobileConnectionInfo',
+},
+
+'MozMobileNetworkInfo': {
+    'nativeType': 'mozilla::dom::MobileNetworkInfo',
+},
+
 'MozNamedAttrMap': {
     'nativeType': 'nsDOMAttributeMap',
 },
 
 'MozSpeakerManager': {
     'nativeType': 'mozilla::dom::SpeakerManager',
     'headerFile': 'SpeakerManager.h'
 },
@@ -1901,17 +1917,16 @@ addExternalIface('imgINotificationObserv
 addExternalIface('imgIRequest', nativeType='imgIRequest', notflattened=True)
 addExternalIface('MenuBuilder', nativeType='nsIMenuBuilder', notflattened=True)
 addExternalIface('MozBoxObject', nativeType='nsIBoxObject')
 addExternalIface('MozControllers', nativeType='nsIControllers')
 addExternalIface('MozFrameLoader', nativeType='nsIFrameLoader', notflattened=True)
 addExternalIface('MozFrameRequestCallback', nativeType='nsIFrameRequestCallback',
                  notflattened=True)
 addExternalIface('MozIccInfo', headerFile='nsIDOMIccInfo.h')
-addExternalIface('MozMobileConnection', headerFile='nsIDOMMobileConnection.h')
 addExternalIface('MozMobileMessageManager', headerFile='nsIDOMMobileMessageManager.h')
 addExternalIface('MozObserver', nativeType='nsIObserver', notflattened=True)
 addExternalIface('MozRDFCompositeDataSource', nativeType='nsIRDFCompositeDataSource',
                  notflattened=True)
 addExternalIface('MozRDFResource', nativeType='nsIRDFResource', notflattened=True)
 addExternalIface('MozTreeBoxObject', nativeType='nsITreeBoxObject',
                  notflattened=True)
 addExternalIface('MozTreeColumn', nativeType='nsITreeColumn',
--- a/dom/bluetooth/BluetoothRilListener.cpp
+++ b/dom/bluetooth/BluetoothRilListener.cpp
@@ -2,17 +2,17 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* 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/. */
 
 #include "BluetoothRilListener.h"
 
 #include "BluetoothHfpManager.h"
-#include "nsIDOMMobileConnection.h"
+#include "nsIMobileConnectionInfo.h"
 #include "nsIRadioInterfaceLayer.h"
 #include "nsRadioInterfaceLayer.h"
 #include "nsServiceManagerUtils.h"
 #include "nsString.h"
 
 USING_BLUETOOTH_NAMESPACE
 
 /**
@@ -345,17 +345,17 @@ BluetoothRilListener::SelectClient()
   // Reset mClientId
   mClientId = mMobileConnListeners.Length();
 
   nsCOMPtr<nsIMobileConnectionProvider> connection =
     do_GetService(NS_RILCONTENTHELPER_CONTRACTID);
   NS_ENSURE_TRUE_VOID(connection);
 
   for (uint32_t i = 0; i < mMobileConnListeners.Length(); i++) {
-    nsCOMPtr<nsIDOMMozMobileConnectionInfo> voiceInfo;
+    nsCOMPtr<nsIMobileConnectionInfo> voiceInfo;
     connection->GetVoiceConnectionInfo(i, getter_AddRefs(voiceInfo));
     if (!voiceInfo) {
       BT_WARNING("%s: Failed to get voice connection info", __FUNCTION__);
       continue;
     }
 
     nsString regState;
     voiceInfo->GetState(regState);
--- a/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.cpp
+++ b/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.cpp
@@ -12,19 +12,20 @@
 
 #include "jsapi.h"
 #include "mozilla/dom/bluetooth/BluetoothTypes.h"
 #include "mozilla/Services.h"
 #include "mozilla/StaticPtr.h"
 #include "nsContentUtils.h"
 #include "nsIAudioManager.h"
 #include "nsIDOMIccInfo.h"
-#include "nsIDOMMobileConnection.h"
 #include "nsIIccProvider.h"
+#include "nsIMobileConnectionInfo.h"
 #include "nsIMobileConnectionProvider.h"
+#include "nsIMobileNetworkInfo.h"
 #include "nsIObserverService.h"
 #include "nsISettingsService.h"
 #include "nsITelephonyProvider.h"
 #include "nsRadioInterfaceLayer.h"
 #include "nsServiceManagerUtils.h"
 #include "nsThreadUtils.h"
 
 #define MOZSETTINGS_CHANGED_ID               "mozsettings-changed"
@@ -401,16 +402,20 @@ BluetoothHfpManager::Init()
 
   if (NS_FAILED(obs->AddObserver(this, MOZSETTINGS_CHANGED_ID, false)) ||
       NS_FAILED(obs->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, false))) {
     BT_WARNING("Failed to add observers!");
     return false;
   }
 
   hal::RegisterBatteryObserver(this);
+  // Update to the latest battery level
+  hal::BatteryInformation batteryInfo;
+  hal::GetCurrentBatteryInformation(&batteryInfo);
+  Notify(batteryInfo);
 
   mListener = new BluetoothRilListener();
   NS_ENSURE_TRUE(mListener->Listen(true), false);
 
   nsCOMPtr<nsISettingsService> settings =
     do_GetService("@mozilla.org/settingsService;1");
   NS_ENSURE_TRUE(settings, false);
 
@@ -516,17 +521,17 @@ BluetoothHfpManager::Observe(nsISupports
   return NS_OK;
 }
 
 void
 BluetoothHfpManager::Notify(const hal::BatteryInformation& aBatteryInfo)
 {
   // Range of battery level: [0, 1], double
   // Range of CIND::BATTCHG: [0, 5], int
-  mBattChg = (int) ceil(aBatteryInfo.level() * 5.0);
+  mBattChg = (int) round(aBatteryInfo.level() * 5.0);
   UpdateDeviceCIND();
 }
 
 void
 BluetoothHfpManager::ProcessConnectionState(bthf_connection_state_t aState,
                                             bt_bdaddr_t* aBdAddress)
 {
   BT_LOGR("state %d", aState);
@@ -884,17 +889,17 @@ BluetoothHfpManager::HandleVolumeChanged
 
 void
 BluetoothHfpManager::HandleVoiceConnectionChanged(uint32_t aClientId)
 {
   nsCOMPtr<nsIMobileConnectionProvider> connection =
     do_GetService(NS_RILCONTENTHELPER_CONTRACTID);
   NS_ENSURE_TRUE_VOID(connection);
 
-  nsCOMPtr<nsIDOMMozMobileConnectionInfo> voiceInfo;
+  nsCOMPtr<nsIMobileConnectionInfo> voiceInfo;
   connection->GetVoiceConnectionInfo(aClientId, getter_AddRefs(voiceInfo));
   NS_ENSURE_TRUE_VOID(voiceInfo);
 
   nsString type;
   voiceInfo->GetType(type);
   mPhoneType = GetPhoneType(type);
 
   // Roam
@@ -919,17 +924,17 @@ BluetoothHfpManager::HandleVoiceConnecti
   JS::Rooted<JS::Value> value(cx);
   voiceInfo->GetRelSignalStrength(&value);
   NS_ENSURE_TRUE_VOID(value.isNumber());
   mSignal = (int)ceil(value.toNumber() / 20.0);
 
   UpdateDeviceCIND();
 
   // Operator name
-  nsCOMPtr<nsIDOMMozMobileNetworkInfo> network;
+  nsCOMPtr<nsIMobileNetworkInfo> network;
   voiceInfo->GetNetwork(getter_AddRefs(network));
   NS_ENSURE_TRUE_VOID(network);
   network->GetLongName(mOperatorName);
 
   // According to GSM 07.07, "<format> indicates if the format is alphanumeric
   // or numeric; long alphanumeric format can be upto 16 characters long and
   // short format up to 8 characters (refer GSM MoU SE.13 [9])..."
   // However, we found that the operator name may sometimes be longer than 16
--- a/dom/bluetooth/bluez/BluetoothHfpManager.cpp
+++ b/dom/bluetooth/bluez/BluetoothHfpManager.cpp
@@ -21,19 +21,20 @@
 #include "mozilla/StaticPtr.h"
 #include "nsContentUtils.h"
 #include "nsIObserverService.h"
 #include "nsISettingsService.h"
 #include "nsServiceManagerUtils.h"
 
 #ifdef MOZ_B2G_RIL
 #include "nsIDOMIccInfo.h"
-#include "nsIDOMMobileConnection.h"
 #include "nsIIccProvider.h"
+#include "nsIMobileConnectionInfo.h"
 #include "nsIMobileConnectionProvider.h"
+#include "nsIMobileNetworkInfo.h"
 #include "nsITelephonyProvider.h"
 #include "nsRadioInterfaceLayer.h"
 #endif
 
 /**
  * BRSF bitmask of AG supported features. See 4.34.1 "Bluetooth Defined AT
  * Capabilities" in Bluetooth hands-free profile 1.6
  */
@@ -215,17 +216,17 @@ BluetoothHfpManager::Observe(nsISupports
   return NS_OK;
 }
 
 void
 BluetoothHfpManager::Notify(const hal::BatteryInformation& aBatteryInfo)
 {
   // Range of battery level: [0, 1], double
   // Range of CIND::BATTCHG: [0, 5], int
-  int level = ceil(aBatteryInfo.level() * 5.0);
+  int level = round(aBatteryInfo.level() * 5.0);
   if (level != sCINDItems[CINDType::BATTCHG].value) {
     sCINDItems[CINDType::BATTCHG].value = level;
     SendCommand(RESPONSE_CIEV, CINDType::BATTCHG);
   }
 }
 
 #ifdef MOZ_B2G_RIL
 class BluetoothHfpManager::RespondToBLDNTask : public Task
@@ -420,16 +421,20 @@ BluetoothHfpManager::Init()
 
   if (NS_FAILED(obs->AddObserver(this, MOZSETTINGS_CHANGED_ID, false)) ||
       NS_FAILED(obs->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, false))) {
     BT_WARNING("Failed to add observers!");
     return false;
   }
 
   hal::RegisterBatteryObserver(this);
+  // Update to the latest battery level
+  hal::BatteryInformation batteryInfo;
+  hal::GetCurrentBatteryInformation(&batteryInfo);
+  Notify(batteryInfo);
 
 #ifdef MOZ_B2G_RIL
   mListener = new BluetoothRilListener();
   if (!mListener->Listen(true)) {
     BT_WARNING("Failed to start listening RIL");
     return false;
   }
 #endif
@@ -600,17 +605,17 @@ BluetoothHfpManager::HandleVolumeChanged
 #ifdef MOZ_B2G_RIL
 void
 BluetoothHfpManager::HandleVoiceConnectionChanged(uint32_t aClientId)
 {
   nsCOMPtr<nsIMobileConnectionProvider> connection =
     do_GetService(NS_RILCONTENTHELPER_CONTRACTID);
   NS_ENSURE_TRUE_VOID(connection);
 
-  nsCOMPtr<nsIDOMMozMobileConnectionInfo> voiceInfo;
+  nsCOMPtr<nsIMobileConnectionInfo> voiceInfo;
   connection->GetVoiceConnectionInfo(aClientId, getter_AddRefs(voiceInfo));
   NS_ENSURE_TRUE_VOID(voiceInfo);
 
   nsString type;
   voiceInfo->GetType(type);
   mPhoneType = GetPhoneType(type);
 
   bool roaming;
@@ -643,17 +648,17 @@ BluetoothHfpManager::HandleVoiceConnecti
   nsString mode;
   connection->GetNetworkSelectionMode(aClientId, mode);
   if (mode.EqualsLiteral("manual")) {
     mNetworkSelectionMode = 1;
   } else {
     mNetworkSelectionMode = 0;
   }
 
-  nsCOMPtr<nsIDOMMozMobileNetworkInfo> network;
+  nsCOMPtr<nsIMobileNetworkInfo> network;
   voiceInfo->GetNetwork(getter_AddRefs(network));
   NS_ENSURE_TRUE_VOID(network);
   network->GetLongName(mOperatorName);
 
   // According to GSM 07.07, "<format> indicates if the format is alphanumeric
   // or numeric; long alphanumeric format can be upto 16 characters long and
   // short format up to 8 characters (refer GSM MoU SE.13 [9])..."
   // However, we found that the operator name may sometimes be longer than 16
--- a/dom/mobileconnection/interfaces/moz.build
+++ b/dom/mobileconnection/interfaces/moz.build
@@ -1,12 +1,14 @@
 # -*- 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 += [
-    'nsIDOMMobileConnection.idl',
+    'nsIMobileCellInfo.idl',
+    'nsIMobileConnectionInfo.idl',
     'nsIMobileConnectionProvider.idl',
+    'nsIMobileNetworkInfo.idl',
 ]
 
 XPIDL_MODULE = 'dom_mobileconnection'
deleted file mode 100644
--- a/dom/mobileconnection/interfaces/nsIDOMMobileConnection.idl
+++ /dev/null
@@ -1,704 +0,0 @@
-/* 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/. */
-
-#include "nsIDOMEventTarget.idl"
-
-interface nsIDOMEventListener;
-interface nsIDOMDOMRequest;
-interface nsIDOMMozMobileConnectionInfo;
-interface nsIDOMMozMobileNetworkInfo;
-interface nsIDOMMozMobileCellInfo;
-interface nsIDOMMozMobileCFInfo;
-interface nsIVariant;
-
-[scriptable, builtinclass, uuid(e891c732-216b-40b2-bda5-5a9d62e08779)]
-interface nsIDOMMozMobileConnection : nsIDOMEventTarget
-{
-  const long ICC_SERVICE_CLASS_VOICE = (1 << 0);
-  const long ICC_SERVICE_CLASS_DATA = (1 << 1);
-  const long ICC_SERVICE_CLASS_FAX = (1 << 2);
-  const long ICC_SERVICE_CLASS_SMS = (1 << 3);
-  const long ICC_SERVICE_CLASS_DATA_SYNC = (1 << 4);
-  const long ICC_SERVICE_CLASS_DATA_ASYNC = (1 << 5);
-  const long ICC_SERVICE_CLASS_PACKET = (1 << 6);
-  const long ICC_SERVICE_CLASS_PAD = (1 << 7);
-  const long ICC_SERVICE_CLASS_MAX = (1 << 7);
-
-  /**
-   * Call barring program.
-   *
-   * (0) all outgoing.
-   * (1) outgoing international.
-   * (2) outgoing international except to home country.
-   * (3) all incoming.
-   * (4) incoming when roaming outside the home country.
-   */
-  const long CALL_BARRING_PROGRAM_ALL_OUTGOING                       = 0;
-  const long CALL_BARRING_PROGRAM_OUTGOING_INTERNATIONAL             = 1;
-  const long CALL_BARRING_PROGRAM_OUTGOING_INTERNATIONAL_EXCEPT_HOME = 2;
-  const long CALL_BARRING_PROGRAM_ALL_INCOMING                       = 3;
-  const long CALL_BARRING_PROGRAM_INCOMING_ROAMING                   = 4;
-
-  /**
-   * Calling line identification restriction constants.
-   *
-   * @see 3GPP TS 27.007 7.7 Defined values
-   *
-   * (0) Uses subscription default value.
-   * (1) Restricts CLI presentation.
-   * (2) Allows CLI presentation.
-   */
-  const long CLIR_DEFAULT     = 0;
-  const long CLIR_INVOCATION  = 1;
-  const long CLIR_SUPPRESSION = 2;
-
-  /**
-   * These two fields can be accessed by privileged applications with the
-   * 'mobilenetwork' permission.
-   */
-  readonly attribute DOMString lastKnownNetwork;
-  readonly attribute DOMString lastKnownHomeNetwork;
-
-  /**
-   * Information about the voice connection.
-   */
-  readonly attribute nsIDOMMozMobileConnectionInfo voice;
-
-  /**
-   * Information about the data connection.
-   */
-  readonly attribute nsIDOMMozMobileConnectionInfo data;
-
-  /**
-   * Integrated Circuit Card Identifier of the SIM this
-   * mobile connection corresponds to.
-   */
-  readonly attribute DOMString iccId;
-
-  /**
-   * The selection mode of the voice and data networks.
-   *
-   * Possible values: null (unknown), 'automatic', 'manual'
-   */
-  readonly attribute DOMString networkSelectionMode;
-
-  /**
-   * The current radio state.
-   *
-   * Possible values: null (unknown), 'enabling', 'enabled', 'disabling',
-   * 'disabled'
-   */
-  readonly attribute DOMString radioState;
-
-  /**
-   * Array of network types that are supported by this radio.
-   *
-   * Possible values: 'gsm', 'wcdma', 'cdma', 'evdo', 'lte'
-   */
-  readonly attribute nsIVariant supportedNetworkTypes;
-
-  /**
-   * Search for available networks.
-   *
-   * If successful, the request's onsuccess will be called, and the request's
-   * result will be an array of nsIDOMMozMobileNetworkInfo.
-   *
-   * Otherwise, the request's onerror will be called, and the request's error
-   * will be either 'RadioNotAvailable', 'RequestNotSupported',
-   * or 'GenericFailure'.
-   */
-  nsIDOMDOMRequest getNetworks();
-
-  /**
-   * Manually selects the passed in network, overriding the radio's current
-   * selection.
-   *
-   * If successful, the request's onsuccess will be called.
-   * Note: If the network was actually changed by this request,
-   * the 'voicechange' and 'datachange' events will also be fired.
-   *
-   * Otherwise, the request's onerror will be called, and the request's error
-   * will be either 'RadioNotAvailable', 'RequestNotSupported',
-   * 'IllegalSIMorME', or 'GenericFailure'
-   */
-  nsIDOMDOMRequest selectNetwork(in nsIDOMMozMobileNetworkInfo network);
-
-  /**
-   * Tell the radio to automatically select a network.
-   *
-   * If successful, the request's onsuccess will be called.
-   * Note: If the network was actually changed by this request, the
-   * 'voicechange' and 'datachange' events will also be fired.
-   *
-   * Otherwise, the request's onerror will be called, and the request's error
-   * will be either 'RadioNotAvailable', 'RequestNotSupported',
-   * 'IllegalSIMorME', or 'GenericFailure'
-   */
-  nsIDOMDOMRequest selectNetworkAutomatically();
-
-  /**
-   * Set preferred network type
-   *
-   * @param type
-   *        DOMString indicates the desired preferred network type.
-   *        Possible values: 'wcdma/gsm', 'gsm', 'wcdma', 'wcdma/gsm-auto',
-   *                         'cdma/evdo', 'cdma', 'evdo', 'wcdma/gsm/cdma/evdo',
-   *                         'lte/cdma/evdo', 'lte/wcdma/gsm',
-   *                         'lte/wcdma/gsm/cdma/evdo' or 'lte'.
-   *
-   * If successful, the request's onsuccess will be called.
-   *
-   * Otherwise, the request's onerror will be called, and the request's error
-   * will be either 'RadioNotAvailable', 'RequestNotSupported',
-   * 'InvalidParameter', 'ModeNotSupported' or 'GenericFailure'
-   *
-   * TODO: param "type" should be a WebIDL enum when this interface is converted
-   *       to WebIDL
-   */
-  nsIDOMDOMRequest setPreferredNetworkType(in DOMString type);
-
-  /**
-   * Query current preferred network type
-   *
-   * If successful, the request's onsuccess will be called. And the request's
-   * result will be a string indicating the current preferred network type.
-   * The value will be either 'wcdma/gsm', 'gsm', 'wcdma', 'wcdma/gsm-auto',
-   * 'cdma/evdo', 'cdma', 'evdo', 'wcdma/gsm/cdma/evdo', 'lte/cdma/evdo',
-   * 'lte/wcdma/gsm', 'lte/wcdma/gsm/cdma/evdo' or 'lte'.
-   *
-   * Otherwise, the request's onerror will be called, and the request's error
-   * will be either 'RadioNotAvailable', 'RequestNotSupported',
-   * or 'GenericFailure'
-   */
-  nsIDOMDOMRequest getPreferredNetworkType();
-
-  /**
-   * Set roaming preference
-   *
-   * @param mode
-   *        DOMString indicates the desired roaming preference.
-   *        Possible values: 'home', 'affiliated', or 'any'.
-   *
-   * If successful, the request's onsuccess will be called.
-   *
-   * Otherwise, the request's onerror will be called, and the request's error
-   * will be either 'RadioNotAvailable', 'RequestNotSupported',
-   * 'IllegalSIMorME', 'InvalidParameter', or 'GenericFailure'
-   *
-   * TODO: param "mode" should be a WebIDL enum when this interface is converted
-   *       to WebIDL
-   */
-  nsIDOMDOMRequest setRoamingPreference(in DOMString mode);
-
-  /**
-   * Query current roaming preference
-   *
-   * If successful, the request's onsuccess will be called. And the request's
-   * result will be a string indicating the current roaming preference.
-   * The value will be either 'home', 'affiliated', or 'any'.
-   *
-   * Otherwise, the request's onerror will be called, and the request's error
-   * will be either 'RadioNotAvailable', 'RequestNotSupported',
-   * 'IllegalSIMorME', or 'GenericFailure'
-   */
-  nsIDOMDOMRequest getRoamingPreference();
-
-  /**
-   * Set voice privacy preference.
-   *
-   * @param enabled
-   *        Boolean indicates the preferred voice privacy mode used in voice
-   *        scrambling in CDMA networks. 'True' means the enhanced voice security
-   *        is required.
-   *
-   * If successful, the request's onsuccess will be called.
-   *
-   * Otherwise, the request's onerror will be called, and the request's error
-   * will be either 'RadioNotAvailable', 'RequestNotSupported',
-   * 'IllegalSIMorME', 'InvalidParameter', or 'GenericFailure'
-   */
-  nsIDOMDOMRequest setVoicePrivacyMode(in bool enabled);
-
-  /**
-   * Query current voice privacy mode.
-   *
-   * If successful, the request's onsuccess will be called. And the request's
-   * result will be a boolean indicating the current voice privacy mode.
-   *
-   * Otherwise, the request's onerror will be called, and the request's error
-   * will be either 'RadioNotAvailable', 'RequestNotSupported',
-   * 'IllegalSIMorME', or 'GenericFailure'
-   */
-  nsIDOMDOMRequest getVoicePrivacyMode();
-
-  /**
-   * Send a MMI message.
-   *
-   * @param mmi
-   *        DOMString containing an MMI string that can be associated to a
-   *        USSD request or other RIL functionality.
-   *
-   * @return a nsIDOMDOMRequest
-   *         The request's result will be an object containing information
-   *         about the operation.
-   *
-   * In case that the MMI code requires sending an USSD request, the DOMrequest
-   * 'success' event means that the RIL has successfully processed and sent the
-   * USSD request to the network. The network reply will be reported via
-   * 'onussdreceived' event. If the MMI code is not associated to a USSD but to
-   * other RIL request its result, if one is needed, will be notified via the
-   * returned DOMRequest 'success' or 'error' event.
-   */
-  nsIDOMDOMRequest sendMMI(in DOMString mmi);
-
-  /**
-   * Cancel the current MMI request if one exists.
-   */
-  nsIDOMDOMRequest cancelMMI();
-
-  /**
-   * Configures call forward options.
-   *
-   * @param CFInfo
-   *        An object containing the call forward rule to set.
-   *
-   * If successful, the request's onsuccess will be called.
-   *
-   * Otherwise, the request's onerror will be called, and the request's error
-   * will be either 'RadioNotAvailable', 'RequestNotSupported',
-   * 'IllegalSIMorME', 'InvalidParameter', or 'GenericFailure'
-   */
-  nsIDOMDOMRequest setCallForwardingOption(in nsIDOMMozMobileCFInfo CFInfo);
-
-  /**
-   * Queries current call forward options.
-   *
-   * @param reason
-   *        Indicates the reason the call is being forwarded. It will be either
-   *        unconditional (0), mobile busy (1), no reply (2), not reachable (3),
-   *        all call forwarding (4), or all conditional call forwarding (5).
-   *
-   * If successful, the request's onsuccess will be called, and the request's
-   * result will be an array of nsIDOMMozMobileCFInfo.
-   *
-   * Otherwise, the request's onerror will be called, and the request's error
-   * will be either 'RadioNotAvailable', 'RequestNotSupported',
-   * 'InvalidParameter', or 'GenericFailure'.
-   */
-  nsIDOMDOMRequest getCallForwardingOption(in unsigned short reason);
-
-  /**
-   * Configures call barring option.
-   *
-   * @param option
-   *        An object containing the call barring rule to set.
-   * @see MozCallBarringOption for the detail of info.
-   *
-   * If successful, the request's onsuccess will be called.
-   *
-   * Otherwise, the request's onerror will be called, and the request's error
-   * will be either 'RadioNotAvailable', 'RequestNotSupported',
-   * 'IllegalSIMorME', 'InvalidParameter', or 'GenericFailure'
-   */
-  nsIDOMDOMRequest setCallBarringOption(in jsval option);
-
-  /**
-   * Queries current call barring status.
-   *
-   * @param info
-   *        An object containing the call barring rule to query. No need to
-   *        specify 'enabled' property.
-   * @see MozCallBarringOption for the detail of info.
-   *
-   * If successful, the request's onsuccess will be called, and the request's
-   * result will be an object of MozCallBarringOption with correct 'enabled'
-   * property indicating the status of this rule.
-   *
-   * Otherwise, the request's onerror will be called, and the request's error
-   * will be either 'RadioNotAvailable', 'RequestNotSupported',
-   * 'InvalidParameter', or 'GenericFailure'.
-   */
-  nsIDOMDOMRequest getCallBarringOption(in jsval option);
-
-  /**
-   * Change call barring facility password.
-   *
-   * @param info
-   *        An object containing information about pin and newPin, and,
-   *        this object must have both "pin" and "newPin" attributes
-   *        to change the call barring facility password.
-   *
-   * Example:
-   *
-   *   changeCallBarringPassword({pin: "...",
-   *                              newPin: "..."});
-   */
-  nsIDOMDOMRequest changeCallBarringPassword(in jsval info);
-
-  /**
-   * Configures call waiting options.
-   *
-   * @param enabled
-   *        Value containing the desired call waiting status.
-   *
-   * If successful, the request's onsuccess will be called.
-   *
-   * Otherwise, the request's onerror will be called, and the request's error
-   * will be either 'RadioNotAvailable', 'RequestNotSupported',
-   * 'IllegalSIMorME', or 'GenericFailure'
-   */
-  nsIDOMDOMRequest setCallWaitingOption(in bool enabled);
-
-  /**
-   * Queries current call waiting options.
-   *
-   * If successful, the request's onsuccess will be called, and the request's
-   * result will be a boolean indicating the call waiting status.
-   *
-   *
-   * Otherwise, the request's onerror will be called, and the request's error
-   * will be either 'RadioNotAvailable', 'RequestNotSupported',
-   * or 'GenericFailure'.
-   */
-  nsIDOMDOMRequest getCallWaitingOption();
-
-  /**
-   * Enables or disables the presentation of the calling line identity (CLI) to
-   * the called party when originating a call.
-   *
-   * @param clirMode
-   *        Is one of the CLIR_* constants.
-   *
-   * If successful, the request's onsuccess will be called.
-   *
-   * Otherwise, the request's onerror will be called, and the request's error
-   * will be either 'RadioNotAvailable', 'RequestNotSupported',
-   */
-  nsIDOMDOMRequest setCallingLineIdRestriction(in unsigned short clirMode);
-
-  /**
-   * Queries current CLIR status.
-   *
-   * If successful, the request's onsuccess will be called, and the request's
-   * result will be a DOMCLIRStatus dictionary containing CLIR 'n' and 'm'
-   * parameter.
-   *
-   * Otherwise, the request's onerror will be called, and the request's error
-   * will be either 'RadioNotAvailable', 'RequestNotSupported',
-   * or 'GenericFailure'.
-   */
-  nsIDOMDOMRequest getCallingLineIdRestriction();
-
-  /**
-   * Exit emergency callback mode.
-   *
-   * If successful, the request's onsuccess will be called.
-   *
-   * Otherwise, the request's onerror will be called, and the request's error
-   * will be either 'RequestNotSupported'  or 'GenericFailure'.
-   */
-  nsIDOMDOMRequest exitEmergencyCbMode();
-
-  /**
-   * Set radio enabled/disabled.
-   *
-   * @param enabled
-   *        True to enable the radio.
-   *
-   * If successful, the request's onsuccess will be called.
-   *
-   * Otherwise, the request's onerror will be called, and the request's error
-   * will be either 'InvalidStateError', 'RadioNotAvailable', or
-   * 'GenericFailure'.
-   *
-   * Note: Request is not available when radioState is null, 'enabling', or
-   *       'disabling'. Calling the function in above conditions will receive
-   *       'InvalidStateError' error.
-   */
-  nsIDOMDOMRequest setRadioEnabled(in boolean enabled);
-
-  /**
-   * The 'voicechange' event is notified whenever the voice connection object
-   * changes.
-   */
-  [implicit_jscontext] attribute jsval onvoicechange;
-
-  /**
-   * The 'datachange' event is notified whenever the data connection object
-   * changes values.
-   */
-  [implicit_jscontext] attribute jsval ondatachange;
-
-  /**
-   * The 'ussdreceived' event is notified whenever a new USSD message is
-   * received.
-   */
-  [implicit_jscontext] attribute jsval onussdreceived;
-
-  /**
-   * The 'dataerror' event is notified whenever the data connection object
-   * receives an error from the RIL
-   */
-  [implicit_jscontext] attribute jsval ondataerror;
-
-  /**
-   * The 'oncfstatechange' event is notified whenever the call forwarding
-   * state changes.
-   */
-  [implicit_jscontext] attribute jsval oncfstatechange;
-
-  /**
-   * The 'emergencycbmodechange' event is notified whenever the emergency
-   * callback mode changes.
-   */
-  [implicit_jscontext] attribute jsval onemergencycbmodechange;
-
-  /**
-   * The 'onotastatuschange' event is notified whenever the ota provision status
-   * changes.
-   */
-  [implicit_jscontext] attribute jsval onotastatuschange;
-
-  /**
-   * The 'oniccchange' event is notified whenever the iccid value
-   * changes.
-   */
-  [implicit_jscontext] attribute jsval oniccchange;
-
-  /**
-   * The 'onradiostatechange' event is notified whenever the radio state
-   * changes.
-   */
-  [implicit_jscontext] attribute jsval onradiostatechange;
-
-  /**
-   * The 'onclirmodechange' event is notified whenever the mode of the calling
-   * line id restriction (CLIR) changes.
-   */
-  [implicit_jscontext] attribute jsval onclirmodechange;
-};
-
-[scriptable, uuid(49706beb-a160-40b7-b745-50f62e389a2c)]
-interface nsIDOMMozMobileConnectionInfo : nsISupports
-{
-  /**
-   * State of the connection.
-   *
-   * Possible values: 'notSearching', 'searching', 'denied', 'registered'.
-   * null if the state is unknown.
-   */
-  readonly attribute DOMString state;
-
-  /**
-   * Indicates whether the connection is ready. This may be different
-   */
-  readonly attribute bool connected;
-
-  /**
-   * Indicates whether only emergency calls are possible.
-   *
-   * This flag is only relevant to voice connections and when 'connected' is
-   * false.
-   */
-  readonly attribute bool emergencyCallsOnly;
-
-  /**
-   * Indicates whether the connection is going through a foreign operator
-   * (roaming) or not.
-   */
-  readonly attribute bool roaming;
-
-  /**
-   * Network operator
-   */
-  readonly attribute nsIDOMMozMobileNetworkInfo network;
-
-  /**
-   * Type of connection.
-   *
-   * Possible values: 'gsm', 'cdma', gprs', 'edge', 'umts', 'hsdpa', 'evdo0',
-   * 'evdoa', 'evdob', etc.
-   */
-  readonly attribute DOMString type;
-
-  /**
-   * Signal strength in dBm, or null if no service is available.
-   */
-  readonly attribute jsval signalStrength;
-
-  /**
-   * Signal strength, represented linearly as a number between 0 (weakest
-   * signal) and 100 (full signal).
-   */
-  readonly attribute jsval relSignalStrength;
-
-  /**
-   * Cell location.
-   */
-  readonly attribute nsIDOMMozMobileCellInfo cell;
-
-};
-
-[scriptable, uuid(40018fc7-4c42-47b6-8de6-3591a9c622bc)]
-interface nsIDOMMozMobileNetworkInfo: nsISupports
-{
-  /**
-   * Short name of the network operator
-   */
-  readonly attribute DOMString shortName;
-
-  /**
-   * Long name of the network operator
-   */
-  readonly attribute DOMString longName;
-
-  /**
-   * Mobile Country Code (MCC) of the network operator
-   */
-  readonly attribute DOMString mcc;
-
-  /**
-   * Mobile Network Code (MNC) of the network operator
-   */
-  readonly attribute DOMString mnc;
-
-  /**
-   * State of this network operator.
-   *
-   * Possible values: 'available', 'connected', 'forbidden', or null (unknown)
-   */
-  readonly attribute DOMString state;
-};
-
-[scriptable, uuid(9750b3a7-d913-436e-95d4-7ef2973ec6a1)]
-interface nsIDOMMozMobileCellInfo: nsISupports
-{
-  /**
-   * Mobile Location Area Code (LAC) for GSM/WCDMA networks.
-   *
-   * Possible ranges from 0x0000 to 0xffff.
-   * -1 if the LAC is unknown.
-   */
-  readonly attribute long gsmLocationAreaCode;
-
-  /**
-   * Mobile Cell ID for GSM/WCDMA networks.
-   *
-   * Possible ranges from 0x00000000 to 0xffffffff.
-   * -1 if the cell id is unknown.
-   */
-  readonly attribute long long gsmCellId;
-
-  /**
-   * Base Station ID for CDMA networks.
-   *
-   * Possible ranges from 0 to 65535
-   * -1 if the base station id is unknown.
-   */
-  readonly attribute long cdmaBaseStationId;
-
-  /**
-   * Base Station Latitude for CDMA networks.
-   *
-   * Possible ranges from -1296000 to 1296000.
-   * -2147483648 if the latitude is unknown.
-   *
-   * @see 3GPP2 C.S0005-A v6.0.
-   */
-  readonly attribute long cdmaBaseStationLatitude;
-
-  /**
-   * Base Station Longitude for CDMA networks.
-   *
-   * Possible ranges from -2592000 to 2592000.
-   * -2147483648 if the longitude is unknown.
-   *
-   * @see 3GPP2 C.S0005-A v6.0.
-   */
-  readonly attribute long cdmaBaseStationLongitude;
-
-  /**
-   * System ID for CDMA networks.
-   *
-   * Possible ranges from 0 to 32767.
-   * -1 if the system id is unknown.
-   */
-  readonly attribute long cdmaSystemId;
-
-  /**
-   * Network ID for CDMA networks.
-   *
-   * Possible ranges from 0 to 65535.
-   * -1 if the network id is unknown.
-   */
-  readonly attribute long cdmaNetworkId;
-};
-
-[scriptable, uuid(d1b35ad8-99aa-47cc-ab49-2e72b00e39df)]
-interface nsIDOMMozMobileCFInfo : nsISupports
-{
-  /**
-   * Call forwarding rule status.
-   *
-   * It will be either not active (false), or active (true).
-   *
-   * Note: Unused for setting call forwarding options. It reports
-   *       the status of the rule when getting how the rule is
-   *       configured.
-   *
-   * @see 3GPP TS 27.007 7.11 "status".
-   */
-  readonly attribute bool active;
-
-  const long CALL_FORWARD_ACTION_DISABLE = 0;
-  const long CALL_FORWARD_ACTION_ENABLE = 1;
-  const long CALL_FORWARD_ACTION_QUERY_STATUS = 2;
-  const long CALL_FORWARD_ACTION_REGISTRATION = 3;
-  const long CALL_FORWARD_ACTION_ERASURE = 4;
-
-  /**
-   * Indicates what to do with the rule.
-   *
-   * One of the CALL_FORWARD_ACTION_* constants. It will be either disable (0),
-   * enable (1), query status (2), registration (3), or erasure (4).
-   *
-   * @see 3GPP TS 27.007 7.11 "mode".
-   */
-  readonly attribute unsigned short action;
-
-  const long CALL_FORWARD_REASON_UNCONDITIONAL = 0;
-  const long CALL_FORWARD_REASON_MOBILE_BUSY = 1;
-  const long CALL_FORWARD_REASON_NO_REPLY = 2;
-  const long CALL_FORWARD_REASON_NOT_REACHABLE = 3;
-  const long CALL_FORWARD_REASON_ALL_CALL_FORWARDING = 4;
-  const long CALL_FORWARD_REASON_ALL_CONDITIONAL_CALL_FORWARDING = 5;
-
-  /**
-   * Indicates the reason the call is being forwarded.
-   *
-   * One of the CALL_FORWARD_REASON_* constants. It will be either
-   * unconditional (0), mobile busy (1), no reply (2), not reachable (3),
-   * all call forwarding (4), or all conditional call forwarding (5).
-   *
-   * @see 3GPP TS 27.007 7.11 "reason".
-   */
-  readonly attribute unsigned short reason;
-
-  /**
-   * Phone number of forwarding address.
-   */
-  readonly attribute DOMString number;
-
-  /**
-   * When "no reply" is enabled or queried, this gives the time in
-   * seconds to wait before call is forwarded.
-   */
-  readonly attribute unsigned short timeSeconds;
-
-  /**
-   * Service for which the call forward is set up. It should be one of the
-   * nsIDOMMozMobileConnection.ICC_SERVICE_CLASS_* values.
-   */
-  readonly attribute unsigned short serviceClass;
-};
new file mode 100644
--- /dev/null
+++ b/dom/mobileconnection/interfaces/nsIMobileCellInfo.idl
@@ -0,0 +1,69 @@
+/* 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/. */
+
+#include "nsISupports.idl"
+
+[scriptable, uuid(286a96fe-5519-459b-9ef8-2e34b9c1f9f2)]
+interface nsIMobileCellInfo: nsISupports
+{
+  /**
+   * Mobile Location Area Code (LAC) for GSM/WCDMA networks.
+   *
+   * Possible ranges from 0x0000 to 0xffff.
+   * -1 if the LAC is unknown.
+   */
+  readonly attribute long gsmLocationAreaCode;
+
+  /**
+   * Mobile Cell ID for GSM/WCDMA networks.
+   *
+   * Possible ranges from 0x00000000 to 0xffffffff.
+   * -1 if the cell id is unknown.
+   */
+  readonly attribute long long gsmCellId;
+
+  /**
+   * Base Station ID for CDMA networks.
+   *
+   * Possible ranges from 0 to 65535.
+   * -1 if the base station id is unknown.
+   */
+  readonly attribute long cdmaBaseStationId;
+
+  /**
+   * Base Station Latitude for CDMA networks.
+   *
+   * Possible ranges from -1296000 to 1296000.
+   * -2147483648 if the latitude is unknown.
+   *
+   * @see 3GPP2 C.S0005-A v6.0.
+   */
+  readonly attribute long cdmaBaseStationLatitude;
+
+  /**
+   * Base Station Longitude for CDMA networks.
+   *
+   * Possible ranges from -2592000 to 2592000.
+   * -2147483648 if the longitude is unknown.
+   *
+   * @see 3GPP2 C.S0005-A v6.0.
+   */
+  readonly attribute long cdmaBaseStationLongitude;
+
+  /**
+   * System ID for CDMA networks.
+   *
+   * Possible ranges from 0 to 32767.
+   * -1 if the system id is unknown.
+   */
+  readonly attribute long cdmaSystemId;
+
+  /**
+   * Network ID for CDMA networks.
+   *
+   * Possible ranges from 0 to 65535.
+   * -1 if the network id is unknown.
+   */
+  readonly attribute long cdmaNetworkId;
+};
new file mode 100644
--- /dev/null
+++ b/dom/mobileconnection/interfaces/nsIMobileConnectionInfo.idl
@@ -0,0 +1,73 @@
+/* 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/. */
+
+#include "nsISupports.idl"
+
+interface nsIMobileCellInfo;
+interface nsIMobileNetworkInfo;
+
+[scriptable, uuid(d5208e13-42dc-4dce-9427-2572fa252751)]
+interface nsIMobileConnectionInfo : nsISupports
+{
+  /**
+   * State of the connection.
+   *
+   * Possible values: 'notSearching', 'searching', 'denied', 'registered' or
+   *                  null (unknown).
+   */
+  readonly attribute DOMString state;
+
+  /**
+   * Indicates whether the connection is ready.
+   *
+   * Note: The meaning of "connection ready" for data and voice are different.
+   *       - Data: the "default" data connection is established or not.
+   *       - Voice: voice is registered to network or not.
+   */
+  readonly attribute bool connected;
+
+  /**
+   * Indicates whether only emergency calls are possible.
+   *
+   * This flag is only relevant to voice connections and when 'connected' is
+   * false.
+   */
+  readonly attribute bool emergencyCallsOnly;
+
+  /**
+   * Indicates whether the connection is going through a foreign operator
+   * (roaming) or not.
+   */
+  readonly attribute bool roaming;
+
+  /**
+   * Network operator information.
+   */
+  readonly attribute nsIMobileNetworkInfo network;
+
+  /**
+   * Type of connection.
+   *
+   * Possible values: 'gsm', 'gprs', 'edge', 'umts', 'hsdpa', 'hsupa', 'hspa',
+   *                  'hspa+', 'is95a', 'is95b', '1xrtt', 'evdo0', 'evdoa',
+   *                  'evdob', 'ehrpd', 'lte' or null (unknown).
+   */
+  readonly attribute DOMString type;
+
+  /**
+   * Signal strength in dBm, or null if no service is available.
+   */
+  readonly attribute jsval signalStrength;
+
+  /**
+   * Signal strength, represented linearly as a number between 0 (weakest
+   * signal) and 100 (full signal).
+   */
+  readonly attribute jsval relSignalStrength;
+
+  /**
+   * Cell location information.
+   */
+  readonly attribute nsIMobileCellInfo cell;
+};
--- a/dom/mobileconnection/interfaces/nsIMobileConnectionProvider.idl
+++ b/dom/mobileconnection/interfaces/nsIMobileConnectionProvider.idl
@@ -1,50 +1,174 @@
 /* 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/. */
 
 #include "nsISupports.idl"
 
 interface nsIDOMDOMRequest;
-interface nsIDOMMozMobileCFInfo;
-interface nsIDOMMozMobileConnectionInfo;
-interface nsIDOMMozMobileNetworkInfo;
 interface nsIDOMWindow;
+interface nsIMobileConnectionInfo;
+interface nsIMobileNetworkInfo;
 interface nsIVariant;
 
-[scriptable, uuid(64eb8c1a-34b6-4ff8-ba47-23a5f9bea68c)]
+[scriptable, uuid(c6d98e6a-d96f-45fe-aa86-01453a6daf9e)]
 interface nsIMobileConnectionListener : nsISupports
 {
+  /**
+   * Notify when voice info is changed.
+   */
   void notifyVoiceChanged();
+
+  /**
+   * Notify when data info is changed.
+   */
   void notifyDataChanged();
+
+  /**
+   * Notify when ussd is received.
+   *
+   * @param message
+   *        The ussd request in string format.
+   * @param sessionEnded
+   *        Indicates whether the session is ended.
+   */
   void notifyUssdReceived(in DOMString message,
                           in boolean sessionEnded);
+
+  /**
+   * Notify when data call is failed to establish.
+   *
+   * @param message
+   *        Error message from RIL.
+   */
   void notifyDataError(in DOMString message);
+
+  /**
+   * Notify when call forwarding state is changed.
+   *
+   * @param success
+   *        Indicates whether the set call forwarding request is success.
+   * @param action
+   *        One of the nsIMobileConnectionProvider.CALL_FORWARD_ACTION_* values.
+   * @param reason
+   *        One of the nsIMobileConnectionProvider.CALL_FORWARD_REASON_* values.
+   * @param number
+   *        Phone number of forwarding address.
+   * @param timeSeconds
+   *        The time in seconds should wait before call is forwarded.
+   * @param serviceClass
+   *        One of the nsIMobileConnectionProvider.ICC_SERVICE_CLASS_* values.
+   */
   void notifyCFStateChange(in boolean success,
                            in unsigned short action,
                            in unsigned short reason,
                            in DOMString number,
                            in unsigned short timeSeconds,
                            in unsigned short serviceClass);
+
+  /**
+   * Notify when emergency callback mode is changed.
+   *
+   * @param active
+   *        Indicates whether the emergency callback mode is activated.
+   * @param timeoutMs
+   *        The timeout in millisecond for emergency callback mode.
+   */
   void notifyEmergencyCbModeChanged(in boolean active,
                                     in unsigned long timeoutMs);
+
+  /**
+   * Notify when ota status is changed.
+   *
+   * @param status
+   *        Ota status. Possible values: 'spl_unlocked', 'spc_retries_exceeded',
+   *        'a_key_exchanged', 'ssd_updated', 'nam_downloaded', 'mdn_downloaded',
+   *        'imsi_downloaded', 'prl_downloaded', 'committed', 'otapa_started',
+   *        'otapa_stopped', 'otapa_aborted'.
+   */
   void notifyOtaStatusChanged(in DOMString status);
+
+  /**
+   * Notify when icc id is changed.
+   */
   void notifyIccChanged();
+
+  /**
+   * Notify when radio state is changed.
+   */
   void notifyRadioStateChanged();
+
+  /**
+   * Notify when clir mode is changed.
+   *
+   * @param mode
+   *        One of the nsIMobileConnectionProvider.CLIR_* values.
+   */
   void notifyClirModeChanged(in unsigned long mode);
 };
 
 /**
  * XPCOM component (in the content process) that provides the mobile
  * network information.
  */
-[scriptable, uuid(987fc93a-e538-4fd3-9e4d-0e0f0934f019)]
+[scriptable, uuid(2a3af80f-9f8e-447d-becd-034f95e4cd4d)]
 interface nsIMobileConnectionProvider : nsISupports
 {
+  const long ICC_SERVICE_CLASS_VOICE      = (1 << 0);
+  const long ICC_SERVICE_CLASS_DATA       = (1 << 1);
+  const long ICC_SERVICE_CLASS_FAX        = (1 << 2);
+  const long ICC_SERVICE_CLASS_SMS        = (1 << 3);
+  const long ICC_SERVICE_CLASS_DATA_SYNC  = (1 << 4);
+  const long ICC_SERVICE_CLASS_DATA_ASYNC = (1 << 5);
+  const long ICC_SERVICE_CLASS_PACKET     = (1 << 6);
+  const long ICC_SERVICE_CLASS_PAD        = (1 << 7);
+  const long ICC_SERVICE_CLASS_MAX        = (1 << 7);
+
+  /**
+   * Call forwarding action.
+   *
+   * @see 3GPP TS 27.007 7.11 "mode".
+   */
+  const long CALL_FORWARD_ACTION_DISABLE      = 0;
+  const long CALL_FORWARD_ACTION_ENABLE       = 1;
+  const long CALL_FORWARD_ACTION_QUERY_STATUS = 2;
+  const long CALL_FORWARD_ACTION_REGISTRATION = 3;
+  const long CALL_FORWARD_ACTION_ERASURE      = 4;
+
+  /**
+   * Call forwarding reason.
+   *
+   * @see 3GPP TS 27.007 7.11 "reason".
+   */
+  const long CALL_FORWARD_REASON_UNCONDITIONAL                   = 0;
+  const long CALL_FORWARD_REASON_MOBILE_BUSY                     = 1;
+  const long CALL_FORWARD_REASON_NO_REPLY                        = 2;
+  const long CALL_FORWARD_REASON_NOT_REACHABLE                   = 3;
+  const long CALL_FORWARD_REASON_ALL_CALL_FORWARDING             = 4;
+  const long CALL_FORWARD_REASON_ALL_CONDITIONAL_CALL_FORWARDING = 5;
+
+  /**
+   * Call barring program.
+   */
+  const long CALL_BARRING_PROGRAM_ALL_OUTGOING                       = 0;
+  const long CALL_BARRING_PROGRAM_OUTGOING_INTERNATIONAL             = 1;
+  const long CALL_BARRING_PROGRAM_OUTGOING_INTERNATIONAL_EXCEPT_HOME = 2;
+  const long CALL_BARRING_PROGRAM_ALL_INCOMING                       = 3;
+  const long CALL_BARRING_PROGRAM_INCOMING_ROAMING                   = 4;
+
+  /**
+   * Calling line identification restriction constants.
+   *
+   * @see 3GPP TS 27.007 7.7 Defined values.
+   */
+  const long CLIR_DEFAULT     = 0;
+  const long CLIR_INVOCATION  = 1;
+  const long CLIR_SUPPRESSION = 2;
+
   /**
    * Called when a content process registers receiving unsolicited messages from
    * RadioInterfaceLayer in the chrome process. Only a content process that has
    * the 'mobileconnection' permission is allowed to register.
    */
   void registerMobileConnectionMsg(in unsigned long clientId,
                                    in nsIMobileConnectionListener listener);
   void unregisterMobileConnectionMsg(in unsigned long clientId,
@@ -54,81 +178,572 @@ interface nsIMobileConnectionProvider : 
    * These two fields require the 'mobilenetwork' permission.
    */
   DOMString getLastKnownNetwork(in unsigned long clientId);
   DOMString getLastKnownHomeNetwork(in unsigned long clientId);
 
   /**
    * All fields below require the 'mobileconnection' permission.
    */
-  nsIDOMMozMobileConnectionInfo getVoiceConnectionInfo(in unsigned long clientId);
-  nsIDOMMozMobileConnectionInfo getDataConnectionInfo(in unsigned long clientId);
+
+  /**
+   * Get the connection information about the voice.
+   *
+   * @param clientId
+   *        Indicate the RIL client, 0 ~ (number of client - 1).
+   *
+   * @return a nsIMobileConnectionInfo
+   */
+  nsIMobileConnectionInfo getVoiceConnectionInfo(in unsigned long clientId);
+
+  /**
+   * Get the connection information about the data.
+   *
+   * @param clientId
+   *        Indicate the RIL client, 0 ~ (number of client - 1).
+   *
+   * @return a nsIMobileConnectionInfo
+   */
+  nsIMobileConnectionInfo getDataConnectionInfo(in unsigned long clientId);
+
+  /**
+   * Get the integrated circuit card identifier of the SIM.
+   *
+   * @param clientId
+   *        Indicate the RIL client, 0 ~ (number of client - 1).
+   *
+   * @return a DOMString indicates the iccId
+   */
   DOMString getIccId(in unsigned long clientId);
+
+  /**
+   * Get the selection mode of the voice and data networks.
+   *
+   * @param clientId
+   *        Indicate the RIL client, 0 ~ (number of client - 1).
+   *
+   * @return a DOMString
+   *         Possible values: 'automatic', 'manual', null (unknown).
+   */
   DOMString getNetworkSelectionMode(in unsigned long clientId);
+
+  /**
+   * Get the current radio state.
+   *
+   * @param clientId
+   *        Indicate the RIL client, 0 ~ (number of client - 1).
+   *
+   * @return a DOMString
+   *         Possible values: 'enabling', 'enabled', 'disabling', 'disabled',
+   *         null (unknown).
+   */
   DOMString getRadioState(in unsigned long clientId);
+
+  /**
+   * Get the network types that are supported by this radio.
+   *
+   * @param clientId
+   *        Indicate the RIL client, 0 ~ (number of client - 1).
+   *
+   * @return an array of DOMString
+   *         Possible values: 'gsm', 'wcdma', 'cdma', 'evdo', 'lte'.
+   */
   nsIVariant getSupportedNetworkTypes(in unsigned long clientId);
 
+  /**
+   * Search for available networks.
+   *
+   * @param clientId
+   *        Indicate the RIL client, 0 ~ (number of client - 1).
+   * @param window
+   *        Current window.
+   *
+   * @return a nsIDOMDOMRequest
+   *
+   * If successful, the request's onsuccess will be called. And the request's
+   * result will be an array of nsIMobileNetworkInfo.
+   *
+   * Otherwise, the request's onerror will be called, and the request's error
+   * will be either 'RadioNotAvailable', 'RequestNotSupported',
+   * 'IllegalSIMorME', or 'GenericFailure'.
+   */
   nsIDOMDOMRequest getNetworks(in unsigned long clientId,
                                in nsIDOMWindow window);
+
+  /**
+   * Manually selects the passed in network, overriding the radio's current
+   * selection.
+   *
+   * @param clientId
+   *        Indicate the RIL client, 0 ~ (number of client - 1).
+   * @param window
+   *        Current window.
+   * @param network
+   *        The manually selecting network.
+   *
+   * @return a nsIDOMDOMRequest
+   *
+   * If successful, the request's onsuccess will be called.
+   *
+   * Otherwise, the request's onerror will be called, and the request's error
+   * will be either 'RadioNotAvailable', 'RequestNotSupported',
+   * 'IllegalSIMorME', or 'GenericFailure'.
+   */
   nsIDOMDOMRequest selectNetwork(in unsigned long clientId,
                                  in nsIDOMWindow window,
-                                 in nsIDOMMozMobileNetworkInfo network);
+                                 in nsIMobileNetworkInfo network);
+
+  /**
+   * Tell the radio to automatically select a network.
+   *
+   * @param clientId
+   *        Indicate the RIL client, 0 ~ (number of client - 1).
+   * @param window
+   *        Current window.
+   *
+   * @return a nsIDOMDOMRequest
+   *
+   * If successful, the request's onsuccess will be called.
+   *
+   * Otherwise, the request's onerror will be called, and the request's error
+   * will be either 'RadioNotAvailable', 'RequestNotSupported',
+   * 'IllegalSIMorME', or 'GenericFailure'.
+   */
   nsIDOMDOMRequest selectNetworkAutomatically(in unsigned long clientId,
                                               in nsIDOMWindow window);
 
+  /**
+   * Set preferred network type.
+   *
+   * @param clientId
+   *        Indicate the RIL client, 0 ~ (number of client - 1).
+   * @param window
+   *        Current window.
+   * @param type
+   *        DOMString indicates the desired preferred network type.
+   *        Possible values: 'wcdma/gsm', 'gsm', 'wcdma', 'wcdma/gsm-auto',
+   *        'cdma/evdo', 'cdma', 'evdo', 'wcdma/gsm/cdma/evdo',
+   *        'lte/cdma/evdo', 'lte/wcdma/gsm', 'lte/wcdma/gsm/cdma/evdo' or
+   *        'lte'.
+   *
+   * @return a nsIDOMDOMRequest
+   *
+   * If successful, the request's onsuccess will be called.
+   *
+   * Otherwise, the request's onerror will be called, and the request's error
+   * will be either 'RadioNotAvailable', 'RequestNotSupported',
+   * 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
+   */
   nsIDOMDOMRequest setPreferredNetworkType(in unsigned long clientId,
                                            in nsIDOMWindow window,
                                            in DOMString type);
+
+  /**
+   * Query current preferred network type.
+   *
+   * @param clientId
+   *        Indicate the RIL client, 0 ~ (number of client - 1).
+   * @param window
+   *        Current window.
+   *
+   * @return a nsIDOMDOMRequest
+   *
+   * If successful, the request's onsuccess will be called. And the request's
+   * result will be a string indicating the current preferred network type.
+   * The value will be either 'wcdma/gsm', 'gsm', 'wcdma', 'wcdma/gsm-auto',
+   * 'cdma/evdo', 'cdma', 'evdo', 'wcdma/gsm/cdma/evdo', 'lte/cdma/evdo',
+   * 'lte/wcdma/gsm', 'lte/wcdma/gsm/cdma/evdo' or 'lte'.
+   *
+   * Otherwise, the request's onerror will be called, and the request's error
+   * will be either 'RadioNotAvailable', 'RequestNotSupported',
+   * 'IllegalSIMorME', or 'GenericFailure'.
+   */
   nsIDOMDOMRequest getPreferredNetworkType(in unsigned long clientId,
                                            in nsIDOMWindow window);
 
+  /**
+   * Set roaming preference.
+   *
+   * @param clientId
+   *        Indicate the RIL client, 0 ~ (number of client - 1).
+   * @param window
+   *        Current window.
+   * @param mode
+   *        DOMString indicates the desired roaming preference.
+   *        Possible values: 'home', 'affiliated', or 'any'.
+   *
+   * @return a nsIDOMDOMRequest
+   *
+   * If successful, the request's onsuccess will be called.
+   *
+   * Otherwise, the request's onerror will be called, and the request's error
+   * will be either 'RadioNotAvailable', 'RequestNotSupported',
+   * InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
+   */
   nsIDOMDOMRequest setRoamingPreference(in unsigned long clientId,
                                         in nsIDOMWindow window,
                                         in DOMString mode);
+
+  /**
+   * Query current roaming preference.
+   *
+   * @param clientId
+   *        Indicate the RIL client, 0 ~ (number of client - 1).
+   * @param window
+   *        Current window.
+   *
+   * @return a nsIDOMDOMRequest
+   *
+   * If successful, the request's onsuccess will be called. And the request's
+   * result will be a string indicating the current roaming preference.
+   * The value will be either 'home', 'affiliated', or 'any'.
+   *
+   * Otherwise, the request's onerror will be called, and the request's error
+   * will be either 'RadioNotAvailable', 'RequestNotSupported',
+   * 'IllegalSIMorME', or 'GenericFailure'.
+   */
   nsIDOMDOMRequest getRoamingPreference(in unsigned long clientId,
                                         in nsIDOMWindow window);
 
+  /**
+   * Set voice privacy preference.
+   *
+   * @param clientId
+   *        Indicate the RIL client, 0 ~ (number of client - 1).
+   * @param window
+   *        Current window.
+   * @param enabled
+   *        Boolean indicates the preferred voice privacy mode used in voice
+   *        scrambling in CDMA networks. 'True' means the enhanced voice security
+   *        is required.
+   *
+   * @return a nsIDOMDOMRequest
+   *
+   * If successful, the request's onsuccess will be called.
+   *
+   * Otherwise, the request's onerror will be called, and the request's error
+   * will be either 'RadioNotAvailable', 'RequestNotSupported',
+   * 'IllegalSIMorME', or 'GenericFailure'.
+   */
   nsIDOMDOMRequest setVoicePrivacyMode(in unsigned long clientId,
                                        in nsIDOMWindow window,
                                        in bool enabled);
+
+  /**
+   * Query current voice privacy mode.
+   *
+   * @param clientId
+   *        Indicate the RIL client, 0 ~ (number of client - 1).
+   * @param window
+   *        Current window.
+   *
+   * @return a nsIDOMDOMRequest
+   *
+   * If successful, the request's onsuccess will be called. And the request's
+   * result will be a boolean indicating the current voice privacy mode.
+   *
+   * Otherwise, the request's onerror will be called, and the request's error
+   * will be either 'RadioNotAvailable', 'RequestNotSupported',
+   * 'IllegalSIMorME', or 'GenericFailure'.
+   */
   nsIDOMDOMRequest getVoicePrivacyMode(in unsigned long clientId,
                                        in nsIDOMWindow window);
 
+  /**
+   * Send a MMI message.
+   *
+   * @param clientId
+   *        Indicate the RIL client, 0 ~ (number of client - 1).
+   * @param window
+   *        Current window.
+   * @param mmi
+   *        DOMString containing an MMI string that can be associated to a
+   *        USSD request or other RIL functionality.
+   *
+   * @return a nsIDOMDOMRequest
+   *
+   * If successful, the request's onsuccess will be called. And the request's
+   * result will be an object containing information about the operation.
+   * @see MozMMIResult for the detail of result.
+   *
+   * Otherwise, the request's onerror will be called, and the request's error
+   * will be a DOMMMIError.
+   * @see DOMMMIError for the detail of error.
+   */
   nsIDOMDOMRequest sendMMI(in unsigned long clientId,
                            in nsIDOMWindow window,
                            in DOMString mmi);
+
+  /**
+   * Cancel the current MMI request if one exists.
+   *
+   * @param clientId
+   *        Indicate the RIL client, 0 ~ (number of client - 1).
+   * @param window
+   *        Current window.
+   *
+   * @return a nsIDOMDOMRequest
+   *
+   * If successful, the request's onsuccess will be called. And the request's
+   * result will be an object containing information about the operation.
+   * @see MozMMIResult for the detail of result.
+   *
+   * Otherwise, the request's onerror will be called, and the request's error
+   * will be a DOMMMIError.
+   * @see DOMMMIError for the detail of error.
+   */
   nsIDOMDOMRequest cancelMMI(in unsigned long clientId,
                              in nsIDOMWindow window);
 
-  nsIDOMDOMRequest getCallForwardingOption(in unsigned long clientId,
-                                           in nsIDOMWindow window,
-                                           in unsigned short reason);
-  nsIDOMDOMRequest setCallForwardingOption(in unsigned long clientId,
-                                           in nsIDOMWindow window,
-                                           in nsIDOMMozMobileCFInfo CFInfo);
+  /**
+   * Queries current call forwarding options.
+   *
+   * @param clientId
+   *        Indicate the RIL client, 0 ~ (number of client - 1).
+   * @param window
+   *        Current window.
+   * @param reason
+   *        Indicates the reason the call is being forwarded. It shall be one of
+   *        the nsIMobileConnectionProvider.CALL_FORWARD_REASON_* values.
+   *
+   * @return a nsIDOMDOMRequest
+   *
+   * If successful, the request's onsuccess will be called. And the request's
+   * result will be an array of MozCallForwardingOptions.
+   * @see MozCallForwardingOptions for the detail of result.
+   *
+   * Otherwise, the request's onerror will be called, and the request's error
+   * will be either 'RadioNotAvailable', 'RequestNotSupported',
+   * 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
+   */
+  nsIDOMDOMRequest getCallForwarding(in unsigned long clientId,
+                                     in nsIDOMWindow window,
+                                     in unsigned short reason);
+
+  /**
+   * Configures call forwarding options.
+   *
+   * @param clientId
+   *        Indicate the RIL client, 0 ~ (number of client - 1).
+   * @param window
+   *        Current window.
+   * @param options
+   *        An object containing the call forward rule to set.
+   * @see MozCallForwardingOptions for the detail of options.
+   *
+   * @return a nsIDOMDOMRequest
+   *
+   * If successful, the request's onsuccess will be called.
+   *
+   * Otherwise, the request's onerror will be called, and the request's error
+   * will be either 'RadioNotAvailable', 'RequestNotSupported',
+   * 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'
+   */
+  nsIDOMDOMRequest setCallForwarding(in unsigned long clientId,
+                                     in nsIDOMWindow window,
+                                     in jsval options);
 
-  nsIDOMDOMRequest getCallBarringOption(in unsigned long clientId,
-                                        in nsIDOMWindow window,
-                                        in jsval option);
-  nsIDOMDOMRequest setCallBarringOption(in unsigned long clientId,
-                                        in nsIDOMWindow window,
-                                        in jsval option);
+  /**
+   * Queries current call barring status.
+   *
+   * @param clientId
+   *        Indicate the RIL client, 0 ~ (number of client - 1).
+   * @param window
+   *        Current window.
+   * @param options
+   *        An object containing the call barring rule to query. No need to
+   *        specify 'enabled' property.
+   * @see MozCallBarringOptions for the detail of options.
+   *
+   * @return a nsIDOMDOMRequest
+   *
+   * If successful, the request's onsuccess will be called. And the request's
+   * result will be an object of MozCallBarringOptions with correct 'enabled'
+   * property indicating the status of this rule.
+   * @see MozCallBarringOptions for the detail of result.
+   *
+   * Otherwise, the request's onerror will be called, and the request's error
+   * will be either 'RadioNotAvailable', 'RequestNotSupported',
+   * 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
+   */
+  nsIDOMDOMRequest getCallBarring(in unsigned long clientId,
+                                  in nsIDOMWindow window,
+                                  in jsval options);
+
+  /**
+   * Configures call barring option.
+   *
+   * @param clientId
+   *        Indicate the RIL client, 0 ~ (number of client - 1).
+   * @param window
+   *        Current window.
+   * @param options
+   *        An object containing the call barring rule to set.
+   * @see MozCallBarringOptions for the detail of options.
+   *
+   * @return a nsIDOMDOMRequest
+   *
+   * If successful, the request's onsuccess will be called.
+   *
+   * Otherwise, the request's onerror will be called, and the request's error
+   * will be either 'RadioNotAvailable', 'RequestNotSupported',
+   * 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'
+   */
+  nsIDOMDOMRequest setCallBarring(in unsigned long clientId,
+                                  in nsIDOMWindow window,
+                                  in jsval options);
+
+  /**
+   * Change call barring facility password.
+   *
+   * @param clientId
+   *        Indicate the RIL client, 0 ~ (number of client - 1).
+   * @param window
+   *        Current window.
+   * @param options
+   *        An object containing information about pin and newPin, and,
+   *        this object must have both "pin" and "newPin" attributes
+   *        to change the call barring facility password.
+   * @see MozCallBarringOptions for the detail of options.
+   *
+   * @return a nsIDOMDOMRequest
+   *
+   * If successful, the request's onsuccess will be called.
+   *
+   * Otherwise, the request's onerror will be called, and the request's error
+   * will be either 'RadioNotAvailable', 'RequestNotSupported',
+   * 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
+   */
   nsIDOMDOMRequest changeCallBarringPassword(in unsigned long clientId,
                                              in nsIDOMWindow window,
-                                             in jsval info);
+                                             in jsval options);
+
+  /**
+   * Configures call waiting options.
+   *
+   * @param clientId
+   *        Indicate the RIL client, 0 ~ (number of client - 1).
+   * @param window
+   *        Current window.
+   * @param enabled
+   *        Boolean indicates the desired call waiting status.
+   *
+   * @return a nsIDOMDOMRequest
+   *
+   * If successful, the request's onsuccess will be called.
+   *
+   * Otherwise, the request's onerror will be called, and the request's error
+   * will be either 'RadioNotAvailable', 'RequestNotSupported',
+   * 'IllegalSIMorME', or 'GenericFailure'.
+   */
+  nsIDOMDOMRequest setCallWaiting(in unsigned long clientId,
+                                  in nsIDOMWindow window,
+                                  in bool enabled);
 
-  nsIDOMDOMRequest setCallWaitingOption(in unsigned long clientId,
-                                        in nsIDOMWindow window,
-                                        in bool enabled);
-  nsIDOMDOMRequest getCallWaitingOption(in unsigned long clientId,
-                                        in nsIDOMWindow window);
+  /**
+   * Queries current call waiting options.
+   *
+   * @param clientId
+   *        Indicate the RIL client, 0 ~ (number of client - 1).
+   * @param window
+   *        Current window.
+   *
+   * @return a nsIDOMDOMRequest
+   *
+   * If successful, the request's onsuccess will be called. And the request's
+   * result will be a boolean indicating the call waiting status.
+   *
+   * Otherwise, the request's onerror will be called, and the request's error
+   * will be either 'RadioNotAvailable', 'RequestNotSupported',
+   * 'IllegalSIMorME', or 'GenericFailure'.
+   */
+  nsIDOMDOMRequest getCallWaiting(in unsigned long clientId,
+                                  in nsIDOMWindow window);
 
+  /**
+   * Enables or disables the presentation of the calling line identity (CLI) to
+   * the called party when originating a call.
+   *
+   * @param clientId
+   *        Indicate the RIL client, 0 ~ (number of client - 1).
+   * @param window
+   *        Current window.
+   * @param clirMode
+   *        One of the nsIMobileConnectionProvider.CLIR_* values.
+   *
+   * @return a nsIDOMDOMRequest
+   *
+   * If successful, the request's onsuccess will be called.
+   *
+   * Otherwise, the request's onerror will be called, and the request's error
+   * will be either 'RadioNotAvailable', 'RequestNotSupported',
+   * 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
+   */
   nsIDOMDOMRequest setCallingLineIdRestriction(in unsigned long clientId,
                                                in nsIDOMWindow window,
                                                in unsigned short clirMode);
+
+  /**
+   * Queries current CLIR status.
+   *
+   * @param clientId
+   *        Indicate the RIL client, 0 ~ (number of client - 1).
+   * @param window
+   *        Current window.
+   *
+   * @return a nsIDOMDOMRequest
+   *
+   * If successful, the request's onsuccess will be called. And the request's
+   * result will be a an object containing CLIR 'n' and 'm' parameter.
+   * @see MozClirStatus for the detail of result.
+   *
+   * Otherwise, the request's onerror will be called, and the request's error
+   * will be either 'RadioNotAvailable', 'RequestNotSupported',
+   * 'IllegalSIMorME', or 'GenericFailure'.
+   */
   nsIDOMDOMRequest getCallingLineIdRestriction(in unsigned long clientId,
                                                in nsIDOMWindow window);
 
+  /**
+   * Exit emergency callback mode.
+   *
+   * @param clientId
+   *        Indicate the RIL client, 0 ~ (number of client - 1).
+   * @param window
+   *        Current window.
+   *
+   * @return a nsIDOMDOMRequest
+   *
+   * If successful, the request's onsuccess will be called.
+   *
+   * Otherwise, the request's onerror will be called, and the request's error
+   * will be either 'RadioNotAvailable', 'RequestNotSupported',
+   * 'IllegalSIMorME', or 'GenericFailure'.
+   */
   nsIDOMDOMRequest exitEmergencyCbMode(in unsigned long clientId,
                                        in nsIDOMWindow window);
 
-  nsIDOMDOMRequest setRadioEnabled(in unsigned long clientId, in nsIDOMWindow window, in bool enabled);
+  /**
+   * Set radio enabled/disabled.
+   *
+   * @param clientId
+   *        Indicate the RIL client, 0 ~ (number of client - 1).
+   * @param window
+   *        Current window.
+   * @param enabled
+   *        Boolean indicates the desired radio power. True to enable the radio.
+   *
+   * @return a nsIDOMDOMRequest
+   *
+   * If successful, the request's onsuccess will be called.
+   *
+   * Otherwise, the request's onerror will be called, and the request's error
+   * will be either 'InvalidStateError', 'RadioNotAvailable',
+   * 'IllegalSIMorME', or 'GenericFailure'.
+   *
+   * Note: Request is not available when radioState is null, 'enabling', or
+   * 'disabling'. Calling the function in above conditions will receive
+   * 'InvalidStateError' error.
+   */
+  nsIDOMDOMRequest setRadioEnabled(in unsigned long clientId,
+                                   in nsIDOMWindow window,
+                                   in bool enabled);
 };
new file mode 100644
--- /dev/null
+++ b/dom/mobileconnection/interfaces/nsIMobileNetworkInfo.idl
@@ -0,0 +1,36 @@
+/* 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/. */
+
+#include "nsISupports.idl"
+
+[scriptable, uuid(d7e1364c-61a0-4cf1-bae3-a960e87064e1)]
+interface nsIMobileNetworkInfo: nsISupports
+{
+  /**
+   * Short name of the network operator.
+   */
+  readonly attribute DOMString shortName;
+
+  /**
+   * Long name of the network operator.
+   */
+  readonly attribute DOMString longName;
+
+  /**
+   * Mobile Country Code (MCC) of the network operator.
+   */
+  readonly attribute DOMString mcc;
+
+  /**
+   * Mobile Network Code (MNC) of the network operator.
+   */
+  readonly attribute DOMString mnc;
+
+  /**
+   * State of this network operator.
+   *
+   * Possible values: 'available', 'connected', 'forbidden', or null (unknown).
+   */
+  readonly attribute DOMString state;
+};
new file mode 100644
--- /dev/null
+++ b/dom/mobileconnection/src/MobileCellInfo.cpp
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set ts=8 sts=2 et sw=2 tw=80: */
+/* 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/. */
+
+#include "MobileCellInfo.h"
+#include "mozilla/dom/MozMobileCellInfoBinding.h"
+
+using namespace mozilla::dom;
+
+NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(MobileCellInfo, mWindow)
+
+NS_IMPL_CYCLE_COLLECTING_ADDREF(MobileCellInfo)
+NS_IMPL_CYCLE_COLLECTING_RELEASE(MobileCellInfo)
+
+NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(MobileCellInfo)
+  NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
+  NS_INTERFACE_MAP_ENTRY(nsISupports)
+NS_INTERFACE_MAP_END
+
+MobileCellInfo::MobileCellInfo(nsPIDOMWindow* aWindow)
+  : mWindow(aWindow)
+  , mGsmLocationAreaCode(-1)
+  , mGsmCellId(-1)
+  , mCdmaBaseStationId(-1)
+  , mCdmaBaseStationLatitude(-1)
+  , mCdmaBaseStationLongitude(-1)
+  , mCdmaSystemId(-1)
+  , mCdmaNetworkId(-1)
+{
+  SetIsDOMBinding();
+}
+
+void
+MobileCellInfo::Update(nsIMobileCellInfo* aInfo)
+{
+  if (!aInfo) {
+    return;
+  }
+
+  aInfo->GetGsmLocationAreaCode(&mGsmLocationAreaCode);
+  aInfo->GetGsmCellId(&mGsmCellId);
+  aInfo->GetCdmaBaseStationId(&mCdmaBaseStationId);
+  aInfo->GetCdmaBaseStationLatitude(&mCdmaBaseStationLatitude);
+  aInfo->GetCdmaBaseStationLongitude(&mCdmaBaseStationLongitude);
+  aInfo->GetCdmaSystemId(&mCdmaSystemId);
+  aInfo->GetCdmaNetworkId(&mCdmaNetworkId);
+}
+
+JSObject*
+MobileCellInfo::WrapObject(JSContext* aCx)
+{
+  return MozMobileCellInfoBinding::Wrap(aCx, this);
+}
new file mode 100644
--- /dev/null
+++ b/dom/mobileconnection/src/MobileCellInfo.h
@@ -0,0 +1,95 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set ts=8 sts=2 et sw=2 tw=80: */
+/* 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/. */
+
+#ifndef mozilla_dom_MobileCellInfo_h
+#define mozilla_dom_MobileCellInfo_h
+
+#include "nsIMobileCellInfo.h"
+#include "nsPIDOMWindow.h"
+#include "nsWrapperCache.h"
+
+namespace mozilla {
+namespace dom {
+
+class MobileCellInfo MOZ_FINAL : public nsISupports
+                               , public nsWrapperCache
+{
+public:
+  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
+  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(MobileCellInfo)
+
+  MobileCellInfo(nsPIDOMWindow* aWindow);
+
+  void
+  Update(nsIMobileCellInfo* aInfo);
+
+  nsPIDOMWindow*
+  GetParentObject() const
+  {
+    return mWindow;
+  }
+
+  virtual JSObject*
+  WrapObject(JSContext* aCx) MOZ_OVERRIDE;
+
+  // WebIDL interface
+  int32_t
+  GsmLocationAreaCode() const
+  {
+    return mGsmLocationAreaCode;
+  }
+
+  int64_t
+  GsmCellId() const
+  {
+    return mGsmCellId;
+  }
+
+  int32_t
+  CdmaBaseStationId() const
+  {
+    return mCdmaBaseStationId;
+  }
+
+  int32_t
+  CdmaBaseStationLatitude() const
+  {
+    return mCdmaBaseStationLatitude;
+  }
+
+  int32_t
+  CdmaBaseStationLongitude() const
+  {
+    return mCdmaBaseStationLongitude;
+  }
+
+  int32_t
+  CdmaSystemId() const
+  {
+    return mCdmaSystemId;
+  }
+
+  int32_t
+  CdmaNetworkId() const
+  {
+    return mCdmaNetworkId;
+  }
+
+private:
+  nsCOMPtr<nsPIDOMWindow> mWindow;
+  int32_t mGsmLocationAreaCode;
+  int64_t mGsmCellId;
+  int32_t mCdmaBaseStationId;
+  int32_t mCdmaBaseStationLatitude;
+  int32_t mCdmaBaseStationLongitude;
+  int32_t mCdmaSystemId;
+  int32_t mCdmaNetworkId;
+};
+
+} // namespace dom
+} // namespace mozilla
+
+#endif // mozilla_dom_MobileCellInfo_h
--- a/dom/mobileconnection/src/MobileConnection.cpp
+++ b/dom/mobileconnection/src/MobileConnection.cpp
@@ -1,33 +1,51 @@
 /* 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/. */
 
-#include "mozilla/dom/MobileConnection.h"
+#include "MobileConnection.h"
 
 #include "GeneratedEvents.h"
 #include "mozilla/dom/CFStateChangeEvent.h"
 #include "mozilla/dom/DataErrorEvent.h"
 #include "mozilla/dom/MozClirModeEvent.h"
 #include "mozilla/dom/MozEmergencyCbModeEvent.h"
 #include "mozilla/dom/MozOtaStatusEvent.h"
 #include "mozilla/dom/USSDReceivedEvent.h"
 #include "mozilla/Preferences.h"
-#include "nsIDOMClassInfo.h"
+#include "mozilla/Services.h"
 #include "nsIDOMDOMRequest.h"
 #include "nsIPermissionManager.h"
 #include "nsIVariant.h"
-
+#include "nsJSON.h"
 #include "nsJSUtils.h"
-#include "nsJSON.h"
-#include "mozilla/Services.h"
+#include "nsServiceManagerUtils.h"
 
 #define NS_RILCONTENTHELPER_CONTRACTID "@mozilla.org/ril/content-helper;1"
 
+#define CONVERT_STRING_TO_NULLABLE_ENUM(_string, _enumType, _enum)      \
+{                                                                       \
+  uint32_t i = 0;                                                       \
+  for (const EnumEntry* entry = _enumType##Values::strings;             \
+       entry->value;                                                    \
+       ++entry, ++i) {                                                  \
+    if (_string.EqualsASCII(entry->value)) {                            \
+      _enum.SetValue(static_cast<_enumType>(i));                        \
+    }                                                                   \
+  }                                                                     \
+}
+
+#define CONVERT_ENUM_TO_STRING(_enumType, _enum, _string)               \
+{                                                                       \
+  uint32_t index = uint32_t(_enum);                                     \
+  _string.AssignASCII(_enumType##Values::strings[index].value,          \
+                      _enumType##Values::strings[index].length);        \
+}
+
 using namespace mozilla::dom;
 
 class MobileConnection::Listener MOZ_FINAL : public nsIMobileConnectionListener
 {
   MobileConnection* mMobileConnection;
 
 public:
   NS_DECL_ISUPPORTS
@@ -43,577 +61,830 @@ public:
   {
     MOZ_ASSERT(mMobileConnection);
     mMobileConnection = nullptr;
   }
 };
 
 NS_IMPL_ISUPPORTS(MobileConnection::Listener, nsIMobileConnectionListener)
 
-DOMCI_DATA(MozMobileConnection, MobileConnection)
-
 NS_IMPL_CYCLE_COLLECTION_CLASS(MobileConnection)
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(MobileConnection,
                                                   DOMEventTargetHelper)
   // Don't traverse mListener because it doesn't keep any reference to
   // MobileConnection but a raw pointer instead. Neither does mProvider because
   // it's an xpcom service and is only released at shutting down.
+  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mVoice)
+  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mData)
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(MobileConnection,
                                                 DOMEventTargetHelper)
+  NS_IMPL_CYCLE_COLLECTION_UNLINK(mVoice)
+  NS_IMPL_CYCLE_COLLECTION_UNLINK(mData)
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(MobileConnection)
-  NS_INTERFACE_MAP_ENTRY(nsIDOMMozMobileConnection)
-  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(MozMobileConnection)
 NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
 
 NS_IMPL_ADDREF_INHERITED(MobileConnection, DOMEventTargetHelper)
 NS_IMPL_RELEASE_INHERITED(MobileConnection, DOMEventTargetHelper)
 
-NS_IMPL_EVENT_HANDLER(MobileConnection, voicechange)
-NS_IMPL_EVENT_HANDLER(MobileConnection, datachange)
-NS_IMPL_EVENT_HANDLER(MobileConnection, ussdreceived)
-NS_IMPL_EVENT_HANDLER(MobileConnection, dataerror)
-NS_IMPL_EVENT_HANDLER(MobileConnection, cfstatechange)
-NS_IMPL_EVENT_HANDLER(MobileConnection, emergencycbmodechange)
-NS_IMPL_EVENT_HANDLER(MobileConnection, otastatuschange)
-NS_IMPL_EVENT_HANDLER(MobileConnection, iccchange)
-NS_IMPL_EVENT_HANDLER(MobileConnection, radiostatechange)
-NS_IMPL_EVENT_HANDLER(MobileConnection, clirmodechange)
+MobileConnection::MobileConnection(nsPIDOMWindow* aWindow, uint32_t aClientId)
+  : DOMEventTargetHelper(aWindow)
+  , mClientId(aClientId)
+{
+  SetIsDOMBinding();
 
-MobileConnection::MobileConnection(uint32_t aClientId)
-: mClientId(aClientId)
-{
   mProvider = do_GetService(NS_RILCONTENTHELPER_CONTRACTID);
-  mWindow = nullptr;
 
   // Not being able to acquire the provider isn't fatal since we check
   // for it explicitly below.
   if (!mProvider) {
     NS_WARNING("Could not acquire nsIMobileConnectionProvider!");
     return;
   }
-}
 
-void
-MobileConnection::Init(nsPIDOMWindow* aWindow)
-{
-  BindToOwner(aWindow);
-
-  mWindow = do_GetWeakReference(aWindow);
   mListener = new Listener(this);
+  mVoice = new MobileConnectionInfo(GetOwner());
+  mData = new MobileConnectionInfo(GetOwner());
 
   if (CheckPermission("mobileconnection")) {
     DebugOnly<nsresult> rv = mProvider->RegisterMobileConnectionMsg(mClientId, mListener);
     NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
                      "Failed registering mobile connection messages with provider");
+    UpdateVoice();
+    UpdateData();
   }
 }
 
 void
 MobileConnection::Shutdown()
 {
   if (mProvider && mListener) {
     mListener->Disconnect();
     mProvider->UnregisterMobileConnectionMsg(mClientId, mListener);
     mProvider = nullptr;
     mListener = nullptr;
+    mVoice = nullptr;
+    mData = nullptr;
   }
 }
 
-// nsIDOMMozMobileConnection
-
-NS_IMETHODIMP
-MobileConnection::GetLastKnownNetwork(nsAString& aNetwork)
+JSObject*
+MobileConnection::WrapObject(JSContext* aCx)
 {
-  aNetwork.SetIsVoid(true);
-
-  if (!CheckPermission("mobilenetwork")) {
-    return NS_OK;
-  }
-
-  return mProvider->GetLastKnownNetwork(mClientId, aNetwork);
+  return MozMobileConnectionBinding::Wrap(aCx, this);
 }
 
-NS_IMETHODIMP
-MobileConnection::GetLastKnownHomeNetwork(nsAString& aNetwork)
+bool
+MobileConnection::CheckPermission(const char* aType) const
 {
-  aNetwork.SetIsVoid(true);
-
-  if (!CheckPermission("mobilenetwork")) {
-    return NS_OK;
-  }
-
-  return mProvider->GetLastKnownHomeNetwork(mClientId, aNetwork);
-}
-
-// All fields below require the "mobileconnection" permission.
-
-bool
-MobileConnection::CheckPermission(const char* aType)
-{
-  nsCOMPtr<nsPIDOMWindow> window = do_QueryReferent(mWindow);
-  NS_ENSURE_TRUE(window, false);
-
   nsCOMPtr<nsIPermissionManager> permMgr =
     mozilla::services::GetPermissionManager();
   NS_ENSURE_TRUE(permMgr, false);
 
   uint32_t permission = nsIPermissionManager::DENY_ACTION;
-  permMgr->TestPermissionFromWindow(window, aType, &permission);
+  permMgr->TestPermissionFromWindow(GetOwner(), aType, &permission);
   return permission == nsIPermissionManager::ALLOW_ACTION;
 }
 
-NS_IMETHODIMP
-MobileConnection::GetVoice(nsIDOMMozMobileConnectionInfo** aVoice)
+void
+MobileConnection::UpdateVoice()
 {
-  *aVoice = nullptr;
+  if (!mProvider) {
+    return;
+  }
 
-  if (!mProvider || !CheckPermission("mobileconnection")) {
-    return NS_OK;
+  nsCOMPtr<nsIMobileConnectionInfo> info;
+  mProvider->GetVoiceConnectionInfo(mClientId, getter_AddRefs(info));
+  mVoice->Update(info);
+}
+
+void
+MobileConnection::UpdateData()
+{
+  if (!mProvider) {
+    return;
   }
-  return mProvider->GetVoiceConnectionInfo(mClientId, aVoice);
+
+  nsCOMPtr<nsIMobileConnectionInfo> info;
+  mProvider->GetDataConnectionInfo(mClientId, getter_AddRefs(info));
+  mData->Update(info);
 }
 
-NS_IMETHODIMP
-MobileConnection::GetData(nsIDOMMozMobileConnectionInfo** aData)
+// WebIDL interface
+
+void
+MobileConnection::GetLastKnownNetwork(nsString& aRetVal) const
 {
-  *aData = nullptr;
+  aRetVal.SetIsVoid(true);
 
-  if (!mProvider || !CheckPermission("mobileconnection")) {
-    return NS_OK;
+  if (!mProvider ||
+      (!CheckPermission("mobilenetwork") &&
+       !CheckPermission("mobileconnection"))) {
+    return;
   }
-  return mProvider->GetDataConnectionInfo(mClientId, aData);
+
+  mProvider->GetLastKnownNetwork(mClientId, aRetVal);
 }
 
-NS_IMETHODIMP
-MobileConnection::GetIccId(nsAString& aIccId)
+void
+MobileConnection::GetLastKnownHomeNetwork(nsString& aRetVal) const
 {
-  aIccId.SetIsVoid(true);
+  aRetVal.SetIsVoid(true);
 
-  if (!mProvider || !CheckPermission("mobileconnection")) {
-     return NS_OK;
+  if (!mProvider ||
+      (!CheckPermission("mobilenetwork") &&
+       !CheckPermission("mobileconnection"))) {
+    return;
   }
-  return mProvider->GetIccId(mClientId, aIccId);
+
+  mProvider->GetLastKnownHomeNetwork(mClientId, aRetVal);
 }
 
-NS_IMETHODIMP
-MobileConnection::GetNetworkSelectionMode(nsAString& aNetworkSelectionMode)
+// All fields below require the "mobileconnection" permission.
+
+MobileConnectionInfo*
+MobileConnection::Voice() const
 {
-  aNetworkSelectionMode.SetIsVoid(true);
+  if (!mProvider || !CheckPermission("mobileconnection")) {
+    return nullptr;
+  }
 
+  return mVoice;
+}
+
+MobileConnectionInfo*
+MobileConnection::Data() const
+{
   if (!mProvider || !CheckPermission("mobileconnection")) {
-     return NS_OK;
+    return nullptr;
   }
-  return mProvider->GetNetworkSelectionMode(mClientId, aNetworkSelectionMode);
+
+  return mData;
 }
 
-NS_IMETHODIMP
-MobileConnection::GetRadioState(nsAString& aRadioState)
+void
+MobileConnection::GetIccId(nsString& aRetVal) const
 {
-  aRadioState.SetIsVoid(true);
+  aRetVal.SetIsVoid(true);
 
   if (!mProvider || !CheckPermission("mobileconnection")) {
-     return NS_OK;
+    return;
   }
-  return mProvider->GetRadioState(mClientId, aRadioState);
+
+  mProvider->GetIccId(mClientId, aRetVal);
 }
 
-NS_IMETHODIMP
-MobileConnection::GetSupportedNetworkTypes(nsIVariant** aSupportedNetworkTypes)
+Nullable<MobileNetworkSelectionMode>
+MobileConnection::GetNetworkSelectionMode() const
 {
-  *aSupportedNetworkTypes = nullptr;
+  Nullable<MobileNetworkSelectionMode> retVal =
+    Nullable<MobileNetworkSelectionMode>();
 
   if (!mProvider || !CheckPermission("mobileconnection")) {
-     return NS_OK;
+    return retVal;
   }
 
-  return mProvider->GetSupportedNetworkTypes(mClientId, aSupportedNetworkTypes);
+  nsAutoString mode;
+  mProvider->GetNetworkSelectionMode(mClientId, mode);
+  CONVERT_STRING_TO_NULLABLE_ENUM(mode, MobileNetworkSelectionMode, retVal);
+
+  return retVal;
 }
 
-NS_IMETHODIMP
-MobileConnection::GetNetworks(nsIDOMDOMRequest** aRequest)
+Nullable<MobileRadioState>
+MobileConnection::GetRadioState() const
 {
-  *aRequest = nullptr;
+  Nullable<MobileRadioState> retVal = Nullable<MobileRadioState>();
+
+  if (!mProvider || !CheckPermission("mobileconnection")) {
+    return retVal;
+  }
 
-  if (!CheckPermission("mobileconnection")) {
-    return NS_OK;
+  nsAutoString state;
+  mProvider->GetRadioState(mClientId, state);
+  CONVERT_STRING_TO_NULLABLE_ENUM(state, MobileRadioState, retVal);
+
+  return retVal;
+}
+
+void
+MobileConnection::GetSupportedNetworkTypes(nsTArray<MobileNetworkType>& aTypes) const
+{
+  if (!mProvider || !CheckPermission("mobileconnection")) {
+    return;
   }
 
-  if (!mProvider) {
-    return NS_ERROR_FAILURE;
+  nsCOMPtr<nsIVariant> variant;
+  mProvider->GetSupportedNetworkTypes(mClientId,
+                                      getter_AddRefs(variant));
+
+  uint16_t type;
+  nsIID iid;
+  uint32_t count;
+  void* data;
+
+  // Convert the nsIVariant to an array.  We own the resulting buffer and its
+  // elements.
+  if (NS_FAILED(variant->GetAsArray(&type, &iid, &count, &data))) {
+    return;
   }
 
-  return mProvider->GetNetworks(mClientId, GetOwner(), aRequest);
+  // We expect the element type is wstring.
+  if (type == nsIDataType::VTYPE_WCHAR_STR) {
+    char16_t** rawArray = reinterpret_cast<char16_t**>(data);
+    for (uint32_t i = 0; i < count; ++i) {
+      nsDependentString rawType(rawArray[i]);
+      Nullable<MobileNetworkType> type = Nullable<MobileNetworkType>();
+      CONVERT_STRING_TO_NULLABLE_ENUM(rawType, MobileNetworkType, type);
+
+      if (!type.IsNull()) {
+        aTypes.AppendElement(type.Value());
+      }
+    }
+  }
+  NS_Free(data);
 }
 
-NS_IMETHODIMP
-MobileConnection::SelectNetwork(nsIDOMMozMobileNetworkInfo* aNetwork, nsIDOMDOMRequest** aRequest)
+already_AddRefed<DOMRequest>
+MobileConnection::GetNetworks(ErrorResult& aRv)
 {
-  *aRequest = nullptr;
-
   if (!CheckPermission("mobileconnection")) {
-    return NS_OK;
+    return nullptr;
   }
 
   if (!mProvider) {
-    return NS_ERROR_FAILURE;
+    aRv.Throw(NS_ERROR_FAILURE);
+    return nullptr;
   }
 
-  return mProvider->SelectNetwork(mClientId, GetOwner(), aNetwork, aRequest);
+  nsCOMPtr<nsIDOMDOMRequest> request;
+  nsresult rv = mProvider->GetNetworks(mClientId, GetOwner(),
+                                       getter_AddRefs(request));
+  if (NS_FAILED(rv)) {
+    aRv.Throw(rv);
+    return nullptr;
+  }
+
+  return request.forget().downcast<DOMRequest>();
 }
 
-NS_IMETHODIMP
-MobileConnection::SelectNetworkAutomatically(nsIDOMDOMRequest** aRequest)
+already_AddRefed<DOMRequest>
+MobileConnection::SelectNetwork(MobileNetworkInfo& aNetwork, ErrorResult& aRv)
 {
-  *aRequest = nullptr;
-
   if (!CheckPermission("mobileconnection")) {
-    return NS_OK;
+    return nullptr;
   }
 
   if (!mProvider) {
-    return NS_ERROR_FAILURE;
+    aRv.Throw(NS_ERROR_FAILURE);
+    return nullptr;
   }
 
-  return mProvider->SelectNetworkAutomatically(mClientId, GetOwner(), aRequest);
+  nsCOMPtr<nsIDOMDOMRequest> request;
+  nsresult rv = mProvider->SelectNetwork(mClientId, GetOwner(), &aNetwork,
+                                         getter_AddRefs(request));
+  if (NS_FAILED(rv)) {
+    aRv.Throw(rv);
+    return nullptr;
+  }
+
+  return request.forget().downcast<DOMRequest>();
 }
 
-NS_IMETHODIMP
-MobileConnection::SetPreferredNetworkType(const nsAString& aType,
-                                          nsIDOMDOMRequest** aDomRequest)
+already_AddRefed<DOMRequest>
+MobileConnection::SelectNetworkAutomatically(ErrorResult& aRv)
 {
-  *aDomRequest = nullptr;
-
   if (!CheckPermission("mobileconnection")) {
-    return NS_OK;
+    return nullptr;
   }
 
   if (!mProvider) {
-    return NS_ERROR_FAILURE;
+    aRv.Throw(NS_ERROR_FAILURE);
+    return nullptr;
   }
 
-  return mProvider->SetPreferredNetworkType(mClientId, GetOwner(), aType, aDomRequest);
+  nsCOMPtr<nsIDOMDOMRequest> request;
+  nsresult rv = mProvider->SelectNetworkAutomatically(mClientId, GetOwner(),
+                                                      getter_AddRefs(request));
+  if (NS_FAILED(rv)) {
+    aRv.Throw(rv);
+    return nullptr;
+  }
+
+  return request.forget().downcast<DOMRequest>();
 }
 
-NS_IMETHODIMP
-MobileConnection::GetPreferredNetworkType(nsIDOMDOMRequest** aDomRequest)
+already_AddRefed<DOMRequest>
+MobileConnection::SetPreferredNetworkType(MobilePreferredNetworkType& aType,
+                                          ErrorResult& aRv)
 {
-  *aDomRequest = nullptr;
-
   if (!CheckPermission("mobileconnection")) {
-    return NS_OK;
+    return nullptr;
   }
 
   if (!mProvider) {
-    return NS_ERROR_FAILURE;
+    aRv.Throw(NS_ERROR_FAILURE);
+    return nullptr;
   }
 
-  return mProvider->GetPreferredNetworkType(mClientId, GetOwner(), aDomRequest);
+  nsAutoString type;
+  CONVERT_ENUM_TO_STRING(MobilePreferredNetworkType, aType, type);
+
+  nsCOMPtr<nsIDOMDOMRequest> request;
+  nsresult rv = mProvider->SetPreferredNetworkType(mClientId, GetOwner(), type,
+                                                   getter_AddRefs(request));
+  if (NS_FAILED(rv)) {
+    aRv.Throw(rv);
+    return nullptr;
+  }
+
+  return request.forget().downcast<DOMRequest>();
 }
 
-NS_IMETHODIMP
-MobileConnection::SetRoamingPreference(const nsAString& aMode, nsIDOMDOMRequest** aDomRequest)
+already_AddRefed<DOMRequest>
+MobileConnection::GetPreferredNetworkType(ErrorResult& aRv)
 {
-  *aDomRequest = nullptr;
-
   if (!CheckPermission("mobileconnection")) {
-    return NS_OK;
+    return nullptr;
   }
 
   if (!mProvider) {
-    return NS_ERROR_FAILURE;
+    aRv.Throw(NS_ERROR_FAILURE);
+    return nullptr;
   }
 
-  return mProvider->SetRoamingPreference(mClientId, GetOwner(), aMode, aDomRequest);
+  nsCOMPtr<nsIDOMDOMRequest> request;
+  nsresult rv = mProvider->GetPreferredNetworkType(mClientId, GetOwner(),
+                                                   getter_AddRefs(request));
+  if (NS_FAILED(rv)) {
+    aRv.Throw(rv);
+    return nullptr;
+  }
+
+  return request.forget().downcast<DOMRequest>();
 }
 
-NS_IMETHODIMP
-MobileConnection::GetRoamingPreference(nsIDOMDOMRequest** aDomRequest)
+already_AddRefed<DOMRequest>
+MobileConnection::SetRoamingPreference(MobileRoamingMode& aMode,
+                                       ErrorResult& aRv)
 {
-  *aDomRequest = nullptr;
-
   if (!CheckPermission("mobileconnection")) {
-    return NS_OK;
+    return nullptr;
   }
 
   if (!mProvider) {
-    return NS_ERROR_FAILURE;
+    aRv.Throw(NS_ERROR_FAILURE);
+    return nullptr;
   }
 
-  return mProvider->GetRoamingPreference(mClientId, GetOwner(), aDomRequest);
+  nsAutoString mode;
+  CONVERT_ENUM_TO_STRING(MobileRoamingMode, aMode, mode);
+
+  nsCOMPtr<nsIDOMDOMRequest> request;
+  nsresult rv = mProvider->SetRoamingPreference(mClientId, GetOwner(), mode,
+                                                getter_AddRefs(request));
+  if (NS_FAILED(rv)) {
+    aRv.Throw(rv);
+    return nullptr;
+  }
+
+  return request.forget().downcast<DOMRequest>();
 }
 
-NS_IMETHODIMP
-MobileConnection::SetVoicePrivacyMode(bool aEnabled, nsIDOMDOMRequest** aDomRequest)
+already_AddRefed<DOMRequest>
+MobileConnection::GetRoamingPreference(ErrorResult& aRv)
 {
-  *aDomRequest = nullptr;
-
   if (!CheckPermission("mobileconnection")) {
-    return NS_OK;
+    return nullptr;
   }
 
   if (!mProvider) {
-    return NS_ERROR_FAILURE;
+    aRv.Throw(NS_ERROR_FAILURE);
+    return nullptr;
   }
 
-  return mProvider->SetVoicePrivacyMode(mClientId, GetOwner(), aEnabled, aDomRequest);
+  nsCOMPtr<nsIDOMDOMRequest> request;
+  nsresult rv = mProvider->GetRoamingPreference(mClientId, GetOwner(),
+                                                getter_AddRefs(request));
+  if (NS_FAILED(rv)) {
+    aRv.Throw(rv);
+  }
+
+  return request.forget().downcast<DOMRequest>();
 }
 
-NS_IMETHODIMP
-MobileConnection::GetVoicePrivacyMode(nsIDOMDOMRequest** aDomRequest)
+already_AddRefed<DOMRequest>
+MobileConnection::SetVoicePrivacyMode(bool aEnabled, ErrorResult& aRv)
 {
-  *aDomRequest = nullptr;
-
   if (!CheckPermission("mobileconnection")) {
-    return NS_OK;
+    return nullptr;
   }
 
   if (!mProvider) {
-    return NS_ERROR_FAILURE;
+    aRv.Throw(NS_ERROR_FAILURE);
+    return nullptr;
   }
 
-  return mProvider->GetVoicePrivacyMode(mClientId, GetOwner(), aDomRequest);
+  nsCOMPtr<nsIDOMDOMRequest> request;
+  nsresult rv = mProvider->SetVoicePrivacyMode(mClientId, GetOwner(), aEnabled,
+                                               getter_AddRefs(request));
+  if (NS_FAILED(rv)) {
+    aRv.Throw(rv);
+    return nullptr;
+  }
+
+  return request.forget().downcast<DOMRequest>();
 }
 
-NS_IMETHODIMP
-MobileConnection::SendMMI(const nsAString& aMMIString,
-                          nsIDOMDOMRequest** aRequest)
+already_AddRefed<DOMRequest>
+MobileConnection::GetVoicePrivacyMode(ErrorResult& aRv)
 {
   if (!CheckPermission("mobileconnection")) {
-    return NS_OK;
+    return nullptr;
   }
 
   if (!mProvider) {
-    return NS_ERROR_FAILURE;
+    aRv.Throw(NS_ERROR_FAILURE);
+    return nullptr;
   }
 
-  return mProvider->SendMMI(mClientId, GetOwner(), aMMIString, aRequest);
+  nsCOMPtr<nsIDOMDOMRequest> request;
+  nsresult rv = mProvider->GetVoicePrivacyMode(mClientId, GetOwner(),
+                                               getter_AddRefs(request));
+  if (NS_FAILED(rv)) {
+    aRv.Throw(rv);
+    return nullptr;
+  }
+
+  return request.forget().downcast<DOMRequest>();
 }
 
-NS_IMETHODIMP
-MobileConnection::CancelMMI(nsIDOMDOMRequest** aRequest)
+already_AddRefed<DOMRequest>
+MobileConnection::SendMMI(const nsAString& aMMIString, ErrorResult& aRv)
 {
   if (!CheckPermission("mobileconnection")) {
-    return NS_OK;
+    return nullptr;
   }
 
   if (!mProvider) {
-    return NS_ERROR_FAILURE;
+    aRv.Throw(NS_ERROR_FAILURE);
+    return nullptr;
   }
 
-  return mProvider->CancelMMI(mClientId, GetOwner(),aRequest);
+  nsCOMPtr<nsIDOMDOMRequest> request;
+  nsresult rv = mProvider->SendMMI(mClientId, GetOwner(), aMMIString,
+                                   getter_AddRefs(request));
+  if (NS_FAILED(rv)) {
+    aRv.Throw(rv);
+    return nullptr;
+  }
+
+  return request.forget().downcast<DOMRequest>();
 }
 
-NS_IMETHODIMP
-MobileConnection::GetCallForwardingOption(uint16_t aReason,
-                                          nsIDOMDOMRequest** aRequest)
+already_AddRefed<DOMRequest>
+MobileConnection::CancelMMI(ErrorResult& aRv)
 {
-  *aRequest = nullptr;
-
   if (!CheckPermission("mobileconnection")) {
-    return NS_OK;
+    return nullptr;
   }
 
   if (!mProvider) {
-    return NS_ERROR_FAILURE;
+    aRv.Throw(NS_ERROR_FAILURE);
+    return nullptr;
   }
 
-  return mProvider->GetCallForwardingOption(mClientId, GetOwner(), aReason, aRequest);
+  nsCOMPtr<nsIDOMDOMRequest> request;
+  nsresult rv = mProvider->CancelMMI(mClientId, GetOwner(),
+                                     getter_AddRefs(request));
+  if (NS_FAILED(rv)) {
+    aRv.Throw(rv);
+    return nullptr;
+  }
+
+  return request.forget().downcast<DOMRequest>();
 }
 
-NS_IMETHODIMP
-MobileConnection::SetCallForwardingOption(nsIDOMMozMobileCFInfo* aCFInfo,
-                                          nsIDOMDOMRequest** aRequest)
+already_AddRefed<DOMRequest>
+MobileConnection::GetCallForwardingOption(uint16_t aReason, ErrorResult& aRv)
 {
-  *aRequest = nullptr;
+  if (!CheckPermission("mobileconnection")) {
+    return nullptr;
+  }
+
+  if (!mProvider) {
+    aRv.Throw(NS_ERROR_FAILURE);
+    return nullptr;
+  }
 
+  nsCOMPtr<nsIDOMDOMRequest> request;
+  nsresult rv = mProvider->GetCallForwarding(mClientId, GetOwner(), aReason,
+                                             getter_AddRefs(request));
+  if (NS_FAILED(rv)) {
+    aRv.Throw(rv);
+    return nullptr;
+  }
+
+  return request.forget().downcast<DOMRequest>();
+}
+
+already_AddRefed<DOMRequest>
+MobileConnection::SetCallForwardingOption(const MozCallForwardingOptions& aOptions,
+                                          ErrorResult& aRv)
+{
   if (!CheckPermission("mobileconnection")) {
-    return NS_OK;
+    return nullptr;
   }
 
   if (!mProvider) {
-    return NS_ERROR_FAILURE;
+    aRv.Throw(NS_ERROR_FAILURE);
+    return nullptr;
   }
 
-  return mProvider->SetCallForwardingOption(mClientId, GetOwner(), aCFInfo, aRequest);
+  AutoSafeJSContext cx;
+  JS::Rooted<JS::Value> options(cx);
+  if (!aOptions.ToObject(cx, &options)) {
+    aRv.Throw(NS_ERROR_TYPE_ERR);
+    return nullptr;
+  }
+
+  nsCOMPtr<nsIDOMDOMRequest> request;
+  nsresult rv = mProvider->SetCallForwarding(mClientId, GetOwner(), options,
+                                             getter_AddRefs(request));
+  if (NS_FAILED(rv)) {
+    aRv.Throw(rv);
+    return nullptr;
+  }
+
+  return request.forget().downcast<DOMRequest>();
 }
 
-NS_IMETHODIMP
-MobileConnection::GetCallBarringOption(JS::Handle<JS::Value> aOption,
-                                       nsIDOMDOMRequest** aRequest)
+already_AddRefed<DOMRequest>
+MobileConnection::GetCallBarringOption(const MozCallBarringOptions& aOptions,
+                                       ErrorResult& aRv)
 {
-  *aRequest = nullptr;
-
   if (!CheckPermission("mobileconnection")) {
-    return NS_OK;
+    return nullptr;
   }
 
   if (!mProvider) {
-    return NS_ERROR_FAILURE;
+    aRv.Throw(NS_ERROR_FAILURE);
+    return nullptr;
   }
 
-  return mProvider->GetCallBarringOption(mClientId, GetOwner(), aOption, aRequest);
+  AutoSafeJSContext cx;
+  JS::Rooted<JS::Value> options(cx);
+  if (!aOptions.ToObject(cx, &options)) {
+    aRv.Throw(NS_ERROR_TYPE_ERR);
+    return nullptr;
+  }
+
+  nsCOMPtr<nsIDOMDOMRequest> request;
+  nsresult rv = mProvider->GetCallBarring(mClientId, GetOwner(), options,
+                                          getter_AddRefs(request));
+  if (NS_FAILED(rv)) {
+    aRv.Throw(rv);
+    return nullptr;
+  }
+
+  return request.forget().downcast<DOMRequest>();
 }
 
-NS_IMETHODIMP
-MobileConnection::SetCallBarringOption(JS::Handle<JS::Value> aOption,
-                                       nsIDOMDOMRequest** aRequest)
+already_AddRefed<DOMRequest>
+MobileConnection::SetCallBarringOption(const MozCallBarringOptions& aOptions,
+                                       ErrorResult& aRv)
 {
-  *aRequest = nullptr;
-
   if (!CheckPermission("mobileconnection")) {
-    return NS_OK;
+    return nullptr;
   }
 
   if (!mProvider) {
-    return NS_ERROR_FAILURE;
+    aRv.Throw(NS_ERROR_FAILURE);
+    return nullptr;
   }
 
-  return mProvider->SetCallBarringOption(mClientId, GetOwner(), aOption, aRequest);
+  AutoSafeJSContext cx;
+  JS::Rooted<JS::Value> options(cx);
+  if (!aOptions.ToObject(cx, &options)) {
+    aRv.Throw(NS_ERROR_TYPE_ERR);
+    return nullptr;
+  }
+
+  nsCOMPtr<nsIDOMDOMRequest> request;
+  nsresult rv = mProvider->SetCallBarring(mClientId, GetOwner(), options,
+                                          getter_AddRefs(request));
+  if (NS_FAILED(rv)) {
+    aRv.Throw(rv);
+    return nullptr;
+  }
+
+  return request.forget().downcast<DOMRequest>();
 }
 
-NS_IMETHODIMP
-MobileConnection::ChangeCallBarringPassword(JS::Handle<JS::Value> aInfo,
-                                            nsIDOMDOMRequest** aRequest)
+already_AddRefed<DOMRequest>
+MobileConnection::ChangeCallBarringPassword(const MozCallBarringOptions& aOptions,
+                                            ErrorResult& aRv)
 {
-  *aRequest = nullptr;
-
   if (!CheckPermission("mobileconnection")) {
-    return NS_OK;
+    return nullptr;
   }
 
   if (!mProvider) {
-    return NS_ERROR_FAILURE;
+    aRv.Throw(NS_ERROR_FAILURE);
+    return nullptr;
+  }
+
+  AutoSafeJSContext cx;
+  JS::Rooted<JS::Value> options(cx);
+  if (!aOptions.ToObject(cx, &options)) {
+    aRv.Throw(NS_ERROR_TYPE_ERR);
+    return nullptr;
   }
 
-  return mProvider->ChangeCallBarringPassword(mClientId, GetOwner(), aInfo, aRequest);
+  nsCOMPtr<nsIDOMDOMRequest> request;
+  nsresult rv = mProvider->ChangeCallBarringPassword(mClientId,
+                                                     GetOwner(),
+                                                     options,
+                                                     getter_AddRefs(request));
+  if (NS_FAILED(rv)) {
+    aRv.Throw(rv);
+    return nullptr;
+  }
+
+  return request.forget().downcast<DOMRequest>();
 }
 
-NS_IMETHODIMP
-MobileConnection::GetCallWaitingOption(nsIDOMDOMRequest** aRequest)
+already_AddRefed<DOMRequest>
+MobileConnection::GetCallWaitingOption(ErrorResult& aRv)
 {
-  *aRequest = nullptr;
-
   if (!CheckPermission("mobileconnection")) {
-    return NS_OK;
+    return nullptr;
   }
 
   if (!mProvider) {
-    return NS_ERROR_FAILURE;
+    aRv.Throw(NS_ERROR_FAILURE);
+    return nullptr;
   }
 
-  return mProvider->GetCallWaitingOption(mClientId, GetOwner(), aRequest);
+  nsCOMPtr<nsIDOMDOMRequest> request;
+  nsresult rv = mProvider->GetCallWaiting(mClientId, GetOwner(),
+                                          getter_AddRefs(request));
+  if (NS_FAILED(rv)) {
+    aRv.Throw(rv);
+    return nullptr;
+  }
+
+  return request.forget().downcast<DOMRequest>();
 }
 
-NS_IMETHODIMP
-MobileConnection::SetCallWaitingOption(bool aEnabled,
-                                       nsIDOMDOMRequest** aRequest)
+already_AddRefed<DOMRequest>
+MobileConnection::SetCallWaitingOption(bool aEnabled, ErrorResult& aRv)
 {
-  *aRequest = nullptr;
-
   if (!CheckPermission("mobileconnection")) {
-    return NS_OK;
+    return nullptr;
   }
 
   if (!mProvider) {
-    return NS_ERROR_FAILURE;
+    aRv.Throw(NS_ERROR_FAILURE);
+    return nullptr;
   }
 
-  return mProvider->SetCallWaitingOption(mClientId, GetOwner(), aEnabled, aRequest);
+  nsCOMPtr<nsIDOMDOMRequest> request;
+  nsresult rv = mProvider->SetCallWaiting(mClientId, GetOwner(), aEnabled,
+                                          getter_AddRefs(request));
+  if (NS_FAILED(rv)) {
+    aRv.Throw(rv);
+    return nullptr;
+  }
+
+  return request.forget().downcast<DOMRequest>();
 }
 
-NS_IMETHODIMP
-MobileConnection::GetCallingLineIdRestriction(nsIDOMDOMRequest** aRequest)
+already_AddRefed<DOMRequest>
+MobileConnection::GetCallingLineIdRestriction(ErrorResult& aRv)
 {
-  *aRequest = nullptr;
-
   if (!CheckPermission("mobileconnection")) {
-    return NS_OK;
+    return nullptr;
   }
 
   if (!mProvider) {
-    return NS_ERROR_FAILURE;
+    aRv.Throw(NS_ERROR_FAILURE);
+    return nullptr;
   }
 
-  return mProvider->GetCallingLineIdRestriction(mClientId, GetOwner(), aRequest);
+  nsCOMPtr<nsIDOMDOMRequest> request;
+  nsresult rv = mProvider->GetCallingLineIdRestriction(mClientId, GetOwner(),
+                                                       getter_AddRefs(request));
+  if (NS_FAILED(rv)) {
+    aRv.Throw(rv);
+    return nullptr;
+  }
+
+  return request.forget().downcast<DOMRequest>();
 }
 
-NS_IMETHODIMP
-MobileConnection::SetCallingLineIdRestriction(unsigned short aClirMode,
-                                              nsIDOMDOMRequest** aRequest)
+already_AddRefed<DOMRequest>
+MobileConnection::SetCallingLineIdRestriction(uint16_t aMode,
+                                              ErrorResult& aRv)
 {
-  *aRequest = nullptr;
-
   if (!CheckPermission("mobileconnection")) {
-    return NS_OK;
+    return nullptr;
   }
 
   if (!mProvider) {
-    return NS_ERROR_FAILURE;
+    aRv.Throw(NS_ERROR_FAILURE);
+    return nullptr;
   }
 
-  return mProvider->SetCallingLineIdRestriction(mClientId, GetOwner(), aClirMode, aRequest);
+  nsCOMPtr<nsIDOMDOMRequest> request;
+  nsresult rv = mProvider->SetCallingLineIdRestriction(mClientId,
+                                                       GetOwner(),
+                                                       aMode,
+                                                       getter_AddRefs(request));
+  if (NS_FAILED(rv)) {
+    aRv.Throw(rv);
+    return nullptr;
+  }
+
+  return request.forget().downcast<DOMRequest>();
 }
 
-NS_IMETHODIMP
-MobileConnection::ExitEmergencyCbMode(nsIDOMDOMRequest** aRequest)
+already_AddRefed<DOMRequest>
+MobileConnection::ExitEmergencyCbMode(ErrorResult& aRv)
 {
-  *aRequest = nullptr;
-
   if (!CheckPermission("mobileconnection")) {
-    return NS_OK;
+    return nullptr;
   }
 
   if (!mProvider) {
-    return NS_ERROR_FAILURE;
+    aRv.Throw(NS_ERROR_FAILURE);
+    return nullptr;
   }
 
-  return mProvider->ExitEmergencyCbMode(mClientId, GetOwner(), aRequest);
+  nsCOMPtr<nsIDOMDOMRequest> request;
+  nsresult rv = mProvider->ExitEmergencyCbMode(mClientId, GetOwner(),
+                                               getter_AddRefs(request));
+  if (NS_FAILED(rv)) {
+    aRv.Throw(rv);
+    return nullptr;
+  }
+
+  return request.forget().downcast<DOMRequest>();
 }
 
-NS_IMETHODIMP
-MobileConnection::SetRadioEnabled(bool aEnabled,
-                                  nsIDOMDOMRequest** aRequest)
+already_AddRefed<DOMRequest>
+MobileConnection::SetRadioEnabled(bool aEnabled, ErrorResult& aRv)
 {
-  *aRequest = nullptr;
-
   if (!CheckPermission("mobileconnection")) {
-    return NS_OK;
+    return nullptr;
   }
 
   if (!mProvider) {
-    return NS_ERROR_FAILURE;
+    aRv.Throw(NS_ERROR_FAILURE);
+    return nullptr;
   }
 
-  return mProvider->SetRadioEnabled(mClientId, GetOwner(), aEnabled, aRequest);
+  nsCOMPtr<nsIDOMDOMRequest> request;
+  nsresult rv = mProvider->SetRadioEnabled(mClientId, GetOwner(), aEnabled,
+                                           getter_AddRefs(request));
+  if (NS_FAILED(rv)) {
+    aRv.Throw(rv);
+    return nullptr;
+  }
+
+  return request.forget().downcast<DOMRequest>();
 }
 
 // nsIMobileConnectionListener
 
 NS_IMETHODIMP
 MobileConnection::NotifyVoiceChanged()
 {
   if (!CheckPermission("mobileconnection")) {
     return NS_OK;
   }
 
+  UpdateVoice();
+
   return DispatchTrustedEvent(NS_LITERAL_STRING("voicechange"));
 }
 
 NS_IMETHODIMP
 MobileConnection::NotifyDataChanged()
 {
   if (!CheckPermission("mobileconnection")) {
     return NS_OK;
   }
 
+  UpdateData();
+
   return DispatchTrustedEvent(NS_LITERAL_STRING("datachange"));
 }
 
 NS_IMETHODIMP
 MobileConnection::NotifyUssdReceived(const nsAString& aMessage,
                                      bool aSessionEnded)
 {
   if (!CheckPermission("mobileconnection")) {
--- a/dom/mobileconnection/src/MobileConnection.h
+++ b/dom/mobileconnection/src/MobileConnection.h
@@ -1,58 +1,178 @@
 /* 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/. */
 
-#ifndef mozilla_dom_network_MobileConnection_h
-#define mozilla_dom_network_MobileConnection_h
+#ifndef mozilla_dom_MobileConnection_h
+#define mozilla_dom_MobileConnection_h
 
+#include "MobileConnectionInfo.h"
+#include "MobileNetworkInfo.h"
 #include "mozilla/DOMEventTargetHelper.h"
-#include "nsIDOMMobileConnection.h"
+#include "mozilla/dom/DOMRequest.h"
+#include "mozilla/dom/MozMobileConnectionBinding.h"
+#include "nsCycleCollectionParticipant.h"
 #include "nsIMobileConnectionProvider.h"
-#include "nsCycleCollectionParticipant.h"
 #include "nsWeakPtr.h"
 
 namespace mozilla {
 namespace dom {
 
-class MobileConnection : public DOMEventTargetHelper
-                       , public nsIDOMMozMobileConnection
+class MobileConnection MOZ_FINAL : public DOMEventTargetHelper
 {
   /**
    * Class MobileConnection doesn't actually inherit
    * nsIMobileConnectionListener. Instead, it owns an
    * nsIMobileConnectionListener derived instance mListener and passes it to
    * nsIMobileConnectionProvider. The onreceived events are first delivered to
    * mListener and then forwarded to its owner, MobileConnection. See also bug
    * 775997 comment #51.
    */
   class Listener;
 
 public:
   NS_DECL_ISUPPORTS_INHERITED
-  NS_DECL_NSIDOMMOZMOBILECONNECTION
   NS_DECL_NSIMOBILECONNECTIONLISTENER
-
   NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper)
-
-  MobileConnection(uint32_t aClientId);
-
-  void Init(nsPIDOMWindow *aWindow);
-  void Shutdown();
-
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(MobileConnection,
                                            DOMEventTargetHelper)
 
+  MobileConnection(nsPIDOMWindow *aWindow, uint32_t aClientId);
+
+  void
+  Shutdown();
+
+  nsPIDOMWindow*
+  GetParentObject() const
+  {
+    return GetOwner();
+  }
+
+  // WrapperCache
+  virtual JSObject*
+  WrapObject(JSContext* aCx) MOZ_OVERRIDE;
+
+  // WebIDL interface
+  void
+  GetLastKnownNetwork(nsString& aRetVal) const;
+
+  void
+  GetLastKnownHomeNetwork(nsString& aRetVal) const;
+
+  MobileConnectionInfo*
+  Voice() const;
+
+  MobileConnectionInfo*
+  Data() const;
+
+  void
+  GetIccId(nsString& aRetVal) const;
+
+  Nullable<MobileNetworkSelectionMode>
+  GetNetworkSelectionMode() const;
+
+  Nullable<MobileRadioState>
+  GetRadioState() const;
+
+  void
+  GetSupportedNetworkTypes(nsTArray<MobileNetworkType>& aTypes) const;
+
+  already_AddRefed<DOMRequest>
+  GetNetworks(ErrorResult& aRv);
+
+  already_AddRefed<DOMRequest>
+  SelectNetwork(MobileNetworkInfo& aNetwork, ErrorResult& aRv);
+
+  already_AddRefed<DOMRequest>
+  SelectNetworkAutomatically(ErrorResult& aRv);
+
+  already_AddRefed<DOMRequest>
+  SetPreferredNetworkType(MobilePreferredNetworkType& aType, ErrorResult& aRv);
+
+  already_AddRefed<DOMRequest>
+  GetPreferredNetworkType(ErrorResult& aRv);
+
+  already_AddRefed<DOMRequest>
+  SetRoamingPreference(MobileRoamingMode& aMode, ErrorResult& aRv);
+
+  already_AddRefed<DOMRequest>
+  GetRoamingPreference(ErrorResult& aRv);
+
+  already_AddRefed<DOMRequest>
+  SetVoicePrivacyMode(bool aEnabled, ErrorResult& aRv);
+
+  already_AddRefed<DOMRequest>
+  GetVoicePrivacyMode(ErrorResult& aRv);
+
+  already_AddRefed<DOMRequest>
+  SendMMI(const nsAString& aMmi, ErrorResult& aRv);
+
+  already_AddRefed<DOMRequest>
+  CancelMMI(ErrorResult& aRv);
+
+  already_AddRefed<DOMRequest>
+  SetCallForwardingOption(const MozCallForwardingOptions& aOptions,
+                          ErrorResult& aRv);
+
+  already_AddRefed<DOMRequest>
+  GetCallForwardingOption(uint16_t aReason, ErrorResult& aRv);
+
+  already_AddRefed<DOMRequest>
+  SetCallBarringOption(const MozCallBarringOptions& aOptions, ErrorResult& aRv);
+
+  already_AddRefed<DOMRequest>
+  GetCallBarringOption(const MozCallBarringOptions& aOptions, ErrorResult& aRv);
+
+  already_AddRefed<DOMRequest>
+  ChangeCallBarringPassword(const MozCallBarringOptions& aOptions,
+                            ErrorResult& aRv);
+
+  already_AddRefed<DOMRequest>
+  SetCallWaitingOption(bool aEnabled, ErrorResult& aRv);
+
+  already_AddRefed<DOMRequest>
+  GetCallWaitingOption(ErrorResult& aRv);
+
+  already_AddRefed<DOMRequest>
+  SetCallingLineIdRestriction(uint16_t aMode, ErrorResult& aRv);
+
+  already_AddRefed<DOMRequest>
+  GetCallingLineIdRestriction(ErrorResult& aRv);
+
+  already_AddRefed<DOMRequest>
+  ExitEmergencyCbMode(ErrorResult& aRv);
+
+  already_AddRefed<DOMRequest>
+  SetRadioEnabled(bool aEnabled, ErrorResult& aRv);
+
+  IMPL_EVENT_HANDLER(voicechange)
+  IMPL_EVENT_HANDLER(datachange)
+  IMPL_EVENT_HANDLER(ussdreceived)
+  IMPL_EVENT_HANDLER(dataerror)
+  IMPL_EVENT_HANDLER(cfstatechange)
+  IMPL_EVENT_HANDLER(emergencycbmodechange)
+  IMPL_EVENT_HANDLER(otastatuschange)
+  IMPL_EVENT_HANDLER(iccchange)
+  IMPL_EVENT_HANDLER(radiostatechange)
+  IMPL_EVENT_HANDLER(clirmodechange)
+
 private:
+  uint32_t mClientId;
   nsCOMPtr<nsIMobileConnectionProvider> mProvider;
   nsRefPtr<Listener> mListener;
-  nsWeakPtr mWindow;
+  nsRefPtr<MobileConnectionInfo> mVoice;
+  nsRefPtr<MobileConnectionInfo> mData;
+
+  bool
+  CheckPermission(const char* aType) const;
 
-  uint32_t mClientId;
+  void
+  UpdateVoice();
 
-  bool CheckPermission(const char* aType);
+  void
+  UpdateData();
 };
 
 } // namespace dom
 } // namespace mozilla
 
-#endif // mozilla_dom_network_MobileConnection_h
+#endif // mozilla_dom_MobileConnection_h
--- a/dom/mobileconnection/src/MobileConnectionArray.cpp
+++ b/dom/mobileconnection/src/MobileConnectionArray.cpp
@@ -6,39 +6,43 @@
 
 #include "MobileConnectionArray.h"
 #include "mozilla/dom/MozMobileConnectionArrayBinding.h"
 #include "mozilla/Preferences.h"
 
 using namespace mozilla::dom;
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(MobileConnectionArray)
+
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(MobileConnectionArray)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mWindow)
   // Notify our mobile connections that we're going away.
   tmp->DropConnections();
   NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
+
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(MobileConnectionArray)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mWindow)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mMobileConnections)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
+
 NS_IMPL_CYCLE_COLLECTION_TRACE_WRAPPERCACHE(MobileConnectionArray)
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(MobileConnectionArray)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(MobileConnectionArray)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(MobileConnectionArray)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 MobileConnectionArray::MobileConnectionArray(nsPIDOMWindow* aWindow)
-: mWindow(aWindow), mInitialized(false)
+  : mInitialized(false)
+  , mWindow(aWindow)
 {
   uint32_t numRil = mozilla::Preferences::GetUint("ril.numRadioInterfaces", 1);
   MOZ_ASSERT(numRil > 0);
 
   mMobileConnections.SetLength(numRil);
 
   SetIsDOMBinding();
 }
@@ -49,18 +53,17 @@ MobileConnectionArray::~MobileConnection
 }
 
 void
 MobileConnectionArray::Init()
 {
   mInitialized = true;
 
   for (uint32_t id = 0; id < mMobileConnections.Length(); id++) {
-    nsRefPtr<MobileConnection> mobileConnection = new MobileConnection(id);
-    mobileConnection->Init(mWindow);
+    nsRefPtr<MobileConnection> mobileConnection = new MobileConnection(mWindow, id);
     mMobileConnections[id] = mobileConnection;
   }
 }
 
 void
 MobileConnectionArray::DropConnections()
 {
   if (mInitialized) {
@@ -80,30 +83,30 @@ MobileConnectionArray::GetParentObject()
 }
 
 JSObject*
 MobileConnectionArray::WrapObject(JSContext* aCx)
 {
   return MozMobileConnectionArrayBinding::Wrap(aCx, this);
 }
 
-nsIDOMMozMobileConnection*
+MobileConnection*
 MobileConnectionArray::Item(uint32_t aIndex)
 {
   bool unused;
   return IndexedGetter(aIndex, unused);
 }
 
 uint32_t
 MobileConnectionArray::Length() const
 {
   return mMobileConnections.Length();
 }
 
-nsIDOMMozMobileConnection*
+MobileConnection*
 MobileConnectionArray::IndexedGetter(uint32_t aIndex, bool& aFound)
 {
   if (!mInitialized) {
     Init();
   }
 
   aFound = false;
   aFound = aIndex < mMobileConnections.Length();
--- a/dom/mobileconnection/src/MobileConnectionArray.h
+++ b/dom/mobileconnection/src/MobileConnectionArray.h
@@ -3,47 +3,45 @@
 /* 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/. */
 
 #ifndef mozilla_dom_network_MobileConnectionArray_h__
 #define mozilla_dom_network_MobileConnectionArray_h__
 
 #include "nsWrapperCache.h"
-#include "mozilla/dom/MobileConnection.h"
-
-class nsIDOMMozMobileConnection;
+#include "MobileConnection.h"
 
 namespace mozilla {
 namespace dom {
 
-class MobileConnectionArray MOZ_FINAL : public nsISupports,
-                                        public nsWrapperCache
+class MobileConnectionArray MOZ_FINAL : public nsISupports
+                                      , public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(MobileConnectionArray)
 
   MobileConnectionArray(nsPIDOMWindow* aWindow);
 
   nsPIDOMWindow*
   GetParentObject() const;
 
   // WrapperCache
   virtual JSObject*
   WrapObject(JSContext* aCx) MOZ_OVERRIDE;
 
   //  WebIDL
-  nsIDOMMozMobileConnection*
+  MobileConnection*
   Item(uint32_t aIndex);
 
   uint32_t
   Length() const;
 
-  nsIDOMMozMobileConnection*
+  MobileConnection*
   IndexedGetter(uint32_t aIndex, bool& aFound);
 
 private:
   ~MobileConnectionArray();
 
   void
   Init();
 
new file mode 100644
--- /dev/null
+++ b/dom/mobileconnection/src/MobileConnectionInfo.cpp
@@ -0,0 +1,117 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim:set ts=2 sw=2 sts=2 et cindent: */
+/* 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/. */
+
+#include "MobileConnectionInfo.h"
+
+#include "jsapi.h"
+#include "nsCxPusher.h"
+
+#define CONVERT_STRING_TO_NULLABLE_ENUM(_string, _enumType, _enum)      \
+{                                                                       \
+  _enum.SetNull();                                                      \
+                                                                        \
+  uint32_t i = 0;                                                       \
+  for (const EnumEntry* entry = _enumType##Values::strings;             \
+       entry->value;                                                    \
+       ++entry, ++i) {                                                  \
+    if (_string.EqualsASCII(entry->value)) {                            \
+      _enum.SetValue(static_cast<_enumType>(i));                        \
+    }                                                                   \
+  }                                                                     \
+}
+
+using namespace mozilla::dom;
+
+NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(MobileConnectionInfo, mWindow,
+                                      mNetworkInfo, mCellInfo)
+
+NS_IMPL_CYCLE_COLLECTING_ADDREF(MobileConnectionInfo)
+NS_IMPL_CYCLE_COLLECTING_RELEASE(MobileConnectionInfo)
+
+NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(MobileConnectionInfo)
+  NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
+  NS_INTERFACE_MAP_ENTRY(nsISupports)
+NS_INTERFACE_MAP_END
+
+MobileConnectionInfo::MobileConnectionInfo(nsPIDOMWindow* aWindow)
+  : mConnected(false)
+  , mEmergencyCallsOnly(false)
+  , mRoaming(false)
+  , mWindow(aWindow)
+{
+  SetIsDOMBinding();
+}
+
+void
+MobileConnectionInfo::Update(nsIMobileConnectionInfo* aInfo)
+{
+  if (!aInfo) {
+    return;
+  }
+
+  aInfo->GetConnected(&mConnected);
+  aInfo->GetEmergencyCallsOnly(&mEmergencyCallsOnly);
+  aInfo->GetRoaming(&mRoaming);
+
+  // Update mState
+  nsAutoString state;
+  aInfo->GetState(state);
+  CONVERT_STRING_TO_NULLABLE_ENUM(state, MobileConnectionState, mState);
+
+  // Update mType
+  nsAutoString type;
+  aInfo->GetType(type);
+  CONVERT_STRING_TO_NULLABLE_ENUM(type, MobileConnectionType, mType);
+
+  // Update mSignalStrength
+  AutoSafeJSContext cx;
+  JS::Rooted<JS::Value> signalStrength(cx, JSVAL_VOID);
+  aInfo->GetSignalStrength(&signalStrength);
+  if (signalStrength.isNumber()) {
+    mSignalStrength.SetValue(signalStrength.toNumber());
+  } else {
+    mSignalStrength.SetNull();
+  }
+
+  // Update mRelSignalStrength
+  JS::Rooted<JS::Value> relSignalStrength(cx, JSVAL_VOID);
+  aInfo->GetRelSignalStrength(&relSignalStrength);
+  if (relSignalStrength.isNumber()) {
+    mRelSignalStrength.SetValue(relSignalStrength.toNumber());
+  } else {
+    mRelSignalStrength.SetNull();
+  }
+
+  // Update mNetworkInfo
+  nsCOMPtr<nsIMobileNetworkInfo> networkInfo;
+  aInfo->GetNetwork(getter_AddRefs(networkInfo));
+  if (networkInfo) {
+    if (!mNetworkInfo) {
+      mNetworkInfo = new MobileNetworkInfo(mWindow);
+    }
+    mNetworkInfo->Update(networkInfo);
+  } else {
+    mNetworkInfo = nullptr;
+  }
+
+  // Update mCellInfo
+  nsCOMPtr<nsIMobileCellInfo> cellInfo;
+  aInfo->GetCell(getter_AddRefs(cellInfo));
+  if (cellInfo) {
+    if (!mCellInfo) {
+      mCellInfo = new MobileCellInfo(mWindow);
+    }
+    mCellInfo->Update(cellInfo);
+  } else {
+    mCellInfo = nullptr;
+  }
+}
+
+JSObject*
+MobileConnectionInfo::WrapObject(JSContext* aCx)
+{
+  return MozMobileConnectionInfoBinding::Wrap(aCx, this);
+}
new file mode 100644
--- /dev/null
+++ b/dom/mobileconnection/src/MobileConnectionInfo.h
@@ -0,0 +1,112 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim:set ts=2 sw=2 sts=2 et cindent: */
+/* 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/. */
+
+#ifndef mozilla_dom_MobileConnectionInfo_h
+#define mozilla_dom_MobileConnectionInfo_h
+
+#include "MobileCellInfo.h"
+#include "MobileNetworkInfo.h"
+#include "mozilla/dom/MozMobileConnectionInfoBinding.h"
+#include "nsIMobileConnectionInfo.h"
+#include "nsPIDOMWindow.h"
+#include "nsWrapperCache.h"
+
+namespace mozilla {
+namespace dom {
+
+class MobileConnectionInfo MOZ_FINAL : public nsISupports
+                                     , public nsWrapperCache
+{
+public:
+  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
+  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(MobileConnectionInfo)
+
+  MobileConnectionInfo(nsPIDOMWindow* aWindow);
+
+  void
+  Update(nsIMobileConnectionInfo* aInfo);
+
+  nsPIDOMWindow*
+  GetParentObject() const
+  {
+    return mWindow;
+  }
+
+  virtual JSObject*
+  WrapObject(JSContext* aCx) MOZ_OVERRIDE;
+
+  // WebIDL interface
+  bool
+  Connected() const
+  {
+    return mConnected;
+  }
+
+  bool
+  EmergencyCallsOnly() const
+  {
+    return mEmergencyCallsOnly;
+  }
+
+  bool
+  Roaming() const
+  {
+    return mRoaming;
+  }
+
+  Nullable<MobileConnectionState>
+  GetState() const
+  {
+    return mState;
+  }
+
+  Nullable<MobileConnectionType>
+  GetType() const
+  {
+    return mType;
+  }
+
+  MobileNetworkInfo*
+  GetNetwork() const
+  {
+    return mNetworkInfo;
+  }
+
+  Nullable<int32_t>
+  GetSignalStrength() const
+  {
+    return mSignalStrength;
+  }
+
+  Nullable<uint16_t>
+  GetRelSignalStrength() const
+  {
+    return mRelSignalStrength;
+  }
+
+  MobileCellInfo*
+  GetCell() const
+  {
+    return mCellInfo;
+  }
+
+private:
+  bool mConnected;
+  bool mEmergencyCallsOnly;
+  bool mRoaming;
+  nsCOMPtr<nsPIDOMWindow> mWindow;
+  nsRefPtr<MobileNetworkInfo> mNetworkInfo;
+  nsRefPtr<MobileCellInfo> mCellInfo;
+  Nullable<MobileConnectionState> mState;
+  Nullable<MobileConnectionType> mType;
+  Nullable<int32_t> mSignalStrength;
+  Nullable<uint16_t> mRelSignalStrength;
+};
+
+} // namespace dom
+} // namespace mozilla
+
+#endif // mozilla_dom_MobileConnectionInfo_h
new file mode 100644
--- /dev/null
+++ b/dom/mobileconnection/src/MobileNetworkInfo.cpp
@@ -0,0 +1,106 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set ts=8 sts=2 et sw=2 tw=80: */
+/* 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/. */
+
+#include "MobileNetworkInfo.h"
+
+using namespace mozilla::dom;
+
+NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(MobileNetworkInfo, mWindow)
+
+NS_IMPL_CYCLE_COLLECTING_ADDREF(MobileNetworkInfo)
+NS_IMPL_CYCLE_COLLECTING_RELEASE(MobileNetworkInfo)
+
+NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(MobileNetworkInfo)
+  NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
+  NS_INTERFACE_MAP_ENTRY(nsISupports)
+  NS_INTERFACE_MAP_ENTRY(nsIMobileNetworkInfo)
+NS_INTERFACE_MAP_END
+
+MobileNetworkInfo::MobileNetworkInfo(nsPIDOMWindow* aWindow)
+  : mWindow(aWindow)
+{
+  SetIsDOMBinding();
+}
+
+void
+MobileNetworkInfo::Update(nsIMobileNetworkInfo* aInfo)
+{
+  if (!aInfo) {
+    return;
+  }
+
+  aInfo->GetShortName(mShortName);
+  aInfo->GetLongName(mLongName);
+  aInfo->GetMcc(mMcc);
+  aInfo->GetMnc(mMnc);
+  aInfo->GetState(mState);
+}
+
+JSObject*
+MobileNetworkInfo::WrapObject(JSContext* aCx)
+{
+  return MozMobileNetworkInfoBinding::Wrap(aCx, this);
+}
+
+// WebIDL interface
+
+/* static */ already_AddRefed<MobileNetworkInfo>
+MobileNetworkInfo::Constructor(const GlobalObject& aGlobal,
+                               const nsAString& aShortName,
+                               const nsAString& aLongName,
+                               const nsAString& aMcc,
+                               const nsAString& aMnc,
+                               const nsAString& aState,
+                               ErrorResult& aRv)
+{
+  nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aGlobal.GetAsSupports());
+  nsRefPtr<MobileNetworkInfo> info = new MobileNetworkInfo(window);
+
+  info->mShortName.Assign(aShortName);
+  info->mLongName.Assign(aLongName);
+  info->mMcc.Assign(aMcc);
+  info->mMnc.Assign(aMnc);
+  info->mState.Assign(aState);
+
+  return info.forget();
+}
+
+// nsIMobileNetworkInfo
+
+NS_IMETHODIMP
+MobileNetworkInfo::GetShortName(nsAString& aShortName)
+{
+  aShortName = mShortName;
+  return NS_OK;
+}
+
+NS_IMETHODIMP
+MobileNetworkInfo::GetLongName(nsAString& aLongName)
+{
+  aLongName = mLongName;
+  return NS_OK;
+}
+
+NS_IMETHODIMP
+MobileNetworkInfo::GetMcc(nsAString& aMcc)
+{
+  aMcc = mMcc;
+  return NS_OK;
+}
+
+NS_IMETHODIMP
+MobileNetworkInfo::GetMnc(nsAString& aMnc)
+{
+  aMnc = mMnc;
+  return NS_OK;
+}
+
+NS_IMETHODIMP
+MobileNetworkInfo::GetState(nsAString& aState)
+{
+  aState = mState;
+  return NS_OK;
+}
new file mode 100644
--- /dev/null
+++ b/dom/mobileconnection/src/MobileNetworkInfo.h
@@ -0,0 +1,76 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set ts=8 sts=2 et sw=2 tw=80: */
+/* 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/. */
+
+#ifndef mozilla_dom_MobileNetworkInfo_h
+#define mozilla_dom_MobileNetworkInfo_h
+
+#include "mozilla/dom/MozMobileNetworkInfoBinding.h"
+#include "nsIMobileNetworkInfo.h"
+#include "nsPIDOMWindow.h"
+#include "nsWrapperCache.h"
+
+namespace mozilla {
+namespace dom {
+
+class GlobalObject;
+
+class MobileNetworkInfo MOZ_FINAL : public nsIMobileNetworkInfo
+                                  , public nsWrapperCache
+{
+public:
+  NS_DECL_NSIMOBILENETWORKINFO
+  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
+  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(MobileNetworkInfo)
+
+  MobileNetworkInfo(nsPIDOMWindow* aWindow);
+
+  void
+  Update(nsIMobileNetworkInfo* aInfo);
+
+  nsPIDOMWindow*
+  GetParentObject() const
+  {
+    return mWindow;
+  }
+
+  virtual JSObject*
+  WrapObject(JSContext* aCx) MOZ_OVERRIDE;
+
+  // WebIDL interface
+  static already_AddRefed<MobileNetworkInfo>
+  Constructor(const GlobalObject& aGlobal, const nsAString& aShortName,
+              const nsAString& aLongName, const nsAString& aMcc,
+              const nsAString& aMnc, const nsAString& aState,
+              ErrorResult& aRv);
+
+  Nullable<MobileNetworkState>
+  GetState() const
+  {
+    uint32_t i = 0;
+    for (const EnumEntry* entry = MobileNetworkStateValues::strings;
+         entry->value;
+         ++entry, ++i) {
+      if (mState.EqualsASCII(entry->value)) {
+        return Nullable<MobileNetworkState>(static_cast<MobileNetworkState>(i));
+      }
+    }
+
+    return Nullable<MobileNetworkState>();
+  }
+
+private:
+  nsCOMPtr<nsPIDOMWindow> mWindow;
+  nsString mShortName;
+  nsString mLongName;
+  nsString mMcc;
+  nsString mMnc;
+  nsString mState;
+};
+
+} // namespace dom
+} // namespace mozilla
+
+#endif // mozilla_dom_MobileNetworkInfo_h
--- a/dom/mobileconnection/src/moz.build
+++ b/dom/mobileconnection/src/moz.build
@@ -1,23 +1,29 @@
 # -*- 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/.
 
 EXPORTS.mozilla.dom += [
     'DOMMMIError.h',
+    'MobileCellInfo.h',
     'MobileConnection.h',
     'MobileConnectionArray.h',
+    'MobileConnectionInfo.h',
+    'MobileNetworkInfo.h',
 ]
 
 SOURCES += [
     'DOMMMIError.cpp',
+    'MobileCellInfo.cpp',
     'MobileConnection.cpp',
     'MobileConnectionArray.cpp',
+    'MobileConnectionInfo.cpp',
+    'MobileNetworkInfo.cpp',
 ]
 
 FAIL_ON_WARNINGS = True
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'gklayout'
--- a/dom/mobileconnection/tests/marionette/head.js
+++ b/dom/mobileconnection/tests/marionette/head.js
@@ -5,16 +5,17 @@ const {Cc: Cc, Ci: Ci, Cr: Cr, Cu: Cu} =
 
 const SETTINGS_KEY_DATA_ENABLED = "ril.data.enabled";
 const SETTINGS_KEY_DATA_ROAMING_ENABLED = "ril.data.roaming_enabled";
 const SETTINGS_KEY_DATA_APN_SETTINGS = "ril.data.apnSettings";
 
 let Promise = Cu.import("resource://gre/modules/Promise.jsm").Promise;
 
 let _pendingEmulatorCmdCount = 0;
+let _pendingEmulatorShellCmdCount = 0;
 
 /**
  * Send emulator command with safe guard.
  *
  * We should only call |finish()| after all emulator command transactions
  * end, so here comes with the pending counter.  Resolve when the emulator
  * gives positive response, and reject otherwise.
  *
@@ -43,16 +44,45 @@ function runEmulatorCmdSafe(aCommand) {
       deferred.reject(aResult);
     }
   });
 
   return deferred.promise;
 }
 
 /**
+ * Send emulator shell command with safe guard.
+ *
+ * We should only call |finish()| after all emulator shell command transactions
+ * end, so here comes with the pending counter.  Resolve when the emulator
+ * shell gives response. Never reject.
+ *
+ * Fulfill params:
+ *   result -- an array of emulator shell response lines.
+ *
+ * @param aCommands
+ *        A string array commands to be passed to emulator through adb shell.
+ *
+ * @return A deferred promise.
+ */
+function runEmulatorShellCmdSafe(aCommands) {
+  let deferred = Promise.defer();
+
+  ++_pendingEmulatorShellCmdCount;
+  runEmulatorShell(aCommands, function(aResult) {
+    --_pendingEmulatorShellCmdCount;
+
+    log("Emulator shell response: " + JSON.stringify(aResult));
+    deferred.resolve(aResult);
+  });
+
+  return deferred.promise;
+}
+
+/**
  * Wrap DOMRequest onsuccess/onerror events to Promise resolve/reject.
  *
  * Fulfill params: A DOMEvent.
  * Reject params: A DOMEvent.
  *
  * @param aRequest
  *        A DOMRequest instance.
  *
@@ -312,17 +342,17 @@ function waitForManagerEvent(aEventName,
 
   return deferred.promise;
 }
 
 /**
  * Get available networks.
  *
  * Fulfill params:
- *   An array of nsIDOMMozMobileNetworkInfo.
+ *   An array of MozMobileNetworkInfo.
  * Reject params:
  *   A DOMEvent.
  *
  * @return A deferred promise.
  */
 function getNetworks() {
   let request = mobileConnection.getNetworks();
   return wrapDomRequestAsPromise(request)
@@ -332,17 +362,17 @@ function getNetworks() {
 /**
  * Manually select a network.
  *
  * Fulfill params: (none)
  * Reject params:
  *   'RadioNotAvailable', 'RequestNotSupported', or 'GenericFailure'
  *
  * @param aNetwork
- *        A nsIDOMMozMobileNetworkInfo.
+ *        A MozMobileNetworkInfo.
  *
  * @return A deferred promise.
  */
 function selectNetwork(aNetwork) {
   let request = mobileConnection.selectNetwork(aNetwork);
   return wrapDomRequestAsPromise(request)
     .then(null, () => { throw request.error });
 }
@@ -350,17 +380,17 @@ function selectNetwork(aNetwork) {
 /**
  * Manually select a network and wait for a 'voicechange' event.
  *
  * Fulfill params: (none)
  * Reject params:
  *   'RadioNotAvailable', 'RequestNotSupported', or 'GenericFailure'
  *
  * @param aNetwork
- *        A nsIDOMMozMobileNetworkInfo.
+ *        A MozMobileNetworkInfo.
  *
  * @return A deferred promise.
  */
 function selectNetworkAndWait(aNetwork) {
   let promises = [];
 
   promises.push(waitForManagerEvent("voicechange"));
   promises.push(selectNetwork(aNetwork));
@@ -414,16 +444,146 @@ function selectNetworkAutomaticallyAndWa
  */
 function sendMMI(aMmi) {
   let request = mobileConnection.sendMMI(aMmi);
   return wrapDomRequestAsPromise(request)
     .then(() => request.result, () => { throw request.error });
 }
 
 /**
+ * Set roaming preference.
+ *
+ * Fulfill params: (none)
+ * Reject params:
+ *   'RadioNotAvailable', 'RequestNotSupported', or 'GenericFailure'.
+ *
+ * @param aMode
+ *        'home', 'affiliated', or 'any'.
+ *
+ * @return A deferred promise.
+ */
+ function setRoamingPreference(aMode) {
+  let request = mobileConnection.setRoamingPreference(aMode);
+  return wrapDomRequestAsPromise(request)
+    .then(null, () => { throw request.error });
+}
+
+/**
+ * Set preferred network type.
+ *
+ * Fulfill params: (none)
+ * Reject params:
+ *   'RadioNotAvailable', 'RequestNotSupported', 'ModeNotSupported' or
+ *   'GenericFailure'.
+ *
+ * @param aType
+ *        'wcdma/gsm', 'gsm', 'wcdma', 'wcdma/gsm-auto', 'cdma/evdo', 'cdma',
+ *        'evdo', 'wcdma/gsm/cdma/evdo', 'lte/cdma/evdo', 'lte/wcdma/gsm',
+ *        'lte/wcdma/gsm/cdma/evdo' or 'lte'.
+ *
+ * @return A deferred promise.
+ */
+ function setPreferredNetworkType(aType) {
+  let request = mobileConnection.setPreferredNetworkType(aType);
+  return wrapDomRequestAsPromise(request)
+    .then(null, () => { throw request.error });
+}
+
+/**
+ * Query current preferred network type.
+ *
+ * Fulfill params:
+ *   'wcdma/gsm', 'gsm', 'wcdma', 'wcdma/gsm-auto', 'cdma/evdo', 'cdma',
+ *   'evdo', 'wcdma/gsm/cdma/evdo', 'lte/cdma/evdo', 'lte/wcdma/gsm',
+ *   'lte/wcdma/gsm/cdma/evdo' or 'lte'.
+ * Reject params:
+ *   'RadioNotAvailable', 'RequestNotSupported', or 'GenericFailure'.
+ *
+ * @return A deferred promise.
+ */
+ function getPreferredNetworkType() {
+  let request = mobileConnection.getPreferredNetworkType();
+  return wrapDomRequestAsPromise(request)
+    .then(() => request.result, () => { throw request.error });
+}
+
+/**
+ * Configures call forward options.
+ *
+ * Fulfill params: (none)
+ * Reject params:
+ *   'RadioNotAvailable', 'RequestNotSupported', 'InvalidParameter', or
+ *   'GenericFailure'.
+ *
+ * @param aOptions
+ *        A MozCallForwardingOptions.
+ *
+ * @return A deferred promise.
+ */
+ function setCallForwardingOption(aOptions) {
+  let request = mobileConnection.setCallForwardingOption(aOptions);
+  return wrapDomRequestAsPromise(request)
+    .then(null, () => { throw request.error });
+}
+
+/**
+ * Configures call forward options.
+ *
+ * Fulfill params:
+ *   An array of MozCallForwardingOptions.
+ * Reject params:
+ *   'RadioNotAvailable', 'RequestNotSupported', 'InvalidParameter', or
+ *   'GenericFailure'.
+ *
+ * @param aReason
+ *        One of MozMobileConnection.CALL_FORWARD_REASON_* values.
+ *
+ * @return A deferred promise.
+ */
+ function getCallForwardingOption(aReason) {
+  let request = mobileConnection.getCallForwardingOption(aReason);
+  return wrapDomRequestAsPromise(request)