зеркало из https://github.com/mozilla/gecko-dev.git
bug 1242268 use pointers instead of copies of string literals in AudioNode memory reporting r=padenot
MozReview-Commit-ID: E85FGrmfOWI --HG-- extra : rebase_source : 0895e91ca000164f70251ae0fbb61fcca39cbe56
This commit is contained in:
Родитель
b85b74eb00
Коммит
dc9ad2f5b2
|
@ -3548,8 +3548,8 @@ MediaStreamGraphImpl::CollectReports(nsIHandleReportCallback* aHandleReport,
|
|||
|
||||
for (size_t i = 0; i < mAudioStreamSizes.Length(); i++) {
|
||||
const AudioNodeSizes& usage = mAudioStreamSizes[i];
|
||||
const char* const nodeType = usage.mNodeType.IsEmpty() ?
|
||||
"<unknown>" : usage.mNodeType.get();
|
||||
const char* const nodeType =
|
||||
usage.mNodeType ? usage.mNodeType : "<unknown>";
|
||||
|
||||
nsPrintfCString domNodePath("explicit/webaudio/audio-node/%s/dom-nodes",
|
||||
nodeType);
|
||||
|
|
|
@ -153,7 +153,7 @@ struct AudioNodeSizes
|
|||
size_t mDomNode;
|
||||
size_t mStream;
|
||||
size_t mEngine;
|
||||
nsCString mNodeType;
|
||||
const char* mNodeType;
|
||||
};
|
||||
|
||||
class AudioNodeEngine;
|
||||
|
|
|
@ -217,6 +217,8 @@ public:
|
|||
virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const;
|
||||
virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const;
|
||||
|
||||
// Returns a string from constant static storage identifying the dom node
|
||||
// type.
|
||||
virtual const char* NodeType() const = 0;
|
||||
|
||||
private:
|
||||
|
|
Загрузка…
Ссылка в новой задаче