зеркало из https://github.com/mozilla/gecko-dev.git
Bug 922094 - part 2 - make nsGlobalWindow report its proto/iface cache size, if appropriate; r=bz
This commit is contained in:
Родитель
39e3ffef7f
Коммит
686bb9868e
|
@ -210,6 +210,7 @@
|
|||
#include "mozilla/dom/WindowBinding.h"
|
||||
#include "nsITabChild.h"
|
||||
#include "nsIDOMMediaQueryList.h"
|
||||
#include "mozilla/dom/DOMJSClass.h"
|
||||
|
||||
#ifdef MOZ_WEBSPEECH
|
||||
#include "mozilla/dom/SpeechSynthesis.h"
|
||||
|
@ -12658,6 +12659,12 @@ nsGlobalWindow::AddSizeOfIncludingThis(nsWindowSizes* aWindowSizes) const
|
|||
const_cast<nsTHashtable<nsPtrHashKey<nsDOMEventTargetHelper> >*>
|
||||
(&mEventTargetObjects)->EnumerateEntries(CollectSizeAndListenerCount,
|
||||
aWindowSizes);
|
||||
|
||||
JSObject* global = FastGetGlobalJSObject();
|
||||
if (IsInnerWindow() && global) {
|
||||
JS::Heap<JSObject*>* cache = GetProtoAndIfaceArray(global);
|
||||
aWindowSizes->mProtoIfaceCacheSize += aWindowSizes->mMallocSizeOf(cache);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -342,7 +342,7 @@ public:
|
|||
|
||||
// nsIScriptGlobalObject
|
||||
virtual nsIScriptContext *GetContext();
|
||||
JSObject *FastGetGlobalJSObject()
|
||||
JSObject *FastGetGlobalJSObject() const
|
||||
{
|
||||
return mJSObject;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче