Bug 1268976 - Assert that the micro-task queues are empty upon destruction of CycleCollectedJSRuntime; r=mccr8

MozReview-Commit-ID: SFuX4fiCCl
This commit is contained in:
Nick Fitzgerald
2016-05-02 11:21:43 -07:00
parent 99beedc521
commit a692901d33

View File

@@ -468,6 +468,9 @@ CycleCollectedJSRuntime::~CycleCollectedJSRuntime()
// Clear mPendingException first, since it might be cycle collected.
mPendingException = nullptr;
MOZ_ASSERT(mDebuggerPromiseMicroTaskQueue.empty());
MOZ_ASSERT(mPromiseMicroTaskQueue.empty());
JS_DestroyRuntime(mJSRuntime);
mJSRuntime = nullptr;
nsCycleCollector_forgetJSRuntime();