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
|
||||
DispatchDeferredDeletion(bool aContinuation, bool aPurge) override
|
||||
{
|
||||
|
||||
@@ -665,6 +665,7 @@ XPCJSContext::PrepareForForgetSkippable()
|
||||
void
|
||||
XPCJSContext::BeginCycleCollectionCallback()
|
||||
{
|
||||
CycleCollectedJSContext::BeginCycleCollectionCallback();
|
||||
nsJSContext::BeginCycleCollectionCallback();
|
||||
|
||||
nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
|
||||
@@ -676,6 +677,7 @@ XPCJSContext::BeginCycleCollectionCallback()
|
||||
void
|
||||
XPCJSContext::EndCycleCollectionCallback(CycleCollectorResults& aResults)
|
||||
{
|
||||
CycleCollectedJSContext::EndCycleCollectionCallback(aResults);
|
||||
nsJSContext::EndCycleCollectionCallback(aResults);
|
||||
|
||||
nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
|
||||
|
||||
@@ -1330,6 +1330,16 @@ CycleCollectedJSContext::DumpJSHeap(FILE* aFile)
|
||||
js::DumpHeap(Context(), aFile, js::CollectNurseryBeforeDump);
|
||||
}
|
||||
|
||||
void
|
||||
CycleCollectedJSContext::BeginCycleCollectionCallback()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
CycleCollectedJSContext::EndCycleCollectionCallback(CycleCollectorResults& aResults)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
CycleCollectedJSContext::ProcessStableStateQueue()
|
||||
{
|
||||
|
||||
@@ -321,8 +321,8 @@ public:
|
||||
void DumpJSHeap(FILE* aFile);
|
||||
|
||||
virtual void PrepareForForgetSkippable() = 0;
|
||||
virtual void BeginCycleCollectionCallback() = 0;
|
||||
virtual void EndCycleCollectionCallback(CycleCollectorResults& aResults) = 0;
|
||||
virtual void BeginCycleCollectionCallback();
|
||||
virtual void EndCycleCollectionCallback(CycleCollectorResults& aResults);
|
||||
virtual void DispatchDeferredDeletion(bool aContinuation, bool aPurge = false) = 0;
|
||||
|
||||
JSContext* Context() const
|
||||
|
||||
Reference in New Issue
Block a user