diff --git a/accessible/src/atk/AccessibleWrap.cpp b/accessible/src/atk/AccessibleWrap.cpp index 8de738ece68a..639ebec8769f 100644 --- a/accessible/src/atk/AccessibleWrap.cpp +++ b/accessible/src/atk/AccessibleWrap.cpp @@ -25,7 +25,7 @@ #include "States.h" #include "nsISimpleEnumerator.h" -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsXPCOMStrings.h" #include "nsComponentManagerUtils.h" #include "nsIPersistentProperties2.h" diff --git a/accessible/src/base/nsAccessibilityService.cpp b/accessible/src/base/nsAccessibilityService.cpp index a22250a94143..2a14ed126473 100644 --- a/accessible/src/base/nsAccessibilityService.cpp +++ b/accessible/src/base/nsAccessibilityService.cpp @@ -63,9 +63,9 @@ #include "nsTreeUtils.h" #include "nsXBLPrototypeBinding.h" #include "nsXBLBinding.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Preferences.h" #include "mozilla/Services.h" -#include "mozilla/Util.h" #include "nsDeckFrame.h" #ifdef MOZ_XUL diff --git a/accessible/src/generic/RootAccessible.cpp b/accessible/src/generic/RootAccessible.cpp index d8df4e260408..e1425da23d1b 100644 --- a/accessible/src/generic/RootAccessible.cpp +++ b/accessible/src/generic/RootAccessible.cpp @@ -5,7 +5,7 @@ #include "RootAccessible.h" -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #define CreateEvent CreateEventA #include "nsIDOMDocument.h" diff --git a/browser/components/shell/src/nsGNOMEShellService.cpp b/browser/components/shell/src/nsGNOMEShellService.cpp index 901561fd6a1d..8547bbb50e75 100644 --- a/browser/components/shell/src/nsGNOMEShellService.cpp +++ b/browser/components/shell/src/nsGNOMEShellService.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCOMPtr.h" #include "nsGNOMEShellService.h" diff --git a/caps/src/nsNullPrincipal.cpp b/caps/src/nsNullPrincipal.cpp index 4c4191acbaff..9d67930f34b8 100644 --- a/caps/src/nsNullPrincipal.cpp +++ b/caps/src/nsNullPrincipal.cpp @@ -9,7 +9,7 @@ * same-origin with anything but themselves. */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsNullPrincipal.h" #include "nsNullPrincipalURI.h" diff --git a/caps/src/nsScriptSecurityManager.cpp b/caps/src/nsScriptSecurityManager.cpp index 42ed421344ba..5ee37a855832 100644 --- a/caps/src/nsScriptSecurityManager.cpp +++ b/caps/src/nsScriptSecurityManager.cpp @@ -6,7 +6,7 @@ #include "nsScriptSecurityManager.h" -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "js/OldDebugAPI.h" #include "xpcprivate.h" diff --git a/content/base/src/EventSource.cpp b/content/base/src/EventSource.cpp index a38a864a9970..0464ddc610fe 100644 --- a/content/base/src/EventSource.cpp +++ b/content/base/src/EventSource.cpp @@ -5,9 +5,9 @@ #include "mozilla/dom/EventSource.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/DebugOnly.h" #include "mozilla/dom/EventSourceBinding.h" -#include "mozilla/Util.h" #include "js/OldDebugAPI.h" #include "nsNetUtil.h" diff --git a/content/base/src/FragmentOrElement.cpp b/content/base/src/FragmentOrElement.cpp index dbc582e9d1e4..fc662723d1ea 100644 --- a/content/base/src/FragmentOrElement.cpp +++ b/content/base/src/FragmentOrElement.cpp @@ -10,10 +10,10 @@ * utility methods for subclasses, and so forth. */ +#include "mozilla/ArrayUtils.h" #include "mozilla/Likely.h" #include "mozilla/MemoryReporting.h" #include "mozilla/StaticPtr.h" -#include "mozilla/Util.h" #include "mozilla/dom/FragmentOrElement.h" diff --git a/content/base/src/nsContentUtils.cpp b/content/base/src/nsContentUtils.cpp index f21d9ee5703a..99c402f7b08c 100644 --- a/content/base/src/nsContentUtils.cpp +++ b/content/base/src/nsContentUtils.cpp @@ -28,6 +28,7 @@ // nsNPAPIPluginInstance must be included before nsIDocument.h, which is included in mozAutoDocUpdate.h. #include "nsNPAPIPluginInstance.h" #include "mozAutoDocUpdate.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Attributes.h" #include "mozilla/AutoRestore.h" #include "mozilla/Base64.h" @@ -45,7 +46,6 @@ #include "mozilla/Preferences.h" #include "mozilla/Selection.h" #include "mozilla/TextEvents.h" -#include "mozilla/Util.h" #include "nsAString.h" #include "nsAttrName.h" #include "nsAttrValue.h" diff --git a/content/base/src/nsDocument.cpp b/content/base/src/nsDocument.cpp index c76c8375d650..482008417ed1 100644 --- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -10,10 +10,10 @@ #include "nsDocument.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/AutoRestore.h" #include "mozilla/DebugOnly.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #include "mozilla/Likely.h" #include diff --git a/content/base/src/nsGkAtoms.cpp b/content/base/src/nsGkAtoms.cpp index 95ab827aa357..58cfaf280800 100644 --- a/content/base/src/nsGkAtoms.cpp +++ b/content/base/src/nsGkAtoms.cpp @@ -9,8 +9,6 @@ * is loaded and they are destroyed when gklayout is unloaded. */ -#include "mozilla/Util.h" - #include "nsGkAtoms.h" #include "nsStaticAtom.h" diff --git a/content/base/src/nsINode.cpp b/content/base/src/nsINode.cpp index 3d159100755b..686881736a69 100644 --- a/content/base/src/nsINode.cpp +++ b/content/base/src/nsINode.cpp @@ -18,7 +18,6 @@ #include "mozilla/MemoryReporting.h" #include "mozilla/MutationEvent.h" #include "mozilla/Telemetry.h" -#include "mozilla/Util.h" #include "nsAsyncDOMEvent.h" #include "nsAttrValueOrString.h" #include "nsBindingManager.h" diff --git a/content/base/src/nsNodeInfo.cpp b/content/base/src/nsNodeInfo.cpp index 5fb7d562cf1f..9b9045677599 100644 --- a/content/base/src/nsNodeInfo.cpp +++ b/content/base/src/nsNodeInfo.cpp @@ -10,7 +10,7 @@ * prefix, namespace, and localName. */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Likely.h" #include "nscore.h" diff --git a/content/base/src/nsTreeSanitizer.cpp b/content/base/src/nsTreeSanitizer.cpp index fe88ae2d0ed9..6976c3a7144c 100644 --- a/content/base/src/nsTreeSanitizer.cpp +++ b/content/base/src/nsTreeSanitizer.cpp @@ -4,7 +4,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsTreeSanitizer.h" #include "nsCSSParser.h" diff --git a/content/base/src/nsXMLHttpRequest.cpp b/content/base/src/nsXMLHttpRequest.cpp index 070572740e0f..a043694a1c69 100644 --- a/content/base/src/nsXMLHttpRequest.cpp +++ b/content/base/src/nsXMLHttpRequest.cpp @@ -6,9 +6,9 @@ #include "nsXMLHttpRequest.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/dom/XMLHttpRequestUploadBinding.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #include "nsDOMBlobBuilder.h" #include "nsIDOMDocument.h" #include "nsIDOMProgressEvent.h" diff --git a/content/canvas/test/webgl/non-conf-tests/driver-info.js b/content/canvas/test/webgl/non-conf-tests/driver-info.js index 83688176e39d..d0c6aeb0ebbc 100644 --- a/content/canvas/test/webgl/non-conf-tests/driver-info.js +++ b/content/canvas/test/webgl/non-conf-tests/driver-info.js @@ -18,9 +18,15 @@ DriverInfo = (function() { // --------------------------------------------------------------------------- // OS and driver identification // Stolen from content/canvas/test/webgl/test_webgl_conformance_test_suite.html - const Cc = SpecialPowers.Cc; - const Ci = SpecialPowers.Ci; function detectDriverInfo() { + try { + var cc = SpecialPowers.Cc; + } catch (e) { + throw 'No SpecialPowers!'; + } + + const Cc = SpecialPowers.Cc; + const Ci = SpecialPowers.Ci; var doc = Cc["@mozilla.org/xmlextras/domparser;1"].createInstance(Ci.nsIDOMParser).parseFromString("", "text/html"); var canvas = doc.createElement("canvas"); @@ -46,6 +52,51 @@ DriverInfo = (function() { return [webglVendor, webglRenderer]; } + function detectOSInfo() { + try { + var cc = SpecialPowers.Cc; + } catch (e) { + throw 'No SpecialPowers!'; + } + + const Cc = SpecialPowers.Cc; + const Ci = SpecialPowers.Ci; + + // From reftest.js: + var runtime = Cc['@mozilla.org/xre/app-info;1'].getService(Ci.nsIXULRuntime); + + var os = null; + var version = null; + if (navigator.platform.indexOf('Win') == 0) { + os = OS.WINDOWS; + + // code borrowed from browser/modules/test/browser_taskbar_preview.js + version = SpecialPowers.Services.sysinfo.getProperty('version'); + version = parseFloat(version); + // Version 6.0 is Vista, 6.1 is 7. + + } else if (navigator.platform.indexOf('Mac') == 0) { + os = OS.MAC; + + var versionMatch = /Mac OS X (\d+.\d+)/.exec(navigator.userAgent); + version = versionMatch ? parseFloat(versionMatch[1]) : null; + + } else if (runtime.widgetToolkit == 'gonk') { + os = OS.B2G; + + } else if (navigator.appVersion.indexOf('Android') != -1) { + os = OS.ANDROID; + // From layout/tools/reftest/reftest.js: + version = SpecialPowers.Services.sysinfo.getProperty('version'); + + } else if (navigator.platform.indexOf('Linux') == 0) { + // Must be checked after android, as android also has a 'Linux' platform string. + os = OS.LINUX; + } + + return [os, version]; + } + var OS = { WINDOWS: 'windows', MAC: 'mac', @@ -65,34 +116,10 @@ DriverInfo = (function() { var kOSVersion = null; var kDriver = null; - // From reftest.js: - var runtime = Cc['@mozilla.org/xre/app-info;1'].getService(Ci.nsIXULRuntime); - - if (navigator.platform.indexOf('Win') == 0) { - kOS = OS.WINDOWS; - - // code borrowed from browser/modules/test/browser_taskbar_preview.js - var version = SpecialPowers.Services.sysinfo.getProperty('version'); - kOSVersion = parseFloat(version); - // Version 6.0 is Vista, 6.1 is 7. - - } else if (navigator.platform.indexOf('Mac') == 0) { - kOS = OS.MAC; - - var versionMatch = /Mac OS X (\d+.\d+)/.exec(navigator.userAgent); - kOSVersion = versionMatch ? parseFloat(versionMatch[1]) : null; - - } else if (runtime.widgetToolkit == 'gonk') { - kOS = OS.B2G; - - } else if (navigator.appVersion.indexOf('Android') != -1) { - kOS = OS.ANDROID; - // From layout/tools/reftest/reftest.js: - kOSVersion = SpecialPowers.Services.sysinfo.getProperty('version'); - - } else if (navigator.platform.indexOf('Linux') == 0) { - // Must be checked after android, as android also has a 'Linux' platform string. - kOS = OS.LINUX; + try { + [kOS, kOSVersion] = detectOSInfo(); + } catch (e) { + // Generally just fails when we don't have SpecialPowers. } try { diff --git a/content/canvas/test/webgl/non-conf-tests/mochi-to-testcase.py b/content/canvas/test/webgl/non-conf-tests/mochi-to-testcase.py new file mode 100644 index 000000000000..56ac24e37b67 --- /dev/null +++ b/content/canvas/test/webgl/non-conf-tests/mochi-to-testcase.py @@ -0,0 +1,86 @@ +import sys +import os.path +import re + +assert len(sys.argv) == 2 +mochiPath = sys.argv[1] + +extDotPos = mochiPath.find('.html') +assert extDotPos != -1, 'mochitest target must be an html doc.' + +testPath = mochiPath[:extDotPos] + '.solo.html' + +def ReadLocalFile(include): + incPath = os.path.dirname(mochiPath) + filePath = os.path.join(incPath, include) + + data = None + try: + f = open(filePath, 'r') + data = f.read() + except: + pass + + try: + f.close() + except: + pass + + return data + +kSimpleTestReplacement = '''\n + +
+\n''' + +fin = open(mochiPath, 'r') +fout = open(testPath, 'w') +includePattern = re.compile('\\s*') +cssPattern = re.compile(']*)[\'"]>') +for line in fin: + skipLine = False + for css in cssPattern.findall(line): + skipLine = True + print('Ignoring stylesheet: ' + css) + + for inc in includePattern.findall(line): + skipLine = True + if inc == '/MochiKit/MochiKit': + continue + + if inc == '/tests/SimpleTest/SimpleTest': + print('Injecting SimpleTest replacement') + fout.write(kSimpleTestReplacement); + continue + + incData = ReadLocalFile(inc + '.js') + if not incData: + print('Warning: Unknown JS file ignored: ' + inc + '.js') + continue + + print('Injecting include: ' + inc + '.js') + fout.write('\n\n'); + continue + + if skipLine: + continue + + fout.write(line) + continue + +fin.close() +fout.close() diff --git a/content/events/src/nsDOMDataTransfer.cpp b/content/events/src/nsDOMDataTransfer.cpp index 0e7d2bb08eed..f114dba69b1a 100644 --- a/content/events/src/nsDOMDataTransfer.cpp +++ b/content/events/src/nsDOMDataTransfer.cpp @@ -4,8 +4,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "mozilla/ArrayUtils.h" #include "mozilla/BasicEvents.h" -#include "mozilla/Util.h" #include "nsDOMDataTransfer.h" diff --git a/content/events/src/nsDOMUIEvent.cpp b/content/events/src/nsDOMUIEvent.cpp index 5c46b0698db0..59882d559b9f 100644 --- a/content/events/src/nsDOMUIEvent.cpp +++ b/content/events/src/nsDOMUIEvent.cpp @@ -14,7 +14,7 @@ #include "nsContentUtils.h" #include "nsEventStateManager.h" #include "nsIFrame.h" -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Assertions.h" #include "mozilla/ContentEvents.h" #include "mozilla/TextEvents.h" diff --git a/content/html/content/src/HTMLBRElement.cpp b/content/html/content/src/HTMLBRElement.cpp index 4ab581268d1d..cd24478b595d 100644 --- a/content/html/content/src/HTMLBRElement.cpp +++ b/content/html/content/src/HTMLBRElement.cpp @@ -5,7 +5,6 @@ #include "mozilla/dom/HTMLBRElement.h" #include "mozilla/dom/HTMLBRElementBinding.h" -#include "mozilla/Util.h" #include "nsAttrValueInlines.h" #include "nsStyleConsts.h" diff --git a/content/html/content/src/HTMLBodyElement.cpp b/content/html/content/src/HTMLBodyElement.cpp index 3b26f832c7e0..9f17f945eb01 100644 --- a/content/html/content/src/HTMLBodyElement.cpp +++ b/content/html/content/src/HTMLBodyElement.cpp @@ -3,8 +3,6 @@ * 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/Util.h" - #include "HTMLBodyElement.h" #include "mozilla/dom/HTMLBodyElementBinding.h" #include "nsAttrValueInlines.h" diff --git a/content/html/content/src/HTMLDivElement.cpp b/content/html/content/src/HTMLDivElement.cpp index 73f1e349fd23..b0102b1ec4db 100644 --- a/content/html/content/src/HTMLDivElement.cpp +++ b/content/html/content/src/HTMLDivElement.cpp @@ -3,8 +3,6 @@ * 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/Util.h" - #include "HTMLDivElement.h" #include "nsGenericHTMLElement.h" #include "nsStyleConsts.h" diff --git a/content/html/content/src/HTMLFontElement.cpp b/content/html/content/src/HTMLFontElement.cpp index 1a8dc426ce18..7834b6be8e30 100644 --- a/content/html/content/src/HTMLFontElement.cpp +++ b/content/html/content/src/HTMLFontElement.cpp @@ -3,8 +3,6 @@ * 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/Util.h" - #include "HTMLFontElement.h" #include "mozilla/dom/HTMLFontElementBinding.h" #include "nsAttrValueInlines.h" diff --git a/content/html/content/src/HTMLFrameElement.cpp b/content/html/content/src/HTMLFrameElement.cpp index b7799ba4c8d1..51bcf5526afd 100644 --- a/content/html/content/src/HTMLFrameElement.cpp +++ b/content/html/content/src/HTMLFrameElement.cpp @@ -5,7 +5,6 @@ #include "mozilla/dom/HTMLFrameElement.h" #include "mozilla/dom/HTMLFrameElementBinding.h" -#include "mozilla/Util.h" class nsIDOMDocument; diff --git a/content/html/content/src/HTMLHeadingElement.cpp b/content/html/content/src/HTMLHeadingElement.cpp index 13d3c6b3d52e..b0003cadaeab 100644 --- a/content/html/content/src/HTMLHeadingElement.cpp +++ b/content/html/content/src/HTMLHeadingElement.cpp @@ -6,7 +6,6 @@ #include "mozilla/dom/HTMLHeadingElement.h" #include "mozilla/dom/HTMLHeadingElementBinding.h" -#include "mozilla/Util.h" #include "nsGkAtoms.h" #include "nsStyleConsts.h" #include "nsMappedAttributes.h" diff --git a/content/html/content/src/HTMLIFrameElement.cpp b/content/html/content/src/HTMLIFrameElement.cpp index 4d76ec059bd6..132739ae9a64 100644 --- a/content/html/content/src/HTMLIFrameElement.cpp +++ b/content/html/content/src/HTMLIFrameElement.cpp @@ -3,8 +3,6 @@ * 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/Util.h" - #include "mozilla/dom/HTMLIFrameElement.h" #include "mozilla/dom/HTMLIFrameElementBinding.h" #include "nsMappedAttributes.h" diff --git a/content/html/content/src/HTMLImageElement.cpp b/content/html/content/src/HTMLImageElement.cpp index a5968e1b88ab..3bffa10f904e 100644 --- a/content/html/content/src/HTMLImageElement.cpp +++ b/content/html/content/src/HTMLImageElement.cpp @@ -3,8 +3,6 @@ * 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/Util.h" - #include "mozilla/dom/HTMLImageElement.h" #include "mozilla/dom/HTMLImageElementBinding.h" #include "nsGkAtoms.h" diff --git a/content/html/content/src/HTMLInputElement.cpp b/content/html/content/src/HTMLInputElement.cpp index 0f24ca779398..05a307be366c 100644 --- a/content/html/content/src/HTMLInputElement.cpp +++ b/content/html/content/src/HTMLInputElement.cpp @@ -5,6 +5,7 @@ #include "mozilla/dom/HTMLInputElement.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/DebugOnly.h" #include "mozilla/dom/Date.h" #include "nsAsyncDOMEvent.h" @@ -94,7 +95,6 @@ #include "nsTextEditorState.h" #include "mozilla/LookAndFeel.h" -#include "mozilla/Util.h" // DebugOnly #include "mozilla/Preferences.h" #include "mozilla/MathAlgorithms.h" diff --git a/content/html/content/src/HTMLLIElement.h b/content/html/content/src/HTMLLIElement.h index 45ae622ca61b..86ed5df34b32 100644 --- a/content/html/content/src/HTMLLIElement.h +++ b/content/html/content/src/HTMLLIElement.h @@ -7,7 +7,7 @@ #define mozilla_dom_HTMLLIElement_h #include "mozilla/Attributes.h" -#include "mozilla/Util.h" + #include "nsIDOMHTMLLIElement.h" #include "nsGenericHTMLElement.h" diff --git a/content/html/content/src/HTMLMediaElement.cpp b/content/html/content/src/HTMLMediaElement.cpp index ffd45fd77177..92ca9b535e78 100644 --- a/content/html/content/src/HTMLMediaElement.cpp +++ b/content/html/content/src/HTMLMediaElement.cpp @@ -7,8 +7,8 @@ #include "mozilla/dom/HTMLMediaElement.h" #include "mozilla/dom/HTMLMediaElementBinding.h" #include "mozilla/dom/ElementInlines.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/MathAlgorithms.h" -#include "mozilla/Util.h" #include "base/basictypes.h" #include "nsIDOMHTMLMediaElement.h" diff --git a/content/html/content/src/HTMLObjectElement.cpp b/content/html/content/src/HTMLObjectElement.cpp index 5109fa7237f1..d6158371fca3 100644 --- a/content/html/content/src/HTMLObjectElement.cpp +++ b/content/html/content/src/HTMLObjectElement.cpp @@ -5,8 +5,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "mozilla/dom/HTMLObjectElement.h" -#include "mozilla/Util.h" - #include "mozilla/dom/HTMLObjectElementBinding.h" #include "mozilla/dom/ElementInlines.h" #include "nsAutoPtr.h" diff --git a/content/html/content/src/HTMLOptionsCollection.cpp b/content/html/content/src/HTMLOptionsCollection.cpp index d0e5c979905b..9397987546a0 100644 --- a/content/html/content/src/HTMLOptionsCollection.cpp +++ b/content/html/content/src/HTMLOptionsCollection.cpp @@ -12,7 +12,6 @@ #include "mozilla/dom/HTMLOptionElement.h" #include "mozilla/dom/HTMLOptionsCollectionBinding.h" #include "mozilla/dom/HTMLSelectElement.h" -#include "mozilla/Util.h" #include "nsContentCreatorFunctions.h" #include "nsError.h" #include "nsEventDispatcher.h" diff --git a/content/html/content/src/HTMLParagraphElement.h b/content/html/content/src/HTMLParagraphElement.h index fecfc845c9a0..5dc2381579d8 100644 --- a/content/html/content/src/HTMLParagraphElement.h +++ b/content/html/content/src/HTMLParagraphElement.h @@ -7,7 +7,6 @@ #define mozilla_dom_HTMLParagraphElement_h #include "mozilla/Attributes.h" -#include "mozilla/Util.h" #include "nsIDOMHTMLParagraphElement.h" #include "nsGenericHTMLElement.h" diff --git a/content/html/content/src/HTMLPreElement.h b/content/html/content/src/HTMLPreElement.h index 831a0d131ad8..2640c08c1d10 100644 --- a/content/html/content/src/HTMLPreElement.h +++ b/content/html/content/src/HTMLPreElement.h @@ -7,7 +7,6 @@ #define mozilla_dom_HTMLPreElement_h #include "mozilla/Attributes.h" -#include "mozilla/Util.h" #include "nsIDOMHTMLPreElement.h" #include "nsGenericHTMLElement.h" diff --git a/content/html/content/src/HTMLSelectElement.cpp b/content/html/content/src/HTMLSelectElement.cpp index ef409cb5603d..f72b032938e4 100644 --- a/content/html/content/src/HTMLSelectElement.cpp +++ b/content/html/content/src/HTMLSelectElement.cpp @@ -11,7 +11,6 @@ #include "mozilla/dom/HTMLOptGroupElement.h" #include "mozilla/dom/HTMLOptionElement.h" #include "mozilla/dom/HTMLSelectElementBinding.h" -#include "mozilla/Util.h" #include "nsContentCreatorFunctions.h" #include "nsContentList.h" #include "nsError.h" diff --git a/content/html/content/src/HTMLSharedListElement.h b/content/html/content/src/HTMLSharedListElement.h index 71123998a3d7..000fed30a36d 100644 --- a/content/html/content/src/HTMLSharedListElement.h +++ b/content/html/content/src/HTMLSharedListElement.h @@ -5,8 +5,8 @@ #ifndef mozilla_dom_HTMLSharedListElement_h #define mozilla_dom_HTMLSharedListElement_h + #include "mozilla/Attributes.h" -#include "mozilla/Util.h" #include "nsIDOMHTMLOListElement.h" #include "nsIDOMHTMLUListElement.h" diff --git a/content/html/content/src/HTMLSharedObjectElement.cpp b/content/html/content/src/HTMLSharedObjectElement.cpp index 925d37c3eeb9..798dc122fc57 100644 --- a/content/html/content/src/HTMLSharedObjectElement.cpp +++ b/content/html/content/src/HTMLSharedObjectElement.cpp @@ -8,7 +8,6 @@ #include "mozilla/dom/HTMLEmbedElementBinding.h" #include "mozilla/dom/HTMLAppletElementBinding.h" #include "mozilla/dom/ElementInlines.h" -#include "mozilla/Util.h" #include "nsIDocument.h" #include "nsIPluginDocument.h" diff --git a/content/html/content/src/HTMLTableCaptionElement.cpp b/content/html/content/src/HTMLTableCaptionElement.cpp index 07330cba30bd..2ac62f3884ce 100644 --- a/content/html/content/src/HTMLTableCaptionElement.cpp +++ b/content/html/content/src/HTMLTableCaptionElement.cpp @@ -3,8 +3,6 @@ * 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/Util.h" - #include "mozilla/dom/HTMLTableCaptionElement.h" #include "nsAttrValueInlines.h" #include "nsMappedAttributes.h" diff --git a/content/html/content/src/HTMLTableCellElement.cpp b/content/html/content/src/HTMLTableCellElement.cpp index 97235acc22bf..7d1ffaf02c6f 100644 --- a/content/html/content/src/HTMLTableCellElement.cpp +++ b/content/html/content/src/HTMLTableCellElement.cpp @@ -3,8 +3,6 @@ * 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/Util.h" - #include "mozilla/dom/HTMLTableCellElement.h" #include "mozilla/dom/HTMLTableElement.h" #include "mozilla/dom/HTMLTableRowElement.h" diff --git a/content/html/content/src/HTMLTableColElement.cpp b/content/html/content/src/HTMLTableColElement.cpp index 450f07a7439a..46a8d33fe4f1 100644 --- a/content/html/content/src/HTMLTableColElement.cpp +++ b/content/html/content/src/HTMLTableColElement.cpp @@ -3,8 +3,6 @@ * 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/Util.h" - #include "mozilla/dom/HTMLTableColElement.h" #include "nsMappedAttributes.h" #include "nsAttrValueInlines.h" diff --git a/content/html/content/src/HTMLTableElement.cpp b/content/html/content/src/HTMLTableElement.cpp index 1296bc42db23..618e345e0802 100644 --- a/content/html/content/src/HTMLTableElement.cpp +++ b/content/html/content/src/HTMLTableElement.cpp @@ -3,8 +3,6 @@ * 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/Util.h" - #include "mozilla/dom/HTMLTableElement.h" #include "nsAttrValueInlines.h" #include "nsRuleData.h" diff --git a/content/html/content/src/HTMLTableRowElement.cpp b/content/html/content/src/HTMLTableRowElement.cpp index 584636ad0584..46a7bf0161bd 100644 --- a/content/html/content/src/HTMLTableRowElement.cpp +++ b/content/html/content/src/HTMLTableRowElement.cpp @@ -3,8 +3,6 @@ * 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/Util.h" - #include "mozilla/dom/HTMLTableRowElement.h" #include "mozilla/dom/HTMLTableElement.h" #include "nsMappedAttributes.h" diff --git a/content/html/content/src/HTMLTableSectionElement.cpp b/content/html/content/src/HTMLTableSectionElement.cpp index 572e0ab4618d..e10e4e5e6b24 100644 --- a/content/html/content/src/HTMLTableSectionElement.cpp +++ b/content/html/content/src/HTMLTableSectionElement.cpp @@ -3,8 +3,6 @@ * 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/Util.h" - #include "mozilla/dom/HTMLTableSectionElement.h" #include "nsMappedAttributes.h" #include "nsAttrValueInlines.h" diff --git a/content/html/content/src/HTMLTextAreaElement.cpp b/content/html/content/src/HTMLTextAreaElement.cpp index ce379b59e93e..0f22ac66a9fc 100644 --- a/content/html/content/src/HTMLTextAreaElement.cpp +++ b/content/html/content/src/HTMLTextAreaElement.cpp @@ -10,7 +10,6 @@ #include "mozilla/Attributes.h" #include "mozilla/dom/HTMLTextAreaElementBinding.h" #include "mozilla/MouseEvents.h" -#include "mozilla/Util.h" #include "nsAttrValueInlines.h" #include "nsContentCID.h" #include "nsContentCreatorFunctions.h" diff --git a/content/html/content/src/HTMLVideoElement.cpp b/content/html/content/src/HTMLVideoElement.cpp index 491668ce71ef..1bc49191876c 100644 --- a/content/html/content/src/HTMLVideoElement.cpp +++ b/content/html/content/src/HTMLVideoElement.cpp @@ -4,8 +4,6 @@ * 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/Util.h" - #include "nsIDOMHTMLVideoElement.h" #include "nsIDOMHTMLSourceElement.h" #include "mozilla/dom/HTMLVideoElement.h" diff --git a/content/html/content/src/nsFormSubmission.cpp b/content/html/content/src/nsFormSubmission.cpp index 7885f8a9fa60..df67b79f103d 100644 --- a/content/html/content/src/nsFormSubmission.cpp +++ b/content/html/content/src/nsFormSubmission.cpp @@ -4,8 +4,6 @@ * 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/Util.h" - #include "nsFormSubmission.h" #include "nsCOMPtr.h" diff --git a/content/html/content/src/nsGenericHTMLElement.cpp b/content/html/content/src/nsGenericHTMLElement.cpp index cf87b7beb32b..1c85d8ae398d 100644 --- a/content/html/content/src/nsGenericHTMLElement.cpp +++ b/content/html/content/src/nsGenericHTMLElement.cpp @@ -4,8 +4,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "mozilla/ArrayUtils.h" #include "mozilla/MouseEvents.h" -#include "mozilla/Util.h" #include "mozilla/Likely.h" #include "nscore.h" diff --git a/content/html/document/src/nsHTMLContentSink.cpp b/content/html/document/src/nsHTMLContentSink.cpp index 6028c035ad33..bf0476380901 100644 --- a/content/html/document/src/nsHTMLContentSink.cpp +++ b/content/html/document/src/nsHTMLContentSink.cpp @@ -10,7 +10,7 @@ * Don't bother adding new stuff in this file. */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsContentSink.h" #include "nsCOMPtr.h" diff --git a/content/mathml/content/src/nsMathMLElement.cpp b/content/mathml/content/src/nsMathMLElement.cpp index a1c3bec8571a..5176b794061b 100644 --- a/content/mathml/content/src/nsMathMLElement.cpp +++ b/content/mathml/content/src/nsMathMLElement.cpp @@ -6,7 +6,7 @@ #include "nsMathMLElement.h" #include "base/compiler_specific.h" -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsGkAtoms.h" #include "nsCRT.h" #include "nsRuleData.h" diff --git a/content/media/wave/WaveReader.cpp b/content/media/wave/WaveReader.cpp index 5de5f7b1ffbb..74d1f7182a0b 100644 --- a/content/media/wave/WaveReader.cpp +++ b/content/media/wave/WaveReader.cpp @@ -13,7 +13,7 @@ #include "nsISeekableStream.h" #include -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/CheckedInt.h" #include "mozilla/Endian.h" #include diff --git a/content/media/webaudio/blink/IRC_Composite_C_R0195-incl.cpp b/content/media/webaudio/blink/IRC_Composite_C_R0195-incl.cpp index 3fff3cf47579..9fe14f3d8c08 100644 --- a/content/media/webaudio/blink/IRC_Composite_C_R0195-incl.cpp +++ b/content/media/webaudio/blink/IRC_Composite_C_R0195-incl.cpp @@ -18,7 +18,7 @@ * the listener. */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" using mozilla::ArrayLength; diff --git a/content/media/webrtc/LoadMonitor.cpp b/content/media/webrtc/LoadMonitor.cpp index e140e0636449..a265e5684207 100644 --- a/content/media/webrtc/LoadMonitor.cpp +++ b/content/media/webrtc/LoadMonitor.cpp @@ -19,7 +19,6 @@ #include "nsIServiceManager.h" #include "mozilla/TimeStamp.h" -#include "mozilla/Util.h" #include "mozilla/Services.h" #if defined(ANDROID) || defined(LINUX) || defined(XP_MACOSX) diff --git a/content/svg/content/src/DOMSVGPathSeg.cpp b/content/svg/content/src/DOMSVGPathSeg.cpp index 3f35f6425036..e16d9d44fbc2 100644 --- a/content/svg/content/src/DOMSVGPathSeg.cpp +++ b/content/svg/content/src/DOMSVGPathSeg.cpp @@ -3,8 +3,6 @@ * 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/Util.h" - #include "DOMSVGPathSeg.h" #include "DOMSVGPathSegList.h" #include "SVGAnimatedPathSegList.h" diff --git a/content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp b/content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp index e9fea8bd7c0a..babca0600539 100644 --- a/content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp +++ b/content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "SVGAnimatedPreserveAspectRatio.h" #include "mozilla/dom/SVGAnimatedPreserveAspectRatioBinding.h" diff --git a/content/svg/content/src/SVGClipPathElement.cpp b/content/svg/content/src/SVGClipPathElement.cpp index 6bbd696df93d..afc7619997a3 100644 --- a/content/svg/content/src/SVGClipPathElement.cpp +++ b/content/svg/content/src/SVGClipPathElement.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/dom/SVGClipPathElement.h" #include "mozilla/dom/SVGClipPathElementBinding.h" diff --git a/content/svg/content/src/SVGFilterElement.cpp b/content/svg/content/src/SVGFilterElement.cpp index 5fad0563efc3..79a1ba28bb23 100644 --- a/content/svg/content/src/SVGFilterElement.cpp +++ b/content/svg/content/src/SVGFilterElement.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsGkAtoms.h" #include "nsCOMPtr.h" diff --git a/content/svg/content/src/SVGForeignObjectElement.cpp b/content/svg/content/src/SVGForeignObjectElement.cpp index 197d4adf3512..8d239a4c5076 100644 --- a/content/svg/content/src/SVGForeignObjectElement.cpp +++ b/content/svg/content/src/SVGForeignObjectElement.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCOMPtr.h" #include "mozilla/dom/SVGForeignObjectElement.h" diff --git a/content/svg/content/src/SVGGradientElement.cpp b/content/svg/content/src/SVGGradientElement.cpp index b2c043534604..406017eb4511 100644 --- a/content/svg/content/src/SVGGradientElement.cpp +++ b/content/svg/content/src/SVGGradientElement.cpp @@ -5,10 +5,10 @@ #include "mozilla/dom/SVGGradientElement.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/dom/SVGAnimatedTransformList.h" #include "mozilla/dom/SVGRadialGradientElementBinding.h" #include "mozilla/dom/SVGLinearGradientElementBinding.h" -#include "mozilla/Util.h" #include "nsCOMPtr.h" #include "nsGkAtoms.h" #include "nsSVGElement.h" diff --git a/content/svg/content/src/SVGImageElement.cpp b/content/svg/content/src/SVGImageElement.cpp index db44164da99f..e469d227ddbe 100644 --- a/content/svg/content/src/SVGImageElement.cpp +++ b/content/svg/content/src/SVGImageElement.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/dom/SVGImageElement.h" #include "mozilla/gfx/2D.h" diff --git a/content/svg/content/src/SVGLength.cpp b/content/svg/content/src/SVGLength.cpp index fe4c566517a4..2c4cc0ac2fdd 100644 --- a/content/svg/content/src/SVGLength.cpp +++ b/content/svg/content/src/SVGLength.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "SVGLength.h" #include "nsSVGElement.h" diff --git a/content/svg/content/src/SVGMPathElement.cpp b/content/svg/content/src/SVGMPathElement.cpp index 4a1f1b18f271..f714a78e4d91 100644 --- a/content/svg/content/src/SVGMPathElement.cpp +++ b/content/svg/content/src/SVGMPathElement.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/dom/SVGMPathElement.h" #include "nsDebug.h" diff --git a/content/svg/content/src/SVGMarkerElement.cpp b/content/svg/content/src/SVGMarkerElement.cpp index e358b823bd80..98c2f51f4d9e 100644 --- a/content/svg/content/src/SVGMarkerElement.cpp +++ b/content/svg/content/src/SVGMarkerElement.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsGkAtoms.h" #include "nsCOMPtr.h" diff --git a/content/svg/content/src/SVGMaskElement.cpp b/content/svg/content/src/SVGMaskElement.cpp index a4444e081aa8..f3b2eb7e0bd3 100644 --- a/content/svg/content/src/SVGMaskElement.cpp +++ b/content/svg/content/src/SVGMaskElement.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCOMPtr.h" #include "nsGkAtoms.h" diff --git a/content/svg/content/src/SVGNumberList.cpp b/content/svg/content/src/SVGNumberList.cpp index bf413716a314..1d8be3a3e441 100644 --- a/content/svg/content/src/SVGNumberList.cpp +++ b/content/svg/content/src/SVGNumberList.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "SVGNumberList.h" #include "nsCharSeparatedTokenizer.h" diff --git a/content/svg/content/src/SVGPathSegUtils.cpp b/content/svg/content/src/SVGPathSegUtils.cpp index 051acbc4815d..d337e53e8815 100644 --- a/content/svg/content/src/SVGPathSegUtils.cpp +++ b/content/svg/content/src/SVGPathSegUtils.cpp @@ -3,10 +3,11 @@ * 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/ArrayUtils.h" // MOZ_ARRAY_LENGTH + #include "SVGPathSegUtils.h" #include "gfx2DGlue.h" -#include "mozilla/Util.h" // MOZ_ARRAY_LENGTH #include "nsSVGPathDataParser.h" #include "nsTextFormatter.h" diff --git a/content/svg/content/src/SVGPatternElement.cpp b/content/svg/content/src/SVGPatternElement.cpp index 064f895a772c..5289c7d66680 100644 --- a/content/svg/content/src/SVGPatternElement.cpp +++ b/content/svg/content/src/SVGPatternElement.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCOMPtr.h" #include "nsGkAtoms.h" diff --git a/content/svg/content/src/SVGPointList.cpp b/content/svg/content/src/SVGPointList.cpp index 40519a79e239..e74994637f1e 100644 --- a/content/svg/content/src/SVGPointList.cpp +++ b/content/svg/content/src/SVGPointList.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "SVGPointList.h" #include "nsCharSeparatedTokenizer.h" diff --git a/content/svg/content/src/SVGSVGElement.cpp b/content/svg/content/src/SVGSVGElement.cpp index 58bc0388d04c..aa2e00c1be86 100644 --- a/content/svg/content/src/SVGSVGElement.cpp +++ b/content/svg/content/src/SVGSVGElement.cpp @@ -4,8 +4,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include +#include "mozilla/ArrayUtils.h" #include "mozilla/BasicEvents.h" -#include "mozilla/Util.h" #include "mozilla/Likely.h" #include "nsGkAtoms.h" diff --git a/content/svg/content/src/SVGTextPositioningElement.cpp b/content/svg/content/src/SVGTextPositioningElement.cpp index 1762ab503afd..3765c0fb7b7a 100644 --- a/content/svg/content/src/SVGTextPositioningElement.cpp +++ b/content/svg/content/src/SVGTextPositioningElement.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/dom/SVGTextPositioningElement.h" #include "SVGAnimatedLengthList.h" diff --git a/content/svg/content/src/SVGTransformListParser.cpp b/content/svg/content/src/SVGTransformListParser.cpp index cbd9702b2584..24cfd746a0ba 100644 --- a/content/svg/content/src/SVGTransformListParser.cpp +++ b/content/svg/content/src/SVGTransformListParser.cpp @@ -4,7 +4,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "SVGTransformListParser.h" #include "SVGContentUtils.h" diff --git a/content/svg/content/src/SVGUseElement.cpp b/content/svg/content/src/SVGUseElement.cpp index 56b158d68cd1..20ea5cd0cd18 100644 --- a/content/svg/content/src/SVGUseElement.cpp +++ b/content/svg/content/src/SVGUseElement.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/dom/SVGUseElement.h" #include "mozilla/dom/SVGUseElementBinding.h" diff --git a/content/svg/content/src/nsSVGAngle.cpp b/content/svg/content/src/nsSVGAngle.cpp index adc9c2f81046..bac491c00790 100644 --- a/content/svg/content/src/nsSVGAngle.cpp +++ b/content/svg/content/src/nsSVGAngle.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsSVGAngle.h" #include "mozilla/dom/SVGMarkerElement.h" diff --git a/content/svg/content/src/nsSVGElement.cpp b/content/svg/content/src/nsSVGElement.cpp index 053c9987c120..2561edd73d87 100644 --- a/content/svg/content/src/nsSVGElement.cpp +++ b/content/svg/content/src/nsSVGElement.cpp @@ -3,8 +3,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "mozilla/ArrayUtils.h" #include "mozilla/DebugOnly.h" -#include "mozilla/Util.h" #include "nsSVGElement.h" diff --git a/content/svg/content/src/nsSVGFilters.cpp b/content/svg/content/src/nsSVGFilters.cpp index 6aaac6df0bcb..33bd40219813 100644 --- a/content/svg/content/src/nsSVGFilters.cpp +++ b/content/svg/content/src/nsSVGFilters.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsSVGElement.h" #include "nsGkAtoms.h" diff --git a/content/svg/content/src/nsSVGLength2.cpp b/content/svg/content/src/nsSVGLength2.cpp index 9c69341cffcc..ddfca89e7f8b 100644 --- a/content/svg/content/src/nsSVGLength2.cpp +++ b/content/svg/content/src/nsSVGLength2.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsSVGLength2.h" #include "mozilla/dom/SVGAnimatedLength.h" diff --git a/content/svg/content/test/test_transformParsing.html b/content/svg/content/test/test_transformParsing.html index 0c12d5945af4..676167b86c83 100644 --- a/content/svg/content/test/test_transformParsing.html +++ b/content/svg/content/test/test_transformParsing.html @@ -65,23 +65,23 @@ function checkParseOk(spec, expected) { function checkTransform(transform, expected, spec, index) { var typeMapping = { "unknown": SVGTransform.SVG_TRANSFORM_UNKNOWN, - "matrix": SVGTransform.SVG_TRANSFORM_UNKNOWN, - "translate": SVGTransform.SVG_TRANSFORM_UNKNOWN, - "scale": SVGTransform.SVG_TRANSFORM_UNKNOWN, - "rotate": SVGTransform.SVG_TRANSFORM_UNKNOWN, - "skewx": SVGTransform.SVG_TRANSFORM_UNKNOWN, - "skewy": SVGTransform.SVG_TRANSFORM_UNKNOWN + "matrix": SVGTransform.SVG_TRANSFORM_MATRIX, + "translate": SVGTransform.SVG_TRANSFORM_TRANSLATE, + "scale": SVGTransform.SVG_TRANSFORM_SCALE, + "rotate": SVGTransform.SVG_TRANSFORM_ROTATE, + "skewx": SVGTransform.SVG_TRANSFORM_SKEWX, + "skewy": SVGTransform.SVG_TRANSFORM_SKEWY }; var name = "Item " + index + " of '" + spec + "'"; // Compare type - if (typeof spec.type != "undefined") { - ise(transform.type, typeMapping[spec.type], name + " - transform type"); + if (typeof expected.type != "undefined") { + ise(transform.type, typeMapping[expected.type], name + " - transform type"); } // Compare angle - if (typeof spec.angle != "undefined") { - ise(transform.angle, spec.angle, name + " - angle"); + if (typeof expected.angle != "undefined") { + ise(transform.angle, expected.angle, name + " - angle"); } // Compare matrix values (roughly) diff --git a/content/xbl/src/nsXBLContentSink.cpp b/content/xbl/src/nsXBLContentSink.cpp index e6e5cc57c315..10b49451866f 100644 --- a/content/xbl/src/nsXBLContentSink.cpp +++ b/content/xbl/src/nsXBLContentSink.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsXBLContentSink.h" #include "nsIDocument.h" diff --git a/content/xbl/src/nsXBLPrototypeBinding.cpp b/content/xbl/src/nsXBLPrototypeBinding.cpp index a6320a9d6713..eb0e351ab593 100644 --- a/content/xbl/src/nsXBLPrototypeBinding.cpp +++ b/content/xbl/src/nsXBLPrototypeBinding.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCOMPtr.h" #include "nsIAtom.h" diff --git a/content/xbl/src/nsXBLPrototypeHandler.cpp b/content/xbl/src/nsXBLPrototypeHandler.cpp index 995b96f21a2b..a54a18bad5f2 100644 --- a/content/xbl/src/nsXBLPrototypeHandler.cpp +++ b/content/xbl/src/nsXBLPrototypeHandler.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCOMPtr.h" #include "nsXBLPrototypeHandler.h" diff --git a/content/xbl/src/nsXBLService.cpp b/content/xbl/src/nsXBLService.cpp index a79dfb00ddf4..2f198c42f7a8 100644 --- a/content/xbl/src/nsXBLService.cpp +++ b/content/xbl/src/nsXBLService.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCOMPtr.h" #include "nsNetUtil.h" diff --git a/content/xslt/src/xpath/txCoreFunctionCall.cpp b/content/xslt/src/xpath/txCoreFunctionCall.cpp index 1e9681f35ead..23ffebe707b9 100644 --- a/content/xslt/src/xpath/txCoreFunctionCall.cpp +++ b/content/xslt/src/xpath/txCoreFunctionCall.cpp @@ -3,8 +3,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "mozilla/ArrayUtils.h" #include "mozilla/FloatingPoint.h" -#include "mozilla/Util.h" #include "txExpr.h" #include "nsAutoPtr.h" diff --git a/content/xslt/src/xslt/txEXSLTFunctions.cpp b/content/xslt/src/xslt/txEXSLTFunctions.cpp index d2ce23a14fde..dbc3c9cc01ae 100644 --- a/content/xslt/src/xslt/txEXSLTFunctions.cpp +++ b/content/xslt/src/xslt/txEXSLTFunctions.cpp @@ -3,8 +3,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "mozilla/ArrayUtils.h" #include "mozilla/FloatingPoint.h" -#include "mozilla/Util.h" #include "nsIAtom.h" #include "nsGkAtoms.h" diff --git a/content/xslt/src/xslt/txStylesheetCompileHandlers.cpp b/content/xslt/src/xslt/txStylesheetCompileHandlers.cpp index 5915c620b00f..9e7e929dcb4b 100644 --- a/content/xslt/src/xslt/txStylesheetCompileHandlers.cpp +++ b/content/xslt/src/xslt/txStylesheetCompileHandlers.cpp @@ -3,8 +3,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "mozilla/ArrayUtils.h" #include "mozilla/FloatingPoint.h" -#include "mozilla/Util.h" #include "txStylesheetCompiler.h" #include "txStylesheetCompileHandlers.h" diff --git a/content/xslt/src/xslt/txStylesheetCompiler.cpp b/content/xslt/src/xslt/txStylesheetCompiler.cpp index b38b34fdc4db..9f9424a31223 100644 --- a/content/xslt/src/xslt/txStylesheetCompiler.cpp +++ b/content/xslt/src/xslt/txStylesheetCompiler.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "txStylesheetCompiler.h" #include "txStylesheetCompileHandlers.h" diff --git a/content/xul/document/src/XULDocument.cpp b/content/xul/document/src/XULDocument.cpp index 8ccaa5e0c181..b227de05ec51 100644 --- a/content/xul/document/src/XULDocument.cpp +++ b/content/xul/document/src/XULDocument.cpp @@ -21,7 +21,7 @@ */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" // Note the ALPHABETICAL ORDERING #include "XULDocument.h" diff --git a/content/xul/templates/src/nsRuleNetwork.cpp b/content/xul/templates/src/nsRuleNetwork.cpp index 526df5643164..7e1b5403e08d 100644 --- a/content/xul/templates/src/nsRuleNetwork.cpp +++ b/content/xul/templates/src/nsRuleNetwork.cpp @@ -16,8 +16,6 @@ */ -#include "mozilla/Util.h" - #include "nscore.h" #include "nsCOMPtr.h" #include "plhash.h" diff --git a/content/xul/templates/src/nsXULContentBuilder.cpp b/content/xul/templates/src/nsXULContentBuilder.cpp index 0db1ff42cb03..a1860055d1dd 100644 --- a/content/xul/templates/src/nsXULContentBuilder.cpp +++ b/content/xul/templates/src/nsXULContentBuilder.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsContentCID.h" #include "nsIDocument.h" diff --git a/content/xul/templates/src/nsXULContentUtils.cpp b/content/xul/templates/src/nsXULContentUtils.cpp index d20091113a75..aba3543a28e0 100644 --- a/content/xul/templates/src/nsXULContentUtils.cpp +++ b/content/xul/templates/src/nsXULContentUtils.cpp @@ -25,7 +25,7 @@ */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCOMPtr.h" #include "nsIContent.h" diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 0c703317607f..c7fd5c390c15 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -8,6 +8,7 @@ #include +#include "mozilla/ArrayUtils.h" #include "mozilla/Attributes.h" #include "mozilla/AutoRestore.h" #include "mozilla/Casting.h" @@ -19,7 +20,6 @@ #include "mozilla/StartupTimeline.h" #include "mozilla/Telemetry.h" #include "mozilla/unused.h" -#include "mozilla/Util.h" #include "mozilla/VisualEventTracer.h" #ifdef MOZ_LOGGING diff --git a/dom/audiochannel/AudioChannelService.cpp b/dom/audiochannel/AudioChannelService.cpp index 069e9a8cfd7f..cba41aeadc27 100644 --- a/dom/audiochannel/AudioChannelService.cpp +++ b/dom/audiochannel/AudioChannelService.cpp @@ -12,7 +12,6 @@ #include "mozilla/Services.h" #include "mozilla/StaticPtr.h" #include "mozilla/unused.h" -#include "mozilla/Util.h" #include "mozilla/dom/ContentParent.h" diff --git a/dom/audiochannel/AudioChannelServiceChild.cpp b/dom/audiochannel/AudioChannelServiceChild.cpp index d2e4429c1d5f..023eec896e2b 100644 --- a/dom/audiochannel/AudioChannelServiceChild.cpp +++ b/dom/audiochannel/AudioChannelServiceChild.cpp @@ -11,7 +11,6 @@ #include "mozilla/Services.h" #include "mozilla/StaticPtr.h" #include "mozilla/unused.h" -#include "mozilla/Util.h" #include "mozilla/dom/ContentChild.h" #include "mozilla/dom/ContentParent.h" #include "nsIObserverService.h" diff --git a/dom/base/DOMException.cpp b/dom/base/DOMException.cpp index af705fa47f7e..11f53083db00 100644 --- a/dom/base/DOMException.cpp +++ b/dom/base/DOMException.cpp @@ -7,8 +7,8 @@ #include "jsprf.h" #include "js/OldDebugAPI.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/HoldDropJSObjects.h" -#include "mozilla/Util.h" #include "mozilla/dom/Exceptions.h" #include "nsContentUtils.h" #include "nsCOMPtr.h" diff --git a/dom/base/nsDOMClassInfo.cpp b/dom/base/nsDOMClassInfo.cpp index 7356d6a5b5ee..44b5e80279d7 100644 --- a/dom/base/nsDOMClassInfo.cpp +++ b/dom/base/nsDOMClassInfo.cpp @@ -4,7 +4,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" // On top because they include basictypes.h: #include "mozilla/dom/SmsFilter.h" diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index b7e414e2b08f..17562817597a 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -9,7 +9,6 @@ #include #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" // Local Includes #include "Navigator.h" diff --git a/dom/base/nsGlobalWindowCommands.cpp b/dom/base/nsGlobalWindowCommands.cpp index 4f8e30ed9963..3fc26a7cc8e1 100644 --- a/dom/base/nsGlobalWindowCommands.cpp +++ b/dom/base/nsGlobalWindowCommands.cpp @@ -11,8 +11,8 @@ #include "nsIInterfaceRequestorUtils.h" #include "nsCRT.h" #include "nsString.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Preferences.h" -#include "mozilla/Util.h" #include "nsIControllerCommandTable.h" #include "nsICommandParams.h" diff --git a/dom/bindings/BindingUtils.h b/dom/bindings/BindingUtils.h index 750bcc2929b3..de98b3cdf3d4 100644 --- a/dom/bindings/BindingUtils.h +++ b/dom/bindings/BindingUtils.h @@ -9,6 +9,7 @@ #include "jsfriendapi.h" #include "jswrapper.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Alignment.h" #include "mozilla/Array.h" #include "mozilla/dom/BindingDeclarations.h" @@ -24,7 +25,6 @@ #include "mozilla/HoldDropJSObjects.h" #include "mozilla/Likely.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #include "nsCycleCollector.h" #include "nsIXPConnect.h" #include "MainThreadUtils.h" diff --git a/dom/bindings/CallbackObject.h b/dom/bindings/CallbackObject.h index a04763817a85..854286784194 100644 --- a/dom/bindings/CallbackObject.h +++ b/dom/bindings/CallbackObject.h @@ -24,7 +24,6 @@ #include "mozilla/Assertions.h" #include "mozilla/ErrorResult.h" #include "mozilla/HoldDropJSObjects.h" -#include "mozilla/Util.h" #include "nsContentUtils.h" #include "nsCxPusher.h" #include "nsWrapperCache.h" diff --git a/dom/bindings/DOMJSProxyHandler.cpp b/dom/bindings/DOMJSProxyHandler.cpp index ca4189f069d5..4bb115fbe1e3 100644 --- a/dom/bindings/DOMJSProxyHandler.cpp +++ b/dom/bindings/DOMJSProxyHandler.cpp @@ -4,8 +4,6 @@ * 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/Util.h" - #include "mozilla/dom/DOMJSProxyHandler.h" #include "xpcpublic.h" #include "xpcprivate.h" diff --git a/dom/bindings/TypedArray.h b/dom/bindings/TypedArray.h index f84435a4e109..d8ed5008533c 100644 --- a/dom/bindings/TypedArray.h +++ b/dom/bindings/TypedArray.h @@ -13,7 +13,6 @@ #include "js/Tracer.h" #include "mozilla/Attributes.h" #include "mozilla/dom/BindingDeclarations.h" -#include "mozilla/Util.h" // for Maybe #include "nsWrapperCache.h" namespace mozilla { diff --git a/dom/bluetooth/BluetoothAdapter.cpp b/dom/bluetooth/BluetoothAdapter.cpp index 0b3ec6c2755f..8859776e8558 100644 --- a/dom/bluetooth/BluetoothAdapter.cpp +++ b/dom/bluetooth/BluetoothAdapter.cpp @@ -19,7 +19,6 @@ #include "mozilla/dom/BluetoothAdapterBinding.h" #include "mozilla/dom/ContentChild.h" #include "mozilla/LazyIdleThread.h" -#include "mozilla/Util.h" #include "BluetoothAdapter.h" #include "BluetoothDevice.h" diff --git a/dom/bluetooth/BluetoothManager.cpp b/dom/bluetooth/BluetoothManager.cpp index a4e432f3e947..922c64f853f4 100644 --- a/dom/bluetooth/BluetoothManager.cpp +++ b/dom/bluetooth/BluetoothManager.cpp @@ -16,7 +16,6 @@ #include "nsDOMClassInfo.h" #include "nsIPermissionManager.h" #include "nsThreadUtils.h" -#include "mozilla/Util.h" #include "mozilla/dom/bluetooth/BluetoothTypes.h" #include "mozilla/dom/BluetoothManagerBinding.h" diff --git a/dom/bluetooth/BluetoothService.cpp b/dom/bluetooth/BluetoothService.cpp index dac0fdb3499d..36fe27219a24 100644 --- a/dom/bluetooth/BluetoothService.cpp +++ b/dom/bluetooth/BluetoothService.cpp @@ -23,7 +23,6 @@ #include "mozilla/Services.h" #include "mozilla/StaticPtr.h" #include "mozilla/unused.h" -#include "mozilla/Util.h" #include "mozilla/dom/ContentParent.h" #include "mozilla/dom/bluetooth/BluetoothTypes.h" #include "mozilla/ipc/UnixSocket.h" diff --git a/dom/bluetooth/BluetoothSocketObserver.h b/dom/bluetooth/BluetoothSocketObserver.h index 09584241f956..6a2d6f89bad7 100644 --- a/dom/bluetooth/BluetoothSocketObserver.h +++ b/dom/bluetooth/BluetoothSocketObserver.h @@ -8,9 +8,7 @@ #define mozilla_dom_bluetooth_BluetoothSocketObserver_h #include "BluetoothCommon.h" -#include - -using namespace mozilla::ipc; +#include "mozilla/ipc/UnixSocket.h" BEGIN_BLUETOOTH_NAMESPACE @@ -19,8 +17,9 @@ class BluetoothSocket; class BluetoothSocketObserver { public: - virtual void ReceiveSocketData(BluetoothSocket* aSocket, - nsAutoPtr& aMessage) = 0; + virtual void ReceiveSocketData( + BluetoothSocket* aSocket, + nsAutoPtr& aMessage) = 0; /** * A callback function which would be called when a socket connection diff --git a/dom/bluetooth/bluedroid/BluetoothOppManager.h b/dom/bluetooth/bluedroid/BluetoothOppManager.h index 0642c2457cee..782c1a37ce1b 100644 --- a/dom/bluetooth/bluedroid/BluetoothOppManager.h +++ b/dom/bluetooth/bluedroid/BluetoothOppManager.h @@ -115,7 +115,8 @@ private: * false if the received length exceeds/not reaches the expected * length. */ - bool ComposePacket(uint8_t aOpCode, UnixSocketRawData* aMessage); + bool ComposePacket(uint8_t aOpCode, + mozilla::ipc::UnixSocketRawData* aMessage); /** * OBEX session status. diff --git a/dom/bluetooth/bluez/BluetoothHfpManager.h b/dom/bluetooth/bluez/BluetoothHfpManager.h index 91f78c6cd99e..f44cb194634d 100644 --- a/dom/bluetooth/bluez/BluetoothHfpManager.h +++ b/dom/bluetooth/bluez/BluetoothHfpManager.h @@ -222,7 +222,7 @@ private: nsRefPtr mHandsfreeSocket; nsRefPtr mHeadsetSocket; nsRefPtr mScoSocket; - SocketConnectionStatus mScoSocketStatus; + mozilla::ipc::SocketConnectionStatus mScoSocketStatus; #ifdef MOZ_B2G_RIL // CDMA-specific variable diff --git a/dom/bluetooth/bluez/BluetoothOppManager.h b/dom/bluetooth/bluez/BluetoothOppManager.h index 062032ac69d6..c2db9e5e264b 100644 --- a/dom/bluetooth/bluez/BluetoothOppManager.h +++ b/dom/bluetooth/bluez/BluetoothOppManager.h @@ -115,7 +115,8 @@ private: * false if the received length exceeds/not reaches the expected * length. */ - bool ComposePacket(uint8_t aOpCode, UnixSocketRawData* aMessage); + bool ComposePacket(uint8_t aOpCode, + mozilla::ipc::UnixSocketRawData* aMessage); /** * OBEX session status. diff --git a/dom/bluetooth/bluez/linux/BluetoothDBusService.cpp b/dom/bluetooth/bluez/linux/BluetoothDBusService.cpp index 18c614c78a7d..feadaa379089 100644 --- a/dom/bluetooth/bluez/linux/BluetoothDBusService.cpp +++ b/dom/bluetooth/bluez/linux/BluetoothDBusService.cpp @@ -35,6 +35,7 @@ #include "nsThreadUtils.h" #include "nsDebug.h" #include "nsDataHashtable.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Atomics.h" #include "mozilla/dom/bluetooth/BluetoothTypes.h" #include "mozilla/Hal.h" @@ -45,7 +46,6 @@ #include "mozilla/Mutex.h" #include "mozilla/NullPtr.h" #include "mozilla/StaticMutex.h" -#include "mozilla/Util.h" #if defined(MOZ_WIDGET_GONK) #include "cutils/properties.h" diff --git a/dom/bluetooth/ipc/BluetoothParent.cpp b/dom/bluetooth/ipc/BluetoothParent.cpp index 057e2a678a29..2c9cc88d76f9 100644 --- a/dom/bluetooth/ipc/BluetoothParent.cpp +++ b/dom/bluetooth/ipc/BluetoothParent.cpp @@ -10,7 +10,6 @@ #include "mozilla/Assertions.h" #include "mozilla/unused.h" -#include "mozilla/Util.h" #include "nsDebug.h" #include "nsThreadUtils.h" #include "nsTraceRefcnt.h" diff --git a/dom/encoding/EncodingUtils.cpp b/dom/encoding/EncodingUtils.cpp index ad281ca7fb52..bc9cf22e512a 100644 --- a/dom/encoding/EncodingUtils.cpp +++ b/dom/encoding/EncodingUtils.cpp @@ -4,7 +4,7 @@ #include "mozilla/dom/EncodingUtils.h" -#include "mozilla/Util.h" // ArrayLength +#include "mozilla/ArrayUtils.h" // ArrayLength #include "nsUConvPropertySearch.h" #include "nsIUnicodeDecoder.h" #include "nsIUnicodeEncoder.h" diff --git a/dom/indexedDB/IndexedDatabaseManager.cpp b/dom/indexedDB/IndexedDatabaseManager.cpp index 90cf85144086..d52ab010be12 100644 --- a/dom/indexedDB/IndexedDatabaseManager.cpp +++ b/dom/indexedDB/IndexedDatabaseManager.cpp @@ -23,7 +23,6 @@ #include "mozilla/dom/TabContext.h" #include "mozilla/Services.h" #include "mozilla/storage.h" -#include "mozilla/Util.h" #include "nsContentUtils.h" #include "nsEventDispatcher.h" #include "nsThreadUtils.h" diff --git a/dom/indexedDB/ipc/IndexedDBParent.cpp b/dom/indexedDB/ipc/IndexedDBParent.cpp index 0242472f4f63..ca23d65f3026 100644 --- a/dom/indexedDB/ipc/IndexedDBParent.cpp +++ b/dom/indexedDB/ipc/IndexedDBParent.cpp @@ -17,7 +17,6 @@ #include "mozilla/dom/ipc/Blob.h" #include "mozilla/dom/TabParent.h" #include "mozilla/unused.h" -#include "mozilla/Util.h" #include "nsCxPusher.h" #include "AsyncConnectionHelper.h" diff --git a/dom/plugins/base/nsNPAPIPlugin.cpp b/dom/plugins/base/nsNPAPIPlugin.cpp index dec5ae5dcabc..1cfb84f32829 100644 --- a/dom/plugins/base/nsNPAPIPlugin.cpp +++ b/dom/plugins/base/nsNPAPIPlugin.cpp @@ -6,7 +6,7 @@ #include "base/basictypes.h" /* This must occur *after* layers/PLayerTransaction.h to avoid typedefs conflicts. */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "pratom.h" #include "prmem.h" diff --git a/dom/plugins/base/nsPluginsDirWin.cpp b/dom/plugins/base/nsPluginsDirWin.cpp index 9e762668a819..8d3c0b76ea25 100644 --- a/dom/plugins/base/nsPluginsDirWin.cpp +++ b/dom/plugins/base/nsPluginsDirWin.cpp @@ -11,8 +11,8 @@ by Alex Musil */ +#include "mozilla/ArrayUtils.h" // ArrayLength #include "mozilla/DebugOnly.h" -#include "mozilla/Util.h" // ArrayLength #include "nsPluginsDir.h" #include "prlink.h" diff --git a/dom/plugins/ipc/PluginInstanceChild.cpp b/dom/plugins/ipc/PluginInstanceChild.cpp index 09dd5877c6b8..b51266985496 100644 --- a/dom/plugins/ipc/PluginInstanceChild.cpp +++ b/dom/plugins/ipc/PluginInstanceChild.cpp @@ -27,7 +27,7 @@ using mozilla::gfx::SharedDIBSurface; #include "gfxUtils.h" #include "gfxAlphaRecovery.h" -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/ipc/MessageChannel.h" #include "mozilla/AutoRestore.h" #include "ImageContainer.h" diff --git a/dom/plugins/ipc/PluginModuleChild.cpp b/dom/plugins/ipc/PluginModuleChild.cpp index 4e8989797daf..63e09a24370d 100644 --- a/dom/plugins/ipc/PluginModuleChild.cpp +++ b/dom/plugins/ipc/PluginModuleChild.cpp @@ -14,7 +14,7 @@ #include "mozilla/plugins/PluginModuleChild.h" /* This must occur *after* plugins/PluginModuleChild.h to avoid typedefs conflicts. */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/ipc/MessageChannel.h" diff --git a/dom/speakermanager/SpeakerManagerService.cpp b/dom/speakermanager/SpeakerManagerService.cpp index c3101592a71a..635f95bec374 100644 --- a/dom/speakermanager/SpeakerManagerService.cpp +++ b/dom/speakermanager/SpeakerManagerService.cpp @@ -9,7 +9,6 @@ #include "mozilla/Services.h" #include "mozilla/StaticPtr.h" #include "mozilla/unused.h" -#include "mozilla/Util.h" #include "mozilla/dom/ContentParent.h" #include "nsIPropertyBag2.h" #include "nsThreadUtils.h" diff --git a/dom/speakermanager/SpeakerManagerServiceChild.cpp b/dom/speakermanager/SpeakerManagerServiceChild.cpp index bafb4ffd6691..988c03e12888 100644 --- a/dom/speakermanager/SpeakerManagerServiceChild.cpp +++ b/dom/speakermanager/SpeakerManagerServiceChild.cpp @@ -8,7 +8,6 @@ #include "mozilla/Services.h" #include "mozilla/StaticPtr.h" #include "mozilla/unused.h" -#include "mozilla/Util.h" #include "mozilla/dom/ContentChild.h" #include "mozilla/dom/ContentParent.h" #include "nsIObserverService.h" diff --git a/dom/system/gonk/AudioManager.h b/dom/system/gonk/AudioManager.h index bd0649f390ea..5d71bccff388 100644 --- a/dom/system/gonk/AudioManager.h +++ b/dom/system/gonk/AudioManager.h @@ -28,8 +28,6 @@ {0x89, 0x10, 0xf9, 0x3c, 0x55, 0xe6, 0x62, 0xec}} #define NS_AUDIOMANAGER_CONTRACTID "@mozilla.org/telephony/audiomanager;1" -using namespace mozilla::dom; - namespace mozilla { namespace hal { class SwitchEvent; diff --git a/dom/workers/RuntimeService.cpp b/dom/workers/RuntimeService.cpp index 91e0744dd8d6..82ff35df7075 100644 --- a/dom/workers/RuntimeService.cpp +++ b/dom/workers/RuntimeService.cpp @@ -25,6 +25,7 @@ #include "GeckoProfiler.h" #include "js/OldDebugAPI.h" #include "jsfriendapi.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/CycleCollectedJSRuntime.h" #include "mozilla/dom/AtomList.h" #include "mozilla/dom/BindingUtils.h" @@ -34,7 +35,6 @@ #include "mozilla/dom/WorkerBinding.h" #include "mozilla/DebugOnly.h" #include "mozilla/Preferences.h" -#include "mozilla/Util.h" #include "mozilla/dom/Navigator.h" #include "nsContentUtils.h" #include "nsCycleCollector.h" diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp index e499c2af0db4..793475214b38 100644 --- a/dom/workers/WorkerPrivate.cpp +++ b/dom/workers/WorkerPrivate.cpp @@ -44,7 +44,6 @@ #include "mozilla/dom/MessagePortList.h" #include "mozilla/dom/WorkerBinding.h" #include "mozilla/Preferences.h" -#include "mozilla/Util.h" #include "nsAlgorithm.h" #include "nsContentUtils.h" #include "nsCxPusher.h" diff --git a/editor/libeditor/html/nsEditProperty.cpp b/editor/libeditor/html/nsEditProperty.cpp index 0af7f3e70e01..f92a74ba0918 100644 --- a/editor/libeditor/html/nsEditProperty.cpp +++ b/editor/libeditor/html/nsEditProperty.cpp @@ -3,8 +3,6 @@ * 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/Util.h" - #include "nsMemory.h" #include "nsStaticAtom.h" #include "nsEditProperty.h" diff --git a/editor/libeditor/html/nsHTMLDataTransfer.cpp b/editor/libeditor/html/nsHTMLDataTransfer.cpp index 6cdd13394f33..d32c772562c3 100644 --- a/editor/libeditor/html/nsHTMLDataTransfer.cpp +++ b/editor/libeditor/html/nsHTMLDataTransfer.cpp @@ -7,11 +7,11 @@ #include #include "mozilla/dom/DocumentFragment.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Base64.h" #include "mozilla/BasicEvents.h" #include "mozilla/Preferences.h" #include "mozilla/Selection.h" -#include "mozilla/Util.h" #include "nsAString.h" #include "nsAutoPtr.h" #include "nsCOMArray.h" diff --git a/editor/libeditor/html/nsHTMLEditUtils.cpp b/editor/libeditor/html/nsHTMLEditUtils.cpp index e81de1e6641c..c04e1abea0f6 100644 --- a/editor/libeditor/html/nsHTMLEditUtils.cpp +++ b/editor/libeditor/html/nsHTMLEditUtils.cpp @@ -3,8 +3,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "mozilla/ArrayUtils.h" // for ArrayLength #include "mozilla/Assertions.h" // for MOZ_ASSERT, etc -#include "mozilla/Util.h" // for ArrayLength #include "mozilla/dom/Element.h" // for Element, nsINode #include "nsAString.h" // for nsAString_internal::IsEmpty #include "nsCOMPtr.h" // for nsCOMPtr, operator==, etc diff --git a/editor/libeditor/text/nsPlaintextDataTransfer.cpp b/editor/libeditor/text/nsPlaintextDataTransfer.cpp index 8f5409b0441b..2f3633374723 100644 --- a/editor/libeditor/text/nsPlaintextDataTransfer.cpp +++ b/editor/libeditor/text/nsPlaintextDataTransfer.cpp @@ -3,8 +3,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "mozilla/ArrayUtils.h" #include "mozilla/MouseEvents.h" -#include "mozilla/Util.h" #include "nsAString.h" #include "nsCOMPtr.h" #include "nsCRT.h" diff --git a/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp b/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp index 0ed8801283ed..2b428aea556b 100644 --- a/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp +++ b/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nspr.h" diff --git a/extensions/auth/nsAuthGSSAPI.cpp b/extensions/auth/nsAuthGSSAPI.cpp index acfefd8b3073..a9515ff29108 100644 --- a/extensions/auth/nsAuthGSSAPI.cpp +++ b/extensions/auth/nsAuthGSSAPI.cpp @@ -14,7 +14,7 @@ // // -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "prlink.h" #include "nsCOMPtr.h" diff --git a/extensions/universalchardet/src/base/nsCodingStateMachine.h b/extensions/universalchardet/src/base/nsCodingStateMachine.h index 540ef861b655..5276a2ed004d 100644 --- a/extensions/universalchardet/src/base/nsCodingStateMachine.h +++ b/extensions/universalchardet/src/base/nsCodingStateMachine.h @@ -5,8 +5,9 @@ #ifndef nsCodingStateMachine_h__ #define nsCodingStateMachine_h__ +#include "mozilla/ArrayUtils.h" + #include "nsPkgInt.h" -#include "mozilla/Util.h" typedef enum { eStart = 0, diff --git a/gfx/2d/Blur.cpp b/gfx/2d/Blur.cpp index b183cf7fd4b6..dd18e395a98c 100644 --- a/gfx/2d/Blur.cpp +++ b/gfx/2d/Blur.cpp @@ -12,7 +12,6 @@ #include "mozilla/CheckedInt.h" #include "mozilla/Constants.h" -#include "mozilla/Util.h" #include "2D.h" #include "Tools.h" diff --git a/gfx/gl/GLContextProviderEGL.cpp b/gfx/gl/GLContextProviderEGL.cpp index fa6d1d97535f..2e0d8143486e 100644 --- a/gfx/gl/GLContextProviderEGL.cpp +++ b/gfx/gl/GLContextProviderEGL.cpp @@ -3,8 +3,9 @@ * 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/ArrayUtils.h" + #include "GLContext.h" -#include "mozilla/Util.h" #if defined(XP_UNIX) diff --git a/gfx/gl/GLLibraryLoader.h b/gfx/gl/GLLibraryLoader.h index 00d5a794edaf..0d18a1428d49 100644 --- a/gfx/gl/GLLibraryLoader.h +++ b/gfx/gl/GLLibraryLoader.h @@ -12,7 +12,6 @@ #endif #include "GLDefs.h" -#include "mozilla/Util.h" #include "nscore.h" #include "prlink.h" diff --git a/gfx/ipc/GfxMessageUtils.h b/gfx/ipc/GfxMessageUtils.h index ed42a6276192..9cdd4c008a28 100644 --- a/gfx/ipc/GfxMessageUtils.h +++ b/gfx/ipc/GfxMessageUtils.h @@ -11,7 +11,6 @@ #include "chrome/common/ipc_message_utils.h" #include "ipc/IPCMessageUtils.h" -#include "mozilla/Util.h" #include #include "gfx3DMatrix.h" diff --git a/gfx/layers/CopyableCanvasLayer.h b/gfx/layers/CopyableCanvasLayer.h index 07f7aae9ad7c..c2e0257cf94e 100644 --- a/gfx/layers/CopyableCanvasLayer.h +++ b/gfx/layers/CopyableCanvasLayer.h @@ -22,8 +22,6 @@ #include "nsAutoPtr.h" // for nsRefPtr #include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc -using namespace mozilla::gfx; - namespace mozilla { namespace layers { @@ -49,7 +47,8 @@ protected: Layer* aMaskLayer, gfxContext::GraphicsOperator aOperator = gfxContext::OPERATOR_OVER); - void UpdateSurface(gfxASurface* aDestSurface = nullptr, Layer* aMaskLayer = nullptr); + void UpdateSurface(gfxASurface* aDestSurface = nullptr, + Layer* aMaskLayer = nullptr); nsRefPtr mSurface; nsRefPtr mGLContext; diff --git a/gfx/layers/LayerScope.cpp b/gfx/layers/LayerScope.cpp index 6ebeae9a053b..ca3f32172310 100644 --- a/gfx/layers/LayerScope.cpp +++ b/gfx/layers/LayerScope.cpp @@ -6,8 +6,6 @@ /* This must occur *after* layers/PLayers.h to avoid typedefs conflicts. */ #include "LayerScope.h" -#include "mozilla/Util.h" - #include "Composer2D.h" #include "Effects.h" #include "mozilla/TimeStamp.h" diff --git a/gfx/layers/RotatedBuffer.cpp b/gfx/layers/RotatedBuffer.cpp index 5a4026deeccd..bb041e3b4fff 100644 --- a/gfx/layers/RotatedBuffer.cpp +++ b/gfx/layers/RotatedBuffer.cpp @@ -16,7 +16,7 @@ #include "gfxPlatform.h" // for gfxPlatform #include "gfxPoint.h" // for gfxPoint #include "gfxUtils.h" // for gfxUtils -#include "mozilla/Util.h" // for ArrayLength +#include "mozilla/ArrayUtils.h" // for ArrayLength #include "mozilla/gfx/BasePoint.h" // for BasePoint #include "mozilla/gfx/BaseRect.h" // for BaseRect #include "mozilla/gfx/BaseSize.h" // for BaseSize diff --git a/gfx/layers/basic/BasicCanvasLayer.h b/gfx/layers/basic/BasicCanvasLayer.h index 1d8f3167d2c0..3dd3ae8280b4 100644 --- a/gfx/layers/basic/BasicCanvasLayer.h +++ b/gfx/layers/basic/BasicCanvasLayer.h @@ -14,7 +14,6 @@ #include "nsRegion.h" // for nsIntRegion class gfxContext; -using namespace mozilla::gfx; namespace mozilla { namespace layers { diff --git a/gfx/layers/client/CanvasClient.cpp b/gfx/layers/client/CanvasClient.cpp index 38585e3c54e7..43db6d9de9d6 100644 --- a/gfx/layers/client/CanvasClient.cpp +++ b/gfx/layers/client/CanvasClient.cpp @@ -24,6 +24,7 @@ #include "SharedSurfaceGralloc.h" #endif +using namespace mozilla::gfx; using namespace mozilla::gl; namespace mozilla { diff --git a/gfx/layers/client/ClientCanvasLayer.cpp b/gfx/layers/client/ClientCanvasLayer.cpp index 81f3ed08baa4..a194c54b4c35 100644 --- a/gfx/layers/client/ClientCanvasLayer.cpp +++ b/gfx/layers/client/ClientCanvasLayer.cpp @@ -26,6 +26,7 @@ #include "SharedSurfaceIO.h" #endif +using namespace mozilla::gfx; using namespace mozilla::gl; namespace mozilla { diff --git a/gfx/layers/client/ClientCanvasLayer.h b/gfx/layers/client/ClientCanvasLayer.h index 707a20e1d064..6af3f430fd64 100644 --- a/gfx/layers/client/ClientCanvasLayer.h +++ b/gfx/layers/client/ClientCanvasLayer.h @@ -19,8 +19,6 @@ #include "nsRegion.h" // for nsIntRegion #include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc -using namespace mozilla::gfx; - namespace mozilla { namespace layers { diff --git a/gfx/layers/client/ContentClient.cpp b/gfx/layers/client/ContentClient.cpp index 7ced190f933e..37e09bda0279 100644 --- a/gfx/layers/client/ContentClient.cpp +++ b/gfx/layers/client/ContentClient.cpp @@ -13,7 +13,7 @@ #include "gfxTeeSurface.h" // for gfxTeeSurface #include "gfxUtils.h" // for gfxUtils #include "ipc/ShadowLayers.h" // for ShadowLayerForwarder -#include "mozilla/Util.h" // for ArrayLength +#include "mozilla/ArrayUtils.h" // for ArrayLength #include "mozilla/gfx/2D.h" // for DrawTarget, Factory #include "mozilla/gfx/BasePoint.h" // for BasePoint #include "mozilla/gfx/BaseSize.h" // for BaseSize diff --git a/gfx/layers/d3d10/ThebesLayerD3D10.cpp b/gfx/layers/d3d10/ThebesLayerD3D10.cpp index f6239932fc58..98e0961a9073 100644 --- a/gfx/layers/d3d10/ThebesLayerD3D10.cpp +++ b/gfx/layers/d3d10/ThebesLayerD3D10.cpp @@ -7,7 +7,7 @@ // This must occur *after* layers/PLayerTransaction.h to avoid // typedefs conflicts. -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "ThebesLayerD3D10.h" #include "gfxPlatform.h" diff --git a/gfx/layers/d3d9/ThebesLayerD3D9.cpp b/gfx/layers/d3d9/ThebesLayerD3D9.cpp index 8543fa8f969d..6dbc6752cac4 100644 --- a/gfx/layers/d3d9/ThebesLayerD3D9.cpp +++ b/gfx/layers/d3d9/ThebesLayerD3D9.cpp @@ -7,7 +7,7 @@ // This must occur *after* layers/PLayerTransaction.h to avoid // typedefs conflicts. -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "ipc/AutoOpenSurface.h" diff --git a/gfx/layers/opengl/CompositorOGL.cpp b/gfx/layers/opengl/CompositorOGL.cpp index 416f2bbb9a40..31889957e7c0 100644 --- a/gfx/layers/opengl/CompositorOGL.cpp +++ b/gfx/layers/opengl/CompositorOGL.cpp @@ -23,8 +23,8 @@ #include "gfxPlatform.h" // for gfxPlatform #include "gfxRect.h" // for gfxRect #include "gfxUtils.h" // for NextPowerOfTwo, gfxUtils, etc +#include "mozilla/ArrayUtils.h" // for ArrayLength #include "mozilla/Preferences.h" // for Preferences -#include "mozilla/Util.h" // for ArrayLength #include "mozilla/gfx/BasePoint.h" // for BasePoint #include "mozilla/gfx/Matrix.h" // for Matrix4x4, Matrix #include "mozilla/layers/CompositingRenderTargetOGL.h" diff --git a/gfx/src/nsColor.cpp b/gfx/src/nsColor.cpp index d610fbd80bed..be9e734b709a 100644 --- a/gfx/src/nsColor.cpp +++ b/gfx/src/nsColor.cpp @@ -3,16 +3,15 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" // for ArrayLength +#include "mozilla/mozalloc.h" // for operator delete, etc #include "nsColor.h" #include // for int32_t -#include "mozilla/Util.h" // for ArrayLength -#include "mozilla/mozalloc.h" // for operator delete, etc #include "nsColorNames.h" // for nsColorNames #include "nsDebug.h" // for NS_ASSERTION, etc #include "nsStaticNameTable.h" -#include "nsString.h" // for nsAutoCString, nsString, etc +#include "nsString.h" // for nsAutoCString, nsString, etc #include "nscore.h" // for nsAString, etc using namespace mozilla; diff --git a/gfx/tests/gtest/TestColorNames.cpp b/gfx/tests/gtest/TestColorNames.cpp index 3001e9e072ff..9e620d5bf785 100644 --- a/gfx/tests/gtest/TestColorNames.cpp +++ b/gfx/tests/gtest/TestColorNames.cpp @@ -10,7 +10,7 @@ #include "nsColorNames.h" #include "prprf.h" #include "nsString.h" -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" // define an array of all color names #define GFX_COLOR(_name, _value) #_name, diff --git a/gfx/tests/gtest/gfxTextRunPerfTest.cpp b/gfx/tests/gtest/gfxTextRunPerfTest.cpp index a62690c4411c..18773061ab28 100644 --- a/gfx/tests/gtest/gfxTextRunPerfTest.cpp +++ b/gfx/tests/gtest/gfxTextRunPerfTest.cpp @@ -5,7 +5,7 @@ #include "gtest/gtest.h" -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCOMPtr.h" #include "nsTArray.h" diff --git a/gfx/thebes/gfxCoreTextShaper.cpp b/gfx/thebes/gfxCoreTextShaper.cpp index a266774134a9..4991f4d000c2 100644 --- a/gfx/thebes/gfxCoreTextShaper.cpp +++ b/gfx/thebes/gfxCoreTextShaper.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "gfxCoreTextShaper.h" #include "gfxMacFont.h" #include "gfxFontUtils.h" diff --git a/gfx/thebes/gfxDWriteFontList.cpp b/gfx/thebes/gfxDWriteFontList.cpp index df3f018971a6..6ec89b965063 100644 --- a/gfx/thebes/gfxDWriteFontList.cpp +++ b/gfx/thebes/gfxDWriteFontList.cpp @@ -3,8 +3,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "mozilla/ArrayUtils.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #ifdef MOZ_LOGGING #define FORCE_PR_LOG /* Allow logging in the release build */ diff --git a/gfx/thebes/gfxFT2FontList.cpp b/gfx/thebes/gfxFT2FontList.cpp index d8fee12d2bc3..2d204d6c7abe 100644 --- a/gfx/thebes/gfxFT2FontList.cpp +++ b/gfx/thebes/gfxFT2FontList.cpp @@ -3,8 +3,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "mozilla/ArrayUtils.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #if (MOZ_WIDGET_GTK == 2) #include "gfxPlatformGtk.h" diff --git a/gfx/thebes/gfxFontUtils.cpp b/gfx/thebes/gfxFontUtils.cpp index a3971151e5e0..c4fd5a9c17e3 100644 --- a/gfx/thebes/gfxFontUtils.cpp +++ b/gfx/thebes/gfxFontUtils.cpp @@ -8,7 +8,7 @@ #include "prlog.h" #endif -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "gfxFontUtils.h" diff --git a/gfx/thebes/gfxFontconfigUtils.cpp b/gfx/thebes/gfxFontconfigUtils.cpp index e64c2767ce18..cefa94e56b88 100644 --- a/gfx/thebes/gfxFontconfigUtils.cpp +++ b/gfx/thebes/gfxFontconfigUtils.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "gfxFontconfigUtils.h" #include "gfxFont.h" diff --git a/gfx/thebes/gfxPangoFonts.cpp b/gfx/thebes/gfxPangoFonts.cpp index 94820f132f4a..6573d913fb5f 100644 --- a/gfx/thebes/gfxPangoFonts.cpp +++ b/gfx/thebes/gfxPangoFonts.cpp @@ -3,8 +3,6 @@ * 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/Util.h" - #include "prlink.h" #include "gfxTypes.h" diff --git a/gfx/thebes/gfxWindowsPlatform.cpp b/gfx/thebes/gfxWindowsPlatform.cpp index 1f925ad548fb..85ca86070959 100644 --- a/gfx/thebes/gfxWindowsPlatform.cpp +++ b/gfx/thebes/gfxWindowsPlatform.cpp @@ -4,7 +4,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "gfxWindowsPlatform.h" diff --git a/hal/Hal.cpp b/hal/Hal.cpp index 1673b4509691..4532ac79b964 100644 --- a/hal/Hal.cpp +++ b/hal/Hal.cpp @@ -7,7 +7,6 @@ #include "Hal.h" #include "HalImpl.h" #include "HalSandbox.h" -#include "mozilla/Util.h" #include "nsThreadUtils.h" #include "nsXULAppAPI.h" #include "mozilla/Observer.h" diff --git a/hal/linux/udev.h b/hal/linux/udev.h index 9c29c2905bf0..9f28d95c8274 100644 --- a/hal/linux/udev.h +++ b/hal/linux/udev.h @@ -12,7 +12,7 @@ #include -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" namespace mozilla { diff --git a/image/decoders/icon/nsIconURI.cpp b/image/decoders/icon/nsIconURI.cpp index 1ba45332f8c9..299e1cb23b41 100644 --- a/image/decoders/icon/nsIconURI.cpp +++ b/image/decoders/icon/nsIconURI.cpp @@ -4,7 +4,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsIconURI.h" #include "nsNetUtil.h" diff --git a/image/decoders/icon/win/nsIconChannel.cpp b/image/decoders/icon/win/nsIconChannel.cpp index 7e0595df3ab1..a487dbd89156 100644 --- a/image/decoders/icon/win/nsIconChannel.cpp +++ b/image/decoders/icon/win/nsIconChannel.cpp @@ -4,7 +4,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsIconChannel.h" #include "nsIIconURI.h" diff --git a/image/src/SurfaceCache.cpp b/image/src/SurfaceCache.cpp index d450d32326ca..9ca996fe0e23 100644 --- a/image/src/SurfaceCache.cpp +++ b/image/src/SurfaceCache.cpp @@ -15,7 +15,6 @@ #include "mozilla/Preferences.h" #include "mozilla/RefPtr.h" #include "mozilla/StaticPtr.h" -#include "mozilla/Util.h" // for Maybe #include "gfxASurface.h" #include "gfxPattern.h" // Workaround for flaw in bug 921753 part 2. #include "gfxDrawable.h" diff --git a/intl/locale/src/nsCharsetAlias.cpp b/intl/locale/src/nsCharsetAlias.cpp index 5b8f6a8ad495..e9395528ed62 100644 --- a/intl/locale/src/nsCharsetAlias.cpp +++ b/intl/locale/src/nsCharsetAlias.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCharsetAlias.h" diff --git a/intl/locale/src/os2/nsOS2Charset.cpp b/intl/locale/src/os2/nsOS2Charset.cpp index bf3329f3b3ee..6019456ba208 100644 --- a/intl/locale/src/os2/nsOS2Charset.cpp +++ b/intl/locale/src/os2/nsOS2Charset.cpp @@ -4,7 +4,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsIPlatformCharset.h" #include "nsUConvPropertySearch.h" diff --git a/intl/locale/src/unix/nsUNIXCharset.cpp b/intl/locale/src/unix/nsUNIXCharset.cpp index 656c95bb6121..4086d3bb4131 100644 --- a/intl/locale/src/unix/nsUNIXCharset.cpp +++ b/intl/locale/src/unix/nsUNIXCharset.cpp @@ -5,7 +5,7 @@ #include -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsIPlatformCharset.h" #include "nsUConvPropertySearch.h" diff --git a/intl/locale/src/windows/nsWin32Locale.cpp b/intl/locale/src/windows/nsWin32Locale.cpp index 55fd56bcbb86..1f901460bfed 100644 --- a/intl/locale/src/windows/nsWin32Locale.cpp +++ b/intl/locale/src/windows/nsWin32Locale.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nscore.h" #include "nsString.h" diff --git a/intl/locale/src/windows/nsWinCharset.cpp b/intl/locale/src/windows/nsWinCharset.cpp index 52c45d052009..54888be7525d 100644 --- a/intl/locale/src/windows/nsWinCharset.cpp +++ b/intl/locale/src/windows/nsWinCharset.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsIPlatformCharset.h" #include "nsUConvPropertySearch.h" diff --git a/intl/uconv/idl/nsICharsetConverterManager.idl b/intl/uconv/idl/nsICharsetConverterManager.idl index e42d407a27c9..a39ef5d846e5 100644 --- a/intl/uconv/idl/nsICharsetConverterManager.idl +++ b/intl/uconv/idl/nsICharsetConverterManager.idl @@ -14,7 +14,6 @@ #define NS_ICHARSETCONVERTERMANAGER_CID \ {0x3c1c0163, 0x9bd0, 0x11d3, { 0x9d, 0x9, 0x0, 0x50, 0x4, 0x0, 0x7, 0xb2}} -// XXX change to NS_CHARSETCONVERTERMANAGER_PID #define NS_CHARSETCONVERTERMANAGER_CONTRACTID "@mozilla.org/charset-converter-manager;1" %} diff --git a/intl/unicharutil/util/nsSpecialCasingData.cpp b/intl/unicharutil/util/nsSpecialCasingData.cpp index a60714c14ad8..f822c55e6f69 100644 --- a/intl/unicharutil/util/nsSpecialCasingData.cpp +++ b/intl/unicharutil/util/nsSpecialCasingData.cpp @@ -6,7 +6,7 @@ by genSpecialCasingData.pl - do not edit! */ #include "nsSpecialCasingData.h" -#include "mozilla/Util.h" // for ArrayLength +#include "mozilla/ArrayUtils.h" // for ArrayLength #include // for bsearch /* SpecialCasing-6.1.0.txt */ diff --git a/intl/unicharutil/util/nsUnicodeProperties.cpp b/intl/unicharutil/util/nsUnicodeProperties.cpp index 2d91e3e2d433..e1be052c5690 100644 --- a/intl/unicharutil/util/nsUnicodeProperties.cpp +++ b/intl/unicharutil/util/nsUnicodeProperties.cpp @@ -6,7 +6,7 @@ #include "nsUnicodeProperties.h" #include "nsUnicodePropertyData.cpp" -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCharTraits.h" #define UNICODE_BMP_LIMIT 0x10000 diff --git a/ipc/dbus/DBusThread.cpp b/ipc/dbus/DBusThread.cpp index 86f32ba761c4..346815ad5da1 100644 --- a/ipc/dbus/DBusThread.cpp +++ b/ipc/dbus/DBusThread.cpp @@ -50,7 +50,6 @@ #include "mozilla/NullPtr.h" #include "mozilla/StaticPtr.h" #include "mozilla/Monitor.h" -#include "mozilla/Util.h" #include "mozilla/FileUtils.h" #include "nsThreadUtils.h" #include "nsIThread.h" diff --git a/ipc/glue/IPCMessageUtils.h b/ipc/glue/IPCMessageUtils.h index 1c518eeaaaa7..16ab5e402bc2 100644 --- a/ipc/glue/IPCMessageUtils.h +++ b/ipc/glue/IPCMessageUtils.h @@ -10,11 +10,11 @@ #include "base/process_util.h" #include "chrome/common/ipc_message_utils.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/TimeStamp.h" #ifdef XP_WIN #include "mozilla/TimeStamp_windows.h" #endif -#include "mozilla/Util.h" #include diff --git a/ipc/glue/URIUtils.cpp b/ipc/glue/URIUtils.cpp index 1718821fca21..d90c63a76398 100644 --- a/ipc/glue/URIUtils.cpp +++ b/ipc/glue/URIUtils.cpp @@ -6,8 +6,8 @@ #include "nsIIPCSerializableURI.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Assertions.h" -#include "mozilla/Util.h" #include "nsComponentManagerUtils.h" #include "nsDebug.h" #include "nsID.h" diff --git a/ipc/testshell/TestShellParent.cpp b/ipc/testshell/TestShellParent.cpp index 48a31c650c80..01feecc53c0b 100644 --- a/ipc/testshell/TestShellParent.cpp +++ b/ipc/testshell/TestShellParent.cpp @@ -5,7 +5,7 @@ #include "TestShellParent.h" /* This must occur *after* TestShellParent.h to avoid typedefs conflicts. */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/dom/ContentParent.h" diff --git a/ipc/unixsocket/UnixSocket.cpp b/ipc/unixsocket/UnixSocket.cpp index f352c18a1102..9a67b03f2032 100644 --- a/ipc/unixsocket/UnixSocket.cpp +++ b/ipc/unixsocket/UnixSocket.cpp @@ -17,7 +17,6 @@ #include "base/message_loop.h" #include "mozilla/Monitor.h" -#include "mozilla/Util.h" #include "mozilla/FileUtils.h" #include "nsString.h" #include "nsThreadUtils.h" diff --git a/js/src/builtin/Object.cpp b/js/src/builtin/Object.cpp index 8994108f0bf9..c77625685982 100644 --- a/js/src/builtin/Object.cpp +++ b/js/src/builtin/Object.cpp @@ -6,7 +6,7 @@ #include "builtin/Object.h" -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "jscntxt.h" diff --git a/js/src/gc/RootMarking.cpp b/js/src/gc/RootMarking.cpp index 0f7ba5f44434..3865d02c750e 100644 --- a/js/src/gc/RootMarking.cpp +++ b/js/src/gc/RootMarking.cpp @@ -4,7 +4,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #ifdef MOZ_VALGRIND # include diff --git a/js/src/gc/Zone.h b/js/src/gc/Zone.h index e14eea162764..ebad06d0b6c9 100644 --- a/js/src/gc/Zone.h +++ b/js/src/gc/Zone.h @@ -9,7 +9,6 @@ #include "mozilla/Atomics.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #include "jscntxt.h" #include "jsgc.h" diff --git a/js/src/jit/AsmJS.cpp b/js/src/jit/AsmJS.cpp index 4f21e60dba63..00a358359820 100644 --- a/js/src/jit/AsmJS.cpp +++ b/js/src/jit/AsmJS.cpp @@ -5598,12 +5598,7 @@ GenerateEntry(ModuleCompiler &m, const AsmJSModule::ExportedFunction &exportedFu masm.load32(src, iter->gpr()); break; case ABIArg::FPU: -#if defined(JS_CPU_ARM) and !defined(JS_CPU_ARM_HARDFP) - masm.ma_dataTransferN(IsLoad, 64, true, argv, Imm32(argOffset), - Register::FromCode(iter->fpu().code()*2)); -#else masm.loadDouble(src, iter->fpu()); -#endif break; case ABIArg::Stack: if (iter.mirType() == MIRType_Int32) { @@ -5635,9 +5630,6 @@ GenerateEntry(ModuleCompiler &m, const AsmJSModule::ExportedFunction &exportedFu masm.storeValue(JSVAL_TYPE_INT32, ReturnReg, Address(argv, 0)); break; case RetType::Double: -#if defined(JS_CPU_ARM) and !defined(JS_CPU_ARM_HARDFP) - masm.ma_vxfer(r0, r1, d0); -#endif masm.canonicalizeDouble(ReturnFloatReg); masm.storeDouble(ReturnFloatReg, Address(argv, 0)); break; @@ -5770,11 +5762,6 @@ FillArgumentArray(ModuleCompiler &m, const VarTypeVector &argTypes, masm.storeValue(JSVAL_TYPE_INT32, i->gpr(), dstAddr); break; case ABIArg::FPU: { -#if defined(JS_CPU_ARM) && !defined(JS_CPU_ARM_HARDFP) - FloatRegister fr = i->fpu(); - int srcId = fr.code() * 2; - masm.ma_vxfer(Register::FromCode(srcId), Register::FromCode(srcId+1), fr); -#endif masm.canonicalizeDouble(i->fpu()); masm.storeDouble(i->fpu(), dstAddr); break; @@ -5935,11 +5922,7 @@ GenerateFFIInterpreterExit(ModuleCompiler &m, const ModuleCompiler::ExitDescript case RetType::Double: masm.call(AsmJSImm_InvokeFromAsmJS_ToNumber); masm.branchTest32(Assembler::Zero, ReturnReg, ReturnReg, throwLabel); -#if defined(JS_CPU_ARM) && !defined(JS_CPU_ARM_HARDFP) - masm.loadValue(argv, softfpReturnOperand); -#else masm.loadDouble(argv, ReturnFloatReg); -#endif break; } @@ -6005,11 +5988,7 @@ GenerateOOLConvert(ModuleCompiler &m, RetType retType, Label *throwLabel) case RetType::Double: masm.call(AsmJSImm_CoerceInPlace_ToNumber); masm.branchTest32(Assembler::Zero, ReturnReg, ReturnReg, throwLabel); -#if defined(JS_CPU_ARM) && !defined(JS_CPU_ARM_HARDFP) - masm.loadValue(Address(StackPointer, offsetToArgv), softfpReturnOperand); -#else masm.loadDouble(Address(StackPointer, offsetToArgv), ReturnFloatReg); -#endif break; default: MOZ_ASSUME_UNREACHABLE("Unsupported convert type"); @@ -6148,9 +6127,6 @@ GenerateFFIIonExit(ModuleCompiler &m, const ModuleCompiler::ExitDescriptor &exit break; case RetType::Double: masm.convertValueToDouble(JSReturnOperand, ReturnFloatReg, &oolConvert); -#if defined(JS_CPU_ARM) && !defined(JS_CPU_ARM_HARDFP) - masm.boxDouble(ReturnFloatReg, softfpReturnOperand); -#endif break; } diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp index 9e791cb7d867..17f7263ec92b 100644 --- a/js/src/jit/CodeGenerator.cpp +++ b/js/src/jit/CodeGenerator.cpp @@ -7685,12 +7685,14 @@ CodeGenerator::visitAsmJSCall(LAsmJSCall *ins) MAsmJSCall *mir = ins->mir(); #if defined(JS_CPU_ARM) && !defined(JS_CPU_ARM_HARDFP) - for (unsigned i = 0, e = ins->numOperands(); i < e; i++) { - LAllocation *a = ins->getOperand(i); - if (a->isFloatReg()) { - FloatRegister fr = ToFloatRegister(a); - int srcId = fr.code() * 2; - masm.ma_vxfer(fr, Register::FromCode(srcId), Register::FromCode(srcId+1)); + if (mir->callee().which() == MAsmJSCall::Callee::Builtin) { + for (unsigned i = 0, e = ins->numOperands(); i < e; i++) { + LAllocation *a = ins->getOperand(i); + if (a->isFloatReg()) { + FloatRegister fr = ToFloatRegister(a); + int srcId = fr.code() * 2; + masm.ma_vxfer(fr, Register::FromCode(srcId), Register::FromCode(srcId+1)); + } } } #endif @@ -7730,16 +7732,6 @@ CodeGenerator::visitAsmJSCall(LAsmJSCall *ins) bool CodeGenerator::visitAsmJSParameter(LAsmJSParameter *lir) { -#if defined(JS_CPU_ARM) && !defined(JS_CPU_ARM_HARDFP) - // softfp transfers some double values in gprs. - // undo this. - LAllocation *a = lir->getDef(0)->output(); - if (a->isFloatReg()) { - FloatRegister fr = ToFloatRegister(a); - int srcId = fr.code() * 2; - masm.ma_vxfer(Register::FromCode(srcId), Register::FromCode(srcId+1), fr); - } -#endif return true; } @@ -7747,10 +7739,6 @@ bool CodeGenerator::visitAsmJSReturn(LAsmJSReturn *lir) { // Don't emit a jump to the return label if this is the last block. -#if defined(JS_CPU_ARM) && !defined(JS_CPU_ARM_HARDFP) - if (lir->getOperand(0)->isFloatReg()) - masm.ma_vxfer(d0, r0, r1); -#endif if (current->mir() != *gen->graph().poBegin()) masm.jump(&returnLabel_); return true; diff --git a/js/src/jit/arm/Assembler-arm.cpp b/js/src/jit/arm/Assembler-arm.cpp index c5c56de49089..a44225a13097 100644 --- a/js/src/jit/arm/Assembler-arm.cpp +++ b/js/src/jit/arm/Assembler-arm.cpp @@ -22,13 +22,11 @@ using namespace js::jit; using mozilla::CountLeadingZeroes32; +// Note this is used for inter-AsmJS calls and may pass arguments and results +// in floating point registers even if the system ABI does not. ABIArgGenerator::ABIArgGenerator() : -#if defined(JS_CPU_ARM_HARDFP) intRegIndex_(0), floatRegIndex_(0), -#else - argRegIndex_(0), -#endif stackOffset_(0), current_() {} @@ -36,7 +34,6 @@ ABIArgGenerator::ABIArgGenerator() : ABIArg ABIArgGenerator::next(MIRType type) { -#if defined(JS_CPU_ARM_HARDFP) switch (type) { case MIRType_Int32: case MIRType_Pointer: @@ -62,40 +59,8 @@ ABIArgGenerator::next(MIRType type) default: MOZ_ASSUME_UNREACHABLE("Unexpected argument type"); } - return current_; -#else - switch (type) { - case MIRType_Int32: - case MIRType_Pointer: - if (argRegIndex_ == NumIntArgRegs) { - current_ = ABIArg(stackOffset_); - stackOffset_ += sizeof(uint32_t); - break; - } - current_ = ABIArg(Register::FromCode(argRegIndex_)); - argRegIndex_++; - break; - case MIRType_Double: { - unsigned alignedArgRegIndex_ = (argRegIndex_ + 1) & ~1; - if (alignedArgRegIndex_ + 1 > NumIntArgRegs) { - static const int align = sizeof(double) - 1; - stackOffset_ = (stackOffset_ + align) & ~align; - current_ = ABIArg(stackOffset_); - stackOffset_ += sizeof(uint64_t); - argRegIndex_ = NumIntArgRegs; - break; - } - argRegIndex_ = alignedArgRegIndex_; - current_ = ABIArg(FloatRegister::FromCode(argRegIndex_ >> 1)); - argRegIndex_+=2; - } - break; - default: - MOZ_ASSUME_UNREACHABLE("Unexpected argument type"); - } return current_; -#endif } const Register ABIArgGenerator::NonArgReturnVolatileReg0 = r4; const Register ABIArgGenerator::NonArgReturnVolatileReg1 = r5; diff --git a/js/src/jit/arm/Assembler-arm.h b/js/src/jit/arm/Assembler-arm.h index 11ad7f75053b..d79090039704 100644 --- a/js/src/jit/arm/Assembler-arm.h +++ b/js/src/jit/arm/Assembler-arm.h @@ -7,9 +7,9 @@ #ifndef jit_arm_Assembler_arm_h #define jit_arm_Assembler_arm_h +#include "mozilla/ArrayUtils.h" #include "mozilla/Attributes.h" #include "mozilla/MathAlgorithms.h" -#include "mozilla/Util.h" #include "assembler/assembler/AssemblerBufferWithConstantPool.h" #include "jit/arm/Architecture-arm.h" @@ -68,12 +68,8 @@ static const uint32_t NumCallTempNonArgRegs = mozilla::ArrayLength(CallTempNonArgRegs); class ABIArgGenerator { -#if defined(JS_CPU_ARM_HARDFP) unsigned intRegIndex_; unsigned floatRegIndex_; -#else - unsigned argRegIndex_; -#endif uint32_t stackOffset_; ABIArg current_; diff --git a/js/src/jit/arm/CodeGenerator-arm.h b/js/src/jit/arm/CodeGenerator-arm.h index 712cafbfd1b9..e9f431010169 100644 --- a/js/src/jit/arm/CodeGenerator-arm.h +++ b/js/src/jit/arm/CodeGenerator-arm.h @@ -177,11 +177,12 @@ class CodeGeneratorARM : public CodeGeneratorShared protected: void postAsmJSCall(LAsmJSCall *lir) { #if !defined(JS_CPU_ARM_HARDFP) - if (lir->mir()->type() == MIRType_Double) { - masm.ma_vxfer(r0, r1, d0); + if (lir->mir()->callee().which() == MAsmJSCall::Callee::Builtin) { + if (lir->mir()->type() == MIRType_Double) + masm.ma_vxfer(r0, r1, d0); } #endif -} + } bool visitEffectiveAddress(LEffectiveAddress *ins); bool visitUDiv(LUDiv *ins); diff --git a/js/src/jit/x64/Assembler-x64.h b/js/src/jit/x64/Assembler-x64.h index aadcc2f7efca..ca4c6161e1d3 100644 --- a/js/src/jit/x64/Assembler-x64.h +++ b/js/src/jit/x64/Assembler-x64.h @@ -7,7 +7,7 @@ #ifndef jit_x64_Assembler_x64_h #define jit_x64_Assembler_x64_h -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "jit/IonCode.h" #include "jit/shared/Assembler-shared.h" diff --git a/js/src/jit/x86/Assembler-x86.h b/js/src/jit/x86/Assembler-x86.h index f68303e176df..302f76bcd3b7 100644 --- a/js/src/jit/x86/Assembler-x86.h +++ b/js/src/jit/x86/Assembler-x86.h @@ -7,7 +7,7 @@ #ifndef jit_x86_Assembler_x86_h #define jit_x86_Assembler_x86_h -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "assembler/assembler/X86Assembler.h" #include "jit/CompactBuffer.h" diff --git a/js/src/jsapi-tests/testExternalStrings.cpp b/js/src/jsapi-tests/testExternalStrings.cpp index f5cafcbff6ad..a6205abc13e8 100644 --- a/js/src/jsapi-tests/testExternalStrings.cpp +++ b/js/src/jsapi-tests/testExternalStrings.cpp @@ -2,8 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "mozilla/ArrayUtils.h" #include "mozilla/PodOperations.h" -#include "mozilla/Util.h" #include "jsapi-tests/tests.h" diff --git a/js/src/jsarray.cpp b/js/src/jsarray.cpp index ef3703fd66f5..4ea544ab402b 100644 --- a/js/src/jsarray.cpp +++ b/js/src/jsarray.cpp @@ -6,10 +6,10 @@ #include "jsarray.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/DebugOnly.h" #include "mozilla/FloatingPoint.h" #include "mozilla/MathAlgorithms.h" -#include "mozilla/Util.h" #include "jsapi.h" #include "jsatom.h" diff --git a/js/src/jsatom.cpp b/js/src/jsatom.cpp index 189683a1b63c..2f6ae88f1f0d 100644 --- a/js/src/jsatom.cpp +++ b/js/src/jsatom.cpp @@ -10,8 +10,8 @@ #include "jsatominlines.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/RangedPtr.h" -#include "mozilla/Util.h" #include diff --git a/js/src/jscntxt.cpp b/js/src/jscntxt.cpp index a3e5200d300c..18b1b10c2380 100644 --- a/js/src/jscntxt.cpp +++ b/js/src/jscntxt.cpp @@ -10,9 +10,9 @@ #include "jscntxtinlines.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/DebugOnly.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #include #include diff --git a/js/src/jsdate.cpp b/js/src/jsdate.cpp index 02cf4e71339e..dd5769215049 100644 --- a/js/src/jsdate.cpp +++ b/js/src/jsdate.cpp @@ -17,8 +17,8 @@ #include "jsdate.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/FloatingPoint.h" -#include "mozilla/Util.h" #include #include diff --git a/js/src/jsexn.cpp b/js/src/jsexn.cpp index e6846784f5a0..fbe7bafebac3 100644 --- a/js/src/jsexn.cpp +++ b/js/src/jsexn.cpp @@ -10,8 +10,8 @@ #include "jsexn.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/PodOperations.h" -#include "mozilla/Util.h" #include diff --git a/js/src/jsfun.cpp b/js/src/jsfun.cpp index 868a5c5d95f2..672fd8aaa82e 100644 --- a/js/src/jsfun.cpp +++ b/js/src/jsfun.cpp @@ -10,8 +10,8 @@ #include "jsfuninlines.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/PodOperations.h" -#include "mozilla/Util.h" #include diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp index f6fc70878a64..70f6fa2a332a 100644 --- a/js/src/jsgc.cpp +++ b/js/src/jsgc.cpp @@ -173,10 +173,10 @@ #include "jsgcinlines.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/DebugOnly.h" #include "mozilla/MemoryReporting.h" #include "mozilla/Move.h" -#include "mozilla/Util.h" #include /* for memset used when DEBUG */ #ifndef XP_WIN diff --git a/js/src/jsiter.cpp b/js/src/jsiter.cpp index ce607bdb09e4..d43ef0390039 100644 --- a/js/src/jsiter.cpp +++ b/js/src/jsiter.cpp @@ -8,9 +8,9 @@ #include "jsiter.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/MemoryReporting.h" #include "mozilla/PodOperations.h" -#include "mozilla/Util.h" #include "jsarray.h" #include "jsatom.h" diff --git a/js/src/jsobj.cpp b/js/src/jsobj.cpp index ec08b2aa086e..51ab674ec9b8 100644 --- a/js/src/jsobj.cpp +++ b/js/src/jsobj.cpp @@ -10,10 +10,10 @@ #include "jsobjinlines.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/MathAlgorithms.h" #include "mozilla/MemoryReporting.h" #include "mozilla/TemplateLib.h" -#include "mozilla/Util.h" #include diff --git a/js/src/jsopcode.cpp b/js/src/jsopcode.cpp index d7d64ded74a2..7c5a81519018 100644 --- a/js/src/jsopcode.cpp +++ b/js/src/jsopcode.cpp @@ -10,8 +10,6 @@ #include "jsopcodeinlines.h" -#include "mozilla/Util.h" - #include #include #include @@ -49,7 +47,6 @@ using namespace js; using namespace js::gc; using js::frontend::IsIdentifier; -using mozilla::ArrayLength; /* * Index limit must stay within 32 bits. @@ -1464,7 +1461,7 @@ js::GetBlockChainAtPC(JSScript *script, jsbytecode *pc) while (check >= bottom) { const BlockScopeNote *checkNote = &blockScopes->vector[check]; JS_ASSERT(checkNote->start <= offset); - if (offset <= checkNote->start + checkNote->length) { + if (offset < checkNote->start + checkNote->length) { // We found a matching block chain but there may be inner ones // at a higher block chain index than mid. Continue the binary search. blockChain = &script->getObject(checkNote->index)->as(); diff --git a/js/src/jsreflect.cpp b/js/src/jsreflect.cpp index 0350fd26eceb..1c735b85f9c0 100644 --- a/js/src/jsreflect.cpp +++ b/js/src/jsreflect.cpp @@ -8,8 +8,8 @@ #include "jsreflect.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/DebugOnly.h" -#include "mozilla/Util.h" #include diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp index c3abf95a9408..bfc2548b54c8 100644 --- a/js/src/shell/js.cpp +++ b/js/src/shell/js.cpp @@ -5,11 +5,11 @@ /* JS shell. */ +#include "mozilla/ArrayUtils.h" #include "mozilla/Atomics.h" #include "mozilla/DebugOnly.h" #include "mozilla/GuardObjects.h" #include "mozilla/PodOperations.h" -#include "mozilla/Util.h" #ifdef XP_WIN # include diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp index c426d29fa0d2..f7ad7777f72c 100644 --- a/js/src/vm/Debugger.cpp +++ b/js/src/vm/Debugger.cpp @@ -398,14 +398,14 @@ Debugger::Debugger(JSContext *cx, JSObject *dbg) Debugger::~Debugger() { - JS_ASSERT(debuggees.empty()); - - /* This always happens in the GC thread, so no locking is required. */ - JS_ASSERT(object->runtimeFromMainThread()->isHeapBusy()); + JS_ASSERT_IF(debuggees.initialized(), debuggees.empty()); /* * Since the inactive state for this link is a singleton cycle, it's always * safe to apply JS_REMOVE_LINK to it, regardless of whether we're in the list or not. + * + * We don't have to worry about locking here since Debugger is not + * background finalized. */ JS_REMOVE_LINK(&onNewGlobalObjectWatchersLink); } @@ -1684,7 +1684,6 @@ Debugger::finalize(FreeOp *fop, JSObject *obj) Debugger *dbg = fromJSObject(obj); if (!dbg) return; - JS_ASSERT(dbg->debuggees.empty()); fop->delete_(dbg); } @@ -2127,14 +2126,16 @@ Debugger::construct(JSContext *cx, unsigned argc, Value *vp) for (unsigned slot = JSSLOT_DEBUG_PROTO_START; slot < JSSLOT_DEBUG_PROTO_STOP; slot++) obj->setReservedSlot(slot, proto->getReservedSlot(slot)); + /* Construct the underlying C++ object. */ Debugger *dbg = cx->new_(cx, obj.get()); if (!dbg) return false; - obj->setPrivate(dbg); if (!dbg->init(cx)) { js_delete(dbg); return false; } + obj->setPrivate(dbg); + /* Now the JSObject owns the js::Debugger instance, so we needn't delete it. */ /* Add the initial debuggees, if any. */ for (unsigned i = 0; i < argc; i++) { diff --git a/js/src/vm/Runtime.cpp b/js/src/vm/Runtime.cpp index b6ec193d9155..d9e57b8cfb26 100644 --- a/js/src/vm/Runtime.cpp +++ b/js/src/vm/Runtime.cpp @@ -6,11 +6,11 @@ #include "vm/Runtime-inl.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Atomics.h" #include "mozilla/DebugOnly.h" #include "mozilla/MemoryReporting.h" #include "mozilla/ThreadLocal.h" -#include "mozilla/Util.h" #include #include diff --git a/js/xpconnect/shell/xpcshell.cpp b/js/xpconnect/shell/xpcshell.cpp index 1fac33fe90b5..31effe323cb0 100644 --- a/js/xpconnect/shell/xpcshell.cpp +++ b/js/xpconnect/shell/xpcshell.cpp @@ -9,7 +9,6 @@ #include -#include "mozilla/Util.h" #include "mozilla/WindowsDllBlocklist.h" #include "nsXULAppAPI.h" diff --git a/js/xpconnect/src/XPCConvert.cpp b/js/xpconnect/src/XPCConvert.cpp index 755fe87f934b..036a4295187a 100644 --- a/js/xpconnect/src/XPCConvert.cpp +++ b/js/xpconnect/src/XPCConvert.cpp @@ -7,7 +7,7 @@ /* Data conversion between native and JavaScript types. */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "xpcprivate.h" #include "nsIAtom.h" diff --git a/js/xpconnect/src/xpcprivate.h b/js/xpconnect/src/xpcprivate.h index 81fb18097306..cb43fa26c53f 100644 --- a/js/xpconnect/src/xpcprivate.h +++ b/js/xpconnect/src/xpcprivate.h @@ -81,7 +81,6 @@ #include "mozilla/CycleCollectedJSRuntime.h" #include "mozilla/GuardObjects.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #include #include diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 4474721c8ef1..b39d789db9ac 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -6,9 +6,9 @@ #include "nsLayoutUtils.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/BasicEvents.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #include "nsPresContext.h" #include "nsIContent.h" #include "nsIDOMHTMLDocument.h" diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index ce85e8cdb103..79bd1f451038 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -23,13 +23,13 @@ #endif #include "prlog.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/MemoryReporting.h" #include "mozilla/dom/TabChild.h" #include "mozilla/Likely.h" #include "mozilla/MouseEvents.h" #include "mozilla/TextEvents.h" #include "mozilla/TouchEvents.h" -#include "mozilla/Util.h" #include #ifdef XP_WIN diff --git a/layout/base/nsRefreshDriver.cpp b/layout/base/nsRefreshDriver.cpp index b07041128e3f..77e5047d65b5 100644 --- a/layout/base/nsRefreshDriver.cpp +++ b/layout/base/nsRefreshDriver.cpp @@ -25,7 +25,7 @@ #include "WinUtils.h" #endif -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/AutoRestore.h" #include "nsRefreshDriver.h" #include "nsITimer.h" diff --git a/layout/generic/MathVariantTextRunFactory.cpp b/layout/generic/MathVariantTextRunFactory.cpp index 211e9debe97f..70866775364f 100644 --- a/layout/generic/MathVariantTextRunFactory.cpp +++ b/layout/generic/MathVariantTextRunFactory.cpp @@ -4,10 +4,12 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "MathVariantTextRunFactory.h" + +#include "mozilla/ArrayUtils.h" + #include "nsStyleConsts.h" #include "nsStyleContext.h" #include "nsTextFrameUtils.h" -#include "mozilla/Util.h" using namespace mozilla; diff --git a/layout/generic/TextOverflow.cpp b/layout/generic/TextOverflow.cpp index ddb43c15cccd..db1eae28bf9e 100644 --- a/layout/generic/TextOverflow.cpp +++ b/layout/generic/TextOverflow.cpp @@ -20,7 +20,7 @@ #include "nsRenderingContext.h" #include "nsTextFrame.h" #include "nsIFrameInlines.h" -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Likely.h" namespace mozilla { diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index 7bd33bf37747..4a59b02484f8 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -12,7 +12,6 @@ #include "nsBlockFrame.h" #include "mozilla/DebugOnly.h" -#include "mozilla/Util.h" #include "nsCOMPtr.h" #include "nsAbsoluteContainingBlock.h" diff --git a/layout/generic/nsLineLayout.cpp b/layout/generic/nsLineLayout.cpp index 448fcea83ccc..630e5b738e06 100644 --- a/layout/generic/nsLineLayout.cpp +++ b/layout/generic/nsLineLayout.cpp @@ -10,7 +10,6 @@ #define PL_ARENA_CONST_ALIGN_MASK (sizeof(void*)-1) #include "nsLineLayout.h" -#include "mozilla/Util.h" #include "nsBlockFrame.h" #include "nsStyleConsts.h" #include "nsContainerFrame.h" diff --git a/layout/inspector/inDOMView.cpp b/layout/inspector/inDOMView.cpp index f8bc32bbbe65..26c19d7f8618 100644 --- a/layout/inspector/inDOMView.cpp +++ b/layout/inspector/inDOMView.cpp @@ -3,8 +3,6 @@ * 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/Util.h" - #include "inDOMView.h" #include "inIDOMUtils.h" diff --git a/layout/style/Declaration.cpp b/layout/style/Declaration.cpp index ab5a087eec7f..7de437af96d1 100644 --- a/layout/style/Declaration.cpp +++ b/layout/style/Declaration.cpp @@ -8,8 +8,8 @@ * stylesheet */ +#include "mozilla/ArrayUtils.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #include "mozilla/css/Declaration.h" #include "nsPrintfCString.h" diff --git a/layout/style/Loader.cpp b/layout/style/Loader.cpp index 7ba2f2c585ed..21a9b3b0f72c 100644 --- a/layout/style/Loader.cpp +++ b/layout/style/Loader.cpp @@ -16,8 +16,8 @@ /* loading of CSS style sheets using the network APIs */ +#include "mozilla/ArrayUtils.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #include "mozilla/css/Loader.h" #include "nsIRunnable.h" diff --git a/layout/style/nsCSSAnonBoxes.cpp b/layout/style/nsCSSAnonBoxes.cpp index a5aa44573d21..3585c9e38d00 100644 --- a/layout/style/nsCSSAnonBoxes.cpp +++ b/layout/style/nsCSSAnonBoxes.cpp @@ -5,7 +5,7 @@ /* atom list for CSS anonymous boxes */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCSSAnonBoxes.h" #include "nsAtomListUtils.h" diff --git a/layout/style/nsCSSPropertySet.h b/layout/style/nsCSSPropertySet.h index 9d82cf0e121d..6416df61e3bf 100644 --- a/layout/style/nsCSSPropertySet.h +++ b/layout/style/nsCSSPropertySet.h @@ -7,7 +7,7 @@ #ifndef nsCSSPropertySet_h__ #define nsCSSPropertySet_h__ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCSSProperty.h" #include // for CHAR_BIT diff --git a/layout/style/nsCSSProps.cpp b/layout/style/nsCSSProps.cpp index 44297ded280c..ab50591c83f9 100644 --- a/layout/style/nsCSSProps.cpp +++ b/layout/style/nsCSSProps.cpp @@ -8,7 +8,7 @@ * values they accept */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCSSProps.h" #include "nsCSSKeywords.h" diff --git a/layout/style/nsCSSPseudoClasses.cpp b/layout/style/nsCSSPseudoClasses.cpp index 77974b43c97c..0ed91b9805e2 100644 --- a/layout/style/nsCSSPseudoClasses.cpp +++ b/layout/style/nsCSSPseudoClasses.cpp @@ -5,7 +5,7 @@ /* atom list for CSS pseudo-classes */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCSSPseudoClasses.h" #include "nsStaticAtom.h" diff --git a/layout/style/nsCSSPseudoElements.cpp b/layout/style/nsCSSPseudoElements.cpp index ef4d86c6adfe..42e3d463d49a 100644 --- a/layout/style/nsCSSPseudoElements.cpp +++ b/layout/style/nsCSSPseudoElements.cpp @@ -5,7 +5,7 @@ /* atom list for CSS pseudo-elements */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCSSPseudoElements.h" #include "nsAtomListUtils.h" diff --git a/layout/style/nsCSSRuleProcessor.cpp b/layout/style/nsCSSRuleProcessor.cpp index 4eee802e4e0f..339cd4ef3b9c 100644 --- a/layout/style/nsCSSRuleProcessor.cpp +++ b/layout/style/nsCSSRuleProcessor.cpp @@ -48,10 +48,10 @@ #include "nsStyleSet.h" #include "mozilla/dom/Element.h" #include "nsNthIndexCache.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Preferences.h" #include "mozilla/LookAndFeel.h" #include "mozilla/Likely.h" -#include "mozilla/Util.h" using namespace mozilla; using namespace mozilla::dom; diff --git a/layout/style/nsCSSScanner.cpp b/layout/style/nsCSSScanner.cpp index 35c369d60e62..88eb1d7abcd4 100644 --- a/layout/style/nsCSSScanner.cpp +++ b/layout/style/nsCSSScanner.cpp @@ -9,13 +9,11 @@ #include "nsCSSScanner.h" #include "nsStyleUtil.h" #include "nsTraceRefcnt.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/css/ErrorReporter.h" #include "mozilla/Likely.h" -#include "mozilla/Util.h" #include -using mozilla::ArrayLength; - /* Character class tables and related helper functions. */ static const uint8_t IS_HEX_DIGIT = 0x01; diff --git a/layout/style/nsComputedDOMStyle.cpp b/layout/style/nsComputedDOMStyle.cpp index 224d391990b4..90c18554de71 100644 --- a/layout/style/nsComputedDOMStyle.cpp +++ b/layout/style/nsComputedDOMStyle.cpp @@ -8,8 +8,8 @@ #include "nsComputedDOMStyle.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Preferences.h" -#include "mozilla/Util.h" #include "nsError.h" #include "nsDOMString.h" diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp index bdd7b4745949..226c92873d2d 100644 --- a/layout/style/nsRuleNode.cpp +++ b/layout/style/nsRuleNode.cpp @@ -11,11 +11,11 @@ #include +#include "mozilla/ArrayUtils.h" #include "mozilla/Assertions.h" #include "mozilla/DebugOnly.h" #include "mozilla/Likely.h" #include "mozilla/LookAndFeel.h" -#include "mozilla/Util.h" #include "nsRuleNode.h" #include "nscore.h" diff --git a/layout/style/nsStyleAnimation.cpp b/layout/style/nsStyleAnimation.cpp index 8200cf4514c4..20245acacb14 100644 --- a/layout/style/nsStyleAnimation.cpp +++ b/layout/style/nsStyleAnimation.cpp @@ -5,8 +5,8 @@ /* Utilities for animation of computed style values */ +#include "mozilla/ArrayUtils.h" #include "mozilla/MathAlgorithms.h" -#include "mozilla/Util.h" #include "nsStyleAnimation.h" #include "nsStyleTransformMatrix.h" diff --git a/layout/style/nsStyleSet.cpp b/layout/style/nsStyleSet.cpp index 6e9e46718718..53ac54149f97 100644 --- a/layout/style/nsStyleSet.cpp +++ b/layout/style/nsStyleSet.cpp @@ -9,8 +9,8 @@ * potentially re-creating) style contexts */ +#include "mozilla/ArrayUtils.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #include "nsStyleSet.h" #include "nsCSSStyleSheet.h" diff --git a/media/webrtc/signaling/src/sipcc/core/includes/ccapi.h b/media/webrtc/signaling/src/sipcc/core/includes/ccapi.h index aecd96d0b902..937e41f1cae2 100755 --- a/media/webrtc/signaling/src/sipcc/core/includes/ccapi.h +++ b/media/webrtc/signaling/src/sipcc/core/includes/ccapi.h @@ -5,8 +5,8 @@ #ifndef _CCAPI_H_ #define _CCAPI_H_ +#include "mozilla/ArrayUtils.h" #include "mozilla/Assertions.h" -#include "mozilla/Util.h" #if defined(__cplusplus) && __cplusplus >= 201103L typedef struct Timecard Timecard; diff --git a/memory/mozalloc/throw_gcc.h b/memory/mozalloc/throw_gcc.h index 65a96abec362..2c04dd24343b 100644 --- a/memory/mozalloc/throw_gcc.h +++ b/memory/mozalloc/throw_gcc.h @@ -9,7 +9,6 @@ #define mozilla_throw_gcc_h #include "mozilla/Attributes.h" -#include "mozilla/Util.h" #include // snprintf #include // strerror diff --git a/mfbt/Util.h b/mfbt/ArrayUtils.h similarity index 89% rename from mfbt/Util.h rename to mfbt/ArrayUtils.h index 55189bfa2afa..e2226bf59ded 100644 --- a/mfbt/Util.h +++ b/mfbt/ArrayUtils.h @@ -5,20 +5,19 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* - * Miscellaneous uncategorized functionality. Please add new functionality to - * new headers, or to other appropriate existing headers, not here. + * Implements various helper functions related to arrays. */ -#ifndef mozilla_Util_h -#define mozilla_Util_h +#ifndef mozilla_ArrayUtils_h +#define mozilla_ArrayUtils_h #include "mozilla/Assertions.h" #include "mozilla/Attributes.h" -#include "mozilla/Types.h" + +#include #ifdef __cplusplus -#include "mozilla/Alignment.h" #include "mozilla/Array.h" namespace mozilla { @@ -98,4 +97,4 @@ ArrayEnd(const Array& arr) # define MOZ_ARRAY_LENGTH(array) (sizeof(array)/sizeof((array)[0])) #endif -#endif /* mozilla_Util_h */ +#endif /* mozilla_ArrayUtils_h */ diff --git a/mfbt/BloomFilter.h b/mfbt/BloomFilter.h index afe4b72b8090..8129c489d4c6 100644 --- a/mfbt/BloomFilter.h +++ b/mfbt/BloomFilter.h @@ -16,7 +16,6 @@ #include "mozilla/Assertions.h" #include "mozilla/Likely.h" -#include "mozilla/Util.h" #include #include diff --git a/mfbt/PodOperations.h b/mfbt/PodOperations.h index 4832c0fd717c..adbf2e699d61 100644 --- a/mfbt/PodOperations.h +++ b/mfbt/PodOperations.h @@ -16,9 +16,10 @@ #define mozilla_PodOperations_h #include "mozilla/Array.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Attributes.h" -#include "mozilla/Util.h" +#include #include namespace mozilla { diff --git a/mfbt/RangedPtr.h b/mfbt/RangedPtr.h index 493fcdbaee63..561e564ded59 100644 --- a/mfbt/RangedPtr.h +++ b/mfbt/RangedPtr.h @@ -12,10 +12,12 @@ #ifndef mozilla_RangedPtr_h #define mozilla_RangedPtr_h +#include "mozilla/ArrayUtils.h" #include "mozilla/Assertions.h" #include "mozilla/Attributes.h" #include "mozilla/NullPtr.h" -#include "mozilla/Util.h" + +#include namespace mozilla { diff --git a/mfbt/STYLE b/mfbt/STYLE index 8b8b3a93268f..bdae22a41010 100644 --- a/mfbt/STYLE +++ b/mfbt/STYLE @@ -345,8 +345,7 @@ block start/end as needed. The contents of these blocks should not be indented. Add new functionality to new headers unless an existing header makes sense. Err on the side of more headers rather than fewer, as this helps to minimize -dependencies. Don't add anything to Util.h, which will be split into multiple -headers at some point (bug 713082). +dependencies. Don't use bool for argument types unless the method is a "set" or "enable"-style method where the method name and bool value together indicate the sense of its diff --git a/mfbt/Vector.h b/mfbt/Vector.h index eafa6f3aae48..c67467524f6e 100644 --- a/mfbt/Vector.h +++ b/mfbt/Vector.h @@ -11,6 +11,7 @@ #include "mozilla/Alignment.h" #include "mozilla/AllocPolicy.h" +#include "mozilla/ArrayUtils.h" // for PointerRangeSize #include "mozilla/Assertions.h" #include "mozilla/Attributes.h" #include "mozilla/MathAlgorithms.h" @@ -20,7 +21,6 @@ #include "mozilla/ReentrancyGuard.h" #include "mozilla/TemplateLib.h" #include "mozilla/TypeTraits.h" -#include "mozilla/Util.h" // for PointerRangeSize #include // for placement new diff --git a/mfbt/common.mozbuild b/mfbt/common.mozbuild index dc3f7d96cab7..deb26d978992 100644 --- a/mfbt/common.mozbuild +++ b/mfbt/common.mozbuild @@ -14,6 +14,7 @@ mfbt_headers = [ 'Alignment.h', 'AllocPolicy.h', 'Array.h', + 'ArrayUtils.h', 'Assertions.h', 'Atomics.h', 'Attributes.h', @@ -57,7 +58,6 @@ mfbt_headers = [ 'TypedEnum.h', 'Types.h', 'TypeTraits.h', - 'Util.h', 'Vector.h', 'WeakPtr.h', ] diff --git a/mfbt/decimal/moz-decimal-utils.h b/mfbt/decimal/moz-decimal-utils.h index 0077407e7436..fb5d5af87199 100644 --- a/mfbt/decimal/moz-decimal-utils.h +++ b/mfbt/decimal/moz-decimal-utils.h @@ -11,7 +11,7 @@ // not include it into any file other than Decimal.cpp. #include "../double-conversion/double-conversion.h" -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Casting.h" #include "mozilla/FloatingPoint.h" #include "mozilla/NullPtr.h" diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferences.cpp index dfff204cf1e5..5d532c3af8df 100644 --- a/modules/libpref/src/Preferences.cpp +++ b/modules/libpref/src/Preferences.cpp @@ -7,8 +7,8 @@ #include "mozilla/MemoryReporting.h" #include "mozilla/dom/ContentChild.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Attributes.h" -#include "mozilla/Util.h" #include "mozilla/HashFunctions.h" #include "nsXULAppAPI.h" diff --git a/netwerk/base/src/nsProtocolProxyService.cpp b/netwerk/base/src/nsProtocolProxyService.cpp index a3b6b42e90f0..8005b3a4ef1a 100644 --- a/netwerk/base/src/nsProtocolProxyService.cpp +++ b/netwerk/base/src/nsProtocolProxyService.cpp @@ -4,8 +4,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "mozilla/ArrayUtils.h" #include "mozilla/Attributes.h" -#include "mozilla/Util.h" #include "nsProtocolProxyService.h" #include "nsProxyInfo.h" diff --git a/netwerk/cache/nsCacheService.cpp b/netwerk/cache/nsCacheService.cpp index 9ae9789abb12..350d8ce26364 100644 --- a/netwerk/cache/nsCacheService.cpp +++ b/netwerk/cache/nsCacheService.cpp @@ -4,10 +4,10 @@ * 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/ArrayUtils.h" #include "mozilla/Attributes.h" #include "mozilla/Assertions.h" #include "mozilla/DebugOnly.h" -#include "mozilla/Util.h" #include "necko-config.h" diff --git a/netwerk/cache/nsDiskCacheDeviceSQL.cpp b/netwerk/cache/nsDiskCacheDeviceSQL.cpp index dd5cfdbeedc2..2110c5340ec8 100644 --- a/netwerk/cache/nsDiskCacheDeviceSQL.cpp +++ b/netwerk/cache/nsDiskCacheDeviceSQL.cpp @@ -4,7 +4,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Attributes.h" #include "nsCache.h" diff --git a/netwerk/dns/nsEffectiveTLDService.cpp b/netwerk/dns/nsEffectiveTLDService.cpp index e8427d408eb1..640ce0de435b 100644 --- a/netwerk/dns/nsEffectiveTLDService.cpp +++ b/netwerk/dns/nsEffectiveTLDService.cpp @@ -8,8 +8,8 @@ // complete description of the expected file format and parsing rules, see // http://wiki.mozilla.org/Gecko:Effective_TLD_Service +#include "mozilla/ArrayUtils.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #include "nsEffectiveTLDService.h" #include "nsIIDNService.h" diff --git a/netwerk/ipc/NeckoParent.cpp b/netwerk/ipc/NeckoParent.cpp index cd1fa597ff88..770265208861 100644 --- a/netwerk/ipc/NeckoParent.cpp +++ b/netwerk/ipc/NeckoParent.cpp @@ -383,7 +383,7 @@ NeckoParent::AllocPUDPSocketParent(const nsCString& aHost, const uint16_t& aPort, const nsCString& aFilter) { - UDPSocketParent* p; + UDPSocketParent* p = nullptr; // Only allow socket if it specifies a valid packet filter. nsAutoCString contractId(NS_NETWORK_UDP_SOCKET_FILTER_HANDLER_PREFIX); diff --git a/netwerk/streamconv/converters/nsDirIndexParser.cpp b/netwerk/streamconv/converters/nsDirIndexParser.cpp index 3e0c5b9b7f28..e1a6e1bb9f0a 100644 --- a/netwerk/streamconv/converters/nsDirIndexParser.cpp +++ b/netwerk/streamconv/converters/nsDirIndexParser.cpp @@ -5,7 +5,7 @@ /* This parsing code originally lived in xpfe/components/directory/ - bbaetz */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "prprf.h" diff --git a/netwerk/wifi/nsWifiAccessPoint.h b/netwerk/wifi/nsWifiAccessPoint.h index e11e15b75fa6..95b0f5cdf715 100644 --- a/netwerk/wifi/nsWifiAccessPoint.h +++ b/netwerk/wifi/nsWifiAccessPoint.h @@ -7,8 +7,8 @@ #include "nsString.h" #include "nsCOMArray.h" +#include "mozilla/ArrayUtils.h" // ArrayLength #include "mozilla/Attributes.h" -#include "mozilla/Util.h" // ArrayLength #ifndef __nsWifiAccessPoint__ #define __nsWifiAccessPoint__ diff --git a/parser/html/nsHtml5Atoms.cpp b/parser/html/nsHtml5Atoms.cpp index 108e393ecbb9..ae8136179dab 100644 --- a/parser/html/nsHtml5Atoms.cpp +++ b/parser/html/nsHtml5Atoms.cpp @@ -10,8 +10,6 @@ * unloaded. */ -#include "mozilla/Util.h" - #include "nsHtml5Atoms.h" #include "nsStaticAtom.h" diff --git a/parser/htmlparser/src/CNavDTD.cpp b/parser/htmlparser/src/CNavDTD.cpp index 8657b6aa0f27..652e7a7bb80a 100644 --- a/parser/htmlparser/src/CNavDTD.cpp +++ b/parser/htmlparser/src/CNavDTD.cpp @@ -4,8 +4,6 @@ * 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/Util.h" - #include "nsISupports.h" #include "nsISupportsImpl.h" #include "nsIParser.h" diff --git a/parser/htmlparser/src/nsHTMLEntities.cpp b/parser/htmlparser/src/nsHTMLEntities.cpp index e597cd8abcca..156de928665b 100644 --- a/parser/htmlparser/src/nsHTMLEntities.cpp +++ b/parser/htmlparser/src/nsHTMLEntities.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsHTMLEntities.h" diff --git a/parser/htmlparser/src/nsHTMLTags.cpp b/parser/htmlparser/src/nsHTMLTags.cpp index 2d437bfca0e4..b51fecb93b50 100644 --- a/parser/htmlparser/src/nsHTMLTags.cpp +++ b/parser/htmlparser/src/nsHTMLTags.cpp @@ -3,8 +3,6 @@ * 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/Util.h" - #include "nsHTMLTags.h" #include "nsCRT.h" #include "nsReadableUtils.h" diff --git a/rdf/base/src/nsRDFContentSink.cpp b/rdf/base/src/nsRDFContentSink.cpp index 6fcbc36c5b95..dcd8623eac23 100644 --- a/rdf/base/src/nsRDFContentSink.cpp +++ b/rdf/base/src/nsRDFContentSink.cpp @@ -38,8 +38,6 @@ */ -#include "mozilla/Util.h" - #include "nsCOMPtr.h" #include "nsInterfaceHashtable.h" #include "nsIContentSink.h" diff --git a/security/manager/ssl/src/nsNSSIOLayer.cpp b/security/manager/ssl/src/nsNSSIOLayer.cpp index cbf6d67179f7..1071d35e506e 100644 --- a/security/manager/ssl/src/nsNSSIOLayer.cpp +++ b/security/manager/ssl/src/nsNSSIOLayer.cpp @@ -1036,7 +1036,8 @@ int32_t checkHandshake(int32_t bytesTransfered, bool wasReading, PRFileDesc* ssl_layer_fd, nsNSSSocketInfo *socketInfo) { - PRErrorCode err = PR_GetError(); + const PRErrorCode originalError = PR_GetError(); + PRErrorCode err = originalError; // This is where we work around all of those SSL servers that don't // conform to the SSL spec and shutdown a connection when we request @@ -1114,6 +1115,14 @@ int32_t checkHandshake(int32_t bytesTransfered, bool wasReading, } if (bytesTransfered < 0) { + // Remember that we encountered an error so that getSocketInfoIfRunning + // will correctly cause us to fail if another part of Gecko + // (erroneously) calls an I/O function (PR_Send/PR_Recv/etc.) again on + // this socket. Note that we use the original error because if we use + // PR_CONNECT_RESET_ERROR, we'll repeated try to reconnect. + if (originalError != PR_WOULD_BLOCK_ERROR && !socketInfo->GetErrorCode()) { + socketInfo->SetCanceled(originalError, PlainErrorMessage); + } PR_SetError(err, 0); } diff --git a/security/manager/ssl/tests/unit/tlsserver/cmd/GenerateOCSPResponse.cpp b/security/manager/ssl/tests/unit/tlsserver/cmd/GenerateOCSPResponse.cpp index a528176426dd..dcbb3775ae47 100644 --- a/security/manager/ssl/tests/unit/tlsserver/cmd/GenerateOCSPResponse.cpp +++ b/security/manager/ssl/tests/unit/tlsserver/cmd/GenerateOCSPResponse.cpp @@ -11,7 +11,8 @@ #include -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" + #include "nspr.h" #include "nss.h" #include "plarenas.h" diff --git a/security/sandbox/linux/Sandbox.cpp b/security/sandbox/linux/Sandbox.cpp index 4cd74e330008..a1c81b9493d4 100644 --- a/security/sandbox/linux/Sandbox.cpp +++ b/security/sandbox/linux/Sandbox.cpp @@ -11,8 +11,8 @@ #include #include +#include "mozilla/ArrayUtils.h" #include "mozilla/NullPtr.h" -#include "mozilla/Util.h" #if defined(ANDROID) #include "android_ucontext.h" #include diff --git a/storage/src/SQLCollations.cpp b/storage/src/SQLCollations.cpp index eab36085f2fa..219387b9229d 100644 --- a/storage/src/SQLCollations.cpp +++ b/storage/src/SQLCollations.cpp @@ -4,7 +4,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "SQLCollations.h" diff --git a/storage/src/TelemetryVFS.cpp b/storage/src/TelemetryVFS.cpp index bcdacd7cee10..423788c90526 100644 --- a/storage/src/TelemetryVFS.cpp +++ b/storage/src/TelemetryVFS.cpp @@ -9,7 +9,6 @@ #include "mozilla/Preferences.h" #include "sqlite3.h" #include "nsThreadUtils.h" -#include "mozilla/Util.h" #include "mozilla/dom/quota/PersistenceType.h" #include "mozilla/dom/quota/QuotaManager.h" #include "mozilla/dom/quota/QuotaObject.h" diff --git a/storage/src/mozStorageSQLFunctions.cpp b/storage/src/mozStorageSQLFunctions.cpp index fbdc676bb4af..163c1b13bc29 100644 --- a/storage/src/mozStorageSQLFunctions.cpp +++ b/storage/src/mozStorageSQLFunctions.cpp @@ -4,7 +4,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozStorageSQLFunctions.h" #include "nsUnicharUtils.h" diff --git a/storage/src/mozStorageStatementData.h b/storage/src/mozStorageStatementData.h index 2e611cd3c1e5..727c473b337e 100644 --- a/storage/src/mozStorageStatementData.h +++ b/storage/src/mozStorageStatementData.h @@ -12,7 +12,6 @@ #include "nsAutoPtr.h" #include "nsTArray.h" #include "nsIEventTarget.h" -#include "mozilla/Util.h" #include "MainThreadUtils.h" #include "mozStorageBindingParamsArray.h" diff --git a/toolkit/components/alerts/nsXULAlerts.cpp b/toolkit/components/alerts/nsXULAlerts.cpp index a8bd65a086d5..29b9f2b6cbb9 100644 --- a/toolkit/components/alerts/nsXULAlerts.cpp +++ b/toolkit/components/alerts/nsXULAlerts.cpp @@ -13,6 +13,8 @@ #include "nsPIDOMWindow.h" #include "nsIWindowWatcher.h" +using namespace mozilla; + #define ALERT_CHROME_URL "chrome://global/content/alerts/alert.xul" NS_IMPL_ISUPPORTS1(nsXULAlertObserver, nsIObserver) diff --git a/toolkit/components/alerts/nsXULAlerts.h b/toolkit/components/alerts/nsXULAlerts.h index 8092424f2601..62fe3b6fbd07 100644 --- a/toolkit/components/alerts/nsXULAlerts.h +++ b/toolkit/components/alerts/nsXULAlerts.h @@ -12,8 +12,6 @@ #include "nsIDOMWindow.h" #include "nsIObserver.h" -using namespace mozilla; - class nsXULAlerts { friend class nsXULAlertObserver; public: diff --git a/toolkit/components/build/nsToolkitCompsModule.cpp b/toolkit/components/build/nsToolkitCompsModule.cpp index ed2dbece42bc..b0cbf16aa94a 100644 --- a/toolkit/components/build/nsToolkitCompsModule.cpp +++ b/toolkit/components/build/nsToolkitCompsModule.cpp @@ -36,6 +36,8 @@ #include "nsBrowserStatusFilter.h" #include "mozilla/FinalizationWitnessService.h" +using namespace mozilla; + ///////////////////////////////////////////////////////////////////////////// NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsAppStartup, Init) @@ -113,7 +115,7 @@ NS_DEFINE_NAMED_CID(NS_UPDATEPROCESSOR_CID); #endif NS_DEFINE_NAMED_CID(FINALIZATIONWITNESSSERVICE_CID); -static const mozilla::Module::CIDEntry kToolkitCIDs[] = { +static const Module::CIDEntry kToolkitCIDs[] = { { &kNS_TOOLKIT_APPSTARTUP_CID, false, nullptr, nsAppStartupConstructor }, { &kNS_USERINFO_CID, false, nullptr, nsUserInfoConstructor }, { &kNS_ALERTSSERVICE_CID, false, nullptr, nsAlertsServiceConstructor }, @@ -141,7 +143,7 @@ static const mozilla::Module::CIDEntry kToolkitCIDs[] = { { nullptr } }; -static const mozilla::Module::ContractIDEntry kToolkitContracts[] = { +static const Module::ContractIDEntry kToolkitContracts[] = { { NS_APPSTARTUP_CONTRACTID, &kNS_TOOLKIT_APPSTARTUP_CID }, { NS_USERINFO_CONTRACTID, &kNS_USERINFO_CID }, { NS_ALERTSERVICE_CONTRACTID, &kNS_ALERTSSERVICE_CID }, @@ -170,8 +172,8 @@ static const mozilla::Module::ContractIDEntry kToolkitContracts[] = { { nullptr } }; -static const mozilla::Module kToolkitModule = { - mozilla::Module::kVersion, +static const Module kToolkitModule = { + Module::kVersion, kToolkitCIDs, kToolkitContracts }; diff --git a/toolkit/components/places/Database.cpp b/toolkit/components/places/Database.cpp index e825cbb0f45e..fdfb32f3a4b2 100644 --- a/toolkit/components/places/Database.cpp +++ b/toolkit/components/places/Database.cpp @@ -2,9 +2,9 @@ * 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/ArrayUtils.h" #include "mozilla/Attributes.h" #include "mozilla/DebugOnly.h" -#include "mozilla/Util.h" #include "Database.h" diff --git a/toolkit/components/places/History.cpp b/toolkit/components/places/History.cpp index dcfc266cd64e..8b05135b4304 100644 --- a/toolkit/components/places/History.cpp +++ b/toolkit/components/places/History.cpp @@ -4,10 +4,10 @@ * 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/ArrayUtils.h" #include "mozilla/Attributes.h" #include "mozilla/DebugOnly.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #include "mozilla/dom/ContentChild.h" #include "mozilla/dom/ContentParent.h" diff --git a/toolkit/components/places/nsAnnotationService.cpp b/toolkit/components/places/nsAnnotationService.cpp index 54e58fd5bd88..dfcd5cef86e4 100644 --- a/toolkit/components/places/nsAnnotationService.cpp +++ b/toolkit/components/places/nsAnnotationService.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsAnnotationService.h" #include "nsNavHistory.h" diff --git a/toolkit/components/places/nsFaviconService.cpp b/toolkit/components/places/nsFaviconService.cpp index 51d1c4c7011e..38763a286c43 100644 --- a/toolkit/components/places/nsFaviconService.cpp +++ b/toolkit/components/places/nsFaviconService.cpp @@ -25,8 +25,8 @@ #include "nsStringStream.h" #include "plbase64.h" #include "nsIClassInfoImpl.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Preferences.h" -#include "mozilla/Util.h" // For large favicons optimization. #include "imgITools.h" diff --git a/toolkit/components/places/nsNavBookmarks.cpp b/toolkit/components/places/nsNavBookmarks.cpp index 1879a0781601..64460a511049 100644 --- a/toolkit/components/places/nsNavBookmarks.cpp +++ b/toolkit/components/places/nsNavBookmarks.cpp @@ -16,7 +16,6 @@ #include "nsPrintfCString.h" #include "prprf.h" #include "mozilla/storage.h" -#include "mozilla/Util.h" #include "GeckoProfiler.h" diff --git a/toolkit/components/remote/nsXRemoteService.cpp b/toolkit/components/remote/nsXRemoteService.cpp index de73ca11bf59..bb5aab392604 100644 --- a/toolkit/components/remote/nsXRemoteService.cpp +++ b/toolkit/components/remote/nsXRemoteService.cpp @@ -5,7 +5,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsXRemoteService.h" #include "nsIObserverService.h" diff --git a/toolkit/components/startup/nsUserInfoWin.cpp b/toolkit/components/startup/nsUserInfoWin.cpp index 1338bfd939d3..de5b30527ece 100644 --- a/toolkit/components/startup/nsUserInfoWin.cpp +++ b/toolkit/components/startup/nsUserInfoWin.cpp @@ -5,7 +5,7 @@ #include "nsUserInfo.h" -#include "mozilla/Util.h" // ArrayLength +#include "mozilla/ArrayUtils.h" // ArrayLength #include "nsString.h" #include "windows.h" #include "nsCRT.h" diff --git a/toolkit/crashreporter/nsExceptionHandler.cpp b/toolkit/crashreporter/nsExceptionHandler.cpp index 23b37f72921e..f91bf9abf62a 100644 --- a/toolkit/crashreporter/nsExceptionHandler.cpp +++ b/toolkit/crashreporter/nsExceptionHandler.cpp @@ -5,11 +5,11 @@ #include "nsExceptionHandler.h" #include "nsDataHashtable.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/dom/CrashReporterChild.h" #include "mozilla/Services.h" #include "nsIObserverService.h" #include "mozilla/unused.h" -#include "mozilla/Util.h" #include "nsThreadUtils.h" #include "nsXULAppAPI.h" diff --git a/toolkit/identity/IdentityCryptoService.cpp b/toolkit/identity/IdentityCryptoService.cpp index 9ce1beef4f15..d5f45ce6c3f4 100644 --- a/toolkit/identity/IdentityCryptoService.cpp +++ b/toolkit/identity/IdentityCryptoService.cpp @@ -13,8 +13,8 @@ #include "nsCOMPtr.h" #include "nsProxyRelease.h" #include "nsString.h" +#include "mozilla/ArrayUtils.h" // ArrayLength #include "mozilla/Base64.h" -#include "mozilla/Util.h" // ArrayLength #include "ScopedNSSTypes.h" #include "nss.h" diff --git a/toolkit/mozapps/update/tests/TestAUSReadStrings.cpp b/toolkit/mozapps/update/tests/TestAUSReadStrings.cpp index 9536dae0d94f..8bb58aa279de 100644 --- a/toolkit/mozapps/update/tests/TestAUSReadStrings.cpp +++ b/toolkit/mozapps/update/tests/TestAUSReadStrings.cpp @@ -37,7 +37,7 @@ #include "updater/progressui.h" #include "common/readstrings.h" #include "common/errors.h" -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #ifndef MAXPATHLEN # ifdef PATH_MAX diff --git a/toolkit/profile/nsToolkitProfileService.cpp b/toolkit/profile/nsToolkitProfileService.cpp index 0717214e57be..d6d101d27e5c 100644 --- a/toolkit/profile/nsToolkitProfileService.cpp +++ b/toolkit/profile/nsToolkitProfileService.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include #include diff --git a/toolkit/system/androidproxy/nsAndroidSystemProxySettings.cpp b/toolkit/system/androidproxy/nsAndroidSystemProxySettings.cpp index c268e91a8b74..792893a2bd90 100644 --- a/toolkit/system/androidproxy/nsAndroidSystemProxySettings.cpp +++ b/toolkit/system/androidproxy/nsAndroidSystemProxySettings.cpp @@ -6,7 +6,6 @@ #include "nsNetUtil.h" #include "nsIURI.h" -#include "mozilla/Util.h" #include "nsISystemProxySettings.h" #include "nsIServiceManager.h" #include "mozilla/ModuleUtils.h" diff --git a/toolkit/system/gnome/nsGConfService.cpp b/toolkit/system/gnome/nsGConfService.cpp index 0bfaf51f3f51..cff67b13ddac 100644 --- a/toolkit/system/gnome/nsGConfService.cpp +++ b/toolkit/system/gnome/nsGConfService.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsGConfService.h" #include "nsStringAPI.h" #include "nsCOMPtr.h" diff --git a/toolkit/system/gnome/nsGSettingsService.cpp b/toolkit/system/gnome/nsGSettingsService.cpp index 7cf0424c1e04..184e54ea629c 100644 --- a/toolkit/system/gnome/nsGSettingsService.cpp +++ b/toolkit/system/gnome/nsGSettingsService.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsGSettingsService.h" #include "nsStringAPI.h" diff --git a/toolkit/system/windowsproxy/nsWindowsSystemProxySettings.cpp b/toolkit/system/windowsproxy/nsWindowsSystemProxySettings.cpp index c8aa0dd34bac..61619020108c 100644 --- a/toolkit/system/windowsproxy/nsWindowsSystemProxySettings.cpp +++ b/toolkit/system/windowsproxy/nsWindowsSystemProxySettings.cpp @@ -7,8 +7,8 @@ #include #include +#include "mozilla/ArrayUtils.h" #include "mozilla/Attributes.h" -#include "mozilla/Util.h" #include "nsISystemProxySettings.h" #include "nsIServiceManager.h" #include "mozilla/ModuleUtils.h" diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index 6ea979595ba0..f5dd1d72496a 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -21,11 +21,11 @@ #include "mozilla/dom/ContentParent.h" #include "mozilla/dom/ContentChild.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Attributes.h" #include "mozilla/Likely.h" #include "mozilla/Poison.h" #include "mozilla/Telemetry.h" -#include "mozilla/Util.h" #include "nsAppRunner.h" #include "mozilla/AppData.h" diff --git a/tools/profiler/GeckoProfilerImpl.h b/tools/profiler/GeckoProfilerImpl.h index 727907ac9c4f..e84eb3cc4c8b 100644 --- a/tools/profiler/GeckoProfilerImpl.h +++ b/tools/profiler/GeckoProfilerImpl.h @@ -13,7 +13,6 @@ #include #include "mozilla/ThreadLocal.h" #include "mozilla/Assertions.h" -#include "mozilla/Util.h" #include "nsAlgorithm.h" #include "nscore.h" #include "GeckoProfilerFunc.h" diff --git a/tools/profiler/JSCustomObjectBuilder.cpp b/tools/profiler/JSCustomObjectBuilder.cpp index cfb64f8cca08..713f45b853a4 100644 --- a/tools/profiler/JSCustomObjectBuilder.cpp +++ b/tools/profiler/JSCustomObjectBuilder.cpp @@ -5,7 +5,7 @@ #include "JSCustomObjectBuilder.h" -#include "mozilla/Util.h" // for ArrayLength +#include "mozilla/ArrayUtils.h" // for ArrayLength #include "nsDataHashtable.h" #include "nsString.h" #include "nsTArray.h" diff --git a/tools/profiler/PseudoStack.h b/tools/profiler/PseudoStack.h index 2da8fcefa743..d366dfd0c383 100644 --- a/tools/profiler/PseudoStack.h +++ b/tools/profiler/PseudoStack.h @@ -6,6 +6,7 @@ #ifndef PROFILER_PSEUDO_STACK_H_ #define PROFILER_PSEUDO_STACK_H_ +#include "mozilla/ArrayUtils.h" #include "mozilla/NullPtr.h" #include #include "js/ProfilingStack.h" diff --git a/tools/profiler/platform.h b/tools/profiler/platform.h index 53cdf3eec452..6ad0baadf3b6 100644 --- a/tools/profiler/platform.h +++ b/tools/profiler/platform.h @@ -40,7 +40,6 @@ #endif #include -#include "mozilla/Util.h" #include "mozilla/unused.h" #include "mozilla/TimeStamp.h" #include "mozilla/Mutex.h" diff --git a/uriloader/exthandler/nsExternalHelperAppService.cpp b/uriloader/exthandler/nsExternalHelperAppService.cpp index af1b385d9760..1a3d22d30c4a 100644 --- a/uriloader/exthandler/nsExternalHelperAppService.cpp +++ b/uriloader/exthandler/nsExternalHelperAppService.cpp @@ -11,8 +11,8 @@ #include "base/basictypes.h" /* This must occur *after* base/basictypes.h to avoid typedefs conflicts. */ +#include "mozilla/ArrayUtils.h" #include "mozilla/Base64.h" -#include "mozilla/Util.h" #include "mozilla/dom/ContentChild.h" #include "mozilla/dom/TabChild.h" diff --git a/widget/android/AndroidBridge.cpp b/widget/android/AndroidBridge.cpp index 7322006f529e..7c39a14da865 100644 --- a/widget/android/AndroidBridge.cpp +++ b/widget/android/AndroidBridge.cpp @@ -3,7 +3,6 @@ * 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/Util.h" #include "mozilla/layers/CompositorChild.h" #include "mozilla/layers/CompositorParent.h" diff --git a/widget/android/AndroidJNIWrapper.cpp b/widget/android/AndroidJNIWrapper.cpp index 9c9c825bb651..67e467170099 100644 --- a/widget/android/AndroidJNIWrapper.cpp +++ b/widget/android/AndroidJNIWrapper.cpp @@ -3,8 +3,6 @@ * 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/Util.h" - #include #include #include diff --git a/widget/cocoa/GfxInfo.mm b/widget/cocoa/GfxInfo.mm index ee7f5430e4b0..a94f0bd10a62 100644 --- a/widget/cocoa/GfxInfo.mm +++ b/widget/cocoa/GfxInfo.mm @@ -6,7 +6,7 @@ #include #include -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "GfxInfo.h" #include "nsUnicharUtils.h" diff --git a/widget/cocoa/TextInputHandler.mm b/widget/cocoa/TextInputHandler.mm index 00f39a134273..e2d33f3fae39 100644 --- a/widget/cocoa/TextInputHandler.mm +++ b/widget/cocoa/TextInputHandler.mm @@ -4,7 +4,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "TextInputHandler.h" diff --git a/widget/cocoa/nsChildView.mm b/widget/cocoa/nsChildView.mm index 7949b6ce008d..bb949b80a79c 100644 --- a/widget/cocoa/nsChildView.mm +++ b/widget/cocoa/nsChildView.mm @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #ifdef MOZ_LOGGING #define FORCE_PR_LOG diff --git a/widget/cocoa/nsPrintDialogX.mm b/widget/cocoa/nsPrintDialogX.mm index 6cff61b89d87..cbd2d558c704 100644 --- a/widget/cocoa/nsPrintDialogX.mm +++ b/widget/cocoa/nsPrintDialogX.mm @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsPrintDialogX.h" #include "nsIPrintSettings.h" diff --git a/widget/gonk/libdisplay/BootAnimation.cpp b/widget/gonk/libdisplay/BootAnimation.cpp index 54b550a3d500..a30175a4bdb6 100644 --- a/widget/gonk/libdisplay/BootAnimation.cpp +++ b/widget/gonk/libdisplay/BootAnimation.cpp @@ -22,7 +22,6 @@ #include #include "mozilla/FileUtils.h" #include "mozilla/NullPtr.h" -#include "mozilla/Util.h" #include "png.h" #include "android/log.h" diff --git a/widget/gtk/nsClipboard.cpp b/widget/gtk/nsClipboard.cpp index 92b76fd30c95..a3181d68a2fd 100644 --- a/widget/gtk/nsClipboard.cpp +++ b/widget/gtk/nsClipboard.cpp @@ -5,7 +5,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsClipboard.h" #include "nsSupportsPrimitives.h" diff --git a/widget/gtk/nsColorPicker.cpp b/widget/gtk/nsColorPicker.cpp index 320addd86252..432e1089e254 100644 --- a/widget/gtk/nsColorPicker.cpp +++ b/widget/gtk/nsColorPicker.cpp @@ -5,7 +5,6 @@ #include -#include "mozilla/Util.h" #include "nsColor.h" #include "nsColorPicker.h" #include "nsGtkUtils.h" diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp index afd7e00dd5ea..149d877beed0 100644 --- a/widget/gtk/nsFilePicker.cpp +++ b/widget/gtk/nsFilePicker.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/Types.h" #include diff --git a/widget/gtk/nsGtkKeyUtils.cpp b/widget/gtk/nsGtkKeyUtils.cpp index 740be04f1f5f..3a580cfeafe6 100644 --- a/widget/gtk/nsGtkKeyUtils.cpp +++ b/widget/gtk/nsGtkKeyUtils.cpp @@ -26,9 +26,9 @@ PRLogModuleInfo* gKeymapWrapperLog = nullptr; #endif // PR_LOGGING +#include "mozilla/ArrayUtils.h" #include "mozilla/MouseEvents.h" #include "mozilla/TextEvents.h" -#include "mozilla/Util.h" namespace mozilla { namespace widget { diff --git a/widget/gtk/nsNativeKeyBindings.cpp b/widget/gtk/nsNativeKeyBindings.cpp index f0a65c81f40d..850efdc14042 100644 --- a/widget/gtk/nsNativeKeyBindings.cpp +++ b/widget/gtk/nsNativeKeyBindings.cpp @@ -3,9 +3,9 @@ * 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/ArrayUtils.h" #include "mozilla/MathAlgorithms.h" #include "mozilla/TextEvents.h" -#include "mozilla/Util.h" #include "nsNativeKeyBindings.h" #include "nsString.h" diff --git a/widget/gtk/nsPaperPS.cpp b/widget/gtk/nsPaperPS.cpp index 78f645398833..7d583efaceae 100644 --- a/widget/gtk/nsPaperPS.cpp +++ b/widget/gtk/nsPaperPS.cpp @@ -4,7 +4,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsPaperPS.h" #include "plstr.h" diff --git a/widget/gtk/nsPrintDialogGTK.cpp b/widget/gtk/nsPrintDialogGTK.cpp index f4f436b1af2b..2dd59347ff2c 100644 --- a/widget/gtk/nsPrintDialogGTK.cpp +++ b/widget/gtk/nsPrintDialogGTK.cpp @@ -11,7 +11,7 @@ #endif #include -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozcontainer.h" #include "nsIPrintSettings.h" diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp index b83b257501fb..bfd8e080260b 100644 --- a/widget/gtk/nsWindow.cpp +++ b/widget/gtk/nsWindow.cpp @@ -5,10 +5,10 @@ * 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/ArrayUtils.h" #include "mozilla/MiscEvents.h" #include "mozilla/MouseEvents.h" #include "mozilla/TextEvents.h" -#include "mozilla/Util.h" #include #include "prlink.h" diff --git a/widget/qt/nsClipboard.cpp b/widget/qt/nsClipboard.cpp index 1fdafc52c401..6fe5fd1d8951 100644 --- a/widget/qt/nsClipboard.cpp +++ b/widget/qt/nsClipboard.cpp @@ -11,7 +11,7 @@ #include #include -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsClipboard.h" #include "nsISupportsPrimitives.h" diff --git a/widget/qt/nsQtKeyUtils.cpp b/widget/qt/nsQtKeyUtils.cpp index ef467702d582..798d07e90cd6 100644 --- a/widget/qt/nsQtKeyUtils.cpp +++ b/widget/qt/nsQtKeyUtils.cpp @@ -4,8 +4,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "mozilla/ArrayUtils.h" #include "mozilla/TextEvents.h" -#include "mozilla/Util.h" #include "nsWindow.h" #include "nsQtKeyUtils.h" diff --git a/widget/qt/nsWindow.cpp b/widget/qt/nsWindow.cpp index 655de8a5523e..cc7be08a406c 100644 --- a/widget/qt/nsWindow.cpp +++ b/widget/qt/nsWindow.cpp @@ -5,11 +5,11 @@ * 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/ArrayUtils.h" #include "mozilla/MiscEvents.h" #include "mozilla/MouseEvents.h" #include "mozilla/TextEvents.h" #include "mozilla/TouchEvents.h" -#include "mozilla/Util.h" #include #include diff --git a/widget/windows/GfxInfo.cpp b/widget/windows/GfxInfo.cpp index 8fa0c89b42a5..09a3d0f852b4 100644 --- a/widget/windows/GfxInfo.cpp +++ b/widget/windows/GfxInfo.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include #include diff --git a/widget/windows/KeyboardLayout.cpp b/widget/windows/KeyboardLayout.cpp index 9f91f896f30c..500174206355 100644 --- a/widget/windows/KeyboardLayout.cpp +++ b/widget/windows/KeyboardLayout.cpp @@ -3,10 +3,10 @@ * 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/ArrayUtils.h" #include "mozilla/DebugOnly.h" #include "mozilla/MouseEvents.h" #include "mozilla/TextEvents.h" -#include "mozilla/Util.h" #include "mozilla/WindowsVersion.h" #include "KeyboardLayout.h" diff --git a/widget/windows/TaskbarWindowPreview.cpp b/widget/windows/TaskbarWindowPreview.cpp index ded525ea7943..83ea74a86860 100644 --- a/widget/windows/TaskbarWindowPreview.cpp +++ b/widget/windows/TaskbarWindowPreview.cpp @@ -5,7 +5,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include #include "TaskbarWindowPreview.h" diff --git a/widget/windows/nsDataObj.cpp b/widget/windows/nsDataObj.cpp index 8e864d1501ff..eb2faa19fb49 100644 --- a/widget/windows/nsDataObj.cpp +++ b/widget/windows/nsDataObj.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include #include diff --git a/widget/windows/nsDeviceContextSpecWin.cpp b/widget/windows/nsDeviceContextSpecWin.cpp index b68c52fe1962..630f5a63af7f 100644 --- a/widget/windows/nsDeviceContextSpecWin.cpp +++ b/widget/windows/nsDeviceContextSpecWin.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsDeviceContextSpecWin.h" #include "prmem.h" diff --git a/widget/windows/nsUXThemeData.cpp b/widget/windows/nsUXThemeData.cpp index c803dbafa730..ef50c30d96c2 100644 --- a/widget/windows/nsUXThemeData.cpp +++ b/widget/windows/nsUXThemeData.cpp @@ -5,7 +5,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/WindowsVersion.h" #include "nsUXThemeData.h" diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp index ce319a62764f..8ace248d4092 100644 --- a/widget/windows/nsWindow.cpp +++ b/widget/windows/nsWindow.cpp @@ -58,7 +58,6 @@ #include "mozilla/MiscEvents.h" #include "mozilla/MouseEvents.h" #include "mozilla/TouchEvents.h" -#include "mozilla/Util.h" #include "mozilla/ipc/MessageChannel.h" #include @@ -3514,19 +3513,36 @@ mozilla::TemporaryRef nsWindow::StartRemoteDrawing() { MOZ_ASSERT(!mCompositeDC); + NS_ASSERTION(IsRenderMode(gfxWindowsPlatform::RENDER_DIRECT2D) || + IsRenderMode(gfxWindowsPlatform::RENDER_GDI), + "Unexpected render mode for remote drawing"); HDC dc = (HDC)GetNativeData(NS_NATIVE_GRAPHIC); - if (!dc) { - return nullptr; - } + nsRefPtr surf; - uint32_t flags = (mTransparencyMode == eTransparencyOpaque) ? 0 : - gfxWindowsSurface::FLAG_IS_TRANSPARENT; - nsRefPtr surf = new gfxWindowsSurface(dc, flags); + if (mTransparencyMode == eTransparencyTransparent) { + if (!mTransparentSurface) { + SetupTranslucentWindowMemoryBitmap(mTransparencyMode); + } + if (mTransparentSurface) { + surf = mTransparentSurface; + } + } + + if (!surf) { + if (!dc) { + return nullptr; + } + uint32_t flags = (mTransparencyMode == eTransparencyOpaque) ? 0 : + gfxWindowsSurface::FLAG_IS_TRANSPARENT; + surf = new gfxWindowsSurface(dc, flags); + } mozilla::gfx::IntSize size(surf->GetSize().width, surf->GetSize().height); if (size.width <= 0 || size.height <= 0) { - FreeNativeData(dc, NS_NATIVE_GRAPHIC); + if (dc) { + FreeNativeData(dc, NS_NATIVE_GRAPHIC); + } return nullptr; } @@ -3539,9 +3555,14 @@ nsWindow::StartRemoteDrawing() void nsWindow::EndRemoteDrawing() { - MOZ_ASSERT(mCompositeDC); - UpdateTranslucentWindow(); - FreeNativeData(mCompositeDC, NS_NATIVE_GRAPHIC); + if (mTransparencyMode == eTransparencyTransparent) { + MOZ_ASSERT(IsRenderMode(gfxWindowsPlatform::RENDER_DIRECT2D) + || mTransparentSurface); + UpdateTranslucentWindow(); + } + if (mCompositeDC) { + FreeNativeData(mCompositeDC, NS_NATIVE_GRAPHIC); + } mCompositeDC = nullptr; } diff --git a/widget/windows/nsWindow.h b/widget/windows/nsWindow.h index 697fc6990e5b..3f0334fc815e 100644 --- a/widget/windows/nsWindow.h +++ b/widget/windows/nsWindow.h @@ -18,6 +18,7 @@ #include "nsToolkit.h" #include "nsString.h" #include "nsTArray.h" +#include "gfxWindowsPlatform.h" #include "gfxWindowsSurface.h" #include "nsWindowDbg.h" #include "cairo.h" @@ -436,6 +437,7 @@ protected: static void ActivateOtherWindowHelper(HWND aWnd); void ClearCachedResources(); nsIWidgetListener* GetPaintListener(); + static bool IsRenderMode(gfxWindowsPlatform::RenderMode aMode); protected: nsCOMPtr mParent; diff --git a/widget/windows/nsWindowGfx.cpp b/widget/windows/nsWindowGfx.cpp index bec8f6d5b1bf..c34e87597135 100644 --- a/widget/windows/nsWindowGfx.cpp +++ b/widget/windows/nsWindowGfx.cpp @@ -100,8 +100,8 @@ static IconMetrics sIconMetrics[] = { ************************************************************** **************************************************************/ -static bool -IsRenderMode(gfxWindowsPlatform::RenderMode rmode) +/* static */ bool +nsWindow::IsRenderMode(gfxWindowsPlatform::RenderMode rmode) { return gfxWindowsPlatform::GetPlatform()->GetRenderMode() == rmode; } diff --git a/widget/xpwidgets/GfxDriverInfo.h b/widget/xpwidgets/GfxDriverInfo.h index 784bf0553545..8ee183ff7d23 100644 --- a/widget/xpwidgets/GfxDriverInfo.h +++ b/widget/xpwidgets/GfxDriverInfo.h @@ -6,7 +6,7 @@ #ifndef __mozilla_widget_GfxDriverInfo_h__ #define __mozilla_widget_GfxDriverInfo_h__ -#include "mozilla/Util.h" // ArrayLength +#include "mozilla/ArrayUtils.h" // ArrayLength #include "nsString.h" // Macros for adding a blocklist item to the static list. diff --git a/widget/xpwidgets/GfxInfoBase.cpp b/widget/xpwidgets/GfxInfoBase.cpp index 8a77a6549da3..137d8fdd8e55 100644 --- a/widget/xpwidgets/GfxInfoBase.cpp +++ b/widget/xpwidgets/GfxInfoBase.cpp @@ -5,7 +5,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "GfxInfoBase.h" diff --git a/widget/xpwidgets/nsBaseWidget.cpp b/widget/xpwidgets/nsBaseWidget.cpp index 8e6b11899b2f..5e14b5ceea47 100644 --- a/widget/xpwidgets/nsBaseWidget.cpp +++ b/widget/xpwidgets/nsBaseWidget.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/layers/CompositorChild.h" #include "mozilla/layers/CompositorParent.h" diff --git a/widget/xpwidgets/nsClipboardPrivacyHandler.cpp b/widget/xpwidgets/nsClipboardPrivacyHandler.cpp index 09e96db72ad6..0285d50e9d6f 100644 --- a/widget/xpwidgets/nsClipboardPrivacyHandler.cpp +++ b/widget/xpwidgets/nsClipboardPrivacyHandler.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsClipboardPrivacyHandler.h" #include "nsITransferable.h" diff --git a/widget/xpwidgets/nsXPLookAndFeel.cpp b/widget/xpwidgets/nsXPLookAndFeel.cpp index 532ba79bf94c..d3927954bdfe 100644 --- a/widget/xpwidgets/nsXPLookAndFeel.cpp +++ b/widget/xpwidgets/nsXPLookAndFeel.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nscore.h" diff --git a/xpcom/base/nsCycleCollector.cpp b/xpcom/base/nsCycleCollector.cpp index 62720800cd89..16d9a02684d7 100644 --- a/xpcom/base/nsCycleCollector.cpp +++ b/xpcom/base/nsCycleCollector.cpp @@ -129,11 +129,11 @@ #include "base/process_util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/AutoRestore.h" #include "mozilla/CycleCollectedJSRuntime.h" /* This must occur *after* base/process_util.h to avoid typedefs conflicts. */ #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #include "mozilla/LinkedList.h" #include "nsCycleCollectionParticipant.h" diff --git a/xpcom/base/nsStackWalk.cpp b/xpcom/base/nsStackWalk.cpp index b1aaa0d368d4..b5441871f228 100644 --- a/xpcom/base/nsStackWalk.cpp +++ b/xpcom/base/nsStackWalk.cpp @@ -177,7 +177,7 @@ StackWalkInitCriticalAddress() #include #include #include "plstr.h" -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nspr.h" #include diff --git a/xpcom/base/nsSystemInfo.cpp b/xpcom/base/nsSystemInfo.cpp index 18efc550420f..cc0acf665e3c 100644 --- a/xpcom/base/nsSystemInfo.cpp +++ b/xpcom/base/nsSystemInfo.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsSystemInfo.h" #include "prsystem.h" diff --git a/xpcom/build/PoisonIOInterposerMac.cpp b/xpcom/build/PoisonIOInterposerMac.cpp index 5f8ffdd23cce..0b92ef6c4e12 100644 --- a/xpcom/build/PoisonIOInterposerMac.cpp +++ b/xpcom/build/PoisonIOInterposerMac.cpp @@ -7,6 +7,7 @@ #include "PoisonIOInterposer.h" #include "mach_override.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Assertions.h" #include "mozilla/DebugOnly.h" #include "mozilla/IOInterposer.h" @@ -14,7 +15,6 @@ #include "mozilla/ProcessedStack.h" #include "mozilla/Scoped.h" #include "mozilla/Telemetry.h" -#include "mozilla/Util.h" #include "nsPrintfCString.h" #include "nsStackWalk.h" #include "nsTraceRefcntImpl.h" diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestParser.cpp index 9cff5a4352e5..95a96534f54a 100644 --- a/xpcom/components/ManifestParser.cpp +++ b/xpcom/components/ManifestParser.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "ManifestParser.h" diff --git a/xpcom/io/nsDirectoryService.cpp b/xpcom/io/nsDirectoryService.cpp index ce6cbd4a14dd..aa1640d7f0a4 100644 --- a/xpcom/io/nsDirectoryService.cpp +++ b/xpcom/io/nsDirectoryService.cpp @@ -4,7 +4,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCOMPtr.h" #include "nsAutoPtr.h" diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp index ed137c29d197..1607c3dfac88 100644 --- a/xpcom/io/nsLocalFileUnix.cpp +++ b/xpcom/io/nsLocalFileUnix.cpp @@ -7,7 +7,7 @@ * Implementation of nsIFile for "unixy" systems. */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Attributes.h" #include diff --git a/xpcom/io/nsLocalFileWin.cpp b/xpcom/io/nsLocalFileWin.cpp index a0176bfb7b18..6c5d736eca62 100644 --- a/xpcom/io/nsLocalFileWin.cpp +++ b/xpcom/io/nsLocalFileWin.cpp @@ -3,8 +3,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "mozilla/ArrayUtils.h" #include "mozilla/DebugOnly.h" -#include "mozilla/Util.h" #include "mozilla/WindowsVersion.h" #include "nsCOMPtr.h" diff --git a/xpcom/tests/MoreTestingAtoms.cpp b/xpcom/tests/MoreTestingAtoms.cpp index c64a14cbacca..09433cd187e6 100644 --- a/xpcom/tests/MoreTestingAtoms.cpp +++ b/xpcom/tests/MoreTestingAtoms.cpp @@ -3,8 +3,6 @@ * 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/Util.h" - #include "MoreTestingAtoms.h" #include "nsStaticAtom.h" #include "nsMemory.h" diff --git a/xpcom/tests/TestAtoms.cpp b/xpcom/tests/TestAtoms.cpp index 4688929eaaba..7da8f4c17212 100644 --- a/xpcom/tests/TestAtoms.cpp +++ b/xpcom/tests/TestAtoms.cpp @@ -3,7 +3,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsIAtom.h" #include "nsString.h" diff --git a/xpcom/tests/TestDeadlockDetector.cpp b/xpcom/tests/TestDeadlockDetector.cpp index f2e725d738a0..4a5e0b193307 100644 --- a/xpcom/tests/TestDeadlockDetector.cpp +++ b/xpcom/tests/TestDeadlockDetector.cpp @@ -4,7 +4,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include "prenv.h" #include "prerror.h" diff --git a/xpcom/tests/TestHarness.h b/xpcom/tests/TestHarness.h index a29cf2d93920..9a24dbc9ff22 100644 --- a/xpcom/tests/TestHarness.h +++ b/xpcom/tests/TestHarness.h @@ -20,7 +20,7 @@ #define STATIC_JS_API #endif -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "prenv.h" #include "nsComponentManagerUtils.h" diff --git a/xpcom/tests/TestTArray.cpp b/xpcom/tests/TestTArray.cpp index 42c752452cfb..e4cac3c84d2e 100644 --- a/xpcom/tests/TestTArray.cpp +++ b/xpcom/tests/TestTArray.cpp @@ -4,7 +4,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include #include diff --git a/xpcom/tests/TestUTF.cpp b/xpcom/tests/TestUTF.cpp index 7f1effdb761b..54bf178c1889 100644 --- a/xpcom/tests/TestUTF.cpp +++ b/xpcom/tests/TestUTF.cpp @@ -2,7 +2,7 @@ * 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/Util.h" +#include "mozilla/ArrayUtils.h" #include #include diff --git a/xpcom/tests/TestingAtoms.cpp b/xpcom/tests/TestingAtoms.cpp index f03cf658e595..f1521d9ab70b 100644 --- a/xpcom/tests/TestingAtoms.cpp +++ b/xpcom/tests/TestingAtoms.cpp @@ -3,8 +3,6 @@ * 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/Util.h" - #include "TestingAtoms.h" #include "nsStaticAtom.h" #include "nsMemory.h" diff --git a/xpcom/threads/BackgroundHangMonitor.cpp b/xpcom/threads/BackgroundHangMonitor.cpp index a56b34bea873..966f3aec9b9f 100644 --- a/xpcom/threads/BackgroundHangMonitor.cpp +++ b/xpcom/threads/BackgroundHangMonitor.cpp @@ -3,6 +3,7 @@ * 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/ArrayUtils.h" #include "mozilla/BackgroundHangMonitor.h" #include "mozilla/LinkedList.h" #include "mozilla/Monitor.h" diff --git a/xpcom/threads/nsProcessCommon.cpp b/xpcom/threads/nsProcessCommon.cpp index 9d992c7b6520..66d073875e14 100644 --- a/xpcom/threads/nsProcessCommon.cpp +++ b/xpcom/threads/nsProcessCommon.cpp @@ -11,7 +11,7 @@ ***************************************************************************** */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCOMPtr.h" #include "nsAutoPtr.h"