Merge inbound and m-c. IGNORE BAD COMMIT MESSAGES

This commit is contained in:
Ryan VanderMeulen 2013-06-25 17:02:45 -04:00
Родитель 3a1ceb6c1f 67599314dd
Коммит d13c9361a4
300 изменённых файлов: 2025 добавлений и 1523 удалений

Просмотреть файл

@ -830,6 +830,10 @@ already_AddRefed<nsFrameSelection>
XULTextFieldAccessible::FrameSelection()
{
nsCOMPtr<nsIContent> inputContent(GetInputField());
NS_ASSERTION(inputContent, "No input content");
if (!inputContent)
return nullptr;
nsIFrame* frame = inputContent->GetPrimaryFrame();
return frame ? frame->GetFrameSelection() : nullptr;
}

Просмотреть файл

@ -632,7 +632,7 @@ pref("plugins.hide_infobar_for_outdated_plugin", false);
pref("plugins.update.url", "https://www.mozilla.org/%LOCALE%/plugincheck/");
pref("plugins.update.notifyUser", false);
pref("plugins.click_to_play", false);
pref("plugins.click_to_play", true);
// display door hanger if flash not installed
pref("plugins.notifyMissingFlash", true);

Просмотреть файл

@ -48,6 +48,14 @@ function test() {
function installListener(next, aManifest) {
let expectEvent = "onInstalling";
let prefname = getManifestPrefname(aManifest);
// wait for the actual removal to call next
SocialService.registerProviderListener(function providerListener(topic, data) {
if (topic == "provider-removed") {
SocialService.unregisterProviderListener(providerListener);
executeSoon(next);
}
});
return {
onInstalling: function(addon) {
is(expectEvent, "onInstalling", "install started");
@ -73,7 +81,6 @@ function installListener(next, aManifest) {
is(addon.manifest.origin, aManifest.origin, "provider uninstalled");
ok(!Services.prefs.prefHasUserValue(prefname), "manifest is not in user-prefs");
AddonManager.removeAddonListener(this);
next();
}
};
}

Просмотреть файл

@ -55,17 +55,18 @@ var tests = {
setAndUpdateBlocklist(blocklistURL, function() {
try {
SocialService.addProvider(manifest, function(provider) {
if (provider) {
try {
SocialService.removeProvider(provider.origin, function() {
ok(true, "added and removed provider");
finish(true);
});
} else {
} catch(e) {
ok(false, "SocialService.removeProvider threw exception: " + e);
finish(false);
}
});
} catch(e) {
dump(e+" - "+e.stack+"\n");
ok(false, "SocialService.addProvider threw exception: " + e);
finish(false);
}
});
@ -80,15 +81,11 @@ var tests = {
setAndUpdateBlocklist(blocklistURL, function() {
try {
SocialService.addProvider(manifest_bad, function(provider) {
if (provider) {
SocialService.removeProvider(provider.origin, function() {
finish(false);
});
} else {
finish(true);
}
ok(false, "SocialService.addProvider should throw blocklist exception");
finish(false);
});
} catch(e) {
ok(true, "SocialService.addProvider should throw blocklist exception");
finish(true);
}
});

Просмотреть файл

@ -149,6 +149,7 @@ function runSocialTestWithProvider(manifest, callback, finishcallback) {
function runSocialTests(tests, cbPreTest, cbPostTest, cbFinish) {
let testIter = Iterator(tests);
let providersAtStart = Social.providers.length;
info("runSocialTests: start test run with " + providersAtStart + " providers");
if (cbPreTest === undefined) {
cbPreTest = function(cb) {cb()};
@ -164,6 +165,7 @@ function runSocialTests(tests, cbPreTest, cbPostTest, cbFinish) {
} catch (err if err instanceof StopIteration) {
// out of items:
(cbFinish || defaultFinishChecks)();
info("runSocialTests: finish test run with " + Social.providers.length + " providers");
return;
}
// We run on a timeout as the frameworker also makes use of timeouts, so
@ -174,7 +176,7 @@ function runSocialTests(tests, cbPreTest, cbPostTest, cbFinish) {
cbPostTest(runNextTest);
}
cbPreTest(function() {
is(providersAtStart, Social.providers.length, "no new providers left enabled");
is(providersAtStart, Social.providers.length, "pre-test: no new providers left enabled");
info("sub-test " + name + " starting");
try {
func.call(tests, cleanupAndRunNextTest);

Просмотреть файл

@ -321,17 +321,6 @@ let PermissionDefaults = {
Services.prefs.setBoolPref("dom.disable_open_during_load", value);
},
get plugins() {
if (Services.prefs.getBoolPref("plugins.click_to_play")) {
return this.UNKNOWN;
}
return this.ALLOW;
},
set plugins(aValue) {
let value = (aValue != this.ALLOW);
Services.prefs.setBoolPref("plugins.click_to_play", value);
},
get fullscreen() {
if (!Services.prefs.getBoolPref("full-screen-api.enabled")) {
return this.DENY;
@ -380,7 +369,7 @@ let AboutPermissions = {
*
* Potential future additions: "sts/use", "sts/subd"
*/
_supportedPermissions: ["password", "cookie", "geo", "indexedDB", "popup", "plugins", "fullscreen"],
_supportedPermissions: ["password", "cookie", "geo", "indexedDB", "popup", "fullscreen"],
/**
* Permissions that don't have a global "Allow" option.
@ -390,7 +379,7 @@ let AboutPermissions = {
/**
* Permissions that don't have a global "Deny" option.
*/
_noGlobalDeny: ["plugins"],
_noGlobalDeny: [],
_stringBundle: Services.strings.
createBundle("chrome://browser/locale/preferences/aboutPermissions.properties"),
@ -412,7 +401,6 @@ let AboutPermissions = {
Services.prefs.addObserver("geo.enabled", this, false);
Services.prefs.addObserver("dom.indexedDB.enabled", this, false);
Services.prefs.addObserver("dom.disable_open_during_load", this, false);
Services.prefs.addObserver("plugins.click_to_play", this, false);
Services.prefs.addObserver("full-screen-api.enabled", this, false);
Services.obs.addObserver(this, "perm-changed", false);
@ -434,7 +422,6 @@ let AboutPermissions = {
Services.prefs.removeObserver("geo.enabled", this, false);
Services.prefs.removeObserver("dom.indexedDB.enabled", this, false);
Services.prefs.removeObserver("dom.disable_open_during_load", this, false);
Services.prefs.removeObserver("plugins.click_to_play", this, false);
Services.prefs.removeObserver("full-screen-api.enabled", this, false);
Services.obs.removeObserver(this, "perm-changed");
@ -758,18 +745,11 @@ let AboutPermissions = {
if (!this._selectedSite) {
// If there is no selected site, we are updating the default permissions interface.
permissionValue = PermissionDefaults[aType];
if (aType == "plugins")
document.getElementById("plugins-pref-item").hidden = false;
else if (aType == "cookie")
if (aType == "cookie")
// cookie-9 corresponds to ALLOW_FIRST_PARTY_ONLY, which is reserved
// for site-specific preferences only.
document.getElementById("cookie-9").hidden = true;
} else {
if (aType == "plugins") {
document.getElementById("plugins-pref-item").hidden =
!Services.prefs.getBoolPref("plugins.click_to_play");
return;
}
if (aType == "cookie")
document.getElementById("cookie-9").hidden = false;
let result = {};

Просмотреть файл

@ -191,27 +191,6 @@
</vbox>
</hbox>
<!-- Opt-in activation of Plug-ins -->
<hbox id="plugins-pref-item"
class="pref-item" align="top">
<image class="pref-icon" type="plugins"/>
<vbox>
<label class="pref-title" value="&plugins.label;"/>
<hbox>
<menulist id="plugins-menulist"
class="pref-menulist"
type="plugins"
oncommand="AboutPermissions.onPermissionCommand(event);">
<menupopup>
<menuitem id="plugins-0" value="0" label="&permission.alwaysAsk;"/>
<menuitem id="plugins-1" value="1" label="&permission.allow;"/>
<menuitem id="plugins-2" value="2" label="&permission.block;"/>
</menupopup>
</menulist>
</hbox>
</vbox>
</hbox>
<!-- Fullscreen -->
<hbox id="fullscreen-pref-item"
class="pref-item" align="top">

Просмотреть файл

@ -26,7 +26,6 @@ const TEST_PERMS = {
"geo": PERM_UNKNOWN,
"indexedDB": PERM_UNKNOWN,
"popup": PERM_DENY,
"plugins" : PERM_ALLOW,
"fullscreen" : PERM_UNKNOWN,
};
@ -37,7 +36,7 @@ const NO_GLOBAL_ALLOW = [
];
// number of managed permissions in the interface
const TEST_PERMS_COUNT = 7;
const TEST_PERMS_COUNT = 6;
function test() {
waitForExplicitFinish();

Просмотреть файл

@ -113,7 +113,7 @@ crashedpluginsMessage.submitButton.accesskey=S
crashedpluginsMessage.learnMore=Learn More…
## Plugin doorhanger strings
# LOCALIZATION NOTE (pluginActivateNw.message): Used for newly-installed
# LOCALIZATION NOTE (pluginActivateNew.message): Used for newly-installed
# plugins which are not known to be unsafe. %1$S is the plugin name and %2$S
# is the site domain.
pluginActivateNew.message=Allow %2$S to run "%1$S"?
@ -160,7 +160,7 @@ pluginContinue.accesskey=C
# in-page UI
PluginClickToActivate=Activate %S.
PluginVulnerableUpdatable=Thus plugin is vulnerable and should be updated.
PluginVulnerableUpdatable=This plugin is vulnerable and should be updated.
PluginVulnerableNoUpdate=This plugin has security vulnerabilities.
# Sanitize

Просмотреть файл

@ -4,6 +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/MemoryReporting.h"
#include "nsNullPrincipalURI.h"
#include "nsNetUtil.h"
#include "nsEscape.h"
@ -272,14 +273,14 @@ nsNullPrincipalURI::SchemeIs(const char *aScheme, bool *_schemeIs)
//// nsISizeOf
size_t
nsNullPrincipalURI::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
nsNullPrincipalURI::SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
{
return mScheme.SizeOfExcludingThisIfUnshared(aMallocSizeOf) +
mPath.SizeOfExcludingThisIfUnshared(aMallocSizeOf);
}
size_t
nsNullPrincipalURI::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const {
nsNullPrincipalURI::SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const {
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
}

Просмотреть файл

@ -16,6 +16,7 @@
#include "nsAutoPtr.h"
#include "nsString.h"
#include "mozilla/Attributes.h"
#include "mozilla/MemoryReporting.h"
// {51fcd543-3b52-41f7-b91b-6b54102236e6}
#define NS_NULLPRINCIPALURI_IMPLEMENTATION_CID \
@ -30,8 +31,8 @@ public:
NS_DECL_NSIURI
// nsISizeOf
virtual size_t SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
virtual size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
nsNullPrincipalURI(const nsCString &aSpec);

Просмотреть файл

@ -13,6 +13,7 @@
#define FragmentOrElement_h___
#include "mozilla/Attributes.h"
#include "mozilla/MemoryReporting.h"
#include "nsAttrAndChildArray.h" // member
#include "nsCycleCollectionParticipant.h" // NS_DECL_CYCLE_*
#include "nsIContent.h" // base class
@ -298,7 +299,7 @@ public:
void Traverse(nsCycleCollectionTraversalCallback &cb, bool aIsXUL);
void Unlink(bool aIsXUL);
size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
/**
* The .style attribute (an interface that forwards to the actual

Просмотреть файл

@ -17,6 +17,7 @@
#include "nsPropertyTable.h" // for typedefs
#include "nsTObserverArray.h" // for member
#include "nsWindowMemoryReporter.h" // for NS_DECL_SIZEOF_EXCLUDING_THIS
#include "mozilla/MemoryReporting.h"
#include "mozilla/dom/EventTarget.h" // for base class
// Including 'windows.h' will #define GetClassInfo to something else.
@ -299,7 +300,7 @@ public:
// way that |this| points to the start of the allocated object, even in
// methods of nsINode's sub-classes, and so |aMallocSizeOf(this)| is always
// safe to call no matter which object it was invoked on.
virtual size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const {
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const {
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
}

Просмотреть файл

@ -10,6 +10,7 @@
* utility methods for subclasses, and so forth.
*/
#include "mozilla/MemoryReporting.h"
#include "mozilla/Util.h"
#include "mozilla/Likely.h"
@ -593,7 +594,7 @@ FragmentOrElement::nsDOMSlots::Unlink(bool aIsXUL)
}
size_t
FragmentOrElement::nsDOMSlots::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const
FragmentOrElement::nsDOMSlots::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
{
size_t n = aMallocSizeOf(this);
@ -1834,7 +1835,7 @@ FragmentOrElement::FireNodeRemovedForChildren()
}
size_t
FragmentOrElement::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
FragmentOrElement::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
{
size_t n = 0;
n += nsIContent::SizeOfExcludingThis(aMallocSizeOf);

Просмотреть файл

@ -6,6 +6,7 @@
#include "Link.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/dom/Element.h"
#include "nsEventStates.h"
#include "nsIURL.h"
@ -500,7 +501,7 @@ Link::SetHrefAttribute(nsIURI *aURI)
}
size_t
Link::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
Link::SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
{
size_t n = 0;

Просмотреть файл

@ -12,6 +12,7 @@
#define mozilla_dom_Link_h__
#include "mozilla/IHistory.h"
#include "mozilla/MemoryReporting.h"
#include "nsIContent.h"
namespace mozilla {
@ -98,7 +99,7 @@ public:
virtual bool HasDeferredDNSPrefetchRequest() { return true; }
virtual size_t
SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
bool ElementHasHref() const;

Просмотреть файл

@ -8,6 +8,7 @@
* the two is unified to minimize footprint.
*/
#include "mozilla/MemoryReporting.h"
#include "nsAttrAndChildArray.h"
#include "nsMappedAttributeElement.h"
#include "prbit.h"
@ -836,7 +837,7 @@ nsAttrAndChildArray::SetChildAtPos(void** aPos, nsIContent* aChild,
}
size_t
nsAttrAndChildArray::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
nsAttrAndChildArray::SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
{
size_t n = 0;
if (mImpl) {

Просмотреть файл

@ -12,6 +12,7 @@
#define nsAttrAndChildArray_h___
#include "mozilla/Attributes.h"
#include "mozilla/MemoryReporting.h"
#include "nscore.h"
#include "nsAttrName.h"
@ -116,7 +117,7 @@ public:
!AttrSlotIsTaken(ATTRCHILD_ARRAY_MAX_ATTR_COUNT - 1);
}
size_t SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
bool HasMappedAttrs() const
{
return MappedAttrCount();

Просмотреть файл

@ -15,6 +15,7 @@
#include "nsAttrValueInlines.h"
#include "nsIAtom.h"
#include "nsUnicharUtils.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/css/StyleRule.h"
#include "mozilla/css/Declaration.h"
#include "nsContentUtils.h"
@ -1949,7 +1950,7 @@ nsAttrValue::StringToInteger(const nsAString& aValue, bool* aStrict,
}
size_t
nsAttrValue::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
nsAttrValue::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
{
size_t n = 0;

Просмотреть файл

@ -21,6 +21,7 @@
#include "SVGAttrValueWrapper.h"
#include "nsTArrayForwardDeclare.h"
#include "nsIAtom.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/dom/BindingDeclarations.h"
class nsAString;
@ -371,7 +372,7 @@ public:
bool ParseStyleAttribute(const nsAString& aString,
nsStyledElementNotElementCSSInlineStyle* aElement);
size_t SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
private:
// These have to be the same as in ValueType

Просмотреть файл

@ -9,6 +9,7 @@
#include "nsDOMAttributeMap.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/dom/Attr.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/MozNamedAttrMapBinding.h"
@ -533,14 +534,14 @@ nsDOMAttributeMap::Enumerate(AttrCache::EnumReadFunction aFunc,
size_t
AttrCacheSizeEnumerator(const nsAttrKey& aKey,
const nsRefPtr<Attr>& aValue,
nsMallocSizeOfFun aMallocSizeOf,
MallocSizeOf aMallocSizeOf,
void* aUserArg)
{
return aMallocSizeOf(aValue.get());
}
size_t
nsDOMAttributeMap::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const
nsDOMAttributeMap::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
{
size_t n = aMallocSizeOf(this);
n += mAttributeCache.SizeOfExcludingThis(AttrCacheSizeEnumerator,

Просмотреть файл

@ -10,6 +10,7 @@
#ifndef nsDOMAttributeMap_h
#define nsDOMAttributeMap_h
#include "mozilla/MemoryReporting.h"
#include "mozilla/dom/Attr.h"
#include "mozilla/ErrorResult.h"
#include "nsCycleCollectionParticipant.h"
@ -181,7 +182,7 @@ public:
// No supported names we want to show up in iteration.
}
size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
private:
nsCOMPtr<Element> mContent;

Просмотреть файл

@ -9,6 +9,7 @@
*/
#include "mozilla/DebugOnly.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/Util.h"
#include "mozilla/Likely.h"
#include <algorithm>
@ -452,7 +453,7 @@ nsIdentifierMapEntry::HasIdElementExposedAsHTMLDocumentProperty()
// static
size_t
nsIdentifierMapEntry::SizeOfExcludingThis(nsIdentifierMapEntry* aEntry,
nsMallocSizeOfFun aMallocSizeOf,
MallocSizeOf aMallocSizeOf,
void*)
{
return aEntry->GetKey().SizeOfExcludingThisIfUnshared(aMallocSizeOf);
@ -11066,14 +11067,14 @@ nsIDocument::DocSizeOfIncludingThis(nsWindowSizes* aWindowSizes) const
static size_t
SizeOfStyleSheetsElementIncludingThis(nsIStyleSheet* aStyleSheet,
nsMallocSizeOfFun aMallocSizeOf,
MallocSizeOf aMallocSizeOf,
void* aData)
{
return aStyleSheet->SizeOfIncludingThis(aMallocSizeOf);
}
size_t
nsDocument::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
nsDocument::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
{
// This SizeOfExcludingThis() overrides the one from nsINode. But
// nsDocuments can only appear at the top of the DOM tree, and we use the

Просмотреть файл

@ -62,6 +62,7 @@
#include "nsISecurityEventSink.h"
#include "nsIChannelEventSink.h"
#include "imgIRequest.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/dom/DOMImplementation.h"
#include "nsIDOMTouchEvent.h"
#include "nsIInlineEventHandlers.h"
@ -224,7 +225,7 @@ public:
};
static size_t SizeOfExcludingThis(nsIdentifierMapEntry* aEntry,
nsMallocSizeOfFun aMallocSizeOf,
mozilla::MallocSizeOf aMallocSizeOf,
void* aArg);
private:

Просмотреть файл

@ -11,6 +11,7 @@
#include "mozilla/DebugOnly.h"
#include "nsGenericDOMDataNode.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/dom/Element.h"
#include "nsIDocument.h"
#include "nsEventListenerManager.h"
@ -920,7 +921,7 @@ nsGenericDOMDataNode::GetClassAttributeName() const
}
size_t
nsGenericDOMDataNode::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
nsGenericDOMDataNode::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
{
size_t n = nsIContent::SizeOfExcludingThis(aMallocSizeOf);
n += mText.SizeOfExcludingThis(aMallocSizeOf);

Просмотреть файл

@ -15,6 +15,7 @@
#include "mozAutoDocUpdate.h"
#include "mozilla/CORSMode.h"
#include "mozilla/Likely.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/Telemetry.h"
#include "mozilla/Util.h"
#include "nsAsyncDOMEvent.h"
@ -2074,7 +2075,7 @@ nsINode::UnbindObject(nsISupports* aObject)
}
size_t
nsINode::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
nsINode::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
{
size_t n = 0;
nsEventListenerManager* elm =

Просмотреть файл

@ -12,6 +12,7 @@
#include "nsHTMLStyleSheet.h"
#include "nsRuleWalker.h"
#include "mozilla/HashFunctions.h"
#include "mozilla/MemoryReporting.h"
using namespace mozilla;
@ -248,7 +249,7 @@ nsMappedAttributes::IndexOfAttr(nsIAtom* aLocalName) const
}
size_t
nsMappedAttributes::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const
nsMappedAttributes::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
{
NS_ASSERTION(mAttrCount == mBufferSize,
"mBufferSize and mAttrCount are expected to be the same.");

Просмотреть файл

@ -15,6 +15,7 @@
#include "nsMappedAttributeElement.h"
#include "nsIStyleRule.h"
#include "mozilla/Attributes.h"
#include "mozilla/MemoryReporting.h"
class nsIAtom;
class nsHTMLStyleSheet;
@ -77,7 +78,7 @@ public:
virtual void List(FILE* out = stdout, int32_t aIndent = 0) const MOZ_OVERRIDE;
#endif
size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
private:
nsMappedAttributes(const nsMappedAttributes& aCopy);

Просмотреть файл

@ -20,6 +20,7 @@
* nsIAtom pointers, and the values are void pointers.
*/
#include "mozilla/MemoryReporting.h"
#include "nsPropertyTable.h"
#include "pldhash.h"
#include "nsError.h"
@ -52,7 +53,7 @@ public:
return mName == aPropertyName;
}
size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf);
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf);
nsCOMPtr<nsIAtom> mName; // property name
PLDHashTable mObjectValueMap; // map of object/value pairs
@ -340,7 +341,7 @@ nsPropertyTable::PropertyList::DeletePropertyFor(nsPropertyOwner aObject)
}
size_t
nsPropertyTable::PropertyList::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf)
nsPropertyTable::PropertyList::SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf)
{
size_t n = aMallocSizeOf(this);
n += PL_DHashTableSizeOfExcludingThis(&mObjectValueMap, nullptr, aMallocSizeOf);
@ -348,7 +349,7 @@ nsPropertyTable::PropertyList::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSize
}
size_t
nsPropertyTable::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
nsPropertyTable::SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
{
size_t n = 0;

Просмотреть файл

@ -23,6 +23,7 @@
#ifndef nsPropertyTable_h_
#define nsPropertyTable_h_
#include "mozilla/MemoryReporting.h"
#include "nscore.h"
class nsIAtom;
@ -176,7 +177,7 @@ class nsPropertyTable
class PropertyList;
size_t SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
private:
NS_HIDDEN_(void) DestroyPropertyList();

Просмотреть файл

@ -16,6 +16,7 @@
#include "nsBidiUtils.h"
#include "nsUnicharUtils.h"
#include "nsUTF8Utils.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/SSE.h"
#include "nsTextFragmentImpl.h"
#include <algorithm>
@ -392,7 +393,7 @@ nsTextFragment::Append(const PRUnichar* aBuffer, uint32_t aLength, bool aUpdateB
}
/* virtual */ size_t
nsTextFragment::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
nsTextFragment::SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
{
if (Is2b()) {
return aMallocSizeOf(m2b);

Просмотреть файл

@ -12,6 +12,7 @@
#define nsTextFragment_h___
#include "mozilla/Attributes.h"
#include "mozilla/MemoryReporting.h"
#include "nsString.h"
#include "nsReadableUtils.h"
@ -174,7 +175,7 @@ public:
uint32_t mLength : 29;
};
size_t SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
private:
void ReleaseText();

Просмотреть файл

@ -4,6 +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/MemoryReporting.h"
#include "mozilla/Util.h"
#include "nsXMLHttpRequest.h"
@ -534,7 +535,7 @@ nsXMLHttpRequest::DisconnectFromOwner()
size_t
nsXMLHttpRequest::SizeOfEventTargetIncludingThis(
nsMallocSizeOfFun aMallocSizeOf) const
MallocSizeOf aMallocSizeOf) const
{
size_t n = aMallocSizeOf(this);
n += mResponseBody.SizeOfExcludingThisIfUnshared(aMallocSizeOf);

Просмотреть файл

@ -37,6 +37,7 @@
#include "nsISizeOfEventTarget.h"
#include "mozilla/Assertions.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/dom/BindingUtils.h"
#include "mozilla/dom/TypedArray.h"
#include "mozilla/dom/XMLHttpRequestBinding.h"
@ -227,7 +228,7 @@ public:
// nsISizeOfEventTarget
virtual size_t
SizeOfEventTargetIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
SizeOfEventTargetIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsXHREventTarget)

Просмотреть файл

@ -13,6 +13,7 @@
#include "nsWrapperCache.h"
#include "mozilla/LinkedList.h"
#include "mozilla/MemoryReporting.h"
namespace mozilla {
@ -32,7 +33,7 @@ public:
void Delete();
size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const {
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const {
size_t sizeOfCache = mCache ? mCache->SizeOfIncludingThis(aMallocSizeOf) : 0;
return aMallocSizeOf(this) + sizeOfCache;
}

Просмотреть файл

@ -7,6 +7,7 @@
#include "nsTArray.h"
#include "mozilla/Assertions.h"
#include "mozilla/MemoryReporting.h"
#include <cstdlib>
#include <cstring>
@ -306,7 +307,7 @@ public:
void Update();
size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
{
return aMallocSizeOf(this) + mTreeData.SizeOfExcludingThis(aMallocSizeOf);
}
@ -558,7 +559,7 @@ bool WebGLElementArrayCache::Validate(GLenum type, uint32_t maxAllowed, size_t f
return false;
}
size_t WebGLElementArrayCache::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const {
size_t WebGLElementArrayCache::SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const {
size_t uint8TreeSize = mUint8Tree ? mUint8Tree->SizeOfIncludingThis(aMallocSizeOf) : 0;
size_t uint16TreeSize = mUint16Tree ? mUint16Tree->SizeOfIncludingThis(aMallocSizeOf) : 0;
size_t uint32TreeSize = mUint32Tree ? mUint32Tree->SizeOfIncludingThis(aMallocSizeOf) : 0;

Просмотреть файл

@ -6,6 +6,7 @@
#ifndef WEBGLELEMENTARRAYCACHE_H
#define WEBGLELEMENTARRAYCACHE_H
#include "mozilla/MemoryReporting.h"
#include "mozilla/StandardInteger.h"
#include "nscore.h"
#include "GLDefs.h"
@ -47,7 +48,7 @@ public:
~WebGLElementArrayCache();
size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
private:

Просмотреть файл

@ -6,6 +6,7 @@
#include "WebGLObjectModel.h"
#include "WebGLShader.h"
#include "WebGLContext.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/dom/WebGLRenderingContextBinding.h"
#include "nsContentUtils.h"
@ -39,7 +40,7 @@ WebGLShader::Delete() {
}
size_t
WebGLShader::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const {
WebGLShader::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const {
return aMallocSizeOf(this) +
mSource.SizeOfExcludingThisIfUnshared(aMallocSizeOf) +
mTranslationLog.SizeOfExcludingThisIfUnshared(aMallocSizeOf);

Просмотреть файл

@ -14,6 +14,7 @@
#include "angle/ShaderLang.h"
#include "mozilla/LinkedList.h"
#include "mozilla/MemoryReporting.h"
namespace mozilla {
@ -39,7 +40,7 @@ public:
DeleteOnce();
}
size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
WebGLuint GLName() { return mGLName; }
WebGLenum ShaderType() { return mType; }

Просмотреть файл

@ -24,6 +24,7 @@
#include "nsLayoutUtils.h"
#include "nsINameSpaceManager.h"
#include "nsIContent.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/dom/Element.h"
#include "nsIFrame.h"
#include "nsView.h"
@ -1275,7 +1276,7 @@ nsEventListenerManager::GetEventHandlerInternal(nsIAtom *aEventName)
}
size_t
nsEventListenerManager::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf)
nsEventListenerManager::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf)
const
{
size_t n = aMallocSizeOf(this);

Просмотреть файл

@ -18,6 +18,7 @@
#include "nsTObserverArray.h"
#include "nsGUIEvent.h"
#include "nsIJSEventListener.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/dom/EventTarget.h"
#include "mozilla/dom/EventListenerBinding.h"
@ -400,7 +401,7 @@ public:
bool MayHaveMouseEnterLeaveEventListener() { return mMayHaveMouseEnterLeaveEventListener; }
size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
void MarkForCC();

Просмотреть файл

@ -4,6 +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/MemoryReporting.h"
#include "mozilla/dom/HTMLAnchorElement.h"
#include "mozilla/dom/HTMLAnchorElementBinding.h"
@ -413,7 +414,7 @@ HTMLAnchorElement::IntrinsicState() const
}
size_t
HTMLAnchorElement::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
HTMLAnchorElement::SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
{
return nsGenericHTMLElement::SizeOfExcludingThis(aMallocSizeOf) +
Link::SizeOfExcludingThis(aMallocSizeOf);

Просмотреть файл

@ -4,6 +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/MemoryReporting.h"
#include "mozilla/dom/HTMLAreaElement.h"
#include "mozilla/dom/HTMLAreaElementBinding.h"
#include "base/compiler_specific.h"
@ -232,7 +233,7 @@ HTMLAreaElement::IntrinsicState() const
}
size_t
HTMLAreaElement::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
HTMLAreaElement::SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
{
return nsGenericHTMLElement::SizeOfExcludingThis(aMallocSizeOf) +
Link::SizeOfExcludingThis(aMallocSizeOf);

Просмотреть файл

@ -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/MemoryReporting.h"
#include "mozilla/dom/HTMLLinkElement.h"
#include "mozilla/dom/HTMLLinkElementBinding.h"
@ -404,7 +405,7 @@ HTMLLinkElement::IntrinsicState() const
}
size_t
HTMLLinkElement::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
HTMLLinkElement::SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
{
return nsGenericHTMLElement::SizeOfExcludingThis(aMallocSizeOf) +
Link::SizeOfExcludingThis(aMallocSizeOf);

Просмотреть файл

@ -11,6 +11,7 @@
#include "nsIXULAppInfo.h"
#include "nsPluginArray.h"
#include "nsMimeTypeArray.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/dom/DesktopNotification.h"
#include "nsGeolocation.h"
#include "nsIHttpProtocolHandler.h"
@ -1536,7 +1537,7 @@ Navigator::GetMozCameras(nsISupports** aCameraManager)
}
size_t
Navigator::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const
Navigator::SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
{
size_t n = aMallocSizeOf(this);

Просмотреть файл

@ -7,6 +7,7 @@
#ifndef mozilla_dom_Navigator_h
#define mozilla_dom_Navigator_h
#include "mozilla/MemoryReporting.h"
#include "nsIDOMNavigator.h"
#include "nsIDOMNavigatorGeolocation.h"
#include "nsIDOMNavigatorDeviceStorage.h"
@ -200,7 +201,7 @@ public:
static bool HasDesktopNotificationSupport();
size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
/**
* For use during document.write where our inner window changes.

Просмотреть файл

@ -8,6 +8,7 @@
#include <algorithm>
/* This must occur *after* base/basictypes.h to avoid typedefs conflicts. */
#include "mozilla/MemoryReporting.h"
#include "mozilla/Util.h"
// Local Includes
@ -11224,7 +11225,7 @@ nsGlobalWindow::HasIndexedDBSupport()
static size_t
SizeOfEventTargetObjectsEntryExcludingThisFun(
nsPtrHashKey<nsDOMEventTargetHelper> *aEntry,
nsMallocSizeOfFun aMallocSizeOf,
MallocSizeOf aMallocSizeOf,
void *arg)
{
nsISupports *supports = aEntry->GetKey();

Просмотреть файл

@ -11,6 +11,7 @@
#include "xpcpublic.h"
#include "nsIDOMEventListener.h"
#include "nsIAtom.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/dom/EventHandlerBinding.h"
#define NS_IJSEVENTLISTENER_IID \
@ -236,7 +237,7 @@ public:
mHandler.SetHandler(aHandler);
}
virtual size_t SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
{
return 0;
@ -252,7 +253,7 @@ public:
// - mEventName: shared with others
}
virtual size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
{
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
}

Просмотреть файл

@ -7,6 +7,7 @@
#ifndef nsISizeOfEventTarget_h___
#define nsISizeOfEventTarget_h___
#include "mozilla/MemoryReporting.h"
#include "nsISupports.h"
#define NS_ISIZEOFEVENTTARGET_IID \
@ -31,7 +32,7 @@ public:
* itself.
*/
virtual size_t
SizeOfEventTargetIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const = 0;
SizeOfEventTargetIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsISizeOfEventTarget, NS_ISIZEOFEVENTTARGET_IID)

Просмотреть файл

@ -27,6 +27,7 @@
#include "nsCRT.h"
#include "nsIObserverService.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/Preferences.h"
#include "mozilla/Services.h"
@ -43,7 +44,7 @@ public:
nsString mKey;
nsGlobalNameStruct mGlobalName;
size_t SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) {
size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) {
// Measurement of the following members may be added later if DMD finds it
// is worthwhile:
// - mGlobalName
@ -877,7 +878,7 @@ nsScriptNameSpaceManager::EnumerateGlobalNames(GlobalNameEnumerator aEnumerator,
}
static size_t
SizeOfEntryExcludingThis(PLDHashEntryHdr *aHdr, nsMallocSizeOfFun aMallocSizeOf,
SizeOfEntryExcludingThis(PLDHashEntryHdr *aHdr, MallocSizeOf aMallocSizeOf,
void *aArg)
{
GlobalNameMapEntry* entry = static_cast<GlobalNameMapEntry*>(aHdr);
@ -885,7 +886,7 @@ SizeOfEntryExcludingThis(PLDHashEntryHdr *aHdr, nsMallocSizeOfFun aMallocSizeOf,
}
size_t
nsScriptNameSpaceManager::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf)
nsScriptNameSpaceManager::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf)
{
size_t n = 0;
n += PL_DHashTableSizeOfExcludingThis(&mGlobalNames,

Просмотреть файл

@ -21,6 +21,7 @@
#ifndef nsScriptNameSpaceManager_h__
#define nsScriptNameSpaceManager_h__
#include "mozilla/MemoryReporting.h"
#include "nsIScriptNameSpaceManager.h"
#include "nsString.h"
#include "nsID.h"
@ -156,7 +157,7 @@ public:
void EnumerateGlobalNames(GlobalNameEnumerator aEnumerator,
void* aClosure);
size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf);
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf);
private:
// Adds a new entry to the hash and returns the nsGlobalNameStruct

Просмотреть файл

@ -12,6 +12,7 @@
#include "nsDataHashtable.h"
#include "nsWeakReference.h"
#include "nsAutoPtr.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/TimeStamp.h"
#include "nsArenaMemoryStats.h"
#include "mozilla/Attributes.h"
@ -21,15 +22,15 @@
// SizeOfExcludingThis from its super-class. SizeOfIncludingThis() need not be
// defined, it is inherited from nsINode.
#define NS_DECL_SIZEOF_EXCLUDING_THIS \
virtual size_t SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
class nsWindowSizes {
public:
nsWindowSizes(nsMallocSizeOfFun aMallocSizeOf) {
nsWindowSizes(mozilla::MallocSizeOf aMallocSizeOf) {
memset(this, 0, sizeof(nsWindowSizes));
mMallocSizeOf = aMallocSizeOf;
}
nsMallocSizeOfFun mMallocSizeOf;
mozilla::MallocSizeOf mMallocSizeOf;
nsArenaMemoryStats mArenaStats;
size_t mDOMElementNodes;
size_t mDOMTextNodes;

Просмотреть файл

@ -7,6 +7,7 @@
#define nsJSEventListener_h__
#include "mozilla/Attributes.h"
#include "mozilla/MemoryReporting.h"
#include "nsIDOMKeyEvent.h"
#include "nsIJSEventListener.h"
#include "nsIDOMEventListener.h"
@ -33,7 +34,7 @@ public:
// nsIJSEventListener
virtual size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const MOZ_OVERRIDE
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE
{
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
}

Просмотреть файл

@ -701,49 +701,63 @@ NS_IMETHODIMP nsWebBrowser::SetProperty(uint32_t aId, uint32_t aValue)
case nsIWebBrowserSetup::SETUP_ALLOW_PLUGINS:
{
NS_ENSURE_STATE(mDocShell);
NS_ENSURE_TRUE((aValue == true || aValue == false), NS_ERROR_INVALID_ARG);
NS_ENSURE_TRUE((aValue == static_cast<uint32_t>(true) ||
aValue == static_cast<uint32_t>(false)),
NS_ERROR_INVALID_ARG);
mDocShell->SetAllowPlugins(!!aValue);
}
break;
case nsIWebBrowserSetup::SETUP_ALLOW_JAVASCRIPT:
{
NS_ENSURE_STATE(mDocShell);
NS_ENSURE_TRUE((aValue == true || aValue == false), NS_ERROR_INVALID_ARG);
NS_ENSURE_TRUE((aValue == static_cast<uint32_t>(true) ||
aValue == static_cast<uint32_t>(false)),
NS_ERROR_INVALID_ARG);
mDocShell->SetAllowJavascript(!!aValue);
}
break;
case nsIWebBrowserSetup::SETUP_ALLOW_META_REDIRECTS:
{
NS_ENSURE_STATE(mDocShell);
NS_ENSURE_TRUE((aValue == true || aValue == false), NS_ERROR_INVALID_ARG);
NS_ENSURE_TRUE((aValue == static_cast<uint32_t>(true) ||
aValue == static_cast<uint32_t>(false)),
NS_ERROR_INVALID_ARG);
mDocShell->SetAllowMetaRedirects(!!aValue);
}
break;
case nsIWebBrowserSetup::SETUP_ALLOW_SUBFRAMES:
{
NS_ENSURE_STATE(mDocShell);
NS_ENSURE_TRUE((aValue == true || aValue == false), NS_ERROR_INVALID_ARG);
NS_ENSURE_TRUE((aValue == static_cast<uint32_t>(true) ||
aValue == static_cast<uint32_t>(false)),
NS_ERROR_INVALID_ARG);
mDocShell->SetAllowSubframes(!!aValue);
}
break;
case nsIWebBrowserSetup::SETUP_ALLOW_IMAGES:
{
NS_ENSURE_STATE(mDocShell);
NS_ENSURE_TRUE((aValue == true || aValue == false), NS_ERROR_INVALID_ARG);
NS_ENSURE_TRUE((aValue == static_cast<uint32_t>(true) ||
aValue == static_cast<uint32_t>(false)),
NS_ERROR_INVALID_ARG);
mDocShell->SetAllowImages(!!aValue);
}
break;
case nsIWebBrowserSetup::SETUP_ALLOW_DNS_PREFETCH:
{
NS_ENSURE_STATE(mDocShell);
NS_ENSURE_TRUE((aValue == true || aValue == false), NS_ERROR_INVALID_ARG);
NS_ENSURE_TRUE((aValue == static_cast<uint32_t>(true) ||
aValue == static_cast<uint32_t>(false)),
NS_ERROR_INVALID_ARG);
mDocShell->SetAllowDNSPrefetch(!!aValue);
}
break;
case nsIWebBrowserSetup::SETUP_USE_GLOBAL_HISTORY:
{
NS_ENSURE_STATE(mDocShell);
NS_ENSURE_TRUE((aValue == true || aValue == false), NS_ERROR_INVALID_ARG);
NS_ENSURE_TRUE((aValue == static_cast<uint32_t>(true) ||
aValue == static_cast<uint32_t>(false)),
NS_ERROR_INVALID_ARG);
rv = EnableGlobalHistory(!!aValue);
mShouldEnableHistory = aValue;
}
@ -755,7 +769,9 @@ NS_IMETHODIMP nsWebBrowser::SetProperty(uint32_t aId, uint32_t aValue)
break;
case nsIWebBrowserSetup::SETUP_IS_CHROME_WRAPPER:
{
NS_ENSURE_TRUE((aValue == true || aValue == false), NS_ERROR_INVALID_ARG);
NS_ENSURE_TRUE((aValue == static_cast<uint32_t>(true) ||
aValue == static_cast<uint32_t>(false)),
NS_ERROR_INVALID_ARG);
SetItemType(aValue ? static_cast<int32_t>(typeChromeWrapper)
: static_cast<int32_t>(typeContentWrapper));
}

Просмотреть файл

@ -8,6 +8,7 @@
#include "mozilla/Base64.h"
#include "mozilla/CheckedInt.h"
#include "mozilla/Attributes.h"
#include "mozilla/MemoryReporting.h"
#include "gfxASurface.h"
#include "gfxContext.h"
@ -671,14 +672,14 @@ gfxASurface::RecordMemoryFreed()
}
size_t
gfxASurface::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
gfxASurface::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
{
// We don't measure mSurface because cairo doesn't allow it.
return 0;
}
size_t
gfxASurface::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const
gfxASurface::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
{
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
}

Просмотреть файл

@ -10,6 +10,7 @@
#define MOZ_DUMP_IMAGES
#endif
#include "mozilla/MemoryReporting.h"
#include "gfxTypes.h"
#include "gfxRect.h"
#include "nsAutoPtr.h"
@ -210,8 +211,8 @@ public:
virtual int32_t KnownMemoryUsed() { return mBytesRecorded; }
virtual size_t SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
virtual size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
// gfxASurface has many sub-classes. This method indicates if a sub-class
// is capable of measuring its own size accurately. If not, the caller
// must fall back to a computed size. (Note that gfxASurface can actually

Просмотреть файл

@ -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/MemoryReporting.h"
#include "mozilla/Util.h"
#ifdef MOZ_LOGGING
@ -213,7 +214,7 @@ gfxDWriteFontFamily::LocalizedName(nsAString &aLocalizedName)
}
void
gfxDWriteFontFamily::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
gfxDWriteFontFamily::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const
{
gfxFontFamily::SizeOfExcludingThis(aMallocSizeOf, aSizes);
@ -222,7 +223,7 @@ gfxDWriteFontFamily::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
}
void
gfxDWriteFontFamily::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
gfxDWriteFontFamily::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const
{
aSizes->mFontListSize += aMallocSizeOf(this);
@ -555,7 +556,7 @@ gfxDWriteFontEntry::IsCJKFont()
}
void
gfxDWriteFontEntry::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
gfxDWriteFontEntry::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const
{
gfxFontEntry::SizeOfExcludingThis(aMallocSizeOf, aSizes);
@ -564,7 +565,7 @@ gfxDWriteFontEntry::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
}
void
gfxDWriteFontEntry::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
gfxDWriteFontEntry::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const
{
aSizes->mFontListSize += aMallocSizeOf(this);
@ -1218,7 +1219,7 @@ gfxDWriteFontList::ResolveFontName(const nsAString& aFontName,
}
void
gfxDWriteFontList::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
gfxDWriteFontList::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const
{
gfxPlatformFontList::SizeOfExcludingThis(aMallocSizeOf, aSizes);
@ -1236,7 +1237,7 @@ gfxDWriteFontList::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
}
void
gfxDWriteFontList::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
gfxDWriteFontList::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const
{
aSizes->mFontListSize += aMallocSizeOf(this);

Просмотреть файл

@ -6,6 +6,7 @@
#ifndef GFX_DWRITEFONTLIST_H
#define GFX_DWRITEFONTLIST_H
#include "mozilla/MemoryReporting.h"
#include "gfxDWriteCommon.h"
#include "gfxFont.h"
@ -48,9 +49,9 @@ public:
void SetForceGDIClassic(bool aForce) { mForceGDIClassic = aForce; }
virtual void SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
virtual void SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const;
virtual void SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
virtual void SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const;
protected:
@ -152,9 +153,9 @@ public:
void SetForceGDIClassic(bool aForce) { mForceGDIClassic = aForce; }
bool GetForceGDIClassic() { return mForceGDIClassic; }
virtual void SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
virtual void SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const;
virtual void SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
virtual void SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const;
protected:
@ -365,9 +366,9 @@ public:
gfxFloat GetForceGDIClassicMaxFontSize() { return mForceGDIClassicMaxFontSize; }
virtual void SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
virtual void SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const;
virtual void SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
virtual void SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const;
private:

Просмотреть файл

@ -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/MemoryReporting.h"
#include "gfxDWriteFonts.h"
#include "gfxDWriteShaper.h"
#include "gfxHarfBuzzShaper.h"
@ -668,7 +669,7 @@ gfxDWriteFont::MeasureGlyphWidth(uint16_t aGlyph)
}
void
gfxDWriteFont::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
gfxDWriteFont::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf,
FontCacheSizes* aSizes) const
{
gfxFont::SizeOfExcludingThis(aMallocSizeOf, aSizes);
@ -677,7 +678,7 @@ gfxDWriteFont::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
}
void
gfxDWriteFont::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
gfxDWriteFont::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf,
FontCacheSizes* aSizes) const
{
aSizes->mFontInstances += aMallocSizeOf(this);

Просмотреть файл

@ -6,6 +6,7 @@
#ifndef GFX_WINDOWSDWRITEFONTS_H
#define GFX_WINDOWSDWRITEFONTS_H
#include "mozilla/MemoryReporting.h"
#include <dwrite.h>
#include "gfxFont.h"
@ -58,9 +59,9 @@ public:
virtual mozilla::TemporaryRef<mozilla::gfx::GlyphRenderingOptions> GetGlyphRenderingOptions();
virtual void SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
virtual void SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontCacheSizes* aSizes) const;
virtual void SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
virtual void SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontCacheSizes* aSizes) const;
virtual FontType GetType() const { return FONT_TYPE_DWRITE; }

Просмотреть файл

@ -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/MemoryReporting.h"
#include "mozilla/Util.h"
#if defined(MOZ_WIDGET_GTK2)
@ -464,7 +465,7 @@ FT2FontEntry::CopyFontTable(uint32_t aTableTag,
}
void
FT2FontEntry::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
FT2FontEntry::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const
{
gfxFontEntry::SizeOfExcludingThis(aMallocSizeOf, aSizes);
@ -473,7 +474,7 @@ FT2FontEntry::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
}
void
FT2FontEntry::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
FT2FontEntry::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const
{
aSizes->mFontListSize += aMallocSizeOf(this);

Просмотреть файл

@ -6,6 +6,8 @@
#ifndef GFX_FT2FONTLIST_H
#define GFX_FT2FONTLIST_H
#include "mozilla/MemoryReporting.h"
#ifdef XP_WIN
#include "gfxWindowsPlatform.h"
#include <windows.h>
@ -74,9 +76,9 @@ public:
// accordingly so that we avoid using bad font tables
void CheckForBrokenFont(gfxFontFamily *aFamily);
virtual void SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
virtual void SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const;
virtual void SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
virtual void SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const;
FT_Face mFTFace;

Просмотреть файл

@ -35,6 +35,7 @@
#include "prlog.h"
#include "prinit.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/Preferences.h"
// rounding and truncation functions for a Freetype floating point number
@ -642,7 +643,7 @@ gfxFT2Font::FillGlyphDataForChar(uint32_t ch, CachedGlyphData *gd)
}
void
gfxFT2Font::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
gfxFT2Font::SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontCacheSizes* aSizes) const
{
gfxFont::SizeOfExcludingThis(aMallocSizeOf, aSizes);
@ -651,7 +652,7 @@ gfxFT2Font::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
}
void
gfxFT2Font::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
gfxFT2Font::SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontCacheSizes* aSizes) const
{
aSizes->mFontInstances += aMallocSizeOf(this);

Просмотреть файл

@ -6,6 +6,7 @@
#ifndef GFX_FT2FONTS_H
#define GFX_FT2FONTS_H
#include "mozilla/MemoryReporting.h"
#include "cairo.h"
#include "gfxTypes.h"
#include "gfxFont.h"
@ -63,9 +64,9 @@ public: // new functions
return &entry->mData;
}
virtual void SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
virtual void SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontCacheSizes* aSizes) const;
virtual void SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
virtual void SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontCacheSizes* aSizes) const;
protected:

Просмотреть файл

@ -35,6 +35,7 @@
#include "nsStyleConsts.h"
#include "mozilla/FloatingPoint.h"
#include "mozilla/Likely.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/Preferences.h"
#include "mozilla/Services.h"
#include "mozilla/Telemetry.h"
@ -325,10 +326,10 @@ public:
mHashKey = 0;
}
size_t SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const {
size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const {
return mTableData.SizeOfExcludingThis(aMallocSizeOf);
}
size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const {
size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const {
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
}
@ -576,7 +577,7 @@ gfxFontEntry::CheckForGraphiteTables()
/* static */ size_t
gfxFontEntry::FontTableHashEntry::SizeOfEntryExcludingThis
(FontTableHashEntry *aEntry,
nsMallocSizeOfFun aMallocSizeOf,
MallocSizeOf aMallocSizeOf,
void* aUserArg)
{
FontListSizes *sizes = static_cast<FontListSizes*>(aUserArg);
@ -594,7 +595,7 @@ gfxFontEntry::FontTableHashEntry::SizeOfEntryExcludingThis
}
void
gfxFontEntry::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
gfxFontEntry::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const
{
aSizes->mFontListSize += mName.SizeOfExcludingThisIfUnshared(aMallocSizeOf);
@ -611,7 +612,7 @@ gfxFontEntry::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
}
void
gfxFontEntry::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
gfxFontEntry::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const
{
aSizes->mFontListSize += aMallocSizeOf(this);
@ -1197,7 +1198,7 @@ gfxFontFamily::FindFont(const nsAString& aPostscriptName)
}
void
gfxFontFamily::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
gfxFontFamily::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const
{
aSizes->mFontListSize +=
@ -1216,7 +1217,7 @@ gfxFontFamily::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
}
void
gfxFontFamily::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
gfxFontFamily::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const
{
aSizes->mFontListSize += aMallocSizeOf(this);
@ -1476,7 +1477,7 @@ gfxFontCache::ClearCachedWordsForFont(HashEntry* aHashEntry, void* aUserData)
/*static*/
size_t
gfxFontCache::SizeOfFontEntryExcludingThis(HashEntry* aHashEntry,
nsMallocSizeOfFun aMallocSizeOf,
MallocSizeOf aMallocSizeOf,
void* aUserArg)
{
HashEntry *entry = static_cast<HashEntry*>(aHashEntry);
@ -1489,7 +1490,7 @@ gfxFontCache::SizeOfFontEntryExcludingThis(HashEntry* aHashEntry,
}
void
gfxFontCache::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
gfxFontCache::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf,
FontCacheSizes* aSizes) const
{
// TODO: add the overhead of the expiration tracker (generation arrays)
@ -1499,7 +1500,7 @@ gfxFontCache::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
}
void
gfxFontCache::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
gfxFontCache::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf,
FontCacheSizes* aSizes) const
{
aSizes->mFontInstances += aMallocSizeOf(this);
@ -3671,14 +3672,14 @@ gfxFont::SynthesizeSpaceWidth(uint32_t aCh)
/*static*/ size_t
gfxFont::WordCacheEntrySizeOfExcludingThis(CacheHashEntry* aHashEntry,
nsMallocSizeOfFun aMallocSizeOf,
MallocSizeOf aMallocSizeOf,
void* aUserArg)
{
return aMallocSizeOf(aHashEntry->mShapedWord.get());
}
void
gfxFont::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
gfxFont::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf,
FontCacheSizes* aSizes) const
{
for (uint32_t i = 0; i < mGlyphExtentsArray.Length(); ++i) {
@ -3691,7 +3692,7 @@ gfxFont::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
}
void
gfxFont::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
gfxFont::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf,
FontCacheSizes* aSizes) const
{
aSizes->mFontInstances += aMallocSizeOf(this);
@ -3748,7 +3749,7 @@ gfxGlyphExtents::GlyphWidths::~GlyphWidths()
}
uint32_t
gfxGlyphExtents::GlyphWidths::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
gfxGlyphExtents::GlyphWidths::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
{
uint32_t i;
uint32_t size = mBlocks.SizeOfExcludingThis(aMallocSizeOf);
@ -3812,14 +3813,14 @@ gfxGlyphExtents::SetTightGlyphExtents(uint32_t aGlyphID, const gfxRect& aExtents
}
size_t
gfxGlyphExtents::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
gfxGlyphExtents::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
{
return mContainedGlyphWidths.SizeOfExcludingThis(aMallocSizeOf) +
mTightGlyphExtents.SizeOfExcludingThis(nullptr, aMallocSizeOf);
}
size_t
gfxGlyphExtents::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const
gfxGlyphExtents::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
{
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
}
@ -6547,7 +6548,7 @@ gfxTextRun::ClusterIterator::ClusterAdvance(PropertyProvider *aProvider) const
}
size_t
gfxTextRun::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf)
gfxTextRun::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf)
{
// The second arg is how much gfxTextRun::AllocateStorage would have
// allocated.
@ -6561,7 +6562,7 @@ gfxTextRun::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf)
}
size_t
gfxTextRun::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf)
gfxTextRun::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf)
{
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
}

Просмотреть файл

@ -25,6 +25,7 @@
#include "mozilla/HashFunctions.h"
#include "nsIMemoryReporter.h"
#include "gfxFontFeatures.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/gfx/Types.h"
#include "mozilla/Attributes.h"
#include <algorithm>
@ -196,7 +197,7 @@ public:
void CalcHash() { mHash = GetChecksum(); }
size_t SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const {
size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const {
return gfxSparseBitSet::SizeOfExcludingThis(aMallocSizeOf);
}
@ -411,9 +412,9 @@ public:
virtual void ReleaseGrFace(gr_face* aFace);
// For memory reporting
virtual void SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
virtual void SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const;
virtual void SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
virtual void SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const;
nsString mName;
@ -620,7 +621,7 @@ private:
static size_t
SizeOfEntryExcludingThis(FontTableHashEntry *aEntry,
nsMallocSizeOfFun aMallocSizeOf,
mozilla::MallocSizeOf aMallocSizeOf,
void* aUserArg);
private:
@ -781,9 +782,9 @@ public:
void CheckForSimpleFamily();
// For memory reporter
virtual void SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
virtual void SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const;
virtual void SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
virtual void SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const;
// Only used for debugging checks - does a linear search
@ -949,9 +950,9 @@ public:
mFonts.EnumerateEntries(ClearCachedWordsForFont, nullptr);
}
void SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
void SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontCacheSizes* aSizes) const;
void SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
void SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontCacheSizes* aSizes) const;
protected:
@ -996,7 +997,7 @@ protected:
};
static size_t SizeOfFontEntryExcludingThis(HashEntry* aHashEntry,
nsMallocSizeOfFun aMallocSizeOf,
mozilla::MallocSizeOf aMallocSizeOf,
void* aUserArg);
nsTHashtable<HashEntry> mFonts;
@ -1170,8 +1171,8 @@ public:
int32_t GetAppUnitsPerDevUnit() { return mAppUnitsPerDevUnit; }
size_t SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
private:
class HashEntry : public nsUint32HashKey {
@ -1208,7 +1209,7 @@ private:
return widths[indexInBlock];
}
uint32_t SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
uint32_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
~GlyphWidths();
@ -1675,9 +1676,9 @@ public:
}
}
virtual void SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
virtual void SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontCacheSizes* aSizes) const;
virtual void SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
virtual void SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontCacheSizes* aSizes) const;
typedef enum {
@ -1885,7 +1886,7 @@ protected:
static size_t
WordCacheEntrySizeOfExcludingThis(CacheHashEntry* aHashEntry,
nsMallocSizeOfFun aMallocSizeOf,
mozilla::MallocSizeOf aMallocSizeOf,
void* aUserArg);
nsTHashtable<CacheHashEntry> mWordCache;
@ -2378,7 +2379,7 @@ protected:
return details;
}
size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) {
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) {
return aMallocSizeOf(this) +
mDetails.SizeOfExcludingThis(aMallocSizeOf) +
mOffsetToIndex.SizeOfExcludingThis(aMallocSizeOf);
@ -3136,13 +3137,13 @@ public:
// return storage used by this run, for memory reporter;
// nsTransformedTextRun needs to override this as it holds additional data
virtual size_t SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf)
virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf)
MOZ_MUST_OVERRIDE;
virtual size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf)
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf)
MOZ_MUST_OVERRIDE;
// Get the size, if it hasn't already been gotten, marking as it goes.
size_t MaybeSizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) {
size_t MaybeSizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) {
if (mFlags & gfxTextRunFactory::TEXT_RUN_SIZE_ACCOUNTED) {
return 0;
}

Просмотреть файл

@ -23,6 +23,7 @@
#include "nsAutoPtr.h"
#include "mozilla/Likely.h"
#include "mozilla/Endian.h"
#include "mozilla/MemoryReporting.h"
#include "zlib.h"
#include <algorithm>
@ -257,7 +258,7 @@ public:
}
}
size_t SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const {
size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const {
size_t total = mBlocks.SizeOfExcludingThis(aMallocSizeOf);
for (uint32_t i = 0; i < mBlocks.Length(); i++) {
if (mBlocks[i]) {
@ -267,7 +268,7 @@ public:
return total;
}
size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const {
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const {
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
}

Просмотреть файл

@ -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/MemoryReporting.h"
#include "gfxGDIFont.h"
#include "gfxGDIShaper.h"
#include "gfxUniscribeShaper.h"
@ -551,7 +552,7 @@ gfxGDIFont::GetGlyphWidth(gfxContext *aCtx, uint16_t aGID)
}
void
gfxGDIFont::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
gfxGDIFont::SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontCacheSizes* aSizes) const
{
gfxFont::SizeOfExcludingThis(aMallocSizeOf, aSizes);
@ -560,7 +561,7 @@ gfxGDIFont::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
}
void
gfxGDIFont::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
gfxGDIFont::SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontCacheSizes* aSizes) const
{
aSizes->mFontInstances += aMallocSizeOf(this);

Просмотреть файл

@ -6,6 +6,7 @@
#ifndef GFX_GDIFONT_H
#define GFX_GDIFONT_H
#include "mozilla/MemoryReporting.h"
#include "gfxFont.h"
#include "gfxGDIFontList.h"
@ -53,9 +54,9 @@ public:
// get hinted glyph width in pixels as 16.16 fixed-point value
virtual int32_t GetGlyphWidth(gfxContext *aCtx, uint16_t aGID);
virtual void SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
virtual void SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontCacheSizes* aSizes) const;
virtual void SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
virtual void SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontCacheSizes* aSizes) const;
virtual FontType GetType() const { return FONT_TYPE_GDI; }

Просмотреть файл

@ -27,6 +27,7 @@
#include "nsISimpleEnumerator.h"
#include "nsIWindowsRegKey.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/Telemetry.h"
#include <usp10.h>
@ -444,7 +445,7 @@ GDIFontEntry::CreateFontEntry(const nsAString& aName,
}
void
GDIFontEntry::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
GDIFontEntry::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const
{
aSizes->mFontListSize += aMallocSizeOf(this);
@ -1065,7 +1066,7 @@ gfxGDIFontList::ResolveFontName(const nsAString& aFontName, nsAString& aResolved
}
void
gfxGDIFontList::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
gfxGDIFontList::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const
{
gfxPlatformFontList::SizeOfExcludingThis(aMallocSizeOf, aSizes);
@ -1081,7 +1082,7 @@ gfxGDIFontList::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
}
void
gfxGDIFontList::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
gfxGDIFontList::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const
{
aSizes->mFontListSize += aMallocSizeOf(this);

Просмотреть файл

@ -6,6 +6,7 @@
#ifndef GFX_GDIFONTLIST_H
#define GFX_GDIFONTLIST_H
#include "mozilla/MemoryReporting.h"
#include "gfxWindowsPlatform.h"
#include "gfxPlatformFontList.h"
#include "nsGkAtoms.h"
@ -239,7 +240,7 @@ public:
virtual bool TestCharacterMap(uint32_t aCh);
virtual void SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
virtual void SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const;
// create a font entry for a font with a given name
@ -321,9 +322,9 @@ public:
virtual bool ResolveFontName(const nsAString& aFontName,
nsAString& aResolvedFontName);
virtual void SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
virtual void SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const;
virtual void SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
virtual void SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const;
private:

Просмотреть файл

@ -4,6 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/MemoryReporting.h"
#include "gfxAlphaRecovery.h"
#include "gfxImageSurface.h"
@ -197,7 +198,7 @@ gfxImageSurface::ComputeStride(const gfxIntSize& aSize, gfxImageFormat aFormat)
}
size_t
gfxImageSurface::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
gfxImageSurface::SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
{
size_t n = gfxASurface::SizeOfExcludingThis(aMallocSizeOf);
if (mOwnsData) {
@ -207,7 +208,7 @@ gfxImageSurface::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
}
size_t
gfxImageSurface::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const
gfxImageSurface::SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
{
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
}

Просмотреть файл

@ -6,6 +6,7 @@
#ifndef GFX_IMAGESURFACE_H
#define GFX_IMAGESURFACE_H
#include "mozilla/MemoryReporting.h"
#include "gfxASurface.h"
#include "gfxPoint.h"
@ -113,9 +114,9 @@ public:
static long ComputeStride(const gfxIntSize&, gfxImageFormat);
virtual size_t SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
MOZ_OVERRIDE;
virtual size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
MOZ_OVERRIDE;
virtual bool SizeOfIsMeasured() const MOZ_OVERRIDE;

Просмотреть файл

@ -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/MemoryReporting.h"
#include "gfxMacFont.h"
#include "gfxCoreTextShaper.h"
#include "gfxHarfBuzzShaper.h"
@ -410,7 +411,7 @@ gfxMacFont::GetScaledFont(DrawTarget *aTarget)
}
void
gfxMacFont::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
gfxMacFont::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf,
FontCacheSizes* aSizes) const
{
gfxFont::SizeOfExcludingThis(aMallocSizeOf, aSizes);
@ -419,7 +420,7 @@ gfxMacFont::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
}
void
gfxMacFont::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
gfxMacFont::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf,
FontCacheSizes* aSizes) const
{
aSizes->mFontInstances += aMallocSizeOf(this);

Просмотреть файл

@ -6,6 +6,7 @@
#ifndef GFX_MACFONT_H
#define GFX_MACFONT_H
#include "mozilla/MemoryReporting.h"
#include "gfxFont.h"
#include "gfxMacPlatformFontList.h"
#include "mozilla/gfx/2D.h"
@ -42,9 +43,9 @@ public:
virtual mozilla::TemporaryRef<mozilla::gfx::ScaledFont> GetScaledFont(mozilla::gfx::DrawTarget *aTarget);
virtual void SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
virtual void SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontCacheSizes* aSizes) const;
virtual void SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
virtual void SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontCacheSizes* aSizes) const;
virtual FontType GetType() const { return FONT_TYPE_MAC; }

