Bug 1301301, part 3 - Implement Begin and EndCycleCollectionCallback in CCJSContext. r=smaug
This will let my later patch run code at the start and end of each CC. This patch should not change any behavior. MozReview-Commit-ID: Fu6v3wo8qKB
This commit is contained in:
@@ -1099,16 +1099,6 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void
|
|
||||||
BeginCycleCollectionCallback() override
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void
|
|
||||||
EndCycleCollectionCallback(CycleCollectorResults &aResults) override
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
DispatchDeferredDeletion(bool aContinuation, bool aPurge) override
|
DispatchDeferredDeletion(bool aContinuation, bool aPurge) override
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -665,6 +665,7 @@ XPCJSContext::PrepareForForgetSkippable()
|
|||||||
void
|
void
|
||||||
XPCJSContext::BeginCycleCollectionCallback()
|
XPCJSContext::BeginCycleCollectionCallback()
|
||||||
{
|
{
|
||||||
|
CycleCollectedJSContext::BeginCycleCollectionCallback();
|
||||||
nsJSContext::BeginCycleCollectionCallback();
|
nsJSContext::BeginCycleCollectionCallback();
|
||||||
|
|
||||||
nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
|
nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
|
||||||
@@ -676,6 +677,7 @@ XPCJSContext::BeginCycleCollectionCallback()
|
|||||||
void
|
void
|
||||||
XPCJSContext::EndCycleCollectionCallback(CycleCollectorResults& aResults)
|
XPCJSContext::EndCycleCollectionCallback(CycleCollectorResults& aResults)
|
||||||
{
|
{
|
||||||
|
CycleCollectedJSContext::EndCycleCollectionCallback(aResults);
|
||||||
nsJSContext::EndCycleCollectionCallback(aResults);
|
nsJSContext::EndCycleCollectionCallback(aResults);
|
||||||
|
|
||||||
nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
|
nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
|
||||||
|
|||||||
@@ -1330,6 +1330,16 @@ CycleCollectedJSContext::DumpJSHeap(FILE* aFile)
|
|||||||
js::DumpHeap(Context(), aFile, js::CollectNurseryBeforeDump);
|
js::DumpHeap(Context(), aFile, js::CollectNurseryBeforeDump);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CycleCollectedJSContext::BeginCycleCollectionCallback()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CycleCollectedJSContext::EndCycleCollectionCallback(CycleCollectorResults& aResults)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CycleCollectedJSContext::ProcessStableStateQueue()
|
CycleCollectedJSContext::ProcessStableStateQueue()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -321,8 +321,8 @@ public:
|
|||||||
void DumpJSHeap(FILE* aFile);
|
void DumpJSHeap(FILE* aFile);
|
||||||
|
|
||||||
virtual void PrepareForForgetSkippable() = 0;
|
virtual void PrepareForForgetSkippable() = 0;
|
||||||
virtual void BeginCycleCollectionCallback() = 0;
|
virtual void BeginCycleCollectionCallback();
|
||||||
virtual void EndCycleCollectionCallback(CycleCollectorResults& aResults) = 0;
|
virtual void EndCycleCollectionCallback(CycleCollectorResults& aResults);
|
||||||
virtual void DispatchDeferredDeletion(bool aContinuation, bool aPurge = false) = 0;
|
virtual void DispatchDeferredDeletion(bool aContinuation, bool aPurge = false) = 0;
|
||||||
|
|
||||||
JSContext* Context() const
|
JSContext* Context() const
|
||||||
|
|||||||
Reference in New Issue
Block a user