Merge mozilla-central and mozilla-inbound

This commit is contained in:
Ed Morley 2011-11-18 21:28:29 +00:00
commit 81d14a75dd
14 changed files with 555 additions and 563 deletions

View File

@ -1,73 +0,0 @@
#!/usr/bin/python
import sys
if not sys.platform == "win32":
raise Exception("This script was only meant for Windows.")
import os
def dos2unix(path):
print "dos2unix: %s" % path
inf = open(path, "r")
data = inf.read()
inf.close()
outf = open(path, "wb")
outf.write(data)
outf.close()
adminfiles = [
"Root",
"Repository",
"Entries",
"Entries.Log",
"Entries.Static",
"Tag",
"Notify",
"Template"
]
def walkdirectory(path):
if not os.path.exists(os.path.join(path, "CVS")):
return
print "Directory: %s" % path
for f in adminfiles:
cvsf = os.path.join(path, "CVS", f)
if os.path.exists(cvsf):
dos2unix(cvsf)
entries = open(os.path.join(path, "CVS", "Entries"), "r")
for entry in entries:
if entry == "D\n":
continue
(type, filename, rev, date, flags, extra) = entry.split('/')
if type == "D" or flags == "-kb" or rev[0] == "-":
continue
dos2unix(os.path.join(path, filename))
# Now walk subdirectories
for entry in os.listdir(path):
subdir = os.path.join(path, entry)
if os.path.isdir(subdir):
walkdirectory(subdir)
topsrcdir = os.sep.join(os.path.abspath(__file__).split(os.sep)[:-3])
print """This command will convert the source tree at
%s
to an MSYS-compatible (unix mode) source tree. You can run this
command multiple times safely. Are you sure you want to continue (Y/N)? """ % topsrcdir,
sys.stdout.flush()
print
ask = raw_input()
if len(ask) == 0 or (ask[0] != "y" and ask[0] != "Y"):
raise Exception("User aborted action.")
walkdirectory(topsrcdir)

View File

@ -122,6 +122,19 @@ testxpcobjdir = $(DEPTH)/_tests/xpcshell
ifdef ENABLE_TESTS
# Add test directories to the regular directories list. TEST_DIRS should
# arguably have the same status as TOOL_DIRS and other *_DIRS variables. It is
# coded this way until Makefiles stop using the "ifdef ENABLE_TESTS; DIRS +="
# convention.
#
# The current developer workflow expects tests to be updated when processing
# the default target. If we ever change this implementation, the behavior
# should be preserved or the change should be widely communicated. A
# consequence of not processing test dir targets during the default target is
# that changes to tests may not be updated and code could assume to pass
# locally against non-current test code.
DIRS += $(TEST_DIRS)
ifdef XPCSHELL_TESTS
ifndef relativesrcdir
$(error Must define relativesrcdir when defining XPCSHELL_TESTS.)

View File

@ -245,7 +245,7 @@ protected:
friend class DataOwnerAdapter; // Needs to see DataOwner
class DataOwner {
public:
NS_INLINE_DECL_REFCOUNTING(DataOwner)
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(DataOwner)
DataOwner(void* aMemoryBuffer)
: mData(aMemoryBuffer)
{

View File

@ -73,6 +73,35 @@ DoomCachedStatements(const nsACString& aQuery,
return PL_DHASH_REMOVE;
}
// This runnable doesn't actually do anything beyond "prime the pump" and get
// transactions in the right order on the transaction thread pool.
class StartTransactionRunnable : public nsIRunnable
{
public:
NS_DECL_ISUPPORTS
NS_IMETHOD Run()
{
// NOP
return NS_OK;
}
};
// Could really use those NS_REFCOUNTING_HAHA_YEAH_RIGHT macros here.
NS_IMETHODIMP_(nsrefcnt) StartTransactionRunnable::AddRef()
{
return 2;
}
NS_IMETHODIMP_(nsrefcnt) StartTransactionRunnable::Release()
{
return 1;
}
NS_IMPL_QUERY_INTERFACE1(StartTransactionRunnable, nsIRunnable)
StartTransactionRunnable gStartTransactionRunnable;
} // anonymous namespace
// static
@ -121,6 +150,11 @@ IDBTransaction::Create(IDBDatabase* aDatabase,
transaction->mCreating = true;
}
if (aMode != nsIIDBTransaction::VERSION_CHANGE) {
TransactionThreadPool* pool = TransactionThreadPool::GetOrCreate();
pool->Dispatch(transaction, &gStartTransactionRunnable, false, nsnull);
}
return transaction.forget();
}

View File

@ -47,8 +47,7 @@
#include "nsServiceManagerUtils.h"
#include "nsXPCOMCIDInternal.h"
using mozilla::MutexAutoLock;
using mozilla::MutexAutoUnlock;
using mozilla::MonitorAutoLock;
USING_INDEXEDDB_NAMESPACE
@ -604,8 +603,7 @@ TransactionThreadPool::MaybeFireCallback(PRUint32 aCallbackIndex)
TransactionThreadPool::
TransactionQueue::TransactionQueue(IDBTransaction* aTransaction,
nsIRunnable* aRunnable)
: mMutex("TransactionQueue::mMutex"),
mCondVar(mMutex, "TransactionQueue::mCondVar"),
: mMonitor("TransactionQueue::mMonitor"),
mTransaction(aTransaction),
mShouldFinish(false)
{
@ -617,29 +615,26 @@ TransactionQueue::TransactionQueue(IDBTransaction* aTransaction,
void
TransactionThreadPool::TransactionQueue::Dispatch(nsIRunnable* aRunnable)
{
MutexAutoLock lock(mMutex);
MonitorAutoLock lock(mMonitor);
NS_ASSERTION(!mShouldFinish, "Dispatch called after Finish!");
if (!mQueue.AppendElement(aRunnable)) {
MutexAutoUnlock unlock(mMutex);
NS_RUNTIMEABORT("Out of memory!");
}
mQueue.AppendElement(aRunnable);
mCondVar.Notify();
mMonitor.Notify();
}
void
TransactionThreadPool::TransactionQueue::Finish(nsIRunnable* aFinishRunnable)
{
MutexAutoLock lock(mMutex);
MonitorAutoLock lock(mMonitor);
NS_ASSERTION(!mShouldFinish, "Finish called more than once!");
mShouldFinish = true;
mFinishRunnable = aFinishRunnable;
mCondVar.Notify();
mMonitor.Notify();
}
NS_IMPL_THREADSAFE_ISUPPORTS1(TransactionThreadPool::TransactionQueue,
@ -656,9 +651,9 @@ TransactionThreadPool::TransactionQueue::Run()
NS_ASSERTION(queue.IsEmpty(), "Should have cleared this!");
{
MutexAutoLock lock(mMutex);
MonitorAutoLock lock(mMonitor);
while (!mShouldFinish && mQueue.IsEmpty()) {
if (NS_FAILED(mCondVar.Wait())) {
if (NS_FAILED(mMonitor.Wait())) {
NS_ERROR("Failed to wait!");
}
}

View File

@ -46,8 +46,7 @@
#include "nsIObserver.h"
#include "nsIRunnable.h"
#include "mozilla/Mutex.h"
#include "mozilla/CondVar.h"
#include "mozilla/Monitor.h"
#include "nsClassHashtable.h"
#include "nsHashKeys.h"
#include "nsRefPtrHashtable.h"
@ -106,8 +105,7 @@ protected:
inline void Finish(nsIRunnable* aFinishRunnable);
private:
mozilla::Mutex mMutex;
mozilla::CondVar mCondVar;
mozilla::Monitor mMonitor;
IDBTransaction* mTransaction;
nsAutoTArray<nsCOMPtr<nsIRunnable>, 10> mQueue;
nsCOMPtr<nsIRunnable> mFinishRunnable;

View File

@ -102,6 +102,7 @@ TEST_FILES = \
test_transaction_abort.html \
test_transaction_lifetimes.html \
test_transaction_lifetimes_nested.html \
test_transaction_ordering.html \
test_setVersion.html \
test_setVersion_abort.html \
test_setVersion_events.html \

View File

@ -0,0 +1,61 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<html>
<head>
<title>Indexed Database Property Test</title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<script type="text/javascript;version=1.7">
function testSteps()
{
let request = mozIndexedDB.open(window.location.pathname, 1);
request.onerror = errorHandler;
request.onupgradeneeded = grabEventAndContinueHandler;
let event = yield;
let db = event.target.result;
db.onerror = errorHandler;
request.onsuccess = continueToNextStep;
db.createObjectStore("foo");
yield;
let trans1 = db.transaction("foo", IDBTransaction.READ_WRITE);
let trans2 = db.transaction("foo", IDBTransaction.READ_WRITE);
let request1 = trans2.objectStore("foo").put("2", 42);
let request2 = trans1.objectStore("foo").put("1", 42);
request1.onerror = errorHandler;
request2.onerror = errorHandler;
trans1.oncomplete = grabEventAndContinueHandler;
trans2.oncomplete = grabEventAndContinueHandler;
yield;
yield;
let trans3 = db.transaction("foo", IDBTransaction.READ);
let request = trans3.objectStore("foo").get(42);
request.onsuccess = grabEventAndContinueHandler;
request.onerror = errorHandler;
let event = yield;
is(event.target.result, "2", "Transactions were ordered properly.");
finishTest();
yield;
}
</script>
<script type="text/javascript;version=1.7" src="helpers.js"></script>
</head>
<body onload="runTest();"></body>
</html>

View File

@ -7,7 +7,7 @@ random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) =
random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) == border-padding-1.html border-padding-1-ref.html # bug 629430
random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) == border-padding-2.html border-padding-2-ref.html # bug 629430
random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) skip-if(Android) == border-padding-3.html border-padding-3-ref.html # bug 629430
random-if(cocoaWidget||d2d) fails-if(!haveTestPlugin&&!Android) skip-if(!testPluginIsOOP()) == pluginproblemui-direction-1.html pluginproblemui-direction-1-ref.html
random-if(cocoaWidget||d2d||/^Windows\x20NT\x205\.1/.test(http.oscpu)) fails-if(!haveTestPlugin&&!Android) skip-if(!testPluginIsOOP()) == pluginproblemui-direction-1.html pluginproblemui-direction-1-ref.html # bug 567367
random-if(cocoaWidget) fails-if(!haveTestPlugin&&!Android) skip-if(!testPluginIsOOP()) == pluginproblemui-direction-2.html pluginproblemui-direction-2-ref.html
fails-if(!haveTestPlugin) == plugin-canvas-alpha-zindex.html div-alpha-zindex.html
fails-if(!haveTestPlugin) == plugin-transform-alpha-zindex.html div-alpha-zindex.html

View File

@ -122,6 +122,19 @@ testxpcobjdir = $(DEPTH)/_tests/xpcshell
ifdef ENABLE_TESTS
# Add test directories to the regular directories list. TEST_DIRS should
# arguably have the same status as TOOL_DIRS and other *_DIRS variables. It is
# coded this way until Makefiles stop using the "ifdef ENABLE_TESTS; DIRS +="
# convention.
#
# The current developer workflow expects tests to be updated when processing
# the default target. If we ever change this implementation, the behavior
# should be preserved or the change should be widely communicated. A
# consequence of not processing test dir targets during the default target is
# that changes to tests may not be updated and code could assume to pass
# locally against non-current test code.
DIRS += $(TEST_DIRS)
ifdef XPCSHELL_TESTS
ifndef relativesrcdir
$(error Must define relativesrcdir when defining XPCSHELL_TESTS.)

View File

@ -20,6 +20,7 @@
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Shawn Wilsher <me@shawnwilsher.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
@ -35,10 +36,10 @@
#
# ***** END LICENSE BLOCK *****
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
@ -76,19 +77,352 @@ DEFINES += -DMOZ_ENABLE_GTK2
endif
SHARED_LIBRARY_LIBS += \
$(DEPTH)/toolkit/xre/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX) \
$(NULL)
$(DEPTH)/toolkit/xre/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX) \
$(NULL)
SHARED_LIBRARY_LIBS += \
$(foreach component,$(COMPONENT_LIBS),$(DEPTH)/staticlib/components/$(LIB_PREFIX)$(component).$(LIB_SUFFIX)) \
$(foreach lib,$(STATIC_LIBS),$(DEPTH)/staticlib/$(LIB_PREFIX)$(lib).$(LIB_SUFFIX)) \
$(NULL)
$(foreach component,$(COMPONENT_LIBS),$(DEPTH)/staticlib/components/$(LIB_PREFIX)$(component).$(LIB_SUFFIX)) \
$(foreach lib,$(STATIC_LIBS),$(DEPTH)/staticlib/$(LIB_PREFIX)$(lib).$(LIB_SUFFIX)) \
$(NULL)
include $(srcdir)/libxul-config.mk
CPPSRCS += \
nsStaticXULComponents.cpp \
$(NULL)
ifeq ($(OS_ARCH),WINNT)
REQUIRES += widget gfx
CPPSRCS += \
nsDllMain.cpp \
$(NULL)
endif
ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
CPPSRCS += \
nsGFXDeps.cpp \
$(NULL)
RCINCLUDE = xulrunner.rc
ifndef MOZ_NATIVE_ZLIB
CPPSRCS += dlldeps-zlib.cpp
endif
LOCAL_INCLUDES += -I$(topsrcdir)/widget/src/windows
LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
endif
ifneq (,$(filter WINNT OS2,$(OS_ARCH)))
REQUIRES += libreg
DEFINES += -DZLIB_DLL=1
endif
ifeq ($(OS_ARCH),OS2)
REQUIRES += widget gfx
CPPSRCS += \
nsGFXDeps.cpp \
$(NULL)
ifndef MOZ_NATIVE_ZLIB
CPPSRCS += dlldeps-zlib.cpp
endif
RESFILE = xulrunos2.res
RCFLAGS += -i $(topsrcdir)/widget/src/os2
LOCAL_INCLUDES += -I$(topsrcdir)/widget/src/os2
LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
endif
# dependent libraries
STATIC_LIBS += \
jsipc_s \
domipc_s \
domplugins_s \
mozipc_s \
mozipdlgen_s \
ipcshell_s \
gfx2d \
gfxipc_s \
hal_s \
$(NULL)
ifdef MOZ_IPDL_TESTS
STATIC_LIBS += ipdlunittest_s
endif
ifeq (Linux,$(OS_ARCH))
ifneq (Android,$(OS_TARGET))
OS_LIBS += -lrt
endif
endif
STATIC_LIBS += \
xpcom_core \
ucvutil_s \
chromium_s \
mozreg_s \
$(NULL)
# component libraries
COMPONENT_LIBS += \
necko \
uconv \
i18n \
chardet \
jar$(VERSION_NUMBER) \
startupcache \
pref \
htmlpars \
imglib2 \
gkgfx \
gklayout \
docshell \
embedcomponents \
webbrwsr \
nsappshell \
txmgr \
commandlines \
toolkitcomps \
pipboot \
pipnss \
appcomps \
jsreflect \
composer \
jetpack_s \
telemetry \
jsdebugger \
storagecomps \
rdf \
windowds \
$(NULL)
ifdef BUILD_CTYPES
COMPONENT_LIBS += \
jsctypes \
$(NULL)
endif
COMPONENT_LIBS += \
jsperf \
gkplugin \
$(NULL)
ifdef MOZ_XUL
ifdef MOZ_ENABLE_GTK2
COMPONENT_LIBS += \
unixproxy \
$(NULL)
endif
endif
ifneq (,$(filter cocoa,$(MOZ_WIDGET_TOOLKIT)))
COMPONENT_LIBS += \
osxproxy \
$(NULL)
endif
ifdef MOZ_XUL
ifeq (qt,$(MOZ_WIDGET_TOOLKIT))
COMPONENT_LIBS += \
unixproxy \
$(NULL)
endif
endif
ifneq (,$(filter windows,$(MOZ_WIDGET_TOOLKIT)))
COMPONENT_LIBS += \
windowsproxy \
$(NULL)
endif
ifdef MOZ_JSDEBUGGER
DEFINES += -DMOZ_JSDEBUGGER
COMPONENT_LIBS += \
jsd \
$(NULL)
endif
ifdef MOZ_PREF_EXTENSIONS
DEFINES += -DMOZ_PREF_EXTENSIONS
COMPONENT_LIBS += \
autoconfig \
$(NULL)
endif
ifdef MOZ_AUTH_EXTENSION
COMPONENT_LIBS += auth
DEFINES += -DMOZ_AUTH_EXTENSION
endif
ifdef MOZ_PERMISSIONS
COMPONENT_LIBS += cookie permissions
DEFINES += -DMOZ_PERMISSIONS
endif
ifdef MOZ_UNIVERSALCHARDET
COMPONENT_LIBS += universalchardet
DEFINES += -DMOZ_UNIVERSALCHARDET
endif
ifeq (,$(filter android gonk qt os2 cocoa windows,$(MOZ_WIDGET_TOOLKIT)))
ifdef MOZ_XUL
COMPONENT_LIBS += fileview
DEFINES += -DMOZ_FILEVIEW
endif
endif
ifdef MOZ_PLACES
COMPONENT_LIBS += \
places \
$(NULL)
endif
ifdef MOZ_XUL
COMPONENT_LIBS += \
tkautocomplete \
satchel \
pippki \
$(NULL)
endif
ifdef MOZ_ENABLE_GTK2
COMPONENT_LIBS += widget_gtk2
ifdef MOZ_PREF_EXTENSIONS
COMPONENT_LIBS += system-pref
endif
endif
ifdef MOZ_ENABLE_GTK2
ifdef MOZ_X11
STATIC_LIBS += gtkxtbin
endif
endif
# Platform-specific icon channel stuff - supported mostly-everywhere
ifneq (,$(filter windows os2 mac cocoa gtk2 qt android,$(MOZ_WIDGET_TOOLKIT)))
DEFINES += -DICON_DECODER
COMPONENT_LIBS += imgicon
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),android)
COMPONENT_LIBS += widget_android
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),gonk)
COMPONENT_LIBS += widget_gonk
endif
STATIC_LIBS += thebes gl ycbcr
ifeq ($(MOZ_WIDGET_TOOLKIT),android)
STATIC_LIBS += profiler
endif
STATIC_LIBS += angle
ifeq (windows,$(MOZ_WIDGET_TOOLKIT))
COMPONENT_LIBS += gkwidget
endif
ifeq (os2,$(MOZ_WIDGET_TOOLKIT))
COMPONENT_LIBS += wdgtos2
endif
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
COMPONENT_LIBS += widget_mac
endif
ifeq (qt,$(MOZ_WIDGET_TOOLKIT))
COMPONENT_LIBS += widget_qt
endif
ifdef ACCESSIBILITY
COMPONENT_LIBS += accessibility
endif
ifdef MOZ_ENABLE_XREMOTE
COMPONENT_LIBS += remoteservice
endif
ifdef MOZ_SPELLCHECK
DEFINES += -DMOZ_SPELLCHECK
COMPONENT_LIBS += spellchecker
endif
ifdef MOZ_ZIPWRITER
DEFINES += -DMOZ_ZIPWRITER
COMPONENT_LIBS += zipwriter
endif
COMPONENT_LIBS += services-crypto
ifdef MOZ_DEBUG
ifdef ENABLE_TESTS
COMPONENT_LIBS += gkdebug
endif
endif
ifdef MOZ_APP_COMPONENT_LIBS
COMPONENT_LIBS += $(MOZ_APP_COMPONENT_LIBS)
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
OS_LIBS += -framework OpenGL -lcups
endif
EXTRA_DSO_LDOPTS += \
$(LIBS_DIR) \
$(JPEG_LIBS) \
$(PNG_LIBS) \
$(QCMS_LIBS) \
$(MOZ_JS_LIBS) \
$(NSS_LIBS) \
$(MOZ_CAIRO_LIBS) \
$(MOZ_HARFBUZZ_LIBS) \
$(MOZ_OTS_LIBS) \
$(MOZ_APP_EXTRA_LIBS) \
$(SQLITE_LIBS) \
$(NULL)
ifdef MOZ_NATIVE_ZLIB
EXTRA_DSO_LDOPTS += $(ZLIB_LIBS)
else
EXTRA_DSO_LDOPTS += $(MOZ_ZLIB_LIBS)
endif
ifdef MOZ_NATIVE_HUNSPELL
EXTRA_DSO_LDOPTS += $(MOZ_HUNSPELL_LIBS)
endif
ifdef MOZ_NATIVE_LIBEVENT
EXTRA_DSO_LDOPTS += $(MOZ_LIBEVENT_LIBS)
endif
ifdef MOZ_NATIVE_LIBVPX
EXTRA_DSO_LDOPTS += $(MOZ_LIBVPX_LIBS)
endif
ifdef MOZ_SYDNEYAUDIO
ifeq ($(OS_ARCH),Linux)
EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS)
endif
endif
ifdef HAVE_CLOCK_MONOTONIC
EXTRA_DSO_LDOPTS += $(REALTIME_LIBS)
endif
ifeq (,$(filter-out cocoa android windows,$(MOZ_WIDGET_TOOLKIT)))
EXTRA_DSO_LDOPTS += $(MOZ_SKIA_LIBS)
endif
ifeq (android,$(MOZ_WIDGET_TOOLKIT))
OS_LIBS += -lGLESv2
endif
ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
OS_LIBS += -lui
endif
EXTRA_DEPS += \
$(srcdir)/libxul-config.mk \
$(srcdir)/libxul-rules.mk \
$(topsrcdir)/intl/unicharutil/util/objs.mk \
$(topsrcdir)/rdf/util/src/objs.mk \
$(NULL)
@ -98,7 +432,7 @@ CPPSRCS += \
$(RDF_UTIL_SRC_LCPPSRCS) \
$(NULL)
GARBAGE += \
GARBAGE += \
$(INTL_UNICHARUTIL_UTIL_LCPPSRCS) \
$(wildcard *.$(OBJ_SUFFIX)) \
$(RDF_UTIL_SRC_LCPPSRCS) \
@ -113,10 +447,13 @@ else
SDK_LIBRARY = $(SHARED_LIBRARY)
endif
# See bug 653662 - some builders are hitting an internal size limit
# on incremental builds. Disable this for debug builds using VC8/9.
# See bug 653662 - some builders are hitting an internal size limit on
# incremental builds. Disable incremental linking for debug builds on VC8 or
# on 32-bit hosts.
# See: http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/c34d5c37-ca4a-4580-9c7c-4379a8c76d1f/
ifeq ($(OS_ARCH),WINNT)
ifeq (,$(filter-out 1400 1500,$(_MSC_VER)))
IS_32BIT_HOST := $(if $(filter AMD64,$(PROCESSOR_ARCHITECTURE) $(PROCESSOR_ARCHITEW6432)),,yes)
ifneq (,$(or $(filter 1400,$(_MSC_VER)),$(IS_32BIT_HOST)))
ifdef MOZ_DEBUG
EXTRA_DSO_LDOPTS += -INCREMENTAL:NO
endif
@ -130,27 +467,27 @@ DEFINES += -DIMPL_XREAPI
EXTRA_DSO_LDOPTS += $(NSPR_LIBS) $(MOZALLOC_LIB)
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
CXXFLAGS += $(TK_CFLAGS)
CXXFLAGS += $(TK_CFLAGS)
OS_LIBS += \
-framework SystemConfiguration \
-framework QuickTime \
-framework IOKit \
-F/System/Library/PrivateFrameworks -framework CoreUI \
$(TK_LIBS) \
$(NULL)
-framework SystemConfiguration \
-framework QuickTime \
-framework IOKit \
-F/System/Library/PrivateFrameworks -framework CoreUI \
$(TK_LIBS) \
$(NULL)
endif
ifeq ($(OS_ARCH),Darwin)
ifdef MOZ_SYDNEYAUDIO
EXTRA_DSO_LDOPTS += \
-framework Carbon \
-framework CoreAudio \
-framework AudioToolbox \
-framework AudioUnit \
-framework IOKit \
-framework Foundation \
-framework AppKit \
$(NULL)
-framework Carbon \
-framework CoreAudio \
-framework AudioToolbox \
-framework AudioUnit \
-framework IOKit \
-framework Foundation \
-framework AppKit \
$(NULL)
endif
endif
@ -162,7 +499,7 @@ endif
ifdef MOZ_PLATFORM_MAEMO
EXTRA_DSO_LDOPTS += $(MOZ_PLATFORM_MAEMO_LIBS)
endif
endif
ifdef MOZ_ENABLE_LIBCONIC
EXTRA_DSO_LDOPTS += $(LIBCONIC_LIBS)
@ -228,7 +565,27 @@ include $(topsrcdir)/config/rules.mk
export:: $(RDF_UTIL_SRC_CPPSRCS) $(INTL_UNICHARUTIL_UTIL_CPPSRCS)
$(INSTALL) $^ .
include $(srcdir)/libxul-rules.mk
# need widget/src/windows for resource.h (included from widget.rc)
LOCAL_INCLUDES += \
-I$(topsrcdir)/config \
-I$(topsrcdir)/widget/src/windows \
-I$(topsrcdir)/widget/src/build \
$(NULL)
OS_LIBS += $(LIBICONV)
DEFINES += \
-D_IMPL_NS_COM \
-D_IMPL_NS_STRINGAPI \
-DEXPORT_XPT_API \
-DEXPORT_XPTC_API \
-D_IMPL_NS_GFX \
-D_IMPL_NS_WIDGET \
$(NULL)
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
OS_LIBS += $(call EXPAND_LIBNAME,usp10 oleaut32)
endif
ifeq ($(OS_ARCH),OpenBSD)
# Needed by nsAuthGSSAPI

View File

@ -1,375 +0,0 @@
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is Mozilla libxul
#
# The Initial Developer of the Original Code is
# Benjamin Smedberg <benjamin@smedbergs.us>
#
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Shawn Wilsher <me@shawnwilsher.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
CPPSRCS += \
nsStaticXULComponents.cpp \
$(NULL)
ifeq ($(OS_ARCH),WINNT)
REQUIRES += widget gfx
CPPSRCS += \
nsDllMain.cpp \
$(NULL)
endif
ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
CPPSRCS += \
nsGFXDeps.cpp \
$(NULL)
RCINCLUDE = xulrunner.rc
ifndef MOZ_NATIVE_ZLIB
CPPSRCS += dlldeps-zlib.cpp
endif
LOCAL_INCLUDES += -I$(topsrcdir)/widget/src/windows
LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
endif
ifneq (,$(filter WINNT OS2,$(OS_ARCH)))
REQUIRES += libreg
DEFINES += -DZLIB_DLL=1
endif
ifeq ($(OS_ARCH),OS2)
REQUIRES += widget gfx
CPPSRCS += \
nsGFXDeps.cpp \
$(NULL)
ifndef MOZ_NATIVE_ZLIB
CPPSRCS += dlldeps-zlib.cpp
endif
RESFILE = xulrunos2.res
RCFLAGS += -i $(topsrcdir)/widget/src/os2
LOCAL_INCLUDES += -I$(topsrcdir)/widget/src/os2
LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
endif
# dependent libraries
STATIC_LIBS += \
jsipc_s \
domipc_s \
domplugins_s \
mozipc_s \
mozipdlgen_s \
ipcshell_s \
gfx2d \
gfxipc_s \
hal_s \
$(NULL)
ifdef MOZ_IPDL_TESTS
STATIC_LIBS += ipdlunittest_s
endif
ifeq (Linux,$(OS_ARCH))
ifneq (Android,$(OS_TARGET))
OS_LIBS += -lrt
endif
endif
STATIC_LIBS += \
xpcom_core \
ucvutil_s \
chromium_s \
mozreg_s \
$(NULL)
# component libraries
COMPONENT_LIBS += \
necko \
uconv \
i18n \
chardet \
jar$(VERSION_NUMBER) \
startupcache \
pref \
htmlpars \
imglib2 \
gkgfx \
gklayout \
docshell \
embedcomponents \
webbrwsr \
nsappshell \
txmgr \
commandlines \
toolkitcomps \
pipboot \
pipnss \
appcomps \
jsreflect \
composer \
jetpack_s \
telemetry \
jsdebugger \
storagecomps \
rdf \
windowds \
$(NULL)
ifdef BUILD_CTYPES
COMPONENT_LIBS += \
jsctypes \
$(NULL)
endif
COMPONENT_LIBS += \
jsperf \
gkplugin \
$(NULL)
ifdef MOZ_XUL
ifdef MOZ_ENABLE_GTK2
COMPONENT_LIBS += \
unixproxy \
$(NULL)
endif
endif
ifneq (,$(filter cocoa,$(MOZ_WIDGET_TOOLKIT)))
COMPONENT_LIBS += \
osxproxy \
$(NULL)
endif
ifdef MOZ_XUL
ifeq (qt,$(MOZ_WIDGET_TOOLKIT))
COMPONENT_LIBS += \
unixproxy \
$(NULL)
endif
endif
ifneq (,$(filter windows,$(MOZ_WIDGET_TOOLKIT)))
COMPONENT_LIBS += \
windowsproxy \
$(NULL)
endif
ifdef MOZ_JSDEBUGGER
DEFINES += -DMOZ_JSDEBUGGER
COMPONENT_LIBS += \
jsd \
$(NULL)
endif
ifdef MOZ_PREF_EXTENSIONS
DEFINES += -DMOZ_PREF_EXTENSIONS
COMPONENT_LIBS += \
autoconfig \
$(NULL)
endif
ifdef MOZ_AUTH_EXTENSION
COMPONENT_LIBS += auth
DEFINES += -DMOZ_AUTH_EXTENSION
endif
ifdef MOZ_PERMISSIONS
COMPONENT_LIBS += cookie permissions
DEFINES += -DMOZ_PERMISSIONS
endif
ifdef MOZ_UNIVERSALCHARDET
COMPONENT_LIBS += universalchardet
DEFINES += -DMOZ_UNIVERSALCHARDET
endif
ifeq (,$(filter android gonk qt os2 cocoa windows,$(MOZ_WIDGET_TOOLKIT)))
ifdef MOZ_XUL
COMPONENT_LIBS += fileview
DEFINES += -DMOZ_FILEVIEW
endif
endif
ifdef MOZ_PLACES
COMPONENT_LIBS += \
places \
$(NULL)
endif
ifdef MOZ_XUL
COMPONENT_LIBS += \
tkautocomplete \
satchel \
pippki \
$(NULL)
endif
ifdef MOZ_ENABLE_GTK2
COMPONENT_LIBS += widget_gtk2
ifdef MOZ_PREF_EXTENSIONS
COMPONENT_LIBS += system-pref
endif
endif
ifdef MOZ_ENABLE_GTK2
ifdef MOZ_X11
STATIC_LIBS += gtkxtbin
endif
endif
# Platform-specific icon channel stuff - supported mostly-everywhere
ifneq (,$(filter windows os2 mac cocoa gtk2 qt android,$(MOZ_WIDGET_TOOLKIT)))
DEFINES += -DICON_DECODER
COMPONENT_LIBS += imgicon
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),android)
COMPONENT_LIBS += widget_android
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),gonk)
COMPONENT_LIBS += widget_gonk
endif
STATIC_LIBS += thebes gl ycbcr
ifeq ($(MOZ_WIDGET_TOOLKIT),android)
STATIC_LIBS += profiler
endif
STATIC_LIBS += angle
ifeq (windows,$(MOZ_WIDGET_TOOLKIT))
COMPONENT_LIBS += gkwidget
endif
ifeq (os2,$(MOZ_WIDGET_TOOLKIT))
COMPONENT_LIBS += wdgtos2
endif
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
COMPONENT_LIBS += widget_mac
endif
ifeq (qt,$(MOZ_WIDGET_TOOLKIT))
COMPONENT_LIBS += widget_qt
endif
ifdef ACCESSIBILITY
COMPONENT_LIBS += accessibility
endif
ifdef MOZ_ENABLE_XREMOTE
COMPONENT_LIBS += remoteservice
endif
ifdef MOZ_SPELLCHECK
DEFINES += -DMOZ_SPELLCHECK
COMPONENT_LIBS += spellchecker
endif
ifdef MOZ_ZIPWRITER
DEFINES += -DMOZ_ZIPWRITER
COMPONENT_LIBS += zipwriter
endif
COMPONENT_LIBS += services-crypto
ifdef MOZ_DEBUG
ifdef ENABLE_TESTS
COMPONENT_LIBS += gkdebug
endif
endif
ifdef MOZ_APP_COMPONENT_LIBS
COMPONENT_LIBS += $(MOZ_APP_COMPONENT_LIBS)
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
OS_LIBS += -framework OpenGL -lcups
endif
EXTRA_DSO_LDOPTS += \
$(LIBS_DIR) \
$(JPEG_LIBS) \
$(PNG_LIBS) \
$(QCMS_LIBS) \
$(MOZ_JS_LIBS) \
$(NSS_LIBS) \
$(MOZ_CAIRO_LIBS) \
$(MOZ_HARFBUZZ_LIBS) \
$(MOZ_OTS_LIBS) \
$(MOZ_APP_EXTRA_LIBS) \
$(SQLITE_LIBS) \
$(NULL)
ifdef MOZ_NATIVE_ZLIB
EXTRA_DSO_LDOPTS += $(ZLIB_LIBS)
else
EXTRA_DSO_LDOPTS += $(MOZ_ZLIB_LIBS)
endif
ifdef MOZ_NATIVE_HUNSPELL
EXTRA_DSO_LDOPTS += $(MOZ_HUNSPELL_LIBS)
endif
ifdef MOZ_NATIVE_LIBEVENT
EXTRA_DSO_LDOPTS += $(MOZ_LIBEVENT_LIBS)
endif
ifdef MOZ_NATIVE_LIBVPX
EXTRA_DSO_LDOPTS += $(MOZ_LIBVPX_LIBS)
endif
ifdef MOZ_SYDNEYAUDIO
ifeq ($(OS_ARCH),Linux)
EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS)
endif
endif
ifdef HAVE_CLOCK_MONOTONIC
EXTRA_DSO_LDOPTS += $(REALTIME_LIBS)
endif
ifeq (,$(filter-out cocoa android windows,$(MOZ_WIDGET_TOOLKIT)))
EXTRA_DSO_LDOPTS += $(MOZ_SKIA_LIBS)
endif
ifeq (android,$(MOZ_WIDGET_TOOLKIT))
OS_LIBS += -lGLESv2
endif
ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
OS_LIBS += -lui
endif

