mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1024259: Use NS_FREE_PERMANENT_DATA more consistently. r=mccr8
This commit is contained in:
parent
0afc3dcb75
commit
e08f0ec656
@ -193,6 +193,7 @@
|
||||
#include "mozilla/RemoteSpellCheckEngineChild.h"
|
||||
#include "GMPServiceChild.h"
|
||||
#include "gfxPlatform.h"
|
||||
#include "nscore.h" // for NS_FREE_PERMANENT_DATA
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::docshell;
|
||||
@ -1897,7 +1898,7 @@ ContentChild::ActorDestroy(ActorDestroyReason why)
|
||||
QuickExit();
|
||||
}
|
||||
|
||||
#if !defined(DEBUG) && !defined(MOZ_ASAN)
|
||||
#ifndef NS_FREE_PERMANENT_DATA
|
||||
// In release builds, there's no point in the content process
|
||||
// going through the full XPCOM shutdown path, because it doesn't
|
||||
// keep persistent state.
|
||||
|
@ -111,6 +111,7 @@ class mozilla::gl::SkiaGLGlue : public GenericAtomicRefCounted {
|
||||
#include "nsIXULRuntime.h"
|
||||
#include "VsyncSource.h"
|
||||
#include "SoftwareVsyncSource.h"
|
||||
#include "nscore.h" // for NS_FREE_PERMANENT_DATA
|
||||
|
||||
namespace mozilla {
|
||||
namespace layers {
|
||||
@ -714,7 +715,7 @@ gfxPlatform::~gfxPlatform()
|
||||
// cairo_debug_* function unconditionally.
|
||||
//
|
||||
// because cairo can assert and thus crash on shutdown, don't do this in release builds
|
||||
#if defined(DEBUG) || defined(NS_BUILD_REFCNT_LOGGING) || defined(MOZ_VALGRIND)
|
||||
#ifdef NS_FREE_PERMANENT_DATA
|
||||
#ifdef USE_SKIA
|
||||
// must do Skia cleanup before Cairo cleanup, because Skia may be referencing
|
||||
// Cairo objects e.g. through SkCairoFTTypeface
|
||||
|
@ -47,6 +47,7 @@
|
||||
#include "nsClassHashtable.h"
|
||||
#include "nsHashKeys.h"
|
||||
#include "nsNativeCharsetUtils.h"
|
||||
#include "nscore.h" // for NS_FREE_PERMANENT_DATA
|
||||
|
||||
using mozilla::MonitorAutoLock;
|
||||
using mozilla::ipc::GeckoChildProcessHost;
|
||||
@ -125,7 +126,7 @@ GeckoChildProcessHost::~GeckoChildProcessHost()
|
||||
SharedMemoryBasic::CleanupForPid(mChildProcessHandle);
|
||||
#endif
|
||||
ProcessWatcher::EnsureProcessTerminated(mChildProcessHandle
|
||||
#if defined(NS_BUILD_REFCNT_LOGGING) || defined(MOZ_ASAN)
|
||||
#ifdef NS_FREE_PERMANENT_DATA
|
||||
// If we're doing leak logging, shutdown can be slow.
|
||||
, false // don't "force"
|
||||
#endif
|
||||
|
@ -2477,7 +2477,9 @@ pref("plugin.sessionPermissionNow.intervalInMinutes", 60);
|
||||
// to allow it persistently.
|
||||
pref("plugin.persistentPermissionAlways.intervalInDays", 90);
|
||||
|
||||
#if !defined(DEBUG) && !defined(MOZ_ASAN)
|
||||
// Set IPC timeouts for plugins and tabs, except in leak-checking builds.
|
||||
// (NS_FREE_PERMANENT_DATA is C++ only, so approximate its definition here.)
|
||||
#if !defined(DEBUG) && !defined(MOZ_ASAN) && !defined(MOZ_VALGRIND)
|
||||
// How long a plugin is allowed to process a synchronous IPC message
|
||||
// before we consider it "hung".
|
||||
pref("dom.ipc.plugins.timeoutSecs", 45);
|
||||
@ -2503,7 +2505,7 @@ pref("dom.ipc.plugins.hangUIMinDisplaySecs", 10);
|
||||
// we fear the worst and kill it.
|
||||
pref("dom.ipc.tabs.shutdownTimeoutSecs", 5);
|
||||
#else
|
||||
// No timeout in DEBUG or ASan builds
|
||||
// No timeout in leak-checking builds
|
||||
pref("dom.ipc.plugins.timeoutSecs", 0);
|
||||
pref("dom.ipc.plugins.contentTimeoutSecs", 0);
|
||||
pref("dom.ipc.plugins.processLaunchTimeoutSecs", 0);
|
||||
|
@ -234,7 +234,7 @@
|
||||
* sense to touch memory pages and free that memory at shutdown,
|
||||
* unless we are running leak stats.
|
||||
*/
|
||||
#if defined(NS_BUILD_REFCNT_LOGGING) || defined(MOZ_VALGRIND)
|
||||
#if defined(NS_BUILD_REFCNT_LOGGING) || defined(MOZ_VALGRIND) || defined(MOZ_ASAN)
|
||||
#define NS_FREE_PERMANENT_DATA
|
||||
#endif
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "mozilla/StaticPtr.h"
|
||||
#include "mozilla/ThreadLocal.h"
|
||||
#include "nscore.h" // for NS_FREE_PERMANENT_DATA
|
||||
#if !defined(XP_WIN)
|
||||
#include "NSPRInterposer.h"
|
||||
#endif // !defined(XP_WIN)
|
||||
@ -460,10 +461,10 @@ IOInterposeObserver::IsMainThread()
|
||||
void
|
||||
IOInterposer::Clear()
|
||||
{
|
||||
/* Clear() is a no-op on opt builds so that we may continue to trap I/O until
|
||||
process termination. In debug builds we need to shut down IOInterposer so
|
||||
that all references are properly released and refcnt log remains clean. */
|
||||
#if defined(DEBUG) || defined(FORCE_BUILD_REFCNT_LOGGING) || defined(MOZ_ASAN)
|
||||
/* Clear() is a no-op on release builds so that we may continue to trap I/O
|
||||
until process termination. In leak-checking builds, we need to shut down
|
||||
IOInterposer so that all references are properly released. */
|
||||
#ifdef NS_FREE_PERMANENT_DATA
|
||||
UnregisterCurrentThread();
|
||||
sMasterList = nullptr;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user