Просмотреть файл

@ -6,6 +6,7 @@
#ifndef gfxMacPlatformFontList_H_
#define gfxMacPlatformFontList_H_
#include "mozilla/MemoryReporting.h"
#include "nsDataHashtable.h"
#include "nsRefPtrHashtable.h"
@ -44,7 +45,7 @@ public:
// use CGFontRef API to get direct access to system font data
virtual hb_blob_t *GetFontTable(uint32_t aTag) MOZ_OVERRIDE;
virtual void SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
virtual void SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const;
nsresult ReadCMAP();

Просмотреть файл

@ -63,6 +63,7 @@
#include "nsISimpleEnumerator.h"
#include "nsCharTraits.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/Preferences.h"
#include "mozilla/Telemetry.h"
@ -423,7 +424,7 @@ MacOSFontEntry::HasFontTable(uint32_t aTableTag)
}
void
MacOSFontEntry::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
MacOSFontEntry::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const
{
aSizes->mFontListSize += aMallocSizeOf(this);

Просмотреть файл

@ -16,6 +16,7 @@
#include "mozilla/Attributes.h"
#include "mozilla/Likely.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/Preferences.h"
#include "mozilla/Telemetry.h"
#include "mozilla/TimeStamp.h"
@ -764,7 +765,7 @@ gfxPlatformFontList::GetPrefsAndStartLoader()
static size_t
SizeOfFamilyEntryExcludingThis(const nsAString& aKey,
const nsRefPtr<gfxFontFamily>& aFamily,
nsMallocSizeOfFun aMallocSizeOf,
MallocSizeOf aMallocSizeOf,
void* aUserArg)
{
FontListSizes *sizes = static_cast<FontListSizes*>(aUserArg);
@ -782,7 +783,7 @@ SizeOfFamilyEntryExcludingThis(const nsAString& aKey,
gfxPlatformFontList::SizeOfFamilyNameEntryExcludingThis
(const nsAString& aKey,
const nsRefPtr<gfxFontFamily>& aFamily,
nsMallocSizeOfFun aMallocSizeOf,
MallocSizeOf aMallocSizeOf,
void* aUserArg)
{
// we don't count the size of the family here, because this is an *extra*
@ -793,7 +794,7 @@ gfxPlatformFontList::SizeOfFamilyNameEntryExcludingThis
static size_t
SizeOfFontNameEntryExcludingThis(const nsAString& aKey,
const nsRefPtr<gfxFontEntry>& aFont,
nsMallocSizeOfFun aMallocSizeOf,
MallocSizeOf aMallocSizeOf,
void* aUserArg)
{
// the font itself is counted by its owning family; here we only care about
@ -805,7 +806,7 @@ static size_t
SizeOfPrefFontEntryExcludingThis
(const uint32_t& aKey,
const nsTArray<nsRefPtr<gfxFontFamily> >& aList,
nsMallocSizeOfFun aMallocSizeOf,
MallocSizeOf aMallocSizeOf,
void* aUserArg)
{
// again, we only care about the size of the array itself; we don't follow
@ -816,7 +817,7 @@ SizeOfPrefFontEntryExcludingThis
static size_t
SizeOfStringEntryExcludingThis(nsStringHashKey* aHashEntry,
nsMallocSizeOfFun aMallocSizeOf,
MallocSizeOf aMallocSizeOf,
void* aUserArg)
{
return aHashEntry->GetKey().SizeOfExcludingThisIfUnshared(aMallocSizeOf);
@ -824,7 +825,7 @@ SizeOfStringEntryExcludingThis(nsStringHashKey* aHashEntry,
static size_t
SizeOfSharedCmapExcludingThis(CharMapHashKey* aHashEntry,
nsMallocSizeOfFun aMallocSizeOf,
MallocSizeOf aMallocSizeOf,
void* aUserArg)
{
FontListSizes *sizes = static_cast<FontListSizes*>(aUserArg);
@ -838,8 +839,8 @@ SizeOfSharedCmapExcludingThis(CharMapHashKey* aHashEntry,
}
void
gfxPlatformFontList::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
FontListSizes* aSizes) const
gfxPlatformFontList::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const
{
aSizes->mFontListSize +=
mFontFamilies.SizeOfExcludingThis(SizeOfFamilyEntryExcludingThis,
@ -877,8 +878,8 @@ gfxPlatformFontList::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
}
void
gfxPlatformFontList::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
FontListSizes* aSizes) const
gfxPlatformFontList::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const
{
aSizes->mFontListSize += aMallocSizeOf(this);
SizeOfExcludingThis(aMallocSizeOf, aSizes);

Просмотреть файл

@ -16,6 +16,7 @@
#include "nsIMemoryReporter.h"
#include "mozilla/Attributes.h"
#include "mozilla/MemoryReporting.h"
class CharMapHashKey : public PLDHashEntryHdr
{
@ -161,9 +162,9 @@ public:
// (platforms may override, eg Mac)
virtual bool GetStandardFamilyName(const nsAString& aFontName, nsAString& aFamilyName);
virtual void SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf,
virtual void SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const;
virtual void SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
virtual void SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf,
FontListSizes* aSizes) const;
// search for existing cmap that matches the input
@ -252,7 +253,7 @@ protected:
static size_t
SizeOfFamilyNameEntryExcludingThis(const nsAString& aKey,
const nsRefPtr<gfxFontFamily>& aFamily,
nsMallocSizeOfFun aMallocSizeOf,
mozilla::MallocSizeOf aMallocSizeOf,
void* aUserArg);
// canonical family name ==> family entry (unique, one name per family entry)

Просмотреть файл

@ -5,6 +5,7 @@
#include "FrameBlender.h"
#include "mozilla/MemoryReporting.h"
#include "RasterImage.h"
#include "imgFrame.h"
@ -573,7 +574,7 @@ FrameBlender::Discard()
size_t
FrameBlender::SizeOfDecodedWithComputedFallbackIfHeap(gfxASurface::MemoryLocation aLocation,
nsMallocSizeOfFun aMallocSizeOf) const
MallocSizeOf aMallocSizeOf) const
{
size_t n = 0;
for (uint32_t i = 0; i < mFrames.Length(); ++i) {

Просмотреть файл

@ -8,6 +8,7 @@
#define mozilla_imagelib_FrameBlender_h_
#include "nsTArray.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/TimeStamp.h"
#include "gfxASurface.h"
@ -57,7 +58,7 @@ public:
void SetSize(nsIntSize aSize) { mSize = aSize; }
size_t SizeOfDecodedWithComputedFallbackIfHeap(gfxASurface::MemoryLocation aLocation,
nsMallocSizeOfFun aMallocSizeOf) const;
mozilla::MallocSizeOf aMallocSizeOf) const;
void ResetAnimation();

Просмотреть файл

@ -6,6 +6,7 @@
#ifndef MOZILLA_IMAGELIB_IMAGE_H_
#define MOZILLA_IMAGELIB_IMAGE_H_
#include "mozilla/MemoryReporting.h"
#include "imgIContainer.h"
#include "imgStatusTracker.h"
#include "nsIURI.h"
@ -77,8 +78,8 @@ public:
/**
* The components that make up SizeOfData().
*/
virtual size_t HeapSizeOfSourceWithComputedFallback(nsMallocSizeOfFun aMallocSizeOf) const = 0;
virtual size_t HeapSizeOfDecodedWithComputedFallback(nsMallocSizeOfFun aMallocSizeOf) const = 0;
virtual size_t HeapSizeOfSourceWithComputedFallback(mozilla::MallocSizeOf aMallocSizeOf) const = 0;
virtual size_t HeapSizeOfDecodedWithComputedFallback(mozilla::MallocSizeOf aMallocSizeOf) const = 0;
virtual size_t NonHeapSizeOfDecoded() const = 0;
virtual size_t OutOfProcessSizeOfDecoded() const = 0;

Просмотреть файл

@ -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/MemoryReporting.h"
#include "ImageWrapper.h"
using mozilla::layers::LayerManager;
@ -38,13 +39,13 @@ ImageWrapper::SizeOfData()
}
size_t
ImageWrapper::HeapSizeOfSourceWithComputedFallback(nsMallocSizeOfFun aMallocSizeOf) const
ImageWrapper::HeapSizeOfSourceWithComputedFallback(mozilla::MallocSizeOf aMallocSizeOf) const
{
return mInnerImage->HeapSizeOfSourceWithComputedFallback(aMallocSizeOf);
}
size_t
ImageWrapper::HeapSizeOfDecodedWithComputedFallback(nsMallocSizeOfFun aMallocSizeOf) const
ImageWrapper::HeapSizeOfDecodedWithComputedFallback(mozilla::MallocSizeOf aMallocSizeOf) const
{
return mInnerImage->HeapSizeOfDecodedWithComputedFallback(aMallocSizeOf);
}

Просмотреть файл

@ -6,6 +6,7 @@
#ifndef MOZILLA_IMAGELIB_IMAGEWRAPPER_H_
#define MOZILLA_IMAGELIB_IMAGEWRAPPER_H_
#include "mozilla/MemoryReporting.h"
#include "Image.h"
namespace mozilla {
@ -29,8 +30,8 @@ public:
virtual nsIntRect FrameRect(uint32_t aWhichFrame) MOZ_OVERRIDE;
virtual uint32_t SizeOfData() MOZ_OVERRIDE;
virtual size_t HeapSizeOfSourceWithComputedFallback(nsMallocSizeOfFun aMallocSizeOf) const MOZ_OVERRIDE;
virtual size_t HeapSizeOfDecodedWithComputedFallback(nsMallocSizeOfFun aMallocSizeOf) const MOZ_OVERRIDE;
virtual size_t HeapSizeOfSourceWithComputedFallback(mozilla::MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
virtual size_t HeapSizeOfDecodedWithComputedFallback(mozilla::MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
virtual size_t NonHeapSizeOfDecoded() const MOZ_OVERRIDE;
virtual size_t OutOfProcessSizeOfDecoded() const MOZ_OVERRIDE;

Просмотреть файл

@ -38,6 +38,7 @@
#include "gfxContext.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/Services.h"
#include "mozilla/Preferences.h"
#include "mozilla/StandardInteger.h"
@ -1182,7 +1183,7 @@ RasterImage::UpdateImageContainer()
}
size_t
RasterImage::HeapSizeOfSourceWithComputedFallback(nsMallocSizeOfFun aMallocSizeOf) const
RasterImage::HeapSizeOfSourceWithComputedFallback(MallocSizeOf aMallocSizeOf) const
{
// n == 0 is possible for two reasons.
// - This is a zero-length image.
@ -1197,7 +1198,7 @@ RasterImage::HeapSizeOfSourceWithComputedFallback(nsMallocSizeOfFun aMallocSizeO
size_t
RasterImage::SizeOfDecodedWithComputedFallbackIfHeap(gfxASurface::MemoryLocation aLocation,
nsMallocSizeOfFun aMallocSizeOf) const
MallocSizeOf aMallocSizeOf) const
{
size_t n = mFrameBlender.SizeOfDecodedWithComputedFallbackIfHeap(aLocation, aMallocSizeOf);
@ -1209,7 +1210,7 @@ RasterImage::SizeOfDecodedWithComputedFallbackIfHeap(gfxASurface::MemoryLocation
}
size_t
RasterImage::HeapSizeOfDecodedWithComputedFallback(nsMallocSizeOfFun aMallocSizeOf) const
RasterImage::HeapSizeOfDecodedWithComputedFallback(MallocSizeOf aMallocSizeOf) const
{
return SizeOfDecodedWithComputedFallbackIfHeap(gfxASurface::MEMORY_IN_PROCESS_HEAP,
aMallocSizeOf);

Просмотреть файл

@ -29,6 +29,7 @@
#include "nsThreadUtils.h"
#include "DiscardTracker.h"
#include "nsISupportsImpl.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/Telemetry.h"
#include "mozilla/LinkedList.h"
@ -176,8 +177,8 @@ public:
/* The total number of frames in this image. */
uint32_t GetNumFrames() const;
virtual size_t HeapSizeOfSourceWithComputedFallback(nsMallocSizeOfFun aMallocSizeOf) const;
virtual size_t HeapSizeOfDecodedWithComputedFallback(nsMallocSizeOfFun aMallocSizeOf) const;
virtual size_t HeapSizeOfSourceWithComputedFallback(mozilla::MallocSizeOf aMallocSizeOf) const;
virtual size_t HeapSizeOfDecodedWithComputedFallback(mozilla::MallocSizeOf aMallocSizeOf) const;
virtual size_t NonHeapSizeOfDecoded() const;
virtual size_t OutOfProcessSizeOfDecoded() const;
@ -589,7 +590,7 @@ private:
mozilla::TimeStamp GetCurrentImgFrameEndTime() const;
size_t SizeOfDecodedWithComputedFallbackIfHeap(gfxASurface::MemoryLocation aLocation,
nsMallocSizeOfFun aMallocSizeOf) const;
mozilla::MallocSizeOf aMallocSizeOf) const;
inline void EnsureAnimExists()
{

Просмотреть файл

@ -13,6 +13,7 @@
#include "gfxUtils.h"
#include "imgDecoderObserver.h"
#include "mozilla/AutoRestore.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/dom/SVGSVGElement.h"
#include "nsComponentManagerUtils.h"
#include "nsIObserverService.h"
@ -341,7 +342,7 @@ VectorImage::FrameRect(uint32_t aWhichFrame)
}
size_t
VectorImage::HeapSizeOfSourceWithComputedFallback(nsMallocSizeOfFun aMallocSizeOf) const
VectorImage::HeapSizeOfSourceWithComputedFallback(mozilla::MallocSizeOf aMallocSizeOf) const
{
// We're not storing the source data -- we just feed that directly to
// our helper SVG document as we receive it, for it to parse.
@ -350,7 +351,7 @@ VectorImage::HeapSizeOfSourceWithComputedFallback(nsMallocSizeOfFun aMallocSizeO
}
size_t
VectorImage::HeapSizeOfDecodedWithComputedFallback(nsMallocSizeOfFun aMallocSizeOf) const
VectorImage::HeapSizeOfDecodedWithComputedFallback(mozilla::MallocSizeOf aMallocSizeOf) const
{
// XXXdholbert TODO: return num bytes used by helper SVG doc. (bug 590790)
return 0;

Просмотреть файл

@ -9,6 +9,7 @@
#include "Image.h"
#include "nsIStreamListener.h"
#include "nsIRequest.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/WeakPtr.h"
@ -43,8 +44,8 @@ public:
uint32_t aFlags);
virtual nsIntRect FrameRect(uint32_t aWhichFrame) MOZ_OVERRIDE;
virtual size_t HeapSizeOfSourceWithComputedFallback(nsMallocSizeOfFun aMallocSizeOf) const;
virtual size_t HeapSizeOfDecodedWithComputedFallback(nsMallocSizeOfFun aMallocSizeOf) const;
virtual size_t HeapSizeOfSourceWithComputedFallback(mozilla::MallocSizeOf aMallocSizeOf) const;
virtual size_t HeapSizeOfDecodedWithComputedFallback(mozilla::MallocSizeOf aMallocSizeOf) const;
virtual size_t NonHeapSizeOfDecoded() const;
virtual size_t OutOfProcessSizeOfDecoded() const;

Просмотреть файл

@ -19,6 +19,7 @@ static bool gDisableOptimize = false;
#include "cairo.h"
#include "GeckoProfiler.h"
#include "mozilla/Likely.h"
#include "mozilla/MemoryReporting.h"
#if defined(XP_WIN)
@ -801,7 +802,7 @@ void imgFrame::SetCompositingFailed(bool val)
// |aMallocSizeOf|. If that fails (because the platform doesn't support it) or
// it's non-heap memory, we fall back to computing the size analytically.
size_t
imgFrame::SizeOfExcludingThisWithComputedFallbackIfHeap(gfxASurface::MemoryLocation aLocation, nsMallocSizeOfFun aMallocSizeOf) const
imgFrame::SizeOfExcludingThisWithComputedFallbackIfHeap(gfxASurface::MemoryLocation aLocation, mozilla::MallocSizeOf aMallocSizeOf) const
{
// aMallocSizeOf is only used if aLocation==MEMORY_IN_PROCESS_HEAP. It
// should be NULL otherwise.

Просмотреть файл

@ -7,6 +7,7 @@
#ifndef imgFrame_h
#define imgFrame_h
#include "mozilla/MemoryReporting.h"
#include "nsRect.h"
#include "nsPoint.h"
#include "nsSize.h"
@ -104,7 +105,7 @@ public:
size_t SizeOfExcludingThisWithComputedFallbackIfHeap(
gfxASurface::MemoryLocation aLocation,
nsMallocSizeOfFun aMallocSizeOf) const;
mozilla::MallocSizeOf aMallocSizeOf) const;
uint8_t GetPaletteDepth() const { return mPaletteDepth; }
uint32_t PaletteDataLength() const {

Просмотреть файл

@ -409,7 +409,7 @@ bool Histogram::HasValidRangeChecksum() const {
return CalculateRangeChecksum() == range_checksum_;
}
size_t Histogram::SizeOfIncludingThis(size_t (*aMallocSizeOf)(const void*))
size_t Histogram::SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf)
{
size_t n = 0;
n += aMallocSizeOf(this);
@ -420,7 +420,7 @@ size_t Histogram::SizeOfIncludingThis(size_t (*aMallocSizeOf)(const void*))
return n;
}
size_t Histogram::SampleSet::SizeOfExcludingThis(size_t (*aMallocSizeOf)(const void*))
size_t Histogram::SampleSet::SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf)
{
// We're not allowed to do deep dives into STL data structures. This
// is as close as we can get to measuring this array.

Просмотреть файл

@ -41,6 +41,8 @@
#define BASE_METRICS_HISTOGRAM_H_
#pragma once
#include "mozilla/MemoryReporting.h"
#include <map>
#include <string>
#include <vector>
@ -316,10 +318,7 @@ class Histogram {
const char* description; // Null means end of a list of pairs.
};
// To avoid depending on XPCOM headers, we define our own MallocSizeOf type.
typedef size_t (*MallocSizeOf)(const void*);
size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf);
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf);
//----------------------------------------------------------------------------
// Statistic values, developed over the life of the histogram.
@ -357,7 +356,7 @@ class Histogram {
bool Serialize(Pickle* pickle) const;
bool Deserialize(void** iter, const Pickle& pickle);
size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf);
size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf);
protected:
// Actual histogram data is stored in buckets, showing the count of values

Просмотреть файл

@ -11,6 +11,7 @@
#include "mozilla/Attributes.h"
#include "mozilla/Casting.h"
#include "mozilla/DebugOnly.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/PodOperations.h"
#include "mozilla/TypeTraits.h"
#include "mozilla/Util.h"
@ -204,10 +205,10 @@ class HashMap
// Don't just call |impl.sizeOfExcludingThis()| because there's no
// guarantee that |impl| is the first field in HashMap.
size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const {
size_t sizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf) const {
return impl.sizeOfExcludingThis(mallocSizeOf);
}
size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const {
size_t sizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const {
return mallocSizeOf(this) + impl.sizeOfExcludingThis(mallocSizeOf);
}
@ -412,10 +413,10 @@ class HashSet
// Don't just call |impl.sizeOfExcludingThis()| because there's no
// guarantee that |impl| is the first field in HashSet.
size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const {
size_t sizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf) const {
return impl.sizeOfExcludingThis(mallocSizeOf);
}
size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const {
size_t sizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const {
return mallocSizeOf(this) + impl.sizeOfExcludingThis(mallocSizeOf);
}
@ -1340,12 +1341,12 @@ class HashTable : private AllocPolicy
return gen;
}
size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const
size_t sizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf) const
{
return mallocSizeOf(table);
}
size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const
size_t sizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const
{
return mallocSizeOf(this) + sizeOfExcludingThis(mallocSizeOf);
}

Просмотреть файл

@ -10,6 +10,8 @@
// These declarations are not within jsapi.h because they are highly likely to
// change in the future. Depend on them at your own risk.
#include "mozilla/MemoryReporting.h"
#include <string.h>
#include "jsalloc.h"
@ -363,7 +365,7 @@ struct CompartmentStats
struct RuntimeStats
{
RuntimeStats(JSMallocSizeOfFun mallocSizeOf)
RuntimeStats(mozilla::MallocSizeOf mallocSizeOf)
: runtime(),
gcHeapChunkTotal(0),
gcHeapDecommittedArenas(0),
@ -420,7 +422,7 @@ struct RuntimeStats
ZoneStats *currZoneStats;
JSMallocSizeOfFun mallocSizeOf_;
mozilla::MallocSizeOf mallocSizeOf_;
virtual void initExtraCompartmentStats(JSCompartment *c, CompartmentStats *cstats) = 0;
virtual void initExtraZoneStats(JS::Zone *zone, ZoneStats *zstats) = 0;

Просмотреть файл

@ -814,11 +814,6 @@ inline bool IsPoisonedPtr(T *v)
}
/*
* This is SpiderMonkey's equivalent to |nsMallocSizeOfFun|.
*/
typedef size_t(*JSMallocSizeOfFun)(const void *p);
/* sixgill annotation defines */
#ifndef HAVE_STATIC_ANNOTATIONS
# define HAVE_STATIC_ANNOTATIONS

Просмотреть файл

@ -8,6 +8,7 @@
#define js_Vector_h
#include "mozilla/Attributes.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/TypeTraits.h"
#include "TemplateLib.h"
@ -504,13 +505,13 @@ class Vector : private AllocPolicy
/*
* Measure the size of the Vector's heap-allocated storage.
*/
size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const;
size_t sizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf) const;
/*
* Like sizeOfExcludingThis, but also measures the size of the Vector
* object (which must be heap-allocated) itself.
*/
size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const;
size_t sizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const;
void swap(Vector &other);
};
@ -1059,14 +1060,14 @@ Vector<T,N,AP>::replaceRawBuffer(T *p, size_t aLength)
template <class T, size_t N, class AP>
inline size_t
Vector<T,N,AP>::sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const
Vector<T,N,AP>::sizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf) const
{
return usingInlineStorage() ? 0 : mallocSizeOf(beginNoCheck());
}
template <class T, size_t N, class AP>
inline size_t
Vector<T,N,AP>::sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const
Vector<T,N,AP>::sizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const
{
return mallocSizeOf(this) + sizeOfExcludingThis(mallocSizeOf);
}

Просмотреть файл

@ -21,6 +21,10 @@
#include "jscntxtinlines.h"
#ifdef JSGC_GENERATIONAL
#include "vm/Shape-inl.h"
#endif
using namespace js;
using mozilla::ArrayLength;

Просмотреть файл

@ -16,6 +16,7 @@
#include "ion/AsmJS.h"
#include "vm/ForkJoin.h"
#include "vm/Interpreter.h"
#include "vm/ObjectImpl-inl.h"

Просмотреть файл

@ -7,6 +7,7 @@
#include "ctypes/CTypes.h"
#include "mozilla/FloatingPoint.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/StandardInteger.h"
#include <limits>
@ -1337,7 +1338,7 @@ JS_SetCTypesCallbacks(JSObject *ctypesObj, JSCTypesCallbacks* callbacks)
namespace js {
JS_FRIEND_API(size_t)
SizeOfDataIfCDataObject(JSMallocSizeOfFun mallocSizeOf, JSObject *obj)
SizeOfDataIfCDataObject(mozilla::MallocSizeOf mallocSizeOf, JSObject *obj)
{
if (!CData::IsCData(obj))
return 0;

Просмотреть файл

@ -9,6 +9,7 @@
#include "mozilla/DebugOnly.h"
#include "mozilla/MemoryChecking.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/PodOperations.h"
#include "mozilla/TypeTraits.h"
@ -89,7 +90,7 @@ class BumpChunk
size_t used() const { return bump - bumpBase(); }
size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) {
size_t sizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) {
return mallocSizeOf(this);
}
@ -347,7 +348,7 @@ class LifoAlloc
}
// Get the total size of the arena chunks (including unused space).
size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const {
size_t sizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf) const {
size_t n = 0;
for (BumpChunk *chunk = first; chunk; chunk = chunk->next())
n += chunk->sizeOfIncludingThis(mallocSizeOf);
@ -355,7 +356,7 @@ class LifoAlloc
}
// Like sizeOfExcludingThis(), but includes the size of the LifoAlloc itself.
size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const {
size_t sizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const {
return mallocSizeOf(this) + sizeOfExcludingThis(mallocSizeOf);
}

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше