Merge mozilla-inbound and mozilla-central

This commit is contained in:
Matt Brubeck 2011-08-15 07:33:25 -07:00
Родитель d568957d89 80dddfd9b7
Коммит 86eeebed49
20 изменённых файлов: 70 добавлений и 63 удалений

Просмотреть файл

@ -46,6 +46,27 @@
# #
topsrcdir=$1 topsrcdir=$1
abspath() {
if uname -s | grep -q MINGW; then
# We have no way to figure out whether we're in gmake or pymake right
# now. gmake gives us Unix-style paths while pymake gives us Windows-style
# paths, so attempt to handle both.
regexes='^\([A-Za-z]:\|\\\\\|\/\) ^\/'
else
regexes='^\/'
fi
for regex in $regexes; do
if echo $1 | grep -q $regex; then
echo $1
exit 0
fi
done
# If we're at this point, we have a relative path
echo `pwd`/$1
}
for _config in "$MOZCONFIG" \ for _config in "$MOZCONFIG" \
"$MOZ_MYCONFIG" "$MOZ_MYCONFIG"
do do
@ -66,7 +87,7 @@ for _config in "$MOZCONFIG" \
"$HOME/.mozmyconfig.sh" "$HOME/.mozmyconfig.sh"
do do
if test -f "$_config"; then if test -f "$_config"; then
echo "$_config"; echo `abspath $_config`
exit 0 exit 0
fi fi
done done

Просмотреть файл

@ -42,6 +42,8 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk include $(DEPTH)/config/autoconf.mk
NO_PROFILE_GUIDED_OPTIMIZE = 1
ifdef ENABLE_TESTS ifdef ENABLE_TESTS
ifdef _MSC_VER ifdef _MSC_VER

Просмотреть файл

@ -215,6 +215,14 @@
#include "nsPluginError.h" #include "nsPluginError.h"
#include "nsContentUtils.h" #include "nsContentUtils.h"
#include "nsContentErrors.h"
#include "nsIChannelPolicy.h"
#include "nsIContentSecurityPolicy.h"
#include "nsXULAppAPI.h"
#include "nsDOMNavigationTiming.h"
#include "nsITimedChannel.h"
static NS_DEFINE_CID(kDOMScriptObjectFactoryCID, static NS_DEFINE_CID(kDOMScriptObjectFactoryCID,
NS_DOM_SCRIPT_OBJECT_FACTORY_CID); NS_DOM_SCRIPT_OBJECT_FACTORY_CID);
@ -225,15 +233,6 @@ static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID);
#define DEBUG_PAGE_CACHE #define DEBUG_PAGE_CACHE
#endif #endif
#include "nsContentErrors.h"
#include "nsIChannelPolicy.h"
#include "nsIContentSecurityPolicy.h"
#include "nsXULAppAPI.h"
#include "nsDOMNavigationTiming.h"
#include "nsITimedChannel.h"
using namespace mozilla; using namespace mozilla;
// Number of documents currently loading // Number of documents currently loading
@ -922,7 +921,8 @@ NS_IMETHODIMP nsDocShell::GetInterface(const nsIID & aIID, void **aSink)
*aSink = mScriptGlobal; *aSink = mScriptGlobal;
} }
else if ((aIID.Equals(NS_GET_IID(nsPIDOMWindow)) || else if ((aIID.Equals(NS_GET_IID(nsPIDOMWindow)) ||
aIID.Equals(NS_GET_IID(nsIDOMWindow))) && aIID.Equals(NS_GET_IID(nsIDOMWindow)) ||
aIID.Equals(NS_GET_IID(nsIDOMWindowInternal))) &&
NS_SUCCEEDED(EnsureScriptEnvironment())) { NS_SUCCEEDED(EnsureScriptEnvironment())) {
return mScriptGlobal->QueryInterface(aIID, aSink); return mScriptGlobal->QueryInterface(aIID, aSink);
} }

Просмотреть файл