View File

@ -1,59 +0,0 @@
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is Mozilla libxul
#
# The Initial Developer of the Original Code is
# Benjamin Smedberg <benjamin@smedbergs.us>
#
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
# need widget/src/windows for resource.h (included from widget.rc)
LOCAL_INCLUDES += \
-I$(topsrcdir)/config \
-I$(topsrcdir)/widget/src/windows \
-I$(topsrcdir)/widget/src/build \
$(NULL)
OS_LIBS += $(LIBICONV)
DEFINES += \
-D_IMPL_NS_COM \
-D_IMPL_NS_STRINGAPI \
-DEXPORT_XPT_API \
-DEXPORT_XPTC_API \
-D_IMPL_NS_GFX \
-D_IMPL_NS_WIDGET \
$(NULL)
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
OS_LIBS += $(call EXPAND_LIBNAME,usp10 oleaut32)
endif

View File

@ -319,9 +319,6 @@ public:
* Use this macro to declare and implement the AddRef & Release methods for a
* given non-XPCOM <i>_class</i>.
*
* The implementations here should match NS_IMPL_ADDREF/NS_IMPL_RELEASE, minus
* the nsrefcnt return-value and the NS_ASSERT_OWNINGTHREAD() call.
*
* @param _class The name of the class implementing the method
*/
#define NS_INLINE_DECL_REFCOUNTING(_class) \
@ -351,6 +348,36 @@ protected: \
NS_DECL_OWNINGTHREAD \
public:
/**
* Use this macro to declare and implement the AddRef & Release methods for a
* given non-XPCOM <i>_class</i> in a threadsafe manner.
*
* DOES NOT DO REFCOUNT STABILIZATION!
*
* @param _class The name of the class implementing the method
*/
#define NS_INLINE_DECL_THREADSAFE_REFCOUNTING(_class) \
public: \
NS_METHOD_(nsrefcnt) AddRef(void) { \
NS_PRECONDITION(PRInt32(mRefCnt) >= 0, "illegal refcnt"); \
nsrefcnt count = NS_AtomicIncrementRefcnt(mRefCnt); \
NS_LOG_ADDREF(this, count, #_class, sizeof(*this)); \
return (nsrefcnt) count; \
} \
NS_METHOD_(nsrefcnt) Release(void) { \
NS_PRECONDITION(0 != mRefCnt, "dup release"); \
nsrefcnt count = NS_AtomicDecrementRefcnt(mRefCnt); \
NS_LOG_RELEASE(this, count, #_class); \
if (count == 0) { \
delete (this); \
return 0; \
} \
return count; \
} \
protected: \
nsAutoRefCnt mRefCnt; \
public:
/**
* Use this macro to implement the AddRef method for a given <i>_class</i>
* @param _class The name of the class implementing the method