2015-03-18 18:36:03 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#include "mozilla/DeferredFinalize.h"
|
|
|
|
|
|
|
|
#include "mozilla/Assertions.h"
|
2017-04-27 21:10:15 +00:00
|
|
|
#include "mozilla/CycleCollectedJSRuntime.h"
|
2015-03-18 18:36:03 +00:00
|
|
|
|
|
|
|
void mozilla::DeferredFinalize(nsISupports* aSupports) {
|
2017-04-27 21:10:15 +00:00
|
|
|
CycleCollectedJSRuntime* rt = CycleCollectedJSRuntime::Get();
|
|
|
|
MOZ_ASSERT(rt, "Should have a CycleCollectedJSRuntime by now");
|
2019-08-16 20:51:12 +00:00
|
|
|
rt->DeferredFinalize(aSupports);
|
2015-03-18 18:36:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void mozilla::DeferredFinalize(DeferredFinalizeAppendFunction aAppendFunc,
|
|
|
|
DeferredFinalizeFunction aFunc, void* aThing) {
|
2017-04-27 21:10:15 +00:00
|
|
|
CycleCollectedJSRuntime* rt = CycleCollectedJSRuntime::Get();
|
|
|
|
MOZ_ASSERT(rt, "Should have a CycleCollectedJSRuntime by now");
|
2019-08-16 20:51:12 +00:00
|
|
|
rt->DeferredFinalize(aAppendFunc, aFunc, aThing);
|
2015-03-18 18:36:03 +00:00
|
|
|
}
|