@ -262,6 +262,7 @@ using mozilla::TimeDuration;
nsIDOMStorageList *nsGlobalWindow::sGlobalStorageList = nsnull; nsIDOMStorageList *nsGlobalWindow::sGlobalStorageList = nsnull;
nsGlobalWindow::WindowByIdTable *nsGlobalWindow::sWindowsById = nsnull; nsGlobalWindow::WindowByIdTable *nsGlobalWindow::sWindowsById = nsnull;
bool nsGlobalWindow::sWarnedAboutWindowInternal = false;
static nsIEntropyCollector *gEntropyCollector = nsnull; static nsIEntropyCollector *gEntropyCollector = nsnull;
static PRInt32 gRefCnt = 0; static PRInt32 gRefCnt = 0;
@ -1348,6 +1349,17 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsGlobalWindow)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIScriptGlobalObject) NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIScriptGlobalObject)
NS_INTERFACE_MAP_ENTRY(nsIDOMWindow) NS_INTERFACE_MAP_ENTRY(nsIDOMWindow)
NS_INTERFACE_MAP_ENTRY(nsIDOMJSWindow) NS_INTERFACE_MAP_ENTRY(nsIDOMJSWindow)
if (aIID.Equals(NS_GET_IID(nsIDOMWindowInternal))) {
foundInterface = static_cast<nsIDOMWindowInternal*>(this);
if (!sWarnedAboutWindowInternal) {
sWarnedAboutWindowInternal = true;
nsContentUtils::ReportToConsole(nsContentUtils::eDOM_PROPERTIES,
"nsIDOMWindowInternalWarning",
nsnull, 0, nsnull, EmptyString(), 0, 0,
nsIScriptError::warningFlag,
"Extensions", mWindowID);
}
} else
NS_INTERFACE_MAP_ENTRY(nsIScriptGlobalObject) NS_INTERFACE_MAP_ENTRY(nsIScriptGlobalObject)
NS_INTERFACE_MAP_ENTRY(nsIScriptObjectPrincipal) NS_INTERFACE_MAP_ENTRY(nsIScriptObjectPrincipal)
NS_INTERFACE_MAP_ENTRY(nsIDOMEventTarget) NS_INTERFACE_MAP_ENTRY(nsIDOMEventTarget)
@ -4926,8 +4938,7 @@ nsGlobalWindow::Focus()
return NS_OK; return NS_OK;
} }
nsIDOMWindow *caller = nsIDOMWindow *caller = nsContentUtils::GetWindowFromCaller();
static_cast<nsIDOMWindow*>(nsContentUtils::GetWindowFromCaller());
nsCOMPtr<nsIDOMWindow> opener; nsCOMPtr<nsIDOMWindow> opener;
GetOpener(getter_AddRefs(opener)); GetOpener(getter_AddRefs(opener));

Просмотреть файл

@ -967,6 +967,7 @@ protected:
static nsIDOMStorageList* sGlobalStorageList; static nsIDOMStorageList* sGlobalStorageList;
static WindowByIdTable* sWindowsById; static WindowByIdTable* sWindowsById;
static bool sWarnedAboutWindowInternal;
}; };
/* /*

Просмотреть файл

@ -80,10 +80,10 @@ class nsIArray;
class nsPIWindowRoot; class nsPIWindowRoot;
#define NS_PIDOMWINDOW_IID \ #define NS_PIDOMWINDOW_IID \
{ 0x1bfacc26, 0xad77, 0x42bb, \ { 0xeee816d2, 0x2f08, 0x4b34, \
{ 0xb9, 0xbb, 0xa0, 0x19, 0xc8, 0x27, 0x5c, 0x0e } } { 0x97, 0x47, 0x5e, 0x5a, 0xcd, 0xc3, 0x56, 0xfa } }
class nsPIDOMWindow : public nsIDOMWindow class nsPIDOMWindow : public nsIDOMWindowInternal
{ {
public: public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_PIDOMWINDOW_IID) NS_DECLARE_STATIC_IID_ACCESSOR(NS_PIDOMWINDOW_IID)

Просмотреть файл

@ -42,10 +42,6 @@
interface nsIIDBRequest; interface nsIIDBRequest;
interface nsIVariant; interface nsIVariant;
%{C++
#include "jspubtd.h"
%}
/** /**
* IDBCursor interface. See * IDBCursor interface. See
* http://dev.w3.org/2006/webapi/WebSimpleDB/#idl-def-IDBCursor for more * http://dev.w3.org/2006/webapi/WebSimpleDB/#idl-def-IDBCursor for more

Просмотреть файл

@ -46,10 +46,6 @@ interface nsIIDBTransaction;
interface nsIDOMDOMStringList; interface nsIDOMDOMStringList;
interface nsIDOMEventListener; interface nsIDOMEventListener;
%{C++
#include "jspubtd.h"
%}
/** /**
* IDBDatabase interface. See * IDBDatabase interface. See
* http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBDatabase * http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBDatabase

Просмотреть файл

@ -44,10 +44,6 @@ interface nsIIDBKeyRange;
interface nsIIDBRequest; interface nsIIDBRequest;
interface nsIVariant; interface nsIVariant;
%{C++
#include "jspubtd.h"
%}
/** /**
* Interface that defines the indexedDB property on a window. See * Interface that defines the indexedDB property on a window. See
* http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBFactory * http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBFactory

Просмотреть файл

@ -46,10 +46,6 @@ interface nsIIDBTransaction;
interface nsIVariant; interface nsIVariant;
interface nsIDOMDOMStringList; interface nsIDOMDOMStringList;
%{C++
#include "jspubtd.h"
%}
/** /**
* nsIIDBObjectStore interface. See * nsIIDBObjectStore interface. See
* http://dev.w3.org/2006/webapi/WebSimpleDB/#idl-def-nsIIDBObjectStore * http://dev.w3.org/2006/webapi/WebSimpleDB/#idl-def-nsIIDBObjectStore

Просмотреть файл

@ -41,10 +41,6 @@
#include "domstubs.idl" #include "domstubs.idl"
%{ C++
#include "jspubtd.h"
%}
interface nsIAnimationFrameListener; interface nsIAnimationFrameListener;
interface nsIControllers; interface nsIControllers;
interface nsIDOMBlob; interface nsIDOMBlob;
@ -448,3 +444,10 @@ interface nsIDOMWindowPerformance : nsISupports
*/ */
readonly attribute nsIDOMPerformance performance; readonly attribute nsIDOMPerformance performance;
}; };
/**
* Empty interface for compatibility with older versions.
* @deprecated Use nsIDOMWindow instead
*/
[scriptable, uuid(8614bdb7-5b07-4d00-a7ba-4d44697a343d)]
interface nsIDOMWindowInternal : nsIDOMWindow {};

Просмотреть файл

@ -38,10 +38,6 @@
#include "nsIDOMEvent.idl" #include "nsIDOMEvent.idl"
%{ C++
#include "jspubtd.h"
%}
/** /**
* The nsIDOMMessageEvent interface is used for server-sent events and for * The nsIDOMMessageEvent interface is used for server-sent events and for
* cross-domain messaging. * cross-domain messaging.

Просмотреть файл

@ -40,10 +40,6 @@
#include "nsIDOMEvent.idl" #include "nsIDOMEvent.idl"
#include "nsIVariant.idl" #include "nsIVariant.idl"
%{ C++
#include "jspubtd.h"
%}
[scriptable, uuid(6250652d-7a6a-49a4-a2ee-9114e1e83427)] [scriptable, uuid(6250652d-7a6a-49a4-a2ee-9114e1e83427)]
interface nsIDOMNotifyAudioAvailableEvent : nsIDOMEvent interface nsIDOMNotifyAudioAvailableEvent : nsIDOMEvent
{ {

Просмотреть файл

@ -39,10 +39,6 @@
#include "nsIDOMDocument.idl" #include "nsIDOMDocument.idl"
%{C++
#include "jspubtd.h"
%}
/** /**
* The nsIDOMHTMLDocument interface is the interface to a [X]HTML * The nsIDOMHTMLDocument interface is the interface to a [X]HTML
* document object. * document object.

Просмотреть файл

@ -42,10 +42,6 @@ interface nsIInputStream;
interface nsIOutputStream; interface nsIOutputStream;
interface nsIScriptGlobalObject; interface nsIScriptGlobalObject;
%{ C++
#include "jspubtd.h"
%}
[ptr] native JSValPtr(jsval); [ptr] native JSValPtr(jsval);
[ptr] native JSContext(JSContext); [ptr] native JSContext(JSContext);

Просмотреть файл

@ -108,6 +108,6 @@ IsSupportedWarning=Use of attributes' isSupported() is deprecated.
IsEqualNodeWarning=Use of attributes' isEqualNode() is deprecated. IsEqualNodeWarning=Use of attributes' isEqualNode() is deprecated.
TextContentWarning=Use of attributes' textContent attribute is deprecated. Use value instead. TextContentWarning=Use of attributes' textContent attribute is deprecated. Use value instead.
EnablePrivilegeWarning=Use of enablePrivilege is deprecated. Please use code that runs with the system principal (e.g. an extension) instead. EnablePrivilegeWarning=Use of enablePrivilege is deprecated. Please use code that runs with the system principal (e.g. an extension) instead.
nsIJSONDecodeDeprecatedWarning=nsIJSON.decode is deprecated. Please use JSON.parse instead. nsIJSONDecodeDeprecatedWarning=nsIJSON.decode is deprecated. Please use JSON.parse instead.
nsIJSONEncodeDeprecatedWarning=nsIJSON.encode is deprecated. Please use JSON.stringify instead. nsIJSONEncodeDeprecatedWarning=nsIJSON.encode is deprecated. Please use JSON.stringify instead.
nsIDOMWindowInternalWarning=Use of nsIDOMWindowInternal is deprecated. Use nsIDOMWindow instead.

Просмотреть файл

@ -48,10 +48,6 @@ interface nsIWebBrowserChrome;
interface nsIDocShellTreeItem; interface nsIDocShellTreeItem;
interface nsIArray; interface nsIArray;
%{C++
#include "jspubtd.h"
%}
[uuid(8624594a-28d7-4bc3-8d12-b1c2b9eefd90)] [uuid(8624594a-28d7-4bc3-8d12-b1c2b9eefd90)]
interface nsPIWindowWatcher : nsISupports interface nsPIWindowWatcher : nsISupports

Просмотреть файл

@ -77,10 +77,6 @@ interface nsIDataType : nsISupports
const PRUint16 VTYPE_EMPTY = 255; const PRUint16 VTYPE_EMPTY = 255;
}; };
%{ C++
#include "jspubtd.h"
%}
/** /**
* XPConnect has magic to transparently convert between nsIVariant and JS types. * XPConnect has magic to transparently convert between nsIVariant and JS types.
* We mark the interface [scriptable] so that JS can use methods * We mark the interface [scriptable] so that JS can use methods

Просмотреть файл

@ -859,6 +859,8 @@ class Method(object):
def needsJSTypes(self): def needsJSTypes(self):
if self.implicit_jscontext: if self.implicit_jscontext:
return True return True
if self.type == "jsval":
return True
for p in self.params: for p in self.params:
t = p.realtype t = p.realtype
if isinstance(t, Native) and t.specialtype == "jsval": if isinstance(t, Native) and t.specialtype == "jsval":

Просмотреть файл

@ -89,7 +89,6 @@
#include "nsWebShellWindow.h" // get rid of this one, too... #include "nsWebShellWindow.h" // get rid of this one, too...
#include "prenv.h" #include "prenv.h"
#include "mozilla/Preferences.h" #include "mozilla/Preferences.h"
using namespace mozilla; using namespace mozilla;
@ -201,7 +200,15 @@ NS_IMETHODIMP nsXULWindow::GetInterface(const nsIID& aIID, void** aSink)
} }
if (aIID.Equals(NS_GET_IID(nsIDOMWindow))) { if (aIID.Equals(NS_GET_IID(nsIDOMWindow))) {
return GetWindowDOMWindow(reinterpret_cast<nsIDOMWindow**>(aSink)); return GetWindowDOMWindow(reinterpret_cast<nsIDOMWindow**>(aSink));
} }
if (aIID.Equals(NS_GET_IID(nsIDOMWindowInternal))) {
nsIDOMWindow* domWindow = nsnull;
rv = GetWindowDOMWindow(&domWindow);
nsIDOMWindowInternal* domWindowInternal =
static_cast<nsIDOMWindowInternal*>(domWindow);
*aSink = domWindowInternal;
return rv;
}
if (aIID.Equals(NS_GET_IID(nsIWebBrowserChrome)) && if (aIID.Equals(NS_GET_IID(nsIWebBrowserChrome)) &&
NS_SUCCEEDED(EnsureContentTreeOwner()) && NS_SUCCEEDED(EnsureContentTreeOwner()) &&
NS_SUCCEEDED(mContentTreeOwner->QueryInterface(aIID, aSink))) NS_SUCCEEDED(mContentTreeOwner->QueryInterface(aIID, aSink)))