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