You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2244 lines
80 KiB

diff --git a/.hgignore b/.hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -91,8 +91,11 @@ GPATH
# once legal has centralized their ToS and PP hosting infrastructure,
# (expected Q4 2014) the legal doc build stuff for Loop can be removed,
# including the following three lines
^browser/components/loop/standalone/content/legal/styles/.*\.css$
^browser/components/loop/standalone/content/legal/terms/en_US\.html$
# Android Gradle artifacts.
^mobile/android/gradle/.gradle
+
+_DEBUG/
+_RELEASE/
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
@@ -322,8 +322,11 @@ source-package install:
# Every export rule depends on config/export, but the rule for config/export
# doesn't exist when building js non-standalone.
.PHONY: config/export
config/export:
7 years ago
endif
# There used to be build interdependencies here. They are now in config/recurse.mk
+
+pgo-profile-run:
+ $(PYTHON) $(topsrcdir)/build/pgo/profileserver.py $(EXTRA_TEST_ARGS)
diff --git a/browser/components/build/moz.build b/browser/components/build/moz.build
--- a/browser/components/build/moz.build
+++ b/browser/components/build/moz.build
@@ -17,16 +17,21 @@ XPCOMBinaryComponent('browsercomps')
LOCAL_INCLUDES += [
'../about',
'../dirprovider',
'../feeds',
'../migration',
'../shell',
]
7 years ago
+if CONFIG['JS_SHARED_LIBRARY']:
+ USE_LIBS += [
+ 'js',
+ ]
7 years ago
+
if CONFIG['OS_ARCH'] == 'WINNT':
OS_LIBS += [
'ole32',
'shell32',
'shlwapi',
'version',
]
7 years ago
diff --git a/browser/confvars.sh b/browser/confvars.sh
--- a/browser/confvars.sh
+++ b/browser/confvars.sh
@@ -19,24 +19,24 @@ if test "$OS_ARCH" = "WINNT"; then
if ! test "$MOZ_DEBUG"; then
MOZ_STUB_INSTALLER=1
fi
fi
fi
fi
MOZ_CHROME_FILE_FORMAT=omni
-MOZ_DISABLE_EXPORT_JS=1
-MOZ_SAFE_BROWSING=1
+MOZ_DISABLE_EXPORT_JS=
+MOZ_SAFE_BROWSING=
MOZ_SERVICES_COMMON=1
MOZ_SERVICES_CRYPTO=1
-MOZ_SERVICES_HEALTHREPORT=1
-MOZ_SERVICES_METRICS=1
-MOZ_SERVICES_SYNC=1
-MOZ_SERVICES_CLOUDSYNC=1
+MOZ_SERVICES_HEALTHREPORT=
+MOZ_SERVICES_METRICS=
+MOZ_SERVICES_SYNC=
+MOZ_SERVICES_CLOUDSYNC=
MOZ_APP_VERSION=$FIREFOX_VERSION
MOZ_EXTENSIONS_DEFAULT=" gio"
# MOZ_APP_DISPLAYNAME will be set by branding/configure.sh
# Changing MOZ_*BRANDING_DIRECTORY requires a clobber to ensure correct results,
# because branding dependencies are broken.
# MOZ_BRANDING_DIRECTORY is the default branding directory used when none is
# specified. It should never point to the "official" branding directory.
# For mozilla-beta, mozilla-release, or mozilla-central repositories, use
@@ -52,13 +52,13 @@ ACCEPTED_MAR_CHANNEL_IDS=firefox-mozilla
# The MAR_CHANNEL_ID must not contain the following 3 characters: ",\t "
MAR_CHANNEL_ID=firefox-mozilla-esr
MOZ_PROFILE_MIGRATOR=1
MOZ_APP_STATIC_INI=1
MOZ_WEBAPP_RUNTIME=1
MOZ_MEDIA_NAVIGATOR=1
MOZ_WEBGL_CONFORMANT=1
# Enable navigator.mozPay
-MOZ_PAY=1
+MOZ_PAY=
# Enable activities. These are used for FxOS developers currently.
MOZ_ACTIVITIES=1
MOZ_JSDOWNLOADS=1
MOZ_WEBM_ENCODER=1
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -238,17 +238,19 @@
#endif
@RESPATH@/components/dom_workers.xpt
@RESPATH@/components/dom_xbl.xpt
@RESPATH@/components/dom_xpath.xpt
@RESPATH@/components/dom_xul.xpt
#ifdef MOZ_GAMEPAD
@RESPATH@/components/dom_gamepad.xpt
#endif
+#ifdef MOZ_PAY
@RESPATH@/components/dom_payment.xpt
+#endif
@RESPATH@/components/dom_presentation.xpt
@RESPATH@/components/downloads.xpt
@RESPATH@/components/editor.xpt
@RESPATH@/components/embed_base.xpt
@RESPATH@/components/extensions.xpt
@RESPATH@/components/exthandler.xpt
@RESPATH@/components/exthelper.xpt
@RESPATH@/components/fastfind.xpt
@@ -584,21 +586,21 @@
@RESPATH@/components/SystemMessageManager.manifest
@RESPATH@/components/Activities.manifest
@RESPATH@/components/ActivityProxy.js
@RESPATH@/components/ActivityRequestHandler.js
@RESPATH@/components/ActivityWrapper.js
@RESPATH@/components/ActivityMessageConfigurator.js
#endif
-
+#ifdef MOZ_PAY
@RESPATH@/components/Payment.js
@RESPATH@/components/PaymentFlowInfo.js
@RESPATH@/components/Payment.manifest
-
+#endif
#ifdef MOZ_WEBRTC
@RESPATH@/components/PeerConnection.js
@RESPATH@/components/PeerConnection.manifest
#endif
7 years ago
@RESPATH@/chrome/marionette@JAREXT@
@RESPATH@/chrome/marionette.manifest
@RESPATH@/components/MarionetteComponents.manifest
@@ -614,18 +616,18 @@
@RESPATH@/components/PresentationDeviceInfoManager.manifest
@RESPATH@/components/PresentationDeviceInfoManager.js
; InputMethod API
@RESPATH@/components/MozKeyboard.js
@RESPATH@/components/InputMethod.manifest
#ifdef MOZ_DEBUG
-@RESPATH@/components/TestInterfaceJS.js
-@RESPATH@/components/TestInterfaceJS.manifest
+#@RESPATH@/components/TestInterfaceJS.js
+#@RESPATH@/components/TestInterfaceJS.manifest
#endif
7 years ago
; Modules
@RESPATH@/browser/modules/*
@RESPATH@/modules/*
; Safe Browsing
#ifdef MOZ_URL_CLASSIFIER
diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in
--- a/browser/locales/Makefile.in
+++ b/browser/locales/Makefile.in
@@ -126,17 +126,19 @@ libs:: $(addprefix generic/profile/,$(PR
$(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/defaults/profile
libs:: $(call MERGE_FILES,$(addprefix profile/chrome/,$(PROFILE_CHROME)))
$(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/defaults/profile/chrome
libs-%:
$(NSINSTALL) -D $(DIST)/install
@$(MAKE) -C ../../toolkit/locales libs-$*
+ifdef MOZ_SERVICE_SYNC
@$(MAKE) -C ../../services/sync/locales AB_CD=$* XPI_NAME=locale-$*
+endif
ifdef MOZ_WEBAPP_RUNTIME
@$(MAKE) -C ../../webapprt/locales AB_CD=$* XPI_NAME=locale-$*
7 years ago
endif
@$(MAKE) -C ../../extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$*
@$(MAKE) -C ../../intl/locales AB_CD=$* XPI_NAME=locale-$*
@$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=$(PREF_DIR)
ifdef MOZ_METRO
@$(MAKE) -C ../metro/locales AB_CD=$* XPI_NAME=locale-$*
diff --git a/build/pgo/index.html b/build/pgo/index.html
--- a/build/pgo/index.html
+++ b/build/pgo/index.html
@@ -31,17 +31,18 @@
"js-input/sunspider/math-cordic.html",
"js-input/sunspider/math-partial-sums.html",
"js-input/sunspider/math-spectral-norm.html",
"js-input/sunspider/regexp-dna.html",
"js-input/sunspider/string-base64.html",
"js-input/sunspider/string-fasta.html",
"js-input/sunspider/string-tagcloud.html",
"js-input/sunspider/string-unpack-code.html",
- "js-input/sunspider/string-validate-input.html"
+ "js-input/sunspider/string-validate-input.html",
+ "http://www.livejournal.com"
];
var interval = 1000;
var idx = 0;
var w;
window.onload = function () {
w = window.open("about:blank");
window.setTimeout(loadURL, interval);
diff --git a/caps/nsScriptSecurityManager.cpp b/caps/nsScriptSecurityManager.cpp
--- a/caps/nsScriptSecurityManager.cpp
+++ b/caps/nsScriptSecurityManager.cpp
@@ -388,16 +388,18 @@ NS_IMPL_ISUPPORTS(nsScriptSecurityManage
///////////////// Security Checks /////////////////
7 years ago
bool
nsScriptSecurityManager::ContentSecurityPolicyPermitsJSAction(JSContext *cx)
{
MOZ_ASSERT(cx == nsContentUtils::GetCurrentJSContext());
nsCOMPtr<nsIPrincipal> subjectPrincipal = nsContentUtils::SubjectPrincipal();
+ if (!subjectPrincipal)
+ return true;
nsCOMPtr<nsIContentSecurityPolicy> csp;
nsresult rv = subjectPrincipal->GetCsp(getter_AddRefs(csp));
NS_ASSERTION(NS_SUCCEEDED(rv), "CSP: Failed to get CSP from principal.");
// don't do anything unless there's a CSP
if (!csp)
return true;
diff --git a/config/config.mk b/config/config.mk
--- a/config/config.mk
+++ b/config/config.mk
@@ -338,16 +338,20 @@ OS_INCLUDES := \
7 years ago
endif
include $(MOZILLA_DIR)/config/static-checking-config.mk
7 years ago
CFLAGS = $(OS_CPPFLAGS) $(OS_CFLAGS)
CXXFLAGS = $(OS_CPPFLAGS) $(OS_CXXFLAGS)
LDFLAGS = $(OS_LDFLAGS) $(MOZBUILD_LDFLAGS) $(MOZ_FIX_LINK_PATHS)
+ifeq (1,$(NO_PROFILE_GUIDED_OPTIMIZE))
+MOZ_OPTIMIZE_FLAGS := $(filter-out -GL,$(MOZ_OPTIMIZE_FLAGS))
+endif
+
# Allow each module to override the *default* optimization settings
# by setting MODULE_OPTIMIZE_FLAGS if the developer has not given
# arguments to --enable-optimize
ifdef MOZ_OPTIMIZE
ifeq (1,$(MOZ_OPTIMIZE))
ifdef MODULE_OPTIMIZE_FLAGS
CFLAGS += $(MODULE_OPTIMIZE_FLAGS)
CXXFLAGS += $(MODULE_OPTIMIZE_FLAGS)
7 years ago
diff --git a/config/rules.mk b/config/rules.mk
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -236,25 +236,32 @@ ifdef MOZ_PROFILE_GENERATE
7 years ago
SIMPLE_PROGRAMS :=
endif
ifdef COMPILE_ENVIRONMENT
ifndef TARGETS
TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM) $(SIMPLE_PROGRAMS) $(HOST_LIBRARY) $(HOST_PROGRAM) $(HOST_SIMPLE_PROGRAMS)
endif
+ifdef PCHSRC
+PCHOBJ = $(notdir $(addsuffix .$(OBJ_SUFFIX),$(basename $(PCHSRC))))
+PCHPCH = $(notdir $(addsuffix .pch,$(basename $(PCHSRC))))
+#$(notdir $(PCHHDR:.h=.h.$(PCH_SUFFIX)))
+_PCHFLAGS = -Yu$(PCHHDR) -Fp$(PCHPCH)
+PCHFLAGS = $(if $(filter $(notdir $<),$(notdir $(SOURCES_NOPCH))),,$(_PCHFLAGS))
+endif
COBJS = $(notdir $(CSRCS:.c=.$(OBJ_SUFFIX)))
SOBJS = $(notdir $(SSRCS:.S=.$(OBJ_SUFFIX)))
# CPPSRCS can have different extensions (eg: .cpp, .cc)
CPPOBJS = $(notdir $(addsuffix .$(OBJ_SUFFIX),$(basename $(CPPSRCS))))
CMOBJS = $(notdir $(CMSRCS:.m=.$(OBJ_SUFFIX)))
CMMOBJS = $(notdir $(CMMSRCS:.mm=.$(OBJ_SUFFIX)))
ASOBJS = $(notdir $(ASFILES:.$(ASM_SUFFIX)=.$(OBJ_SUFFIX)))
ifndef OBJS
-_OBJS = $(COBJS) $(SOBJS) $(CPPOBJS) $(CMOBJS) $(CMMOBJS) $(ASOBJS)
+_OBJS = $(PCHOBJ) $(COBJS) $(SOBJS) $(CPPOBJS) $(CMOBJS) $(CMMOBJS) $(ASOBJS)
OBJS = $(strip $(_OBJS))
endif
HOST_COBJS = $(addprefix host_,$(notdir $(HOST_CSRCS:.c=.$(OBJ_SUFFIX))))
# HOST_CPPOBJS can have different extensions (eg: .cpp, .cc)
HOST_CPPOBJS = $(addprefix host_,$(notdir $(addsuffix .$(OBJ_SUFFIX),$(basename $(HOST_CPPSRCS)))))
HOST_CMOBJS = $(addprefix host_,$(notdir $(HOST_CMSRCS:.m=.$(OBJ_SUFFIX))))
HOST_CMMOBJS = $(addprefix host_,$(notdir $(HOST_CMMSRCS:.mm=.$(OBJ_SUFFIX))))
@@ -975,27 +982,31 @@ ifneq (,$(filter %.i,$(MAKECMDGOALS)))
# Hack up VPATH so we can reach the sources. Eg: 'make Parser.i' may need to
# reach $(srcdir)/frontend/Parser.i
VPATH += $(addprefix $(srcdir)/,$(sort $(dir $(CPPSRCS) $(CSRCS) $(CMMSRCS))))
7 years ago
# Make preprocessed files PHONY so they are always executed, since they are
# manual targets and we don't necessarily write to $@.
.PHONY: $(_PREPROCESSED_CPP_FILES) $(_PREPROCESSED_CC_FILES) $(_PREPROCESSED_CXX_FILES) $(_PREPROCESSED_C_FILES) $(_PREPROCESSED_CMM_FILES)
7 years ago
-$(_PREPROCESSED_CPP_FILES): %.i: %.cpp $(call mkdir_deps,$(MDDEPDIR))
7 years ago
+$(PCHOBJ): $(srcdir)/$(PCHSRC) $(srcdir)/$(PCHHDR) $(call mkdir_deps,$(MDDEPDIR))
+ $(REPORT_BUILD)
+ $(CCC) $(PREPROCESS_OPTION)$@ -c -TP -Yc$(notdir $(PCHHDR)) -Fp$(PCHPCH) $(COMPILE_CXXFLAGS) $(TARGET_LOCAL_INCLUDES) $(srcdir)/$(PCHSRC)
7 years ago
+
+$(_PREPROCESSED_CPP_FILES): %.i: %.cpp $(call mkdir_deps,$(MDDEPDIR)) $(PCHPCH)
$(REPORT_BUILD)
$(addprefix $(MKDIR) -p ,$(filter-out .,$(@D)))
$(CCC) -C $(PREPROCESS_OPTION)$@ $(COMPILE_CXXFLAGS) $($(notdir $<)_FLAGS) $(TARGET_LOCAL_INCLUDES) $(_VPATH_SRCS)
-$(_PREPROCESSED_CC_FILES): %.i: %.cc $(call mkdir_deps,$(MDDEPDIR))
+$(_PREPROCESSED_CC_FILES): %.i: %.cc $(call mkdir_deps,$(MDDEPDIR)) $(PCHPCH)
7 years ago
$(REPORT_BUILD)
$(addprefix $(MKDIR) -p ,$(filter-out .,$(@D)))
$(CCC) -C $(PREPROCESS_OPTION)$@ $(COMPILE_CXXFLAGS) $($(notdir $<)_FLAGS) $(TARGET_LOCAL_INCLUDES) $(_VPATH_SRCS)
7 years ago
-$(_PREPROCESSED_CXX_FILES): %.i: %.cxx $(call mkdir_deps,$(MDDEPDIR))
+$(_PREPROCESSED_CXX_FILES): %.i: %.cxx $(call mkdir_deps,$(MDDEPDIR)) $(PCHPCH)
7 years ago
$(REPORT_BUILD)
$(addprefix $(MKDIR) -p ,$(filter-out .,$(@D)))
$(CCC) -C $(PREPROCESS_OPTION)$@ $(COMPILE_CXXFLAGS) $($(notdir $<)_FLAGS) $(TARGET_LOCAL_INCLUDES) $(_VPATH_SRCS)
7 years ago
$(_PREPROCESSED_C_FILES): %.i: %.c $(call mkdir_deps,$(MDDEPDIR))
7 years ago
$(REPORT_BUILD)
$(addprefix $(MKDIR) -p ,$(filter-out .,$(@D)))
$(CC) -C $(PREPROCESS_OPTION)$@ $(COMPILE_CFLAGS) $($(notdir $<)_FLAGS) $(TARGET_LOCAL_INCLUDES) $(_VPATH_SRCS)
7 years ago
diff --git a/configure.in b/configure.in
--- a/configure.in
+++ b/configure.in
@@ -1861,17 +1861,17 @@ fi
dnl ========================================================
dnl System overrides of the defaults for host
dnl ========================================================
case "$host" in
*mingw*)
if test -n "$_WIN32_MSVC"; then
HOST_AR=lib
- HOST_AR_FLAGS='-NOLOGO -OUT:$@'
+ HOST_AR_FLAGS='-LTCG -NOLOGO -OUT:$@'
HOST_CFLAGS="$HOST_CFLAGS -TC -nologo"
HOST_RANLIB='echo ranlib'
else
HOST_CFLAGS="$HOST_CFLAGS -mwindows"
fi
HOST_CFLAGS="$HOST_CFLAGS -DXP_WIN32 -DXP_WIN -DWIN32 -D_WIN32 -DNO_X11 -D_CRT_SECURE_NO_WARNINGS"
HOST_NSPR_MDCPUCFG='\"md/_winnt.cfg\"'
HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}"
@@ -2273,17 +2273,17 @@ ia64*-hpux*)
CXXFLAGS="$CXXFLAGS -Wno-inline-new-delete"
fi
# make 'foo == bar;' error out
CFLAGS="$CFLAGS -we4553"
CXXFLAGS="$CXXFLAGS -we4553"
LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib secur32.lib netapi32.lib"
MOZ_DEBUG_LDFLAGS='-DEBUG -DEBUGTYPE:CV'
WARNINGS_AS_ERRORS='-WX'
- MOZ_OPTIMIZE_FLAGS='-O1 -Oi'
+ MOZ_OPTIMIZE_FLAGS='-O1 -Oi -Gw'
MOZ_FIX_LINK_PATHS=
MOZ_COMPONENT_NSPR_LIBS='$(NSPR_LIBS)'
# Disable these flags on clang-cl since it doesn't ignore unknown arguments by default, and
# autoconf insists on passing $LDFLAGS to the compiler.
if test -z "$CLANG_CL"; then
LDFLAGS="$LDFLAGS -LARGEADDRESSAWARE -NXCOMPAT"
if test -z "$DEVELOPER_OPTIONS"; then
LDFLAGS="$LDFLAGS -RELEASE"
@@ -4275,17 +4275,17 @@ dnl ====================================
7 years ago
MOZ_WIDGET_GTK=
case "$MOZ_WIDGET_TOOLKIT" in
cairo-windows)
MOZ_WIDGET_TOOLKIT=windows
MOZ_PDF_PRINTING=1
- MOZ_INSTRUMENT_EVENT_LOOP=1
+ MOZ_INSTRUMENT_EVENT_LOOP=
if test -n "$GNU_CC"; then
MOZ_FOLD_LIBS=
fi
;;
cairo-gtk3)
MOZ_WIDGET_TOOLKIT=gtk3
MOZ_ENABLE_GTK=1
@@ -5940,17 +5940,17 @@ if test -n "$MOZ_ANGLE_RENDERER"; then
# Get the SDK path from the registry.
# First try to get the June 2010 SDK
MOZ_DIRECTX_SDK_REG_KEY=`reg query 'HKLM\Software\Microsoft\DirectX' //s | grep 'Microsoft DirectX SDK (June 2010)' | head -n 1`
if test -z "$MOZ_DIRECTX_SDK_REG_KEY" ; then
# Otherwise just take whatever comes first
MOZ_DIRECTX_SDK_REG_KEY=`reg query 'HKLM\Software\Microsoft\DirectX' //s | grep 'Microsoft DirectX SDK' | head -n 1`
fi
MOZ_DIRECTX_SDK_PATH=`reg query "$MOZ_DIRECTX_SDK_REG_KEY" //v InstallPath | grep REG_SZ | sed 's/.*\([[a-zA-Z]]\)\\:\\\\/\\1\\:\\\\/' | sed 's,\\\\,/,g'`
7 years ago
-
+ MOZ_DIRECTX_SDK_PATH="h:/DirectXSDK"
if test -n "$MOZ_DIRECTX_SDK_PATH" &&
test -f "$MOZ_DIRECTX_SDK_PATH"/lib/$MOZ_D3D_CPU_SUFFIX/dxguid.lib ; then
AC_MSG_RESULT([Found DirectX SDK via registry, using $MOZ_DIRECTX_SDK_PATH])
else
AC_MSG_RESULT([DirectX SDK not found.])
MOZ_DIRECTX_SDK_PATH=
fi
7 years ago
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -10495,29 +10495,29 @@ nsDocShell::DoURILoad(nsIURI* aURI,
}
7 years ago
if (IsFrame()) {
// Only allow view-source scheme in top-level docshells. view-source is
// the only scheme to which this applies at the moment due to potential
// timing attacks to read data from cross-origin iframes. If this widens
// we should add a protocol flag for whether the scheme is allowed in
// frames and use something like nsNetUtil::NS_URIChainHasFlags.
- nsCOMPtr<nsIURI> tempURI = aURI;
+ /*nsCOMPtr<nsIURI> tempURI = aURI;
nsCOMPtr<nsINestedURI> nestedURI = do_QueryInterface(tempURI);
while (nestedURI) {
// view-source should always be an nsINestedURI, loop and check the
// scheme on this and all inner URIs that are also nested URIs.
bool isViewSource = false;
rv = tempURI->SchemeIs("view-source", &isViewSource);
if (NS_FAILED(rv) || isViewSource) {
return NS_ERROR_UNKNOWN_PROTOCOL;
}
nestedURI->GetInnerURI(getter_AddRefs(tempURI));
nestedURI = do_QueryInterface(tempURI);
- }
+ }*/
}
// open a channel for the url
nsCOMPtr<nsIChannel> channel;
7 years ago
bool isSrcdoc = !aSrcdoc.IsVoid();
7 years ago
nsCOMPtr<nsINode> requestingNode;
7 years ago
diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -7153,16 +7153,17 @@ nsGlobalWindow::SizeToContent()
7 years ago
return rv.ErrorCode();
}
NS_IMETHODIMP
nsGlobalWindow::GetWindowRoot(nsIDOMEventTarget **aWindowRoot)
{
nsCOMPtr<nsPIWindowRoot> root = GetTopWindowRoot();
+ NS_ENSURE_TRUE(root, NS_ERROR_FAILURE);
return CallQueryInterface(root, aWindowRoot);
}
already_AddRefed<nsPIWindowRoot>
nsGlobalWindow::GetTopWindowRoot()
{
nsPIDOMWindow* piWin = GetPrivateRoot();
if (!piWin) {
diff --git a/dom/plugins/base/nsNPAPIPlugin.cpp b/dom/plugins/base/nsNPAPIPlugin.cpp
--- a/dom/plugins/base/nsNPAPIPlugin.cpp
+++ b/dom/plugins/base/nsNPAPIPlugin.cpp
@@ -269,30 +269,30 @@ nsNPAPIPlugin::RunPluginOOP(const nsPlug
7 years ago
#ifdef ACCESSIBILITY
// Certain assistive technologies don't want oop Flash, thus we have a special
// pref for them to disable oop Flash (refer to bug 785047 for details).
bool useA11yPref = false;
#ifdef XP_WIN
useA11yPref = a11y::Compatibility::IsJAWS();
#endif
#endif
-
+/*
7 years ago
#ifdef XP_WIN
// On Windows Vista+, we force Flash to run in OOPP mode because Adobe
// doesn't test Flash in-process and there are known stability bugs.
if (aPluginTag->mIsFlashPlugin && IsVistaOrLater()) {
#ifdef ACCESSIBILITY
if (!useA11yPref)
return true;
#else
return true;
#endif
}
#endif
-
+*/
7 years ago
nsIPrefBranch* prefs = Preferences::GetRootBranch();
if (!prefs) {
return false;
}
// Get per-library whitelist/blacklist pref string
// "dom.ipc.plugins.enabled.filename.dll" and fall back to the default value
// of "dom.ipc.plugins.enabled"
7 years ago
diff --git a/dom/plugins/base/nsPluginInstanceOwner.cpp b/dom/plugins/base/nsPluginInstanceOwner.cpp
--- a/dom/plugins/base/nsPluginInstanceOwner.cpp
+++ b/dom/plugins/base/nsPluginInstanceOwner.cpp
@@ -699,16 +699,17 @@ NS_IMETHODIMP nsPluginInstanceOwner::Get
7 years ago
//
// fixing both the caret and ability to interact issues for a windowless control in a non document aligned windw
// does not seem to be possible without a change to the flash plugin
nsIWidget* win = mPluginFrame->GetNearestWidget();
7 years ago
if (win) {
nsView *view = nsView::GetViewFor(win);
7 years ago
NS_ASSERTION(view, "No view for widget");
+ if (!view) return NS_ERROR_FAILURE;
7 years ago
nsPoint offset = view->GetOffsetTo(nullptr);
7 years ago
if (offset.x || offset.y) {
// in the case the two windows are offset from eachother, we do go ahead and return the correct enclosing window
// so that mouse co-ordinates are not messed up.
*pvalue = (void*)win->GetNativeData(NS_NATIVE_WINDOW);
if (*pvalue)
return NS_OK;
diff --git a/embedding/browser/nsDocShellTreeOwner.cpp b/embedding/browser/nsDocShellTreeOwner.cpp
--- a/embedding/browser/nsDocShellTreeOwner.cpp
+++ b/embedding/browser/nsDocShellTreeOwner.cpp
@@ -683,17 +683,18 @@ nsDocShellTreeOwner::OnProgressChange(ns
int32_t aCurSelfProgress,
int32_t aMaxSelfProgress,
int32_t aCurTotalProgress,
int32_t aMaxTotalProgress)
{
// In the absence of DOM document creation event, this method is the
// most convenient place to install the mouse listener on the
// DOM document.
- return AddChromeListeners();
+ // return AddChromeListeners();
+ return NS_OK;
}
NS_IMETHODIMP
nsDocShellTreeOwner::OnStateChange(nsIWebProgress* aProgress,
nsIRequest* aRequest,
uint32_t aProgressStateFlags,
nsresult aStatus)
{
@@ -837,22 +838,24 @@ nsDocShellTreeOwner::AddChromeListeners(
rv = mChromeContextMenuListener->AddChromeListeners();
7 years ago
}
}
// register dragover and drop event listeners with the listener manager
nsCOMPtr<EventTarget> target;
GetDOMEventTarget(mWebBrowser, getter_AddRefs(target));
7 years ago
- EventListenerManager* elmP = target->GetOrCreateListenerManager();
- if (elmP) {
- elmP->AddEventListenerByType(this, NS_LITERAL_STRING("dragover"),
- TrustedEventsAtSystemGroupBubble());
- elmP->AddEventListenerByType(this, NS_LITERAL_STRING("drop"),
- TrustedEventsAtSystemGroupBubble());
+ if (target) {
+ EventListenerManager* elmP = target->GetOrCreateListenerManager();
+ if (elmP) {
+ elmP->AddEventListenerByType(this, NS_LITERAL_STRING("dragover"),
+ TrustedEventsAtSystemGroupBubble());
+ elmP->AddEventListenerByType(this, NS_LITERAL_STRING("drop"),
+ TrustedEventsAtSystemGroupBubble());
+ }
}
return rv;
} // AddChromeListeners
NS_IMETHODIMP
@@ -897,25 +900,25 @@ nsDocShellTreeOwner::HandleEvent(nsIDOME
}
nsCOMPtr<nsIDroppedLinkHandler> handler = do_GetService("@mozilla.org/content/dropped-link-handler;1");
if (handler) {
nsAutoString eventType;
aEvent->GetType(eventType);
if (eventType.EqualsLiteral("dragover")) {
bool canDropLink;
- handler->CanDropLink(dragEvent, false, &canDropLink);
+ handler->CanDropLink(dragEvent, false, &canDropLink);
7 years ago
if (canDropLink)
aEvent->PreventDefault();
}
else if (eventType.EqualsLiteral("drop")) {
nsIWebNavigation* webnav = static_cast<nsIWebNavigation *>(mWebBrowser);
nsAutoString link, name;
- if (webnav && NS_SUCCEEDED(handler->DropLink(dragEvent, link, false, name))) {
+ if (webnav && NS_SUCCEEDED(handler->DropLink(dragEvent, name, false, link))) {
if (!link.IsEmpty()) {
webnav->LoadURI(link.get(), 0, nullptr, nullptr, nullptr);
}
} else {
7 years ago
aEvent->StopPropagation();
aEvent->PreventDefault();
}
}
diff --git a/embedding/browser/nsWebBrowser.cpp b/embedding/browser/nsWebBrowser.cpp
--- a/embedding/browser/nsWebBrowser.cpp
+++ b/embedding/browser/nsWebBrowser.cpp
@@ -89,23 +89,23 @@ nsWebBrowser::~nsWebBrowser()
}
NS_IMETHODIMP nsWebBrowser::InternalDestroy()
{
if (mInternalWidget) {
mInternalWidget->SetWidgetListener(nullptr);
mInternalWidget->Destroy();
mInternalWidget = nullptr; // Force release here.
- }
+ }
SetDocShell(nullptr);
if (mDocShellTreeOwner) {
- mDocShellTreeOwner->WebBrowser(nullptr);
- mDocShellTreeOwner = nullptr;
+ mDocShellTreeOwner->WebBrowser(nullptr);
+ mDocShellTreeOwner = nullptr;
}
mInitInfo = nullptr;
mListenerArray = nullptr;
return NS_OK;
}
diff --git a/embedding/components/printingui/win/nsPrintDialogUtil.cpp b/embedding/components/printingui/win/nsPrintDialogUtil.cpp
--- a/embedding/components/printingui/win/nsPrintDialogUtil.cpp
+++ b/embedding/components/printingui/win/nsPrintDialogUtil.cpp
7 years ago
@@ -1068,14 +1068,14 @@ PrepareForPrintDialog(nsIWebBrowserPrint
nsresult NativeShowPrintDialog(HWND aHWnd,
nsIWebBrowserPrint* aWebBrowserPrint,
nsIPrintSettings* aPrintSettings)
{
PrepareForPrintDialog(aWebBrowserPrint, aPrintSettings);
nsresult rv = ShowNativePrintDialog(aHWnd, aPrintSettings);
if (aHWnd) {
- ::DestroyWindow(aHWnd);
+ //::DestroyWindow(aHWnd);
}
return rv;
}
diff --git a/embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp b/embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp
--- a/embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp
+++ b/embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp
@@ -1221,17 +1221,18 @@ nsresult nsWebBrowserPersist::SaveURIInt
nsCOMPtr<nsIPrivateBrowsingChannel> pbChannel = do_QueryInterface(inputChannel);
if (pbChannel)
{
pbChannel->SetPrivate(aIsPrivate);
}
if (NS_FAILED(rv) || inputChannel == nullptr)
{
- EndDownload(NS_ERROR_FAILURE);
+ //No point in stopping the download because of a single failure
+ //EndDownload(NS_ERROR_FAILURE);
return NS_ERROR_FAILURE;
}
// Disable content conversion
if (mPersistFlags & PERSIST_FLAGS_NO_CONVERSION)
{
nsCOMPtr<nsIEncodedChannel> encodedChannel(do_QueryInterface(inputChannel));
if (encodedChannel)
diff --git a/gfx/layers/d3d11/CompositorD3D11.cpp b/gfx/layers/d3d11/CompositorD3D11.cpp
--- a/gfx/layers/d3d11/CompositorD3D11.cpp
+++ b/gfx/layers/d3d11/CompositorD3D11.cpp
@@ -1157,17 +1157,18 @@ CompositorD3D11::EndFrame()
rect.left = r->x;
rect.top = r->y;
rect.bottom = r->YMost();
rect.right = r->XMost();
rects.push_back(rect);
}
- params.pDirtyRects = &rects.front();
+ if (rects.size())
+ params.pDirtyRects = &rects.front();
chain->Present1(presentInterval, mDisableSequenceForNextFrame ? DXGI_PRESENT_DO_NOT_SEQUENCE : 0, &params);
} else {
mSwapChain->Present(presentInterval, mDisableSequenceForNextFrame ? DXGI_PRESENT_DO_NOT_SEQUENCE : 0);
}
mDisableSequenceForNextFrame = false;
if (mTarget) {
PaintToTarget();
}
7 years ago
diff --git a/image/decoders/nsICODecoder.cpp b/image/decoders/nsICODecoder.cpp
--- a/image/decoders/nsICODecoder.cpp
+++ b/image/decoders/nsICODecoder.cpp
@@ -15,17 +15,17 @@
7 years ago
#include "RasterImage.h"
namespace mozilla {
namespace image {
#define ICONCOUNTOFFSET 4
#define DIRENTRYOFFSET 6
#define BITMAPINFOSIZE 40
-#define PREFICONSIZE 16
+#define PREFICONSIZE 32
// ----------------------------------------
// Actual Data Processing
// ----------------------------------------
uint32_t
nsICODecoder::CalcAlphaRowSize()
7 years ago
{
diff --git a/intl/icu/source/common/Makefile.in b/intl/icu/source/common/Makefile.in
--- a/intl/icu/source/common/Makefile.in
+++ b/intl/icu/source/common/Makefile.in
@@ -218,8 +218,11 @@ endif # ENABLE_SHARED
ifeq (,$(MAKECMDGOALS))
-include $(DEPS)
else
ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
-include $(DEPS)
endif
endif
+CFLAGS += -O1 -GL -Gw
+CXXFLAGS += -O1 -GL -Gw
+LDFLAGS += -opt:ref,icf -LARGEADDRESSAWARE -LTCG
7 years ago
diff --git a/intl/icu/source/i18n/Makefile.in b/intl/icu/source/i18n/Makefile.in
--- a/intl/icu/source/i18n/Makefile.in
+++ b/intl/icu/source/i18n/Makefile.in
@@ -189,8 +189,12 @@ endif # ENABLE_SHARED
ifeq (,$(MAKECMDGOALS))
-include $(DEPS)
else
ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
-include $(DEPS)
endif
endif
+
+CFLAGS += -O1 -GL -Gw
+CXXFLAGS += -O1 -GL -Gw
+LDFLAGS += -LTCG -opt:ref,icf -LARGEADDRESSAWARE
diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -110,16 +110,22 @@ using JS::ToUint32;
using js::frontend::Parser;
#ifdef HAVE_VA_LIST_AS_ARRAY
#define JS_ADDRESSOF_VA_LIST(ap) ((va_list*)(ap))
#else
#define JS_ADDRESSOF_VA_LIST(ap) (&(ap))
#endif
+JS_PUBLIC_API(bool)
+JS::JS_RequireArgsAtLeast(JSContext* cx, JS::CallArgs& args,
+const char* fnname, unsigned required) {
+ return args.requireAtLeast(cx, fnname, required);
+}
+
bool
JS::CallArgs::requireAtLeast(JSContext* cx, const char* fnname, unsigned required) {
if (length() < required) {
char numArgsStr[40];
JS_snprintf(numArgsStr, sizeof numArgsStr, "%u", required - 1);
JS_ReportErrorNumber(cx, js_GetErrorMessage, nullptr, JSMSG_MORE_ARGS_NEEDED,
fnname, numArgsStr, required == 2 ? "" : "s");
return false;
diff --git a/js/src/jsapi.h b/js/src/jsapi.h
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -32,16 +32,20 @@
#include "js/Utility.h"
#include "js/Value.h"
#include "js/Vector.h"
/************************************************************************/
namespace JS {
+extern JS_PUBLIC_API(bool)
+ JS_RequireArgsAtLeast(JSContext* cx, JS::CallArgs& args, const char* fnname, unsigned required);
+
+
class Latin1CharsZ;
class TwoByteChars;
#ifdef JS_DEBUG
class JS_PUBLIC_API(AutoCheckRequestDepth)
{
JSContext* cx;
7 years ago
diff --git a/js/xpconnect/idl/moz.build b/js/xpconnect/idl/moz.build
--- a/js/xpconnect/idl/moz.build
+++ b/js/xpconnect/idl/moz.build
@@ -2,16 +2,17 @@
7 years ago
# vim: set filetype=python:
# 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/.
XPIDL_SOURCES += [
'mozIJSSubScriptLoader.idl',
'nsIAddonInterposition.idl',
+ 'nsIJSContextStack.idl',
7 years ago
'nsIJSRuntimeService.idl',
'nsIRemoteTagService.idl',
7 years ago
'nsIScriptError.idl',
'nsIXPConnect.idl',
'nsIXPCScriptable.idl',
'xpccomponents.idl',
'xpcexception.idl',
'xpcIJSGetFactory.idl',
diff --git a/js/xpconnect/idl/nsIJSContextStack.idl b/js/xpconnect/idl/nsIJSContextStack.idl
new file mode 100644
--- /dev/null
+++ b/js/xpconnect/idl/nsIJSContextStack.idl
@@ -0,0 +1,12 @@
+#include "nsISupports.idl"
+
+[ptr] native JSContext(JSContext);
+
+[uuid(c67d8270-3189-11d3-9885-006008962422)]
+interface nsIJSContextStack : nsISupports
+{
+ JSContext pop();
+ void push(in JSContext cx);
+};
+
+
7 years ago
diff --git a/js/xpconnect/src/nsXPConnect.cpp b/js/xpconnect/src/nsXPConnect.cpp
--- a/js/xpconnect/src/nsXPConnect.cpp
+++ b/js/xpconnect/src/nsXPConnect.cpp
@@ -36,17 +36,18 @@ using namespace mozilla;
7 years ago
using namespace mozilla::dom;
using namespace xpc;
using namespace JS;
NS_IMPL_ISUPPORTS(nsXPConnect,
nsIXPConnect,
nsISupportsWeakReference,
nsIThreadObserver,
- nsIJSRuntimeService)
+ nsIJSRuntimeService,
+ nsIJSContextStack)
nsXPConnect* nsXPConnect::gSelf = nullptr;
bool nsXPConnect::gOnceAliveNowDead = false;
uint32_t nsXPConnect::gReportAllJSExceptions = 0;
// Global cache of the default script security manager (QI'd to
// nsIScriptSecurityManager) and the system principal.
nsIScriptSecurityManager* nsXPConnect::gScriptSecurityManager = nullptr;
@@ -1008,16 +1009,29 @@ nsXPConnect::AfterProcessNextEvent(nsITh
Promise::PerformMicroTaskCheckpoint();
7 years ago
PopJSContextNoScriptContext();
7 years ago
return NS_OK;
}
NS_IMETHODIMP
+nsXPConnect::Push(JSContext *aJSContext)
+{
+ return PushJSContextNoScriptContext(aJSContext) ? NS_OK : NS_ERROR_FAILURE;
+}
+
+NS_IMETHODIMP
+nsXPConnect::Pop(JSContext **aJSContext)
+{
+ PopJSContextNoScriptContext();//*aJSContext = XPCJSRuntime::Get()->GetJSContextStack()->Pop();
+ return NS_OK;
+}
+
+NS_IMETHODIMP
nsXPConnect::OnDispatchedEvent(nsIThreadInternal* aThread)
7 years ago
{
NS_NOTREACHED("Why tell us?");
return NS_ERROR_UNEXPECTED;
7 years ago
}
NS_IMETHODIMP
nsXPConnect::SetReportAllJSExceptions(bool newval)
@@ -1084,17 +1098,17 @@ nsXPConnect::GetSafeJSContext()
return GetRuntime()->GetJSContextStack()->GetSafeJSContext();
7 years ago
}
namespace xpc {
bool
PushJSContextNoScriptContext(JSContext* aCx)
7 years ago
{
- MOZ_ASSERT_IF(aCx, !GetScriptContextFromJSContext(aCx));
+ //MOZ_ASSERT_IF(aCx, !GetScriptContextFromJSContext(aCx));
return XPCJSRuntime::Get()->GetJSContextStack()->Push(aCx);
7 years ago
}
void
PopJSContextNoScriptContext()
7 years ago
{
XPCJSRuntime::Get()->GetJSContextStack()->Pop();
7 years ago
}
diff --git a/js/xpconnect/src/xpcprivate.h b/js/xpconnect/src/xpcprivate.h
--- a/js/xpconnect/src/xpcprivate.h
+++ b/js/xpconnect/src/xpcprivate.h
@@ -107,16 +107,17 @@
#include "nsIClassInfoImpl.h"
#include "nsIComponentManager.h"
#include "nsIComponentRegistrar.h"
#include "nsISupportsPrimitives.h"
#include "nsMemory.h"
#include "nsIXPConnect.h"
#include "nsIInterfaceInfo.h"
#include "nsIXPCScriptable.h"
+#include "nsIJSContextStack.h"
#include "nsIJSRuntimeService.h"
#include "nsIObserver.h"
#include "nsWeakReference.h"
#include "nsCOMPtr.h"
#include "nsXPTCUtils.h"
#include "xptinfo.h"
#include "XPCForwards.h"
#include "XPCLog.h"
@@ -241,24 +242,26 @@ static inline bool IS_WN_REFLECTOR(JSObj
// We have a general rule internally that getters that return addref'd interface
// pointer generally do so using an 'out' parm. When interface pointers are
// returned as function call result values they are not addref'd. Exceptions
// to this rule are noted explicitly.
class nsXPConnect final : public nsIXPConnect,
public nsIThreadObserver,
public nsSupportsWeakReference,
- public nsIJSRuntimeService
+ public nsIJSRuntimeService,
+ public nsIJSContextStack
7 years ago
{
public:
// all the interface method declarations...
NS_DECL_ISUPPORTS
NS_DECL_NSIXPCONNECT
NS_DECL_NSITHREADOBSERVER
NS_DECL_NSIJSRUNTIMESERVICE
+ NS_DECL_NSIJSCONTEXTSTACK
7 years ago
// non-interface implementation
public:
// These get non-addref'd pointers
static nsXPConnect* XPConnect()
{
// Do a release-mode assert that we're not doing anything significant in
// XPConnect off the main thread. If you're an extension developer hitting
diff --git a/netwerk/base/ProxyAutoConfig.cpp b/netwerk/base/ProxyAutoConfig.cpp
--- a/netwerk/base/ProxyAutoConfig.cpp
+++ b/netwerk/base/ProxyAutoConfig.cpp
@@ -411,17 +411,17 @@ bool PACDnsResolve(JSContext *cx, unsign
7 years ago
{
JS::CallArgs args = CallArgsFromVp(argc, vp);
7 years ago
if (NS_IsMainThread()) {
NS_WARNING("DNS Resolution From PAC on Main Thread. How did that happen?");
return false;
}
7 years ago
- if (!args.requireAtLeast(cx, "dnsResolve", 1))
+ if (!JS::JS_RequireArgsAtLeast(cx, args, "dnsResolve", 1))
return false;
7 years ago
JS::Rooted<JSString*> arg1(cx, JS::ToString(cx, args[0]));
if (!arg1)
return false;
7 years ago
nsAutoJSString hostName;
nsAutoCString dottedDecimal;
@@ -463,17 +463,17 @@ bool PACMyIpAddress(JSContext *cx, unsig
7 years ago
}
// proxyAlert(msg) javascript implementation
static
bool PACProxyAlert(JSContext *cx, unsigned int argc, JS::Value *vp)
7 years ago
{
JS::CallArgs args = CallArgsFromVp(argc, vp);
7 years ago
- if (!args.requireAtLeast(cx, "alert", 1))
+ if (!JS::JS_RequireArgsAtLeast(cx, args, "alert", 1))
return false;
7 years ago
JS::Rooted<JSString*> arg1(cx, JS::ToString(cx, args[0]));
if (!arg1)
return false;
7 years ago
nsAutoJSString message;
if (!message.init(cx, arg1))
diff --git a/python/mozbuild/mozbuild/frontend/context.py b/python/mozbuild/mozbuild/frontend/context.py
--- a/python/mozbuild/mozbuild/frontend/context.py
+++ b/python/mozbuild/mozbuild/frontend/context.py
@@ -408,16 +408,29 @@ VARIABLES = {
""", 'export'),
7 years ago
'SOURCES': (StrictOrderingOnAppendListWithFlagsFactory({'no_pgo': bool, 'flags': List}), list,
"""Source code files.
7 years ago
This variable contains a list of source code files to compile.
Accepts assembler, C, C++, Objective C/C++.
""", None),
+
+ 'SOURCES_NOPCH': (StrictOrderingOnAppendList, list,
+ """Source code files.
+
+ This variable contains a list of source code files not using
+ the precompiled header.
+ """, 'compile'),
+
+ 'PCHHDR': (unicode, unicode,
+ "", None),
+ 'PCHSRC': (unicode, unicode,
+ "", None),
+
7 years ago
'GENERATED_SOURCES': (StrictOrderingOnAppendList, list,
"""Generated source code files.
7 years ago
This variable contains a list of generated source code files to
compile. Accepts assembler, C, C++, Objective C/C++.
""", None),
7 years ago
diff --git a/python/mozbuild/mozbuild/frontend/emitter.py b/python/mozbuild/mozbuild/frontend/emitter.py
--- a/python/mozbuild/mozbuild/frontend/emitter.py
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
@@ -416,16 +416,19 @@ class TreeMetadataEmitter(LoggingMixin):
'NO_DIST_INSTALL',
'PYTHON_UNIT_TESTS',
'RCFILE',
'RESFILE',
'RCINCLUDE',
'DEFFILE',
'WIN32_EXE_LDFLAGS',
'LD_VERSION_SCRIPT',
+ 'SOURCES_NOPCH',
+ 'PCHHDR',
+ 'PCHSRC',
]
for v in varlist:
if v in context and context[v]:
passthru.variables[v] = context[v]
7 years ago
if context.config.substs.get('OS_TARGET') == 'WINNT' and \
context['DELAYLOAD_DLLS']:
context['LDFLAGS'].extend([('-DELAYLOAD:%s' % dll)
diff --git a/security/nss/coreconf/WIN32.mk b/security/nss/coreconf/WIN32.mk
--- a/security/nss/coreconf/WIN32.mk
+++ b/security/nss/coreconf/WIN32.mk
@@ -106,19 +106,19 @@ ifdef NS_USE_GCC
# The -mnop-fun-dllimport flag allows us to avoid a drawback of
# the dllimport attribute that a pointer to a function marked as
# dllimport cannot be used as as a constant address.
OS_CFLAGS += -mwindows -mms-bitfields -mnop-fun-dllimport
_GEN_IMPORT_LIB=-Wl,--out-implib,$(IMPORT_LIBRARY)
DLLFLAGS += -mwindows -o $@ -shared -Wl,--export-all-symbols $(if $(IMPORT_LIBRARY),$(_GEN_IMPORT_LIB))
ifdef BUILD_OPT
ifeq (11,$(ALLOW_OPT_CODE_SIZE)$(OPT_CODE_SIZE))
- OPTIMIZER += -Os
+ OPTIMIZER += -Os -GFL -Gw