mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 463642 - Safe mode should disable JIT, r+sr=jst
--HG-- rename : toolkit/xre/nsIXULRuntime.idl => xpcom/system/nsIXULRuntime.idl
This commit is contained in:
parent
a874b266a0
commit
54de57c5d0
@ -69,6 +69,7 @@
|
||||
#include "nsString.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
#include "nsWidgetsCID.h"
|
||||
#include "nsXPCOMCIDInternal.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
#include "nsTextFormatter.h"
|
||||
|
@ -81,6 +81,8 @@
|
||||
#include "nsIContent.h"
|
||||
#include "nsCycleCollector.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsXPCOMCIDInternal.h"
|
||||
#include "nsIXULRuntime.h"
|
||||
|
||||
// For locale aware string methods
|
||||
#include "plstr.h"
|
||||
@ -1171,9 +1173,18 @@ nsJSContext::JSOptionChangedCallback(const char *pref, void *data)
|
||||
// XXX should we check for sysprin instead of a chrome window, to make
|
||||
// XXX components be covered by the chrome pref instead of the content one?
|
||||
nsCOMPtr<nsIDOMChromeWindow> chromeWindow(do_QueryInterface(global));
|
||||
|
||||
PRBool useJIT = nsContentUtils::GetBoolPref(chromeWindow ?
|
||||
js_jit_chrome_str :
|
||||
js_jit_content_str);
|
||||
nsCOMPtr<nsIXULRuntime> xr = do_GetService(XULRUNTIME_SERVICE_CONTRACTID);
|
||||
if (xr) {
|
||||
PRBool safeMode = PR_FALSE;
|
||||
xr->GetInSafeMode(&safeMode);
|
||||
if (safeMode)
|
||||
useJIT = PR_FALSE;
|
||||
}
|
||||
|
||||
if (useJIT)
|
||||
newDefaultJSOptions |= JSOPTION_JIT;
|
||||
else
|
||||
|
@ -59,6 +59,7 @@
|
||||
#include "nsILivemarkService.h"
|
||||
#include "nsILocaleService.h"
|
||||
#include "nsToolkitCompsCID.h"
|
||||
#include "nsXPCOMCIDInternal.h"
|
||||
|
||||
// We need to suppress inclusion of nsString.h
|
||||
#define nsString_h___
|
||||
|
@ -48,6 +48,7 @@
|
||||
#include "nsDeque.h"
|
||||
#include "nsIFileURL.h"
|
||||
#include "nsIPrefBranch2.h"
|
||||
#include "nsXPCOMCIDInternal.h"
|
||||
|
||||
/**
|
||||
* Code overview
|
||||
|
@ -89,7 +89,6 @@ FORCE_STATIC_LIB = 1
|
||||
|
||||
XPIDLSRCS = \
|
||||
nsINativeAppSupport.idl \
|
||||
nsIXULRuntime.idl \
|
||||
$(NULL)
|
||||
|
||||
ifneq (,$(filter WINCE WINNT,$(OS_ARCH)))
|
||||
|
@ -123,6 +123,7 @@
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsStaticComponents.h"
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsXPCOMCIDInternal.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsXPFEComponentsCID.h"
|
||||
#include "nsVersionComparator.h"
|
||||
@ -893,6 +894,12 @@ static nsModuleComponentInfo kComponents[] =
|
||||
APPINFO_CID,
|
||||
XULAPPINFO_SERVICE_CONTRACTID,
|
||||
AppInfoConstructor
|
||||
},
|
||||
{
|
||||
"nsXULAppInfo",
|
||||
APPINFO_CID,
|
||||
XULRUNTIME_SERVICE_CONTRACTID,
|
||||
AppInfoConstructor
|
||||
}
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
,
|
||||
|
@ -174,12 +174,6 @@ struct nsXREAppData
|
||||
*/
|
||||
#define NS_XRE_ENABLE_CRASH_REPORTER (1 << 3)
|
||||
|
||||
/**
|
||||
* The contract id for the nsIXULAppInfo service.
|
||||
*/
|
||||
#define XULAPPINFO_SERVICE_CONTRACTID \
|
||||
"@mozilla.org/xre/app-info;1"
|
||||
|
||||
/**
|
||||
* A directory service key which provides the platform-correct "application
|
||||
* data" directory as follows, where $name and $vendor are as defined above and
|
||||
|
@ -82,4 +82,16 @@
|
||||
*/
|
||||
#define NS_MEMORY_REPORTER_MANAGER_CONTRACTID "@mozilla.org/memory-reporter-manager;1"
|
||||
|
||||
/**
|
||||
* The contract id for the nsIXULAppInfo service.
|
||||
*/
|
||||
#define XULAPPINFO_SERVICE_CONTRACTID \
|
||||
"@mozilla.org/xre/app-info;1"
|
||||
|
||||
/**
|
||||
* The contract id for the nsIXULRuntime service.
|
||||
*/
|
||||
#define XULRUNTIME_SERVICE_CONTRACTID \
|
||||
"@mozilla.org/xre/runtime;1"
|
||||
|
||||
#endif // nsXPCOMCIDInternal_h__
|
||||
|
@ -47,6 +47,7 @@ XPIDL_MODULE = xpcom_system
|
||||
|
||||
XPIDLSRCS = \
|
||||
nsIXULAppInfo.idl \
|
||||
nsIXULRuntime.idl \
|
||||
nsIGConfService.idl \
|
||||
nsIGnomeVFSService.idl \
|
||||
nsIBlocklistService.idl \
|
||||
|
Loading…
Reference in New Issue
Block a user