зеркало из https://github.com/mozilla/gecko-dev.git
Merge bug 466492, bug 466486, bug 463289, bug 442012, and bug 463420
This commit is contained in:
Коммит
baa60e6034
|
@ -199,15 +199,22 @@ ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
|
||||||
ifndef GNU_CC
|
ifndef GNU_CC
|
||||||
|
|
||||||
#
|
#
|
||||||
# All C++ files share a PDB file per directory. For parallel builds, this PDB
|
# Unless we're building SIMPLE_PROGRAMS, all C++ files share a PDB file per
|
||||||
# file is shared and locked by MSPDBSRV.EXE, starting with MSVC8 SP1. If
|
# directory. For parallel builds, this PDB file is shared and locked by
|
||||||
# you're using MSVC 7.1 or MSVC8 without SP1, don't do parallel builds.
|
# MSPDBSRV.EXE, starting with MSVC8 SP1. If you're using MSVC 7.1 or MSVC8
|
||||||
|
# without SP1, don't do parallel builds.
|
||||||
#
|
#
|
||||||
# The final PDB for libraries and programs is created by the linker and uses
|
# The final PDB for libraries and programs is created by the linker and uses
|
||||||
# a different name from the single PDB file created by the compiler. See
|
# a different name from the single PDB file created by the compiler. See
|
||||||
# bug 462740.
|
# bug 462740.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
ifdef SIMPLE_PROGRAMS
|
||||||
|
COMPILE_PDBFILE = $(basename $(@F)).pdb
|
||||||
|
else
|
||||||
COMPILE_PDBFILE = generated.pdb
|
COMPILE_PDBFILE = generated.pdb
|
||||||
|
endif
|
||||||
|
|
||||||
LINK_PDBFILE = $(basename $(@F)).pdb
|
LINK_PDBFILE = $(basename $(@F)).pdb
|
||||||
ifdef MOZ_DEBUG
|
ifdef MOZ_DEBUG
|
||||||
CODFILE=$(basename $(@F)).cod
|
CODFILE=$(basename $(@F)).cod
|
||||||
|
@ -360,22 +367,30 @@ UPDATE_TITLE_libs = sed -e "s!Y!libs in $(shell $(BUILD_TOOLS)/print-depth-path.
|
||||||
UPDATE_TITLE_tools = sed -e "s!Y!tools in $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$*!" $(MOZILLA_DIR)/config/xterm.str;
|
UPDATE_TITLE_tools = sed -e "s!Y!tools in $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$*!" $(MOZILLA_DIR)/config/xterm.str;
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq (,$(strip $(DIRS)))
|
||||||
LOOP_OVER_DIRS = \
|
LOOP_OVER_DIRS = \
|
||||||
@$(EXIT_ON_ERROR) \
|
@$(EXIT_ON_ERROR) \
|
||||||
$(foreach dir,$(DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true
|
$(foreach dir,$(DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; )
|
||||||
|
endif
|
||||||
|
|
||||||
# we only use this for the makefiles target and other stuff that doesn't matter
|
# we only use this for the makefiles target and other stuff that doesn't matter
|
||||||
|
ifneq (,$(strip $(PARALLEL_DIRS)))
|
||||||
LOOP_OVER_PARALLEL_DIRS = \
|
LOOP_OVER_PARALLEL_DIRS = \
|
||||||
@$(EXIT_ON_ERROR) \
|
@$(EXIT_ON_ERROR) \
|
||||||
$(foreach dir,$(PARALLEL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true
|
$(foreach dir,$(PARALLEL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; )
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq (,$(strip $(STATIC_DIRS)))
|
||||||
LOOP_OVER_STATIC_DIRS = \
|
LOOP_OVER_STATIC_DIRS = \
|
||||||
@$(EXIT_ON_ERROR) \
|
@$(EXIT_ON_ERROR) \
|
||||||
$(foreach dir,$(STATIC_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true
|
$(foreach dir,$(STATIC_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; )
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq (,$(strip $(TOOL_DIRS)))
|
||||||
LOOP_OVER_TOOL_DIRS = \
|
LOOP_OVER_TOOL_DIRS = \
|
||||||
@$(EXIT_ON_ERROR) \
|
@$(EXIT_ON_ERROR) \
|
||||||
$(foreach dir,$(TOOL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true
|
$(foreach dir,$(TOOL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; )
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef PARALLEL_DIRS
|
ifdef PARALLEL_DIRS
|
||||||
# create a bunch of fake targets for order-only processing
|
# create a bunch of fake targets for order-only processing
|
||||||
|
@ -615,8 +630,7 @@ default all alldep::
|
||||||
else
|
else
|
||||||
|
|
||||||
default all::
|
default all::
|
||||||
@$(EXIT_ON_ERROR) \
|
+$(LOOP_OVER_STATIC_DIRS)
|
||||||
$(foreach dir,$(STATIC_DIRS),$(MAKE) -C $(dir); ) true
|
|
||||||
$(MAKE) export
|
$(MAKE) export
|
||||||
$(MAKE) libs
|
$(MAKE) libs
|
||||||
$(MAKE) tools
|
$(MAKE) tools
|
||||||
|
@ -718,10 +732,7 @@ endif
|
||||||
|
|
||||||
tools:: $(SUBMAKEFILES) $(MAKE_DIRS)
|
tools:: $(SUBMAKEFILES) $(MAKE_DIRS)
|
||||||
+$(LOOP_OVER_DIRS)
|
+$(LOOP_OVER_DIRS)
|
||||||
ifdef TOOL_DIRS
|
+$(LOOP_OVER_TOOL_DIRS)
|
||||||
@$(EXIT_ON_ERROR) \
|
|
||||||
$(foreach dir,$(TOOL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) libs; ) true
|
|
||||||
endif
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Rule to create list of libraries for final link
|
# Rule to create list of libraries for final link
|
||||||
|
@ -1805,15 +1816,14 @@ chrome::
|
||||||
$(FINAL_TARGET)/chrome:
|
$(FINAL_TARGET)/chrome:
|
||||||
$(NSINSTALL) -D $@
|
$(NSINSTALL) -D $@
|
||||||
|
|
||||||
libs realchrome:: $(CHROME_DEPS) $(FINAL_TARGET)/chrome
|
ifneq (,$(wildcard $(JAR_MANIFEST)))
|
||||||
ifndef NO_DIST_INSTALL
|
ifndef NO_DIST_INSTALL
|
||||||
@$(EXIT_ON_ERROR) \
|
libs realchrome:: $(CHROME_DEPS) $(FINAL_TARGET)/chrome
|
||||||
if test -f $(JAR_MANIFEST); then \
|
$(PYTHON) $(MOZILLA_DIR)/config/JarMaker.py \
|
||||||
$(PYTHON) $(MOZILLA_DIR)/config/JarMaker.py \
|
$(QUIET) -j $(FINAL_TARGET)/chrome \
|
||||||
$(QUIET) -j $(FINAL_TARGET)/chrome \
|
$(MAKE_JARS_FLAGS) $(XULPPFLAGS) $(DEFINES) $(ACDEFINES) \
|
||||||
$(MAKE_JARS_FLAGS) $(XULPPFLAGS) $(DEFINES) $(ACDEFINES) \
|
$(JAR_MANIFEST)
|
||||||
$(JAR_MANIFEST); \
|
endif
|
||||||
fi
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(DIST_FILES),)
|
ifneq ($(DIST_FILES),)
|
||||||
|
|
|
@ -199,15 +199,22 @@ ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
|
||||||
ifndef GNU_CC
|
ifndef GNU_CC
|
||||||
|
|
||||||
#
|
#
|
||||||
# All C++ files share a PDB file per directory. For parallel builds, this PDB
|
# Unless we're building SIMPLE_PROGRAMS, all C++ files share a PDB file per
|
||||||
# file is shared and locked by MSPDBSRV.EXE, starting with MSVC8 SP1. If
|
# directory. For parallel builds, this PDB file is shared and locked by
|
||||||
# you're using MSVC 7.1 or MSVC8 without SP1, don't do parallel builds.
|
# MSPDBSRV.EXE, starting with MSVC8 SP1. If you're using MSVC 7.1 or MSVC8
|
||||||
|
# without SP1, don't do parallel builds.
|
||||||
#
|
#
|
||||||
# The final PDB for libraries and programs is created by the linker and uses
|
# The final PDB for libraries and programs is created by the linker and uses
|
||||||
# a different name from the single PDB file created by the compiler. See
|
# a different name from the single PDB file created by the compiler. See
|
||||||
# bug 462740.
|
# bug 462740.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
ifdef SIMPLE_PROGRAMS
|
||||||
|
COMPILE_PDBFILE = $(basename $(@F)).pdb
|
||||||
|
else
|
||||||
COMPILE_PDBFILE = generated.pdb
|
COMPILE_PDBFILE = generated.pdb
|
||||||
|
endif
|
||||||
|
|
||||||
LINK_PDBFILE = $(basename $(@F)).pdb
|
LINK_PDBFILE = $(basename $(@F)).pdb
|
||||||
ifdef MOZ_DEBUG
|
ifdef MOZ_DEBUG
|
||||||
CODFILE=$(basename $(@F)).cod
|
CODFILE=$(basename $(@F)).cod
|
||||||
|
@ -360,22 +367,30 @@ UPDATE_TITLE_libs = sed -e "s!Y!libs in $(shell $(BUILD_TOOLS)/print-depth-path.
|
||||||
UPDATE_TITLE_tools = sed -e "s!Y!tools in $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$*!" $(MOZILLA_DIR)/config/xterm.str;
|
UPDATE_TITLE_tools = sed -e "s!Y!tools in $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$*!" $(MOZILLA_DIR)/config/xterm.str;
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq (,$(strip $(DIRS)))
|
||||||
LOOP_OVER_DIRS = \
|
LOOP_OVER_DIRS = \
|
||||||
@$(EXIT_ON_ERROR) \
|
@$(EXIT_ON_ERROR) \
|
||||||
$(foreach dir,$(DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true
|
$(foreach dir,$(DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; )
|
||||||
|
endif
|
||||||
|
|
||||||
# we only use this for the makefiles target and other stuff that doesn't matter
|
# we only use this for the makefiles target and other stuff that doesn't matter
|
||||||
|
ifneq (,$(strip $(PARALLEL_DIRS)))
|
||||||
LOOP_OVER_PARALLEL_DIRS = \
|
LOOP_OVER_PARALLEL_DIRS = \
|
||||||
@$(EXIT_ON_ERROR) \
|
@$(EXIT_ON_ERROR) \
|
||||||
$(foreach dir,$(PARALLEL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true
|
$(foreach dir,$(PARALLEL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; )
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq (,$(strip $(STATIC_DIRS)))
|
||||||
LOOP_OVER_STATIC_DIRS = \
|
LOOP_OVER_STATIC_DIRS = \
|
||||||
@$(EXIT_ON_ERROR) \
|
@$(EXIT_ON_ERROR) \
|
||||||
$(foreach dir,$(STATIC_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true
|
$(foreach dir,$(STATIC_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; )
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq (,$(strip $(TOOL_DIRS)))
|
||||||
LOOP_OVER_TOOL_DIRS = \
|
LOOP_OVER_TOOL_DIRS = \
|
||||||
@$(EXIT_ON_ERROR) \
|
@$(EXIT_ON_ERROR) \
|
||||||
$(foreach dir,$(TOOL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true
|
$(foreach dir,$(TOOL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; )
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef PARALLEL_DIRS
|
ifdef PARALLEL_DIRS
|
||||||
# create a bunch of fake targets for order-only processing
|
# create a bunch of fake targets for order-only processing
|
||||||
|
@ -615,8 +630,7 @@ default all alldep::
|
||||||
else
|
else
|
||||||
|
|
||||||
default all::
|
default all::
|
||||||
@$(EXIT_ON_ERROR) \
|
+$(LOOP_OVER_STATIC_DIRS)
|
||||||
$(foreach dir,$(STATIC_DIRS),$(MAKE) -C $(dir); ) true
|
|
||||||
$(MAKE) export
|
$(MAKE) export
|
||||||
$(MAKE) libs
|
$(MAKE) libs
|
||||||
$(MAKE) tools
|
$(MAKE) tools
|
||||||
|
@ -718,10 +732,7 @@ endif
|
||||||
|
|
||||||
tools:: $(SUBMAKEFILES) $(MAKE_DIRS)
|
tools:: $(SUBMAKEFILES) $(MAKE_DIRS)
|
||||||
+$(LOOP_OVER_DIRS)
|
+$(LOOP_OVER_DIRS)
|
||||||
ifdef TOOL_DIRS
|
+$(LOOP_OVER_TOOL_DIRS)
|
||||||
@$(EXIT_ON_ERROR) \
|
|
||||||
$(foreach dir,$(TOOL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) libs; ) true
|
|
||||||
endif
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Rule to create list of libraries for final link
|
# Rule to create list of libraries for final link
|
||||||
|
@ -1805,15 +1816,14 @@ chrome::
|
||||||
$(FINAL_TARGET)/chrome:
|
$(FINAL_TARGET)/chrome:
|
||||||
$(NSINSTALL) -D $@
|
$(NSINSTALL) -D $@
|
||||||
|
|
||||||
libs realchrome:: $(CHROME_DEPS) $(FINAL_TARGET)/chrome
|
ifneq (,$(wildcard $(JAR_MANIFEST)))
|
||||||
ifndef NO_DIST_INSTALL
|
ifndef NO_DIST_INSTALL
|
||||||
@$(EXIT_ON_ERROR) \
|
libs realchrome:: $(CHROME_DEPS) $(FINAL_TARGET)/chrome
|
||||||
if test -f $(JAR_MANIFEST); then \
|
$(PYTHON) $(MOZILLA_DIR)/config/JarMaker.py \
|
||||||
$(PYTHON) $(MOZILLA_DIR)/config/JarMaker.py \
|
$(QUIET) -j $(FINAL_TARGET)/chrome \
|
||||||
$(QUIET) -j $(FINAL_TARGET)/chrome \
|
$(MAKE_JARS_FLAGS) $(XULPPFLAGS) $(DEFINES) $(ACDEFINES) \
|
||||||
$(MAKE_JARS_FLAGS) $(XULPPFLAGS) $(DEFINES) $(ACDEFINES) \
|
$(JAR_MANIFEST)
|
||||||
$(JAR_MANIFEST); \
|
endif
|
||||||
fi
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(DIST_FILES),)
|
ifneq ($(DIST_FILES),)
|
||||||
|
|
|
@ -184,7 +184,7 @@ function process_cp_pre_genericize(fndecl)
|
||||||
|
|
||||||
let r = isStack(destType);
|
let r = isStack(destType);
|
||||||
if (r)
|
if (r)
|
||||||
error("constructed object of type '%s' not on the stack: %s".format(destType.name, r), getLocation());
|
warning("constructed object of type '%s' not on the stack: %s".format(destType.name, r), getLocation());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -293,6 +293,9 @@ nsMemoryImpl::sFlushEvent;
|
||||||
XPCOM_API(void*)
|
XPCOM_API(void*)
|
||||||
NS_Alloc(PRSize size)
|
NS_Alloc(PRSize size)
|
||||||
{
|
{
|
||||||
|
if (size > PR_INT32_MAX)
|
||||||
|
return nsnull;
|
||||||
|
|
||||||
void* result = MALLOC1(size);
|
void* result = MALLOC1(size);
|
||||||
if (! result) {
|
if (! result) {
|
||||||
// Request an asynchronous flush
|
// Request an asynchronous flush
|
||||||
|
@ -304,6 +307,9 @@ NS_Alloc(PRSize size)
|
||||||
XPCOM_API(void*)
|
XPCOM_API(void*)
|
||||||
NS_Realloc(void* ptr, PRSize size)
|
NS_Realloc(void* ptr, PRSize size)
|
||||||
{
|
{
|
||||||
|
if (size > PR_INT32_MAX)
|
||||||
|
return nsnull;
|
||||||
|
|
||||||
void* result = REALLOC1(ptr, size);
|
void* result = REALLOC1(ptr, size);
|
||||||
if (! result && size != 0) {
|
if (! result && size != 0) {
|
||||||
// Request an asynchronous flush
|
// Request an asynchronous flush
|
||||||
|
|
|
@ -60,10 +60,12 @@
|
||||||
#include "nsComponentManager.h"
|
#include "nsComponentManager.h"
|
||||||
#include "nsCRTGlue.h"
|
#include "nsCRTGlue.h"
|
||||||
#include "nsModule.h"
|
#include "nsModule.h"
|
||||||
|
#include "nsThreadUtils.h"
|
||||||
#include "nsTraceRefcntImpl.h"
|
#include "nsTraceRefcntImpl.h"
|
||||||
|
|
||||||
#include "nsILocalFile.h"
|
#include "nsILocalFile.h"
|
||||||
#include "nsIModule.h"
|
#include "nsIModule.h"
|
||||||
|
#include "nsIProxyObjectManager.h"
|
||||||
|
|
||||||
#ifdef XP_WIN
|
#ifdef XP_WIN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
@ -98,6 +100,8 @@ NS_IMPL_RELEASE_USING_AGGREGATOR(nsNativeModuleLoader,
|
||||||
nsresult
|
nsresult
|
||||||
nsNativeModuleLoader::Init()
|
nsNativeModuleLoader::Init()
|
||||||
{
|
{
|
||||||
|
NS_ASSERTION(NS_IsMainThread(), "Startup not on main thread?");
|
||||||
|
|
||||||
LOG(PR_LOG_DEBUG, ("nsNativeModuleLoader::Init()"));
|
LOG(PR_LOG_DEBUG, ("nsNativeModuleLoader::Init()"));
|
||||||
|
|
||||||
return mLibraries.Init() ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
|
return mLibraries.Init() ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
|
||||||
|
@ -108,6 +112,23 @@ nsNativeModuleLoader::LoadModule(nsILocalFile* aFile, nsIModule* *aResult)
|
||||||
{
|
{
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
|
|
||||||
|
if (!NS_IsMainThread()) {
|
||||||
|
// If this call is off the main thread, synchronously proxy it
|
||||||
|
// to the main thread.
|
||||||
|
|
||||||
|
nsCOMPtr<nsIModuleLoader> proxythis;
|
||||||
|
rv = NS_GetProxyForObject(NS_PROXY_TO_MAIN_THREAD,
|
||||||
|
NS_GET_IID(nsIModuleLoader),
|
||||||
|
this, NS_PROXY_SYNC,
|
||||||
|
getter_AddRefs(proxythis));
|
||||||
|
if (NS_FAILED(rv))
|
||||||
|
return rv;
|
||||||
|
|
||||||
|
return proxythis->LoadModule(aFile, aResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
NS_ASSERTION(NS_IsMainThread(), "LoadModule should always proxy to the main thread!");
|
||||||
|
|
||||||
// Only load components that end in the proper dynamic library suffix
|
// Only load components that end in the proper dynamic library suffix
|
||||||
nsCAutoString filePath;
|
nsCAutoString filePath;
|
||||||
aFile->GetNativePath(filePath);
|
aFile->GetNativePath(filePath);
|
||||||
|
@ -255,6 +276,8 @@ nsNativeModuleLoader::UnloaderFunc(nsIHashable* aHashedFile,
|
||||||
void
|
void
|
||||||
nsNativeModuleLoader::UnloadLibraries()
|
nsNativeModuleLoader::UnloadLibraries()
|
||||||
{
|
{
|
||||||
|
NS_ASSERTION(NS_IsMainThread(), "Shutdown not on main thread?");
|
||||||
|
|
||||||
mLibraries.Enumerate(ReleaserFunc, nsnull);
|
mLibraries.Enumerate(ReleaserFunc, nsnull);
|
||||||
mLibraries.Enumerate(UnloaderFunc, nsnull);
|
mLibraries.Enumerate(UnloaderFunc, nsnull);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче