зеркало из https://github.com/mozilla/gecko-dev.git
Merge m-c to fx-team a=merge
This commit is contained in:
Коммит
c13319b1d9
|
@ -251,6 +251,8 @@ GetAccService()
|
|||
inline bool
|
||||
IPCAccessibilityActive()
|
||||
{
|
||||
// XXX temporarily disable ipc accessibility because of crashes.
|
||||
return false;
|
||||
#ifdef MOZ_B2G
|
||||
return false;
|
||||
#else
|
||||
|
|
|
@ -5,11 +5,10 @@ MOZ_AUTOMATION_L10N_CHECK=0
|
|||
. "$topsrcdir/build/mozconfig.common"
|
||||
|
||||
ac_add_options --enable-debug
|
||||
ac_add_options --enable-dmd
|
||||
|
||||
ac_add_options --disable-unified-compilation
|
||||
|
||||
ac_add_options --with-google-oauth-api-keyfile=/builds/google-oauth-api.key
|
||||
|
||||
# Use Clang as specified in manifest
|
||||
export CC="$topsrcdir/clang/bin/clang"
|
||||
export CXX="$topsrcdir/clang/bin/clang++"
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
ac_add_options --enable-debug
|
||||
ac_add_options --enable-dmd
|
||||
ac_add_options --enable-accessibility
|
||||
ac_add_options --enable-signmar
|
||||
ac_add_options --with-google-oauth-api-keyfile=/builds/google-oauth-api.key
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
ac_add_options --enable-application=browser
|
||||
ac_add_options --enable-debug
|
||||
ac_add_options --enable-optimize="-O1"
|
||||
ac_add_options --enable-accessibility
|
||||
ac_add_options --with-google-oauth-api-keyfile=/builds/google-oauth-api.key
|
||||
|
||||
ac_add_options --disable-unified-compilation
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
||||
MOZ_AUTOMATION_PACKAGE_TESTS=0
|
||||
MOZ_AUTOMATION_L10N_CHECK=0
|
||||
|
||||
. $topsrcdir/build/macosx/mozconfig.common
|
||||
|
||||
ac_add_options --enable-debug
|
||||
ac_add_options --enable-dmd
|
||||
|
||||
# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
|
||||
ac_add_options --enable-warnings-as-errors
|
||||
|
||||
ac_add_options --enable-clang-plugin
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
|
@ -33,7 +33,11 @@ if test -n "$ENABLE_CLANG_PLUGIN"; then
|
|||
AC_MSG_ERROR([Cannot find an llvm-config binary for building a clang plugin])
|
||||
fi
|
||||
LLVM_CXXFLAGS=`$LLVMCONFIG --cxxflags`
|
||||
LLVM_LDFLAGS=`$LLVMCONFIG --ldflags --system-libs --libs core mc analysis asmparser mcparser bitreader option | xargs`
|
||||
dnl The clang package we use on OSX is old, and its llvm-config doesn't
|
||||
dnl recognize --system-libs, so ask for that separately. llvm-config's
|
||||
dnl failure here is benign, so we can ignore it if it happens.
|
||||
LLVM_LDFLAGS=`$LLVMCONFIG --system-libs | xargs`
|
||||
LLVM_LDFLAGS="$LLVM_LDFLAGS `$LLVMCONFIG --ldflags --libs core mc analysis asmparser mcparser bitreader option | xargs`"
|
||||
|
||||
if test "${OS_ARCH}" = "Darwin"; then
|
||||
CLANG_LDFLAGS="-lclangFrontend -lclangDriver -lclangSerialization"
|
||||
|
|
|
@ -91,6 +91,13 @@ fi
|
|||
|
||||
AC_SUBST(CLANG_CXX)
|
||||
AC_SUBST(CLANG_CL)
|
||||
|
||||
if test -n "$GNU_CC" -a -z "$CLANG_CC" ; then
|
||||
if test "$GCC_MAJOR_VERSION" -eq 4 -a "$GCC_MINOR_VERSION" -lt 4 ||
|
||||
test "$GCC_MAJOR_VERSION" -lt 4; then
|
||||
AC_MSG_ERROR([Only GCC 4.4 or newer supported])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([MOZ_CROSS_COMPILER],
|
||||
|
|
18
configure.in
18
configure.in
|
@ -405,13 +405,6 @@ MOZ_TOOL_VARIABLES
|
|||
|
||||
MOZ_CHECK_COMPILER_WRAPPER
|
||||
|
||||
if test -n "$GNU_CC" -a -z "$CLANG_CC" ; then
|
||||
if test "$GCC_MAJOR_VERSION" -eq 4 -a "$GCC_MINOR_VERSION" -lt 4 ||
|
||||
test "$GCC_MAJOR_VERSION" -lt 4; then
|
||||
AC_MSG_ERROR([Only GCC 4.4 or newer supported])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl Special win32 checks
|
||||
dnl ========================================================
|
||||
|
@ -494,12 +487,7 @@ case "$target" in
|
|||
AC_DEFINE(_CRT_SECURE_NO_WARNINGS)
|
||||
AC_DEFINE(_CRT_NONSTDC_NO_WARNINGS)
|
||||
|
||||
if test "$_CC_MAJOR_VERSION" = "17"; then
|
||||
_CC_SUITE=11
|
||||
MSVS_VERSION=2012
|
||||
MSVC_C_RUNTIME_DLL=msvcr110.dll
|
||||
MSVC_CXX_RUNTIME_DLL=msvcp110.dll
|
||||
elif test "$_CC_MAJOR_VERSION" = "18"; then
|
||||
if test "$_CC_MAJOR_VERSION" = "18"; then
|
||||
_CC_SUITE=12
|
||||
MSVS_VERSION=2013
|
||||
MSVC_C_RUNTIME_DLL=msvcr120.dll
|
||||
|
@ -1252,11 +1240,11 @@ MOZ_ANDROID_STLPORT
|
|||
dnl ========================================================
|
||||
dnl Suppress Clang Argument Warnings
|
||||
dnl ========================================================
|
||||
if test -n "$CLANG_CC"; then
|
||||
if test -n "${CLANG_CC}${CLANG_CL}"; then
|
||||
_WARNINGS_CFLAGS="-Qunused-arguments ${_WARNINGS_CFLAGS}"
|
||||
CPPFLAGS="-Qunused-arguments ${CPPFLAGS}"
|
||||
fi
|
||||
if test -n "$CLANG_CXX"; then
|
||||
if test -n "${CLANG_CXX}${CLANG_CL}"; then
|
||||
_WARNINGS_CXXFLAGS="-Qunused-arguments ${_WARNINGS_CXXFLAGS}"
|
||||
fi
|
||||
|
||||
|
|
|
@ -378,9 +378,8 @@ ArchiveZipFileImpl::GetInternalStream(nsIInputStream** aStream)
|
|||
mStart,
|
||||
mLength,
|
||||
mCentral);
|
||||
NS_ADDREF(stream);
|
||||
|
||||
*aStream = stream;
|
||||
stream.forget(aStream);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -354,7 +354,7 @@ public:
|
|||
}
|
||||
|
||||
File*
|
||||
operator->() const
|
||||
operator->() const MOZ_NO_ADDREF_RELEASE_ON_RETURN
|
||||
{
|
||||
MOZ_ASSERT(mFile);
|
||||
return mFile;
|
||||
|
|
|
@ -79,7 +79,7 @@ public:
|
|||
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_AMBIGUOUS(Attr,
|
||||
nsIAttribute)
|
||||
|
||||
virtual nsIDOMNode* AsDOMNode() { return this; }
|
||||
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
|
||||
|
||||
// WebIDL
|
||||
virtual JSObject* WrapNode(JSContext* aCx) MOZ_OVERRIDE;
|
||||
|
@ -98,7 +98,7 @@ public:
|
|||
Element* GetOwnerElement(ErrorResult& aRv);
|
||||
|
||||
protected:
|
||||
virtual Element* GetNameSpaceElement()
|
||||
virtual Element* GetNameSpaceElement() MOZ_OVERRIDE
|
||||
{
|
||||
return GetElement();
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ public:
|
|||
// Empty interface
|
||||
|
||||
// nsINode
|
||||
virtual bool IsNodeOfType(uint32_t aFlags) const;
|
||||
virtual bool IsNodeOfType(uint32_t aFlags) const MOZ_OVERRIDE;
|
||||
|
||||
virtual nsGenericDOMDataNode* CloneDataNode(mozilla::dom::NodeInfo *aNodeInfo,
|
||||
bool aCloneText) const MOZ_OVERRIDE;
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "nsIServiceManager.h"
|
||||
#include "nsISupportsPrimitives.h"
|
||||
#include "nsIWebNavigation.h"
|
||||
#include "nsIXPConnect.h"
|
||||
|
||||
// The maximum allowed number of concurrent timers per page.
|
||||
#define MAX_PAGE_TIMERS 10000
|
||||
|
@ -40,13 +41,6 @@
|
|||
// console.trace().
|
||||
#define DEFAULT_MAX_STACKTRACE_DEPTH 200
|
||||
|
||||
// The console API methods are async and their action is executed later. This
|
||||
// delay tells how much later.
|
||||
#define CALL_DELAY 15 // milliseconds
|
||||
|
||||
// This constant tells how many messages to process in a single timer execution.
|
||||
#define MESSAGES_IN_INTERVAL 1500
|
||||
|
||||
// This tag is used in the Structured Clone Algorithm to move js values from
|
||||
// worker thread to main thread
|
||||
#define CONSOLE_TAG JS_SCTAG_USER_MIN
|
||||
|
@ -137,22 +131,17 @@ static const JSStructuredCloneCallbacks gConsoleCallbacks = {
|
|||
ConsoleStructuredCloneCallbacksError
|
||||
};
|
||||
|
||||
class ConsoleCallData MOZ_FINAL : public LinkedListElement<ConsoleCallData>
|
||||
class ConsoleCallData MOZ_FINAL
|
||||
{
|
||||
public:
|
||||
ConsoleCallData()
|
||||
: mMethodName(Console::MethodLog)
|
||||
, mPrivate(false)
|
||||
, mTimeStamp(JS_Now() / PR_USEC_PER_MSEC)
|
||||
, mMonotonicTimer(0)
|
||||
{
|
||||
MOZ_COUNT_CTOR(ConsoleCallData);
|
||||
}
|
||||
|
||||
~ConsoleCallData()
|
||||
{
|
||||
MOZ_COUNT_DTOR(ConsoleCallData);
|
||||
}
|
||||
, mIDType(eUnknown)
|
||||
, mOuterIDNumber(0)
|
||||
, mInnerIDNumber(0)
|
||||
{ }
|
||||
|
||||
void
|
||||
Initialize(JSContext* aCx, Console::MethodName aName,
|
||||
|
@ -167,6 +156,33 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
SetIDs(uint64_t aOuterID, uint64_t aInnerID)
|
||||
{
|
||||
MOZ_ASSERT(mIDType == eUnknown);
|
||||
|
||||
mOuterIDNumber = aOuterID;
|
||||
mInnerIDNumber = aInnerID;
|
||||
mIDType = eNumber;
|
||||
}
|
||||
|
||||
void
|
||||
SetIDs(const nsAString& aOuterID, const nsAString& aInnerID)
|
||||
{
|
||||
MOZ_ASSERT(mIDType == eUnknown);
|
||||
|
||||
mOuterIDString = aOuterID;
|
||||
mInnerIDString = aInnerID;
|
||||
mIDType = eString;
|
||||
}
|
||||
|
||||
void
|
||||
CleanupJSObjects()
|
||||
{
|
||||
mArguments.Clear();
|
||||
mGlobal = nullptr;
|
||||
}
|
||||
|
||||
JS::Heap<JSObject*> mGlobal;
|
||||
|
||||
Console::MethodName mMethodName;
|
||||
|
@ -174,6 +190,24 @@ public:
|
|||
int64_t mTimeStamp;
|
||||
DOMHighResTimeStamp mMonotonicTimer;
|
||||
|
||||
// The concept of outerID and innerID is misleading because when a
|
||||
// ConsoleCallData is created from a window, these are the window IDs, but
|
||||
// when the object is created from a SharedWorker, a ServiceWorker or a
|
||||
// subworker of a ChromeWorker these IDs are the type of worker and the
|
||||
// filename of the callee.
|
||||
// In Console.jsm the ID is 'jsm'.
|
||||
enum {
|
||||
eString,
|
||||
eNumber,
|
||||
eUnknown
|
||||
} mIDType;
|
||||
|
||||
uint64_t mOuterIDNumber;
|
||||
nsString mOuterIDString;
|
||||
|
||||
uint64_t mInnerIDNumber;
|
||||
nsString mInnerIDString;
|
||||
|
||||
nsString mMethodString;
|
||||
nsTArray<JS::Heap<JS::Value>> mArguments;
|
||||
|
||||
|
@ -209,8 +243,9 @@ private:
|
|||
class ConsoleRunnable : public nsRunnable
|
||||
{
|
||||
public:
|
||||
ConsoleRunnable()
|
||||
explicit ConsoleRunnable(Console* aConsole)
|
||||
: mWorkerPrivate(GetCurrentThreadWorkerPrivate())
|
||||
, mConsole(aConsole)
|
||||
{
|
||||
MOZ_ASSERT(mWorkerPrivate);
|
||||
}
|
||||
|
@ -248,7 +283,18 @@ private:
|
|||
{
|
||||
AssertIsOnMainThread();
|
||||
|
||||
RunConsole();
|
||||
// Walk up to our containing page
|
||||
WorkerPrivate* wp = mWorkerPrivate;
|
||||
while (wp->GetParent()) {
|
||||
wp = wp->GetParent();
|
||||
}
|
||||
|
||||
nsPIDOMWindow* window = wp->GetWindow();
|
||||
if (!window) {
|
||||
RunWindowless();
|
||||
} else {
|
||||
RunWithWindow(window);
|
||||
}
|
||||
|
||||
nsRefPtr<MainThreadStopSyncLoopRunnable> response =
|
||||
new MainThreadStopSyncLoopRunnable(mWorkerPrivate,
|
||||
|
@ -261,15 +307,70 @@ private:
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
RunWithWindow(nsPIDOMWindow* aWindow)
|
||||
{
|
||||
AutoJSAPI jsapi;
|
||||
MOZ_ASSERT(aWindow);
|
||||
|
||||
nsRefPtr<nsGlobalWindow> win = static_cast<nsGlobalWindow*>(aWindow);
|
||||
if (NS_WARN_IF(!jsapi.Init(win))) {
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(aWindow->IsInnerWindow());
|
||||
nsPIDOMWindow* outerWindow = aWindow->GetOuterWindow();
|
||||
MOZ_ASSERT(outerWindow);
|
||||
|
||||
RunConsole(jsapi.cx(), outerWindow, aWindow);
|
||||
}
|
||||
|
||||
void
|
||||
RunWindowless()
|
||||
{
|
||||
WorkerPrivate* wp = mWorkerPrivate;
|
||||
while (wp->GetParent()) {
|
||||
wp = wp->GetParent();
|
||||
}
|
||||
|
||||
MOZ_ASSERT(!wp->GetWindow());
|
||||
|
||||
AutoSafeJSContext cx;
|
||||
|
||||
nsCOMPtr<nsIXPConnectJSObjectHolder> sandbox =
|
||||
mConsole->GetOrCreateSandbox(cx, wp->GetPrincipal());
|
||||
if (NS_WARN_IF(!sandbox)) {
|
||||
return;
|
||||
}
|
||||
|
||||
JS::Rooted<JSObject*> global(cx, sandbox->GetJSObject());
|
||||
if (NS_WARN_IF(!global)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// The CreateSandbox call returns a proxy to the actual sandbox object. We
|
||||
// don't need a proxy here.
|
||||
global = js::UncheckedUnwrap(global);
|
||||
|
||||
JSAutoCompartment ac(cx, global);
|
||||
|
||||
RunConsole(cx, nullptr, nullptr);
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual bool
|
||||
PreDispatch(JSContext* aCx) = 0;
|
||||
|
||||
virtual void
|
||||
RunConsole() = 0;
|
||||
RunConsole(JSContext* aCx, nsPIDOMWindow* aOuterWindow,
|
||||
nsPIDOMWindow* aInnerWindow) = 0;
|
||||
|
||||
WorkerPrivate* mWorkerPrivate;
|
||||
|
||||
// Raw pointer because this method is async and this object is kept alive by
|
||||
// the caller.
|
||||
Console* mConsole;
|
||||
|
||||
private:
|
||||
nsCOMPtr<nsIEventTarget> mSyncLoopTarget;
|
||||
};
|
||||
|
@ -279,15 +380,21 @@ private:
|
|||
class ConsoleCallDataRunnable MOZ_FINAL : public ConsoleRunnable
|
||||
{
|
||||
public:
|
||||
explicit ConsoleCallDataRunnable(ConsoleCallData* aCallData)
|
||||
: mCallData(aCallData)
|
||||
{
|
||||
}
|
||||
ConsoleCallDataRunnable(Console* aConsole,
|
||||
ConsoleCallData* aCallData)
|
||||
: ConsoleRunnable(aConsole)
|
||||
, mCallData(aCallData)
|
||||
{ }
|
||||
|
||||
private:
|
||||
~ConsoleCallDataRunnable()
|
||||
{ }
|
||||
|
||||
bool
|
||||
PreDispatch(JSContext* aCx) MOZ_OVERRIDE
|
||||
{
|
||||
mWorkerPrivate->AssertIsOnWorkerThread();
|
||||
|
||||
ClearException ce(aCx);
|
||||
JSAutoCompartment ac(aCx, mCallData->mGlobal);
|
||||
|
||||
|
@ -311,58 +418,67 @@ private:
|
|||
return false;
|
||||
}
|
||||
|
||||
mCallData->mArguments.Clear();
|
||||
mCallData->mGlobal = nullptr;
|
||||
mCallData->CleanupJSObjects();
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
RunConsole() MOZ_OVERRIDE
|
||||
RunConsole(JSContext* aCx, nsPIDOMWindow* aOuterWindow,
|
||||
nsPIDOMWindow* aInnerWindow) MOZ_OVERRIDE
|
||||
{
|
||||
// Walk up to our containing page
|
||||
WorkerPrivate* wp = mWorkerPrivate;
|
||||
while (wp->GetParent()) {
|
||||
wp = wp->GetParent();
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
// The windows have to run in parallel.
|
||||
MOZ_ASSERT(!!aOuterWindow == !!aInnerWindow);
|
||||
|
||||
if (aOuterWindow) {
|
||||
mCallData->SetIDs(aOuterWindow->WindowID(), aInnerWindow->WindowID());
|
||||
} else {
|
||||
ConsoleStackEntry frame;
|
||||
if (mCallData->mTopStackFrame) {
|
||||
frame = *mCallData->mTopStackFrame;
|
||||
}
|
||||
|
||||
nsString id;
|
||||
if (mWorkerPrivate->IsSharedWorker()) {
|
||||
id = NS_LITERAL_STRING("SharedWorker");
|
||||
} else if (mWorkerPrivate->IsServiceWorker()) {
|
||||
id = NS_LITERAL_STRING("ServiceWorker");
|
||||
} else {
|
||||
id = NS_LITERAL_STRING("Worker");
|
||||
}
|
||||
|
||||
mCallData->SetIDs(id, frame.mFilename);
|
||||
}
|
||||
|
||||
nsPIDOMWindow* window = wp->GetWindow();
|
||||
NS_ENSURE_TRUE_VOID(window);
|
||||
ProcessCallData(aCx);
|
||||
mCallData->CleanupJSObjects();
|
||||
}
|
||||
|
||||
nsRefPtr<nsGlobalWindow> win = static_cast<nsGlobalWindow*>(window);
|
||||
NS_ENSURE_TRUE_VOID(win);
|
||||
private:
|
||||
void
|
||||
ProcessCallData(JSContext* aCx)
|
||||
{
|
||||
ClearException ce(aCx);
|
||||
|
||||
AutoJSAPI jsapi;
|
||||
if (NS_WARN_IF(!jsapi.Init(win))) {
|
||||
return;
|
||||
}
|
||||
JSContext* cx = jsapi.cx();
|
||||
ClearException ce(cx);
|
||||
|
||||
ErrorResult error;
|
||||
nsRefPtr<Console> console = win->GetConsole(error);
|
||||
if (error.Failed()) {
|
||||
NS_WARNING("Failed to get console from the window.");
|
||||
return;
|
||||
}
|
||||
|
||||
JS::Rooted<JS::Value> argumentsValue(cx);
|
||||
if (!mArguments.read(cx, &argumentsValue, &gConsoleCallbacks, &mStrings)) {
|
||||
JS::Rooted<JS::Value> argumentsValue(aCx);
|
||||
if (!mArguments.read(aCx, &argumentsValue, &gConsoleCallbacks, &mStrings)) {
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(argumentsValue.isObject());
|
||||
JS::Rooted<JSObject*> argumentsObj(cx, &argumentsValue.toObject());
|
||||
MOZ_ASSERT(JS_IsArrayObject(cx, argumentsObj));
|
||||
JS::Rooted<JSObject*> argumentsObj(aCx, &argumentsValue.toObject());
|
||||
MOZ_ASSERT(JS_IsArrayObject(aCx, argumentsObj));
|
||||
|
||||
uint32_t length;
|
||||
if (!JS_GetArrayLength(cx, argumentsObj, &length)) {
|
||||
if (!JS_GetArrayLength(aCx, argumentsObj, &length)) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < length; ++i) {
|
||||
JS::Rooted<JS::Value> value(cx);
|
||||
JS::Rooted<JS::Value> value(aCx);
|
||||
|
||||
if (!JS_GetElement(cx, argumentsObj, i, &value)) {
|
||||
if (!JS_GetElement(aCx, argumentsObj, i, &value)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -371,12 +487,11 @@ private:
|
|||
|
||||
MOZ_ASSERT(mCallData->mArguments.Length() == length);
|
||||
|
||||
mCallData->mGlobal = JS::CurrentGlobalOrNull(cx);
|
||||
console->AppendCallData(mCallData.forget());
|
||||
mCallData->mGlobal = JS::CurrentGlobalOrNull(aCx);
|
||||
mConsole->ProcessCallData(mCallData);
|
||||
}
|
||||
|
||||
private:
|
||||
nsAutoPtr<ConsoleCallData> mCallData;
|
||||
ConsoleCallData* mCallData;
|
||||
|
||||
JSAutoStructuredCloneBuffer mArguments;
|
||||
nsTArray<nsString> mStrings;
|
||||
|
@ -386,11 +501,13 @@ private:
|
|||
class ConsoleProfileRunnable MOZ_FINAL : public ConsoleRunnable
|
||||
{
|
||||
public:
|
||||
ConsoleProfileRunnable(const nsAString& aAction,
|
||||
ConsoleProfileRunnable(Console* aConsole, const nsAString& aAction,
|
||||
const Sequence<JS::Value>& aArguments)
|
||||
: mAction(aAction)
|
||||
: ConsoleRunnable(aConsole)
|
||||
, mAction(aAction)
|
||||
, mArguments(aArguments)
|
||||
{
|
||||
MOZ_ASSERT(aConsole);
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -430,64 +547,40 @@ private:
|
|||
}
|
||||
|
||||
void
|
||||
RunConsole() MOZ_OVERRIDE
|
||||
RunConsole(JSContext* aCx, nsPIDOMWindow* aOuterWindow,
|
||||
nsPIDOMWindow* aInnerWindow) MOZ_OVERRIDE
|
||||
{
|
||||
// Walk up to our containing page
|
||||
WorkerPrivate* wp = mWorkerPrivate;
|
||||
while (wp->GetParent()) {
|
||||
wp = wp->GetParent();
|
||||
}
|
||||
ClearException ce(aCx);
|
||||
|
||||
nsPIDOMWindow* window = wp->GetWindow();
|
||||
NS_ENSURE_TRUE_VOID(window);
|
||||
|
||||
nsRefPtr<nsGlobalWindow> win = static_cast<nsGlobalWindow*>(window);
|
||||
NS_ENSURE_TRUE_VOID(win);
|
||||
|
||||
AutoJSAPI jsapi;
|
||||
if (NS_WARN_IF(!jsapi.Init(win))) {
|
||||
return;
|
||||
}
|
||||
JSContext* cx = jsapi.cx();
|
||||
ClearException ce(cx);
|
||||
|
||||
ErrorResult error;
|
||||
nsRefPtr<Console> console = win->GetConsole(error);
|
||||
if (error.Failed()) {
|
||||
NS_WARNING("Failed to get console from the window.");
|
||||
return;
|
||||
}
|
||||
|
||||
JS::Rooted<JS::Value> argumentsValue(cx);
|
||||
if (!mBuffer.read(cx, &argumentsValue, &gConsoleCallbacks, &mStrings)) {
|
||||
JS::Rooted<JS::Value> argumentsValue(aCx);
|
||||
if (!mBuffer.read(aCx, &argumentsValue, &gConsoleCallbacks, &mStrings)) {
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(argumentsValue.isObject());
|
||||
JS::Rooted<JSObject*> argumentsObj(cx, &argumentsValue.toObject());
|
||||
MOZ_ASSERT(JS_IsArrayObject(cx, argumentsObj));
|
||||
JS::Rooted<JSObject*> argumentsObj(aCx, &argumentsValue.toObject());
|
||||
MOZ_ASSERT(JS_IsArrayObject(aCx, argumentsObj));
|
||||
|
||||
uint32_t length;
|
||||
if (!JS_GetArrayLength(cx, argumentsObj, &length)) {
|
||||
if (!JS_GetArrayLength(aCx, argumentsObj, &length)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Sequence<JS::Value> arguments;
|
||||
|
||||
for (uint32_t i = 0; i < length; ++i) {
|
||||
JS::Rooted<JS::Value> value(cx);
|
||||
JS::Rooted<JS::Value> value(aCx);
|
||||
|
||||
if (!JS_GetElement(cx, argumentsObj, i, &value)) {
|
||||
if (!JS_GetElement(aCx, argumentsObj, i, &value)) {
|
||||
return;
|
||||
}
|
||||
|
||||
arguments.AppendElement(value);
|
||||
}
|
||||
|
||||
console->ProfileMethod(cx, mAction, arguments);
|
||||
mConsole->ProfileMethod(aCx, mAction, arguments);
|
||||
}
|
||||
|
||||
private:
|
||||
nsString mAction;
|
||||
Sequence<JS::Value> mArguments;
|
||||
|
||||
|
@ -497,37 +590,22 @@ private:
|
|||
|
||||
NS_IMPL_CYCLE_COLLECTION_CLASS(Console)
|
||||
|
||||
// We don't need to traverse/unlink mStorage and mSanbox because they are not
|
||||
// CCed objects and they are only used on the main thread, even when this
|
||||
// Console object is used on workers.
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(Console)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mWindow)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mTimer)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mStorage)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER
|
||||
|
||||
tmp->ClearConsoleData();
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(Console)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mWindow)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mTimer)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mStorage)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(Console)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER
|
||||
|
||||
for (ConsoleCallData* data = tmp->mQueuedCalls.getFirst(); data != nullptr;
|
||||
data = data->getNext()) {
|
||||
if (data->mGlobal) {
|
||||
aCallbacks.Trace(&data->mGlobal, "data->mGlobal", aClosure);
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < data->mArguments.Length(); ++i) {
|
||||
aCallbacks.Trace(&data->mArguments[i], "data->mArguments[i]", aClosure);
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(Console)
|
||||
|
@ -535,9 +613,8 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(Console)
|
|||
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(Console)
|
||||
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
||||
NS_INTERFACE_MAP_ENTRY(nsITimerCallback)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIObserver)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsITimerCallback)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
Console::Console(nsPIDOMWindow* aWindow)
|
||||
|
@ -566,6 +643,23 @@ Console::Console(nsPIDOMWindow* aWindow)
|
|||
|
||||
Console::~Console()
|
||||
{
|
||||
if (!NS_IsMainThread()) {
|
||||
nsCOMPtr<nsIThread> mainThread;
|
||||
NS_GetMainThread(getter_AddRefs(mainThread));
|
||||
|
||||
if (mStorage) {
|
||||
nsIConsoleAPIStorage* storage;
|
||||
mStorage.forget(&storage);
|
||||
NS_ProxyRelease(mainThread, storage, false);
|
||||
}
|
||||
|
||||
if (mSandbox) {
|
||||
nsIXPConnectJSObjectHolder* sandbox;
|
||||
mSandbox.forget(&sandbox);
|
||||
NS_ProxyRelease(mainThread, sandbox, false);
|
||||
}
|
||||
}
|
||||
|
||||
mozilla::DropJSObjects(this);
|
||||
}
|
||||
|
||||
|
@ -593,13 +687,7 @@ Console::Observe(nsISupports* aSubject, const char* aTopic,
|
|||
obs->RemoveObserver(this, "inner-window-destroyed");
|
||||
}
|
||||
|
||||
ClearConsoleData();
|
||||
mTimerRegistry.Clear();
|
||||
|
||||
if (mTimer) {
|
||||
mTimer->Cancel();
|
||||
mTimer = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -685,7 +773,7 @@ Console::ProfileMethod(JSContext* aCx, const nsAString& aAction,
|
|||
if (!NS_IsMainThread()) {
|
||||
// Here we are in a worker thread.
|
||||
nsRefPtr<ConsoleProfileRunnable> runnable =
|
||||
new ConsoleProfileRunnable(aAction, aData);
|
||||
new ConsoleProfileRunnable(this, aAction, aData);
|
||||
runnable->Dispatch();
|
||||
return;
|
||||
}
|
||||
|
@ -843,43 +931,11 @@ Console::Method(JSContext* aCx, MethodName aMethodName,
|
|||
const nsAString& aMethodString,
|
||||
const Sequence<JS::Value>& aData)
|
||||
{
|
||||
// This RAII class removes the last element of the mQueuedCalls if something
|
||||
// goes wrong.
|
||||
class RAII {
|
||||
public:
|
||||
explicit RAII(LinkedList<ConsoleCallData>& aList)
|
||||
: mList(aList)
|
||||
, mUnfinished(true)
|
||||
{
|
||||
}
|
||||
|
||||
~RAII()
|
||||
{
|
||||
if (mUnfinished) {
|
||||
ConsoleCallData* data = mList.popLast();
|
||||
MOZ_ASSERT(data);
|
||||
delete data;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Finished()
|
||||
{
|
||||
mUnfinished = false;
|
||||
}
|
||||
|
||||
private:
|
||||
LinkedList<ConsoleCallData>& mList;
|
||||
bool mUnfinished;
|
||||
};
|
||||
|
||||
ConsoleCallData* callData = new ConsoleCallData();
|
||||
mQueuedCalls.insertBack(callData);
|
||||
nsAutoPtr<ConsoleCallData> callData(new ConsoleCallData());
|
||||
|
||||
ClearException ce(aCx);
|
||||
|
||||
callData->Initialize(aCx, aMethodName, aMethodString, aData);
|
||||
RAII raii(mQueuedCalls);
|
||||
|
||||
if (mWindow) {
|
||||
nsCOMPtr<nsIWebNavigation> webNav = do_GetInterface(mWindow);
|
||||
|
@ -989,62 +1045,17 @@ Console::Method(JSContext* aCx, MethodName aMethodName,
|
|||
}
|
||||
}
|
||||
|
||||
// The operation is completed. RAII class has to be disabled.
|
||||
raii.Finished();
|
||||
|
||||
if (!NS_IsMainThread()) {
|
||||
// Here we are in a worker thread. The ConsoleCallData has to been removed
|
||||
// from the list and it will be deleted by the ConsoleCallDataRunnable or
|
||||
// by the Main-Thread Console object.
|
||||
mQueuedCalls.popLast();
|
||||
|
||||
nsRefPtr<ConsoleCallDataRunnable> runnable =
|
||||
new ConsoleCallDataRunnable(callData);
|
||||
runnable->Dispatch();
|
||||
if (NS_IsMainThread()) {
|
||||
callData->SetIDs(mOuterID, mInnerID);
|
||||
ProcessCallData(callData);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mTimer) {
|
||||
mTimer = do_CreateInstance("@mozilla.org/timer;1");
|
||||
mTimer->InitWithCallback(this, CALL_DELAY,
|
||||
nsITimer::TYPE_REPEATING_SLACK);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Console::AppendCallData(ConsoleCallData* aCallData)
|
||||
{
|
||||
mQueuedCalls.insertBack(aCallData);
|
||||
|
||||
if (!mTimer) {
|
||||
mTimer = do_CreateInstance("@mozilla.org/timer;1");
|
||||
mTimer->InitWithCallback(this, CALL_DELAY,
|
||||
nsITimer::TYPE_REPEATING_SLACK);
|
||||
}
|
||||
}
|
||||
|
||||
// Timer callback used to process each of the queued calls.
|
||||
NS_IMETHODIMP
|
||||
Console::Notify(nsITimer *timer)
|
||||
{
|
||||
MOZ_ASSERT(!mQueuedCalls.isEmpty());
|
||||
|
||||
for (uint32_t i = 0; i < MESSAGES_IN_INTERVAL; ++i) {
|
||||
ConsoleCallData* data = mQueuedCalls.popFirst();
|
||||
if (!data) {
|
||||
break;
|
||||
}
|
||||
|
||||
ProcessCallData(data);
|
||||
delete data;
|
||||
}
|
||||
|
||||
if (mQueuedCalls.isEmpty() && mTimer) {
|
||||
mTimer->Cancel();
|
||||
mTimer = nullptr;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
// Note: we can pass the reference of callData because this runnable calls
|
||||
// ProcessCallData() synchronously.
|
||||
nsRefPtr<ConsoleCallDataRunnable> runnable =
|
||||
new ConsoleCallDataRunnable(this, callData);
|
||||
runnable->Dispatch();
|
||||
}
|
||||
|
||||
// We store information to lazily compute the stack in the reserved slots of
|
||||
|
@ -1111,13 +1122,15 @@ Console::ProcessCallData(ConsoleCallData* aData)
|
|||
|
||||
event.mID.Construct();
|
||||
event.mInnerID.Construct();
|
||||
if (mWindow) {
|
||||
event.mID.Value().SetAsUnsignedLong() = mOuterID;
|
||||
event.mInnerID.Value().SetAsUnsignedLong() = mInnerID;
|
||||
|
||||
MOZ_ASSERT(aData->mIDType != ConsoleCallData::eUnknown);
|
||||
if (aData->mIDType == ConsoleCallData::eString) {
|
||||
event.mID.Value().SetAsString() = aData->mOuterIDString;
|
||||
event.mInnerID.Value().SetAsString() = aData->mInnerIDString;
|
||||
} else {
|
||||
// If we are in a JSM, the window doesn't exist.
|
||||
event.mID.Value().SetAsString() = NS_LITERAL_STRING("jsm");
|
||||
event.mInnerID.Value().SetAsString() = frame.mFilename;
|
||||
MOZ_ASSERT(aData->mIDType == ConsoleCallData::eNumber);
|
||||
event.mID.Value().SetAsUnsignedLong() = aData->mOuterIDNumber;
|
||||
event.mInnerID.Value().SetAsUnsignedLong() = aData->mInnerIDNumber;
|
||||
}
|
||||
|
||||
event.mLevel = aData->mMethodString;
|
||||
|
@ -1243,29 +1256,21 @@ Console::ProcessCallData(ConsoleCallData* aData)
|
|||
return;
|
||||
}
|
||||
|
||||
nsAutoString innerID;
|
||||
innerID.AppendInt(mInnerID);
|
||||
nsAutoString innerID, outerID;
|
||||
|
||||
if (NS_FAILED(mStorage->RecordEvent(innerID, eventValue))) {
|
||||
MOZ_ASSERT(aData->mIDType != ConsoleCallData::eUnknown);
|
||||
if (aData->mIDType == ConsoleCallData::eString) {
|
||||
outerID = aData->mOuterIDString;
|
||||
innerID = aData->mInnerIDString;
|
||||
} else {
|
||||
MOZ_ASSERT(aData->mIDType == ConsoleCallData::eNumber);
|
||||
outerID.AppendInt(aData->mOuterIDNumber);
|
||||
innerID.AppendInt(aData->mInnerIDNumber);
|
||||
}
|
||||
|
||||
if (NS_FAILED(mStorage->RecordPendingEvent(innerID, outerID, eventValue))) {
|
||||
NS_WARNING("Failed to record a console event.");
|
||||
}
|
||||
|
||||
nsXPConnect* xpc = nsXPConnect::XPConnect();
|
||||
nsCOMPtr<nsISupports> wrapper;
|
||||
const nsIID& iid = NS_GET_IID(nsISupports);
|
||||
|
||||
if (NS_FAILED(xpc->WrapJS(cx, eventObj, iid, getter_AddRefs(wrapper)))) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIObserverService> obs =
|
||||
do_GetService("@mozilla.org/observer-service;1");
|
||||
if (obs) {
|
||||
nsAutoString outerID;
|
||||
outerID.AppendInt(mOuterID);
|
||||
|
||||
obs->NotifyObservers(wrapper, "console-api-log-event", outerID.get());
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1689,14 +1694,6 @@ Console::IncreaseCounter(JSContext* aCx, const ConsoleStackEntry& aFrame,
|
|||
return value;
|
||||
}
|
||||
|
||||
void
|
||||
Console::ClearConsoleData()
|
||||
{
|
||||
while (ConsoleCallData* data = mQueuedCalls.popFirst()) {
|
||||
delete data;
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
Console::ShouldIncludeStackTrace(MethodName aMethodName)
|
||||
{
|
||||
|
@ -1711,5 +1708,24 @@ Console::ShouldIncludeStackTrace(MethodName aMethodName)
|
|||
}
|
||||
}
|
||||
|
||||
nsIXPConnectJSObjectHolder*
|
||||
Console::GetOrCreateSandbox(JSContext* aCx, nsIPrincipal* aPrincipal)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
if (!mSandbox) {
|
||||
nsIXPConnect* xpc = nsContentUtils::XPConnect();
|
||||
MOZ_ASSERT(xpc, "This should never be null!");
|
||||
|
||||
nsresult rv = xpc->CreateSandbox(aCx, aPrincipal,
|
||||
getter_AddRefs(mSandbox));
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
return mSandbox;
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -12,12 +12,12 @@
|
|||
#include "nsDataHashtable.h"
|
||||
#include "nsHashKeys.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsITimer.h"
|
||||
#include "nsWrapperCache.h"
|
||||
#include "nsDOMNavigationTiming.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
|
||||
class nsIConsoleAPIStorage;
|
||||
class nsIXPConnectJSObjectHolder;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
@ -25,17 +25,14 @@ namespace dom {
|
|||
class ConsoleCallData;
|
||||
struct ConsoleStackEntry;
|
||||
|
||||
class Console MOZ_FINAL : public nsITimerCallback
|
||||
, public nsIObserver
|
||||
class Console MOZ_FINAL : public nsIObserver
|
||||
, public nsWrapperCache
|
||||
{
|
||||
~Console();
|
||||
|
||||
public:
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(Console,
|
||||
nsITimerCallback)
|
||||
NS_DECL_NSITIMERCALLBACK
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Console)
|
||||
NS_DECL_NSIOBSERVER
|
||||
|
||||
explicit Console(nsPIDOMWindow* aWindow);
|
||||
|
@ -131,9 +128,6 @@ private:
|
|||
Method(JSContext* aCx, MethodName aName, const nsAString& aString,
|
||||
const Sequence<JS::Value>& aData);
|
||||
|
||||
void
|
||||
AppendCallData(ConsoleCallData* aData);
|
||||
|
||||
void
|
||||
ProcessCallData(ConsoleCallData* aData);
|
||||
|
||||
|
@ -191,17 +185,16 @@ private:
|
|||
IncreaseCounter(JSContext* aCx, const ConsoleStackEntry& aFrame,
|
||||
const nsTArray<JS::Heap<JS::Value>>& aArguments);
|
||||
|
||||
void
|
||||
ClearConsoleData();
|
||||
|
||||
bool
|
||||
ShouldIncludeStackTrace(MethodName aMethodName);
|
||||
|
||||
nsCOMPtr<nsPIDOMWindow> mWindow;
|
||||
nsCOMPtr<nsITimer> mTimer;
|
||||
nsCOMPtr<nsIConsoleAPIStorage> mStorage;
|
||||
nsIXPConnectJSObjectHolder*
|
||||
GetOrCreateSandbox(JSContext* aCx, nsIPrincipal* aPrincipal);
|
||||
|
||||
nsCOMPtr<nsPIDOMWindow> mWindow;
|
||||
nsCOMPtr<nsIConsoleAPIStorage> mStorage;
|
||||
nsCOMPtr<nsIXPConnectJSObjectHolder> mSandbox;
|
||||
|
||||
LinkedList<ConsoleCallData> mQueuedCalls;
|
||||
nsDataHashtable<nsStringHashKey, DOMHighResTimeStamp> mTimerRegistry;
|
||||
nsDataHashtable<nsStringHashKey, uint32_t> mCounterRegistry;
|
||||
|
||||
|
@ -209,6 +202,7 @@ private:
|
|||
uint64_t mInnerID;
|
||||
|
||||
friend class ConsoleCallData;
|
||||
friend class ConsoleRunnable;
|
||||
friend class ConsoleCallDataRunnable;
|
||||
friend class ConsoleProfileRunnable;
|
||||
};
|
||||
|
|
|
@ -11,9 +11,18 @@ let Cc = Components.classes;
|
|||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
// The console API events have to be scheduled when stored using
|
||||
// |recordPendingEvent|.
|
||||
const CALL_DELAY = 15 // milliseconds
|
||||
|
||||
// This constant tells how many messages to process in a single timer execution.
|
||||
const MESSAGES_IN_INTERVAL = 1500
|
||||
|
||||
const STORAGE_MAX_EVENTS = 200;
|
||||
|
||||
var _consoleStorage = new Map();
|
||||
var _consolePendingStorage = new Map();
|
||||
var _timer;
|
||||
|
||||
const CONSOLEAPISTORAGE_CID = Components.ID('{96cf7855-dfa9-4c6d-8276-f9705b4890f2}');
|
||||
|
||||
|
@ -114,7 +123,7 @@ ConsoleAPIStorageService.prototype = {
|
|||
* @param object aEvent
|
||||
* A JavaScript object you want to store.
|
||||
*/
|
||||
recordEvent: function CS_recordEvent(aId, aEvent)
|
||||
recordEvent: function CS_recordEvent(aId, aOuterId, aEvent)
|
||||
{
|
||||
if (!_consoleStorage.has(aId)) {
|
||||
_consoleStorage.set(aId, []);
|
||||
|
@ -128,9 +137,55 @@ ConsoleAPIStorageService.prototype = {
|
|||
storage.shift();
|
||||
}
|
||||
|
||||
Services.obs.notifyObservers(aEvent, "console-api-log-event", aOuterId);
|
||||
Services.obs.notifyObservers(aEvent, "console-storage-cache-event", aId);
|
||||
},
|
||||
|
||||
/**
|
||||
* Similar to recordEvent, but these events are scheduled and stored any
|
||||
* CALL_DELAY millisecs.
|
||||
*/
|
||||
recordPendingEvent: function CS_recordPendingEvent(aId, aOuterId, aEvent)
|
||||
{
|
||||
if (!_consolePendingStorage.has(aId)) {
|
||||
_consolePendingStorage.set(aId, []);
|
||||
}
|
||||
|
||||
let storage = _consolePendingStorage.get(aId);
|
||||
storage.push({ outerId: aOuterId, event: aEvent });
|
||||
|
||||
if (!_timer) {
|
||||
_timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
|
||||
}
|
||||
|
||||
let self = this;
|
||||
_timer.initWithCallback(function() { self.flushPendingEvents(); },
|
||||
CALL_DELAY, Ci.nsITimer.TYPE_REPEATING_SLACK);
|
||||
},
|
||||
|
||||
/**
|
||||
* Processes the pending event queue.
|
||||
*/
|
||||
flushPendingEvents: function CS_flushPendingEvents()
|
||||
{
|
||||
for (let [id, objs] of _consolePendingStorage) {
|
||||
for (let i = 0; i < objs.length && i < MESSAGES_IN_INTERVAL; ++i) {
|
||||
this.recordEvent(id, objs[i].outerId, objs[i].event);
|
||||
}
|
||||
|
||||
if (objs.length <= MESSAGES_IN_INTERVAL) {
|
||||
_consolePendingStorage.delete(id);
|
||||
} else {
|
||||
_consolePendingStorage.set(id, objs.splice(MESSAGES_IN_INTERVAL));
|
||||
}
|
||||
}
|
||||
|
||||
if (_timer && _consolePendingStorage.size == 0) {
|
||||
_timer.cancel();
|
||||
_timer = null;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Clear storage data for the given window.
|
||||
*
|
||||
|
|
|
@ -84,25 +84,25 @@ public:
|
|||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(QuadBounds, DOMRectReadOnly)
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
virtual double X() const
|
||||
virtual double X() const MOZ_OVERRIDE
|
||||
{
|
||||
double x1, x2;
|
||||
GetHorizontalMinMax(&x1, &x2);
|
||||
return x1;
|
||||
}
|
||||
virtual double Y() const
|
||||
virtual double Y() const MOZ_OVERRIDE
|
||||
{
|
||||
double y1, y2;
|
||||
GetVerticalMinMax(&y1, &y2);
|
||||
return y1;
|
||||
}
|
||||
virtual double Width() const
|
||||
virtual double Width() const MOZ_OVERRIDE
|
||||
{
|
||||
double x1, x2;
|
||||
GetHorizontalMinMax(&x1, &x2);
|
||||
return x2 - x1;
|
||||
}
|
||||
virtual double Height() const
|
||||
virtual double Height() const MOZ_OVERRIDE
|
||||
{
|
||||
double y1, y2;
|
||||
GetVerticalMinMax(&y1, &y2);
|
||||
|
|
|
@ -24,7 +24,7 @@ public:
|
|||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMStringList)
|
||||
|
||||
virtual JSObject* WrapObject(JSContext* aCx);
|
||||
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
|
||||
nsISupports* GetParentObject()
|
||||
{
|
||||
return nullptr;
|
||||
|
|
|
@ -112,7 +112,7 @@ public:
|
|||
return;
|
||||
}
|
||||
|
||||
virtual Element* GetNameSpaceElement()
|
||||
virtual Element* GetNameSpaceElement() MOZ_OVERRIDE
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -3078,8 +3078,10 @@ GetFullScreenError(nsIDocument* aDoc)
|
|||
}
|
||||
|
||||
void
|
||||
Element::MozRequestFullScreen(const RequestFullscreenOptions& aOptions)
|
||||
Element::MozRequestFullScreen(JSContext* aCx, JS::Handle<JS::Value> aOptions,
|
||||
ErrorResult& aError)
|
||||
{
|
||||
MOZ_ASSERT_IF(!aCx, aOptions.isNullOrUndefined());
|
||||
// Only grant full-screen requests if this is called from inside a trusted
|
||||
// event handler (i.e. inside an event handler for a user initiated event).
|
||||
// This stops the full-screen from being abused similar to the popups of old,
|
||||
|
@ -3103,13 +3105,23 @@ Element::MozRequestFullScreen(const RequestFullscreenOptions& aOptions)
|
|||
}
|
||||
|
||||
FullScreenOptions opts;
|
||||
if (aOptions.mVrDisplay) {
|
||||
opts.mVRHMDDevice = aOptions.mVrDisplay->GetHMD();
|
||||
RequestFullscreenOptions fsOptions;
|
||||
|
||||
// We need to check if options is convertible to a dict first before
|
||||
// trying to init fsOptions; otherwise Init() would throw, and we want to
|
||||
// silently ignore non-dictionary values
|
||||
if (aCx && IsConvertibleToDictionary(aCx, aOptions)) {
|
||||
if (!fsOptions.Init(aCx, aOptions)) {
|
||||
aError.Throw(NS_ERROR_FAILURE);
|
||||
return;
|
||||
}
|
||||
|
||||
if (fsOptions.mVrDisplay) {
|
||||
opts.mVRHMDDevice = fsOptions.mVrDisplay->GetHMD();
|
||||
}
|
||||
}
|
||||
|
||||
OwnerDoc()->AsyncRequestFullScreen(this, opts);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -159,7 +159,7 @@ public:
|
|||
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ELEMENT_IID)
|
||||
|
||||
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
|
||||
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) MOZ_OVERRIDE;
|
||||
|
||||
/**
|
||||
* Method to get the full state of this element. See mozilla/EventStates.h
|
||||
|
@ -725,7 +725,10 @@ public:
|
|||
nsIPresShell::SetCapturingContent(nullptr, 0);
|
||||
}
|
||||
}
|
||||
void MozRequestFullScreen(const RequestFullscreenOptions& aOptions);
|
||||
|
||||
// aCx == nullptr is allowed only if aOptions.isNullOrUndefined()
|
||||
void MozRequestFullScreen(JSContext* aCx, JS::Handle<JS::Value> aOptions,
|
||||
ErrorResult& aError);
|
||||
void MozRequestPointerLock();
|
||||
Attr* GetAttributeNode(const nsAString& aName);
|
||||
already_AddRefed<Attr> SetAttributeNode(Attr& aNewAttr,
|
||||
|
@ -1211,7 +1214,7 @@ protected:
|
|||
|
||||
nsIFrame* GetStyledFrame();
|
||||
|
||||
virtual Element* GetNameSpaceElement()
|
||||
virtual Element* GetNameSpaceElement() MOZ_OVERRIDE
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
@ -1311,9 +1314,9 @@ public:
|
|||
NS_DECL_NSIDOMNODELIST
|
||||
|
||||
// nsINodeList
|
||||
virtual nsIContent* Item(uint32_t aIndex);
|
||||
virtual int32_t IndexOf(nsIContent* aContent);
|
||||
virtual nsINode* GetParentObject() { return mParent; }
|
||||
virtual nsIContent* Item(uint32_t aIndex) MOZ_OVERRIDE;
|
||||
virtual int32_t IndexOf(nsIContent* aContent) MOZ_OVERRIDE;
|
||||
virtual nsINode* GetParentObject() MOZ_OVERRIDE { return mParent; }
|
||||
virtual uint32_t Length() const;
|
||||
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
|
||||
protected:
|
||||
|
@ -1467,43 +1470,45 @@ _elementName::Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const
|
|||
|
||||
#define NS_FORWARD_NSIDOMELEMENT_TO_GENERIC \
|
||||
typedef mozilla::dom::Element Element; \
|
||||
NS_IMETHOD GetTagName(nsAString& aTagName) MOZ_FINAL \
|
||||
NS_IMETHOD GetTagName(nsAString& aTagName) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
Element::GetTagName(aTagName); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD GetId(nsAString& aId) MOZ_FINAL \
|
||||
NS_IMETHOD GetId(nsAString& aId) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
Element::GetId(aId); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD SetId(const nsAString& aId) MOZ_FINAL \
|
||||
NS_IMETHOD SetId(const nsAString& aId) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
Element::SetId(aId); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD GetClassName(nsAString& aClassName) MOZ_FINAL \
|
||||
NS_IMETHOD GetClassName(nsAString& aClassName) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
Element::GetClassName(aClassName); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD SetClassName(const nsAString& aClassName) MOZ_FINAL \
|
||||
NS_IMETHOD SetClassName(const nsAString& aClassName) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
Element::SetClassName(aClassName); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD GetClassList(nsISupports** aClassList) MOZ_FINAL \
|
||||
NS_IMETHOD GetClassList(nsISupports** aClassList) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
Element::GetClassList(aClassList); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD GetAttributes(nsIDOMMozNamedAttrMap** aAttributes) MOZ_FINAL \
|
||||
MOZ_OVERRIDE \
|
||||
{ \
|
||||
NS_ADDREF(*aAttributes = Attributes()); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
using Element::GetAttribute; \
|
||||
NS_IMETHOD GetAttribute(const nsAString& name, nsAString& _retval) MOZ_FINAL \
|
||||
MOZ_OVERRIDE \
|
||||
{ \
|
||||
nsString attr; \
|
||||
GetAttribute(name, attr); \
|
||||
|
@ -1512,13 +1517,13 @@ NS_IMETHOD GetAttribute(const nsAString& name, nsAString& _retval) MOZ_FINAL \
|
|||
} \
|
||||
NS_IMETHOD GetAttributeNS(const nsAString& namespaceURI, \
|
||||
const nsAString& localName, \
|
||||
nsAString& _retval) MOZ_FINAL \
|
||||
nsAString& _retval) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
Element::GetAttributeNS(namespaceURI, localName, _retval); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD SetAttribute(const nsAString& name, \
|
||||
const nsAString& value) \
|
||||
const nsAString& value) MOZ_OVERRIDE \
|
||||
{ \
|
||||
mozilla::ErrorResult rv; \
|
||||
Element::SetAttribute(name, value, rv); \
|
||||
|
@ -1526,14 +1531,14 @@ NS_IMETHOD SetAttribute(const nsAString& name, \
|
|||
} \
|
||||
NS_IMETHOD SetAttributeNS(const nsAString& namespaceURI, \
|
||||
const nsAString& qualifiedName, \
|
||||
const nsAString& value) MOZ_FINAL \
|
||||
const nsAString& value) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
mozilla::ErrorResult rv; \
|
||||
Element::SetAttributeNS(namespaceURI, qualifiedName, value, rv); \
|
||||
return rv.ErrorCode(); \
|
||||
} \
|
||||
using Element::RemoveAttribute; \
|
||||
NS_IMETHOD RemoveAttribute(const nsAString& name) MOZ_FINAL \
|
||||
NS_IMETHOD RemoveAttribute(const nsAString& name) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
mozilla::ErrorResult rv; \
|
||||
RemoveAttribute(name, rv); \
|
||||
|
@ -1541,6 +1546,7 @@ NS_IMETHOD RemoveAttribute(const nsAString& name) MOZ_FINAL \
|
|||
} \
|
||||
NS_IMETHOD RemoveAttributeNS(const nsAString& namespaceURI, \
|
||||
const nsAString& localName) MOZ_FINAL \
|
||||
MOZ_OVERRIDE \
|
||||
{ \
|
||||
mozilla::ErrorResult rv; \
|
||||
Element::RemoveAttributeNS(namespaceURI, localName, rv); \
|
||||
|
@ -1548,31 +1554,31 @@ NS_IMETHOD RemoveAttributeNS(const nsAString& namespaceURI, \
|
|||
} \
|
||||
using Element::HasAttribute; \
|
||||
NS_IMETHOD HasAttribute(const nsAString& name, \
|
||||
bool* _retval) MOZ_FINAL \
|
||||
bool* _retval) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
*_retval = HasAttribute(name); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD HasAttributeNS(const nsAString& namespaceURI, \
|
||||
const nsAString& localName, \
|
||||
bool* _retval) MOZ_FINAL \
|
||||
bool* _retval) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
*_retval = Element::HasAttributeNS(namespaceURI, localName); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD HasAttributes(bool* _retval) MOZ_FINAL \
|
||||
NS_IMETHOD HasAttributes(bool* _retval) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
*_retval = Element::HasAttributes(); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD GetAttributeNode(const nsAString& name, \
|
||||
nsIDOMAttr** _retval) MOZ_FINAL \
|
||||
nsIDOMAttr** _retval) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
NS_IF_ADDREF(*_retval = Element::GetAttributeNode(name)); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD SetAttributeNode(nsIDOMAttr* newAttr, \
|
||||
nsIDOMAttr** _retval) MOZ_FINAL \
|
||||
nsIDOMAttr** _retval) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
if (!newAttr) { \
|
||||
return NS_ERROR_INVALID_POINTER; \
|
||||
|
@ -1583,7 +1589,7 @@ NS_IMETHOD SetAttributeNode(nsIDOMAttr* newAttr, \
|
|||
return rv.ErrorCode(); \
|
||||
} \
|
||||
NS_IMETHOD RemoveAttributeNode(nsIDOMAttr* oldAttr, \
|
||||
nsIDOMAttr** _retval) MOZ_FINAL \
|
||||
nsIDOMAttr** _retval) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
if (!oldAttr) { \
|
||||
return NS_ERROR_INVALID_POINTER; \
|
||||
|
@ -1595,14 +1601,14 @@ NS_IMETHOD RemoveAttributeNode(nsIDOMAttr* oldAttr, \
|
|||
} \
|
||||
NS_IMETHOD GetAttributeNodeNS(const nsAString& namespaceURI, \
|
||||
const nsAString& localName, \
|
||||
nsIDOMAttr** _retval) MOZ_FINAL \
|
||||
nsIDOMAttr** _retval) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
NS_IF_ADDREF(*_retval = Element::GetAttributeNodeNS(namespaceURI, \
|
||||
localName)); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD SetAttributeNodeNS(nsIDOMAttr* newAttr, \
|
||||
nsIDOMAttr** _retval) MOZ_FINAL \
|
||||
nsIDOMAttr** _retval) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
mozilla::ErrorResult rv; \
|
||||
mozilla::dom::Attr* attr = static_cast<mozilla::dom::Attr*>(newAttr); \
|
||||
|
@ -1611,6 +1617,7 @@ NS_IMETHOD SetAttributeNodeNS(nsIDOMAttr* newAttr, \
|
|||
} \
|
||||
NS_IMETHOD GetElementsByTagName(const nsAString& name, \
|
||||
nsIDOMHTMLCollection** _retval) MOZ_FINAL \
|
||||
MOZ_OVERRIDE \
|
||||
{ \
|
||||
Element::GetElementsByTagName(name, _retval); \
|
||||
return NS_OK; \
|
||||
|
@ -1618,21 +1625,25 @@ NS_IMETHOD GetElementsByTagName(const nsAString& name, \
|
|||
NS_IMETHOD GetElementsByTagNameNS(const nsAString& namespaceURI, \
|
||||
const nsAString& localName, \
|
||||
nsIDOMHTMLCollection** _retval) MOZ_FINAL \
|
||||
MOZ_OVERRIDE\
|
||||
{ \
|
||||
return Element::GetElementsByTagNameNS(namespaceURI, localName, \
|
||||
_retval); \
|
||||
} \
|
||||
NS_IMETHOD GetElementsByClassName(const nsAString& classes, \
|
||||
nsIDOMHTMLCollection** _retval) MOZ_FINAL \
|
||||
MOZ_OVERRIDE\
|
||||
{ \
|
||||
return Element::GetElementsByClassName(classes, _retval); \
|
||||
} \
|
||||
NS_IMETHOD GetChildElements(nsIDOMNodeList** aChildElements) MOZ_FINAL \
|
||||
MOZ_OVERRIDE \
|
||||
{ \
|
||||
nsIHTMLCollection* list = FragmentOrElement::Children(); \
|
||||
return CallQueryInterface(list, aChildElements); \
|
||||
} \
|
||||
NS_IMETHOD GetFirstElementChild(nsIDOMElement** aFirstElementChild) MOZ_FINAL \
|
||||
MOZ_OVERRIDE \
|
||||
{ \
|
||||
Element* element = Element::GetFirstElementChild(); \
|
||||
if (!element) { \
|
||||
|
@ -1642,6 +1653,7 @@ NS_IMETHOD GetFirstElementChild(nsIDOMElement** aFirstElementChild) MOZ_FINAL \
|
|||
return CallQueryInterface(element, aFirstElementChild); \
|
||||
} \
|
||||
NS_IMETHOD GetLastElementChild(nsIDOMElement** aLastElementChild) MOZ_FINAL \
|
||||
MOZ_OVERRIDE \
|
||||
{ \
|
||||
Element* element = Element::GetLastElementChild(); \
|
||||
if (!element) { \
|
||||
|
@ -1651,7 +1663,7 @@ NS_IMETHOD GetLastElementChild(nsIDOMElement** aLastElementChild) MOZ_FINAL \
|
|||
return CallQueryInterface(element, aLastElementChild); \
|
||||
} \
|
||||
NS_IMETHOD GetPreviousElementSibling(nsIDOMElement** aPreviousElementSibling) \
|
||||
MOZ_FINAL \
|
||||
MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
Element* element = Element::GetPreviousElementSibling(); \
|
||||
if (!element) { \
|
||||
|
@ -1661,7 +1673,7 @@ NS_IMETHOD GetPreviousElementSibling(nsIDOMElement** aPreviousElementSibling) \
|
|||
return CallQueryInterface(element, aPreviousElementSibling); \
|
||||
} \
|
||||
NS_IMETHOD GetNextElementSibling(nsIDOMElement** aNextElementSibling) \
|
||||
MOZ_FINAL \
|
||||
MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
Element* element = Element::GetNextElementSibling(); \
|
||||
if (!element) { \
|
||||
|
@ -1671,121 +1683,125 @@ NS_IMETHOD GetNextElementSibling(nsIDOMElement** aNextElementSibling) \
|
|||
return CallQueryInterface(element, aNextElementSibling); \
|
||||
} \
|
||||
NS_IMETHOD GetChildElementCount(uint32_t* aChildElementCount) MOZ_FINAL \
|
||||
MOZ_OVERRIDE \
|
||||
{ \
|
||||
*aChildElementCount = Element::ChildElementCount(); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD MozRemove() MOZ_FINAL \
|
||||
NS_IMETHOD MozRemove() MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
nsINode::Remove(); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD GetClientRects(nsIDOMClientRectList** _retval) MOZ_FINAL \
|
||||
MOZ_OVERRIDE \
|
||||
{ \
|
||||
*_retval = Element::GetClientRects().take(); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD GetBoundingClientRect(nsIDOMClientRect** _retval) MOZ_FINAL \
|
||||
MOZ_OVERRIDE \
|
||||
{ \
|
||||
*_retval = Element::GetBoundingClientRect().take(); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD GetScrollTop(int32_t* aScrollTop) MOZ_FINAL \
|
||||
NS_IMETHOD GetScrollTop(int32_t* aScrollTop) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
*aScrollTop = Element::ScrollTop(); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD SetScrollTop(int32_t aScrollTop) MOZ_FINAL \
|
||||
NS_IMETHOD SetScrollTop(int32_t aScrollTop) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
Element::SetScrollTop(aScrollTop); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD GetScrollLeft(int32_t* aScrollLeft) MOZ_FINAL \
|
||||
NS_IMETHOD GetScrollLeft(int32_t* aScrollLeft) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
*aScrollLeft = Element::ScrollLeft(); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD SetScrollLeft(int32_t aScrollLeft) MOZ_FINAL \
|
||||
NS_IMETHOD SetScrollLeft(int32_t aScrollLeft) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
Element::SetScrollLeft(aScrollLeft); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD GetScrollWidth(int32_t* aScrollWidth) MOZ_FINAL \
|
||||
NS_IMETHOD GetScrollWidth(int32_t* aScrollWidth) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
*aScrollWidth = Element::ScrollWidth(); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD GetScrollHeight(int32_t* aScrollHeight) MOZ_FINAL \
|
||||
NS_IMETHOD GetScrollHeight(int32_t* aScrollHeight) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
*aScrollHeight = Element::ScrollHeight(); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD GetClientTop(int32_t* aClientTop) MOZ_FINAL \
|
||||
NS_IMETHOD GetClientTop(int32_t* aClientTop) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
*aClientTop = Element::ClientTop(); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD GetClientLeft(int32_t* aClientLeft) MOZ_FINAL \
|
||||
NS_IMETHOD GetClientLeft(int32_t* aClientLeft) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
*aClientLeft = Element::ClientLeft(); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD GetClientWidth(int32_t* aClientWidth) MOZ_FINAL \
|
||||
NS_IMETHOD GetClientWidth(int32_t* aClientWidth) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
*aClientWidth = Element::ClientWidth(); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD GetClientHeight(int32_t* aClientHeight) MOZ_FINAL \
|
||||
NS_IMETHOD GetClientHeight(int32_t* aClientHeight) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
*aClientHeight = Element::ClientHeight(); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD GetScrollLeftMax(int32_t* aScrollLeftMax) MOZ_FINAL \
|
||||
NS_IMETHOD GetScrollLeftMax(int32_t* aScrollLeftMax) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
*aScrollLeftMax = Element::ScrollLeftMax(); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD GetScrollTopMax(int32_t* aScrollTopMax) MOZ_FINAL \
|
||||
NS_IMETHOD GetScrollTopMax(int32_t* aScrollTopMax) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
*aScrollTopMax = Element::ScrollTopMax(); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD MozMatchesSelector(const nsAString& selector, \
|
||||
bool* _retval) MOZ_FINAL \
|
||||
bool* _retval) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
mozilla::ErrorResult rv; \
|
||||
*_retval = Element::MozMatchesSelector(selector, rv); \
|
||||
return rv.ErrorCode(); \
|
||||
} \
|
||||
NS_IMETHOD SetCapture(bool retargetToElement) MOZ_FINAL \
|
||||
NS_IMETHOD SetCapture(bool retargetToElement) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
Element::SetCapture(retargetToElement); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD ReleaseCapture(void) MOZ_FINAL \
|
||||
NS_IMETHOD ReleaseCapture(void) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
Element::ReleaseCapture(); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD MozRequestFullScreen(void) MOZ_FINAL \
|
||||
NS_IMETHOD MozRequestFullScreen(void) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
Element::MozRequestFullScreen(mozilla::dom::RequestFullscreenOptions()); \
|
||||
return NS_OK; \
|
||||
mozilla::ErrorResult rv; \
|
||||
Element::MozRequestFullScreen(nullptr, JS::UndefinedHandleValue, rv); \
|
||||
return rv.ErrorCode(); \
|
||||
} \
|
||||
NS_IMETHOD MozRequestPointerLock(void) MOZ_FINAL \
|
||||
NS_IMETHOD MozRequestPointerLock(void) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
Element::MozRequestPointerLock(); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
using nsINode::QuerySelector; \
|
||||
NS_IMETHOD QuerySelector(const nsAString& aSelector, \
|
||||
nsIDOMElement **aReturn) MOZ_FINAL \
|
||||
nsIDOMElement **aReturn) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
return nsINode::QuerySelector(aSelector, aReturn); \
|
||||
} \
|
||||
using nsINode::QuerySelectorAll; \
|
||||
NS_IMETHOD QuerySelectorAll(const nsAString& aSelector, \
|
||||
nsIDOMNodeList **aReturn) MOZ_FINAL \
|
||||
nsIDOMNodeList **aReturn) MOZ_FINAL MOZ_OVERRIDE \
|
||||
{ \
|
||||
return nsINode::QuerySelectorAll(aSelector, aReturn); \
|
||||
}
|
||||
|
|
|
@ -500,7 +500,7 @@ public:
|
|||
NS_DECL_CYCLE_COLLECTION_CLASS(AsyncVerifyRedirectCallbackFwr)
|
||||
|
||||
// nsIAsyncVerifyRedirectCallback implementation
|
||||
NS_IMETHOD OnRedirectVerifyCallback(nsresult aResult)
|
||||
NS_IMETHOD OnRedirectVerifyCallback(nsresult aResult) MOZ_OVERRIDE
|
||||
{
|
||||
nsresult rv = mEventSource->OnRedirectVerifyCallback(aResult);
|
||||
if (NS_FAILED(rv)) {
|
||||
|
|
|
@ -1083,7 +1083,7 @@ public:
|
|||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
|
||||
NS_IMETHOD CollectReports(nsIMemoryReporterCallback *aCallback,
|
||||
nsISupports *aClosure, bool aAnonymize)
|
||||
nsISupports *aClosure, bool aAnonymize) MOZ_OVERRIDE
|
||||
{
|
||||
typedef FileImplMemory::DataOwner DataOwner;
|
||||
|
||||
|
|
|
@ -439,7 +439,7 @@ public:
|
|||
return mIsFile && mLastModificationDate == UINT64_MAX;
|
||||
}
|
||||
|
||||
virtual bool IsFile() const
|
||||
virtual bool IsFile() const MOZ_OVERRIDE
|
||||
{
|
||||
return mIsFile;
|
||||
}
|
||||
|
@ -460,13 +460,13 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
virtual bool IsSizeUnknown() const
|
||||
virtual bool IsSizeUnknown() const MOZ_OVERRIDE
|
||||
{
|
||||
return mLength == UINT64_MAX;
|
||||
}
|
||||
|
||||
virtual void Unlink() {}
|
||||
virtual void Traverse(nsCycleCollectionTraversalCallback &aCb) {}
|
||||
virtual void Unlink() MOZ_OVERRIDE {}
|
||||
virtual void Traverse(nsCycleCollectionTraversalCallback &aCb) MOZ_OVERRIDE {}
|
||||
|
||||
protected:
|
||||
virtual ~FileImplBase() {}
|
||||
|
|
|
@ -99,7 +99,7 @@ public:
|
|||
|
||||
// nsIWeakReference
|
||||
NS_DECL_NSIWEAKREFERENCE
|
||||
virtual size_t SizeOfOnlyThis(mozilla::MallocSizeOf aMallocSizeOf) const;
|
||||
virtual size_t SizeOfOnlyThis(mozilla::MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
|
||||
|
||||
void NoticeNodeDestruction()
|
||||
{
|
||||
|
|
|
@ -82,7 +82,7 @@ public:
|
|||
, mFailed(false)
|
||||
{}
|
||||
|
||||
NS_IMETHOD Run()
|
||||
NS_IMETHOD Run() MOZ_OVERRIDE
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
@ -190,7 +190,7 @@ public:
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHOD Run()
|
||||
NS_IMETHOD Run() MOZ_OVERRIDE
|
||||
{
|
||||
uint64_t imgSize;
|
||||
void* imgData = nullptr;
|
||||
|
|
|
@ -33,9 +33,9 @@ public:
|
|||
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
|
||||
|
||||
|
||||
virtual DOMHighResTimeStamp StartTime() const;
|
||||
virtual DOMHighResTimeStamp StartTime() const MOZ_OVERRIDE;
|
||||
|
||||
virtual DOMHighResTimeStamp Duration() const
|
||||
virtual DOMHighResTimeStamp Duration() const MOZ_OVERRIDE
|
||||
{
|
||||
return ResponseEnd() - StartTime();
|
||||
}
|
||||
|
|
|
@ -1981,7 +1981,7 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Suspend(JSContext* aCx)
|
||||
bool Suspend(JSContext* aCx) MOZ_OVERRIDE
|
||||
{
|
||||
mWebSocketImpl->mWorkerShuttingDown = true;
|
||||
mWebSocketImpl->CloseConnection(nsIWebSocketChannel::CLOSE_GOING_AWAY);
|
||||
|
|
|
@ -86,23 +86,23 @@ public:
|
|||
|
||||
// nsIContentIterator interface methods ------------------------------
|
||||
|
||||
virtual nsresult Init(nsINode* aRoot);
|
||||
virtual nsresult Init(nsINode* aRoot) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult Init(nsIDOMRange* aRange);
|
||||
virtual nsresult Init(nsIDOMRange* aRange) MOZ_OVERRIDE;
|
||||
|
||||
virtual void First();
|
||||
virtual void First() MOZ_OVERRIDE;
|
||||
|
||||
virtual void Last();
|
||||
virtual void Last() MOZ_OVERRIDE;
|
||||
|
||||
virtual void Next();
|
||||
virtual void Next() MOZ_OVERRIDE;
|
||||
|
||||
virtual void Prev();
|
||||
virtual void Prev() MOZ_OVERRIDE;
|
||||
|
||||
virtual nsINode* GetCurrentNode();
|
||||
virtual nsINode* GetCurrentNode() MOZ_OVERRIDE;
|
||||
|
||||
virtual bool IsDone();
|
||||
virtual bool IsDone() MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult PositionAt(nsINode* aCurNode);
|
||||
virtual nsresult PositionAt(nsINode* aCurNode) MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
virtual ~nsContentIterator();
|
||||
|
@ -1113,21 +1113,21 @@ public:
|
|||
|
||||
// nsContentIterator overrides ------------------------------
|
||||
|
||||
virtual nsresult Init(nsINode* aRoot);
|
||||
virtual nsresult Init(nsINode* aRoot) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult Init(nsIDOMRange* aRange);
|
||||
virtual nsresult Init(nsIDOMRange* aRange) MOZ_OVERRIDE;
|
||||
|
||||
virtual void Next();
|
||||
virtual void Next() MOZ_OVERRIDE;
|
||||
|
||||
virtual void Prev();
|
||||
virtual void Prev() MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult PositionAt(nsINode* aCurNode);
|
||||
virtual nsresult PositionAt(nsINode* aCurNode) MOZ_OVERRIDE;
|
||||
|
||||
// Must override these because we don't do PositionAt
|
||||
virtual void First();
|
||||
virtual void First() MOZ_OVERRIDE;
|
||||
|
||||
// Must override these because we don't do PositionAt
|
||||
virtual void Last();
|
||||
virtual void Last() MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
virtual ~nsContentSubtreeIterator() {}
|
||||
|
|
|
@ -339,7 +339,7 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize)
|
||||
nsISupports* aData, bool aAnonymize) MOZ_OVERRIDE
|
||||
{
|
||||
// We don't measure the |EventListenerManager| objects pointed to by the
|
||||
// entries because those references are non-owning.
|
||||
|
@ -411,7 +411,7 @@ class CharsetDetectionObserver MOZ_FINAL : public nsICharsetDetectionObserver
|
|||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD Notify(const char *aCharset, nsDetectionConfident aConf)
|
||||
NS_IMETHOD Notify(const char *aCharset, nsDetectionConfident aConf) MOZ_OVERRIDE
|
||||
{
|
||||
mCharset = aCharset;
|
||||
return NS_OK;
|
||||
|
|
|
@ -285,7 +285,7 @@ public:
|
|||
|
||||
NS_IMETHOD HasInstance(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
|
||||
JSObject *obj, JS::Handle<JS::Value> val, bool *bp,
|
||||
bool *_retval);
|
||||
bool *_retval) MOZ_OVERRIDE;
|
||||
|
||||
static nsIClassInfo *doCreate(nsDOMClassInfoData* aData)
|
||||
{
|
||||
|
|
|
@ -9697,7 +9697,7 @@ class StubCSSLoaderObserver MOZ_FINAL : public nsICSSLoaderObserver {
|
|||
~StubCSSLoaderObserver() {}
|
||||
public:
|
||||
NS_IMETHOD
|
||||
StyleSheetLoaded(CSSStyleSheet*, bool, nsresult)
|
||||
StyleSheetLoaded(CSSStyleSheet*, bool, nsresult) MOZ_OVERRIDE
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -11837,7 +11837,7 @@ public:
|
|||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSICONTENTPERMISSIONREQUEST
|
||||
|
||||
NS_IMETHOD Run()
|
||||
NS_IMETHOD Run() MOZ_OVERRIDE
|
||||
{
|
||||
nsCOMPtr<Element> e = do_QueryReferent(mElement);
|
||||
nsCOMPtr<nsIDocument> d = do_QueryReferent(mDocument);
|
||||
|
|
|
@ -991,23 +991,23 @@ public:
|
|||
int32_t aNamespaceID,
|
||||
nsIContent **aResult) MOZ_OVERRIDE;
|
||||
|
||||
virtual void Sanitize();
|
||||
virtual void Sanitize() MOZ_OVERRIDE;
|
||||
|
||||
virtual void EnumerateSubDocuments(nsSubDocEnumFunc aCallback,
|
||||
void *aData);
|
||||
void *aData) MOZ_OVERRIDE;
|
||||
|
||||
virtual bool CanSavePresentation(nsIRequest *aNewRequest);
|
||||
virtual void Destroy();
|
||||
virtual void RemovedFromDocShell();
|
||||
virtual already_AddRefed<nsILayoutHistoryState> GetLayoutHistoryState() const;
|
||||
virtual bool CanSavePresentation(nsIRequest *aNewRequest) MOZ_OVERRIDE;
|
||||
virtual void Destroy() MOZ_OVERRIDE;
|
||||
virtual void RemovedFromDocShell() MOZ_OVERRIDE;
|
||||
virtual already_AddRefed<nsILayoutHistoryState> GetLayoutHistoryState() const MOZ_OVERRIDE;
|
||||
|
||||
virtual void BlockOnload();
|
||||
virtual void UnblockOnload(bool aFireSync);
|
||||
virtual void BlockOnload() MOZ_OVERRIDE;
|
||||
virtual void UnblockOnload(bool aFireSync) MOZ_OVERRIDE;
|
||||
|
||||
virtual void AddStyleRelevantLink(mozilla::dom::Link* aLink);
|
||||
virtual void ForgetLink(mozilla::dom::Link* aLink);
|
||||
virtual void AddStyleRelevantLink(mozilla::dom::Link* aLink) MOZ_OVERRIDE;
|
||||
virtual void ForgetLink(mozilla::dom::Link* aLink) MOZ_OVERRIDE;
|
||||
|
||||
void ClearBoxObjectFor(nsIContent* aContent);
|
||||
virtual void ClearBoxObjectFor(nsIContent* aContent) MOZ_OVERRIDE;
|
||||
|
||||
virtual already_AddRefed<mozilla::dom::BoxObject>
|
||||
GetBoxObjectFor(mozilla::dom::Element* aElement,
|
||||
|
@ -1016,31 +1016,31 @@ public:
|
|||
virtual Element*
|
||||
GetAnonymousElementByAttribute(nsIContent* aElement,
|
||||
nsIAtom* aAttrName,
|
||||
const nsAString& aAttrValue) const;
|
||||
const nsAString& aAttrValue) const MOZ_OVERRIDE;
|
||||
|
||||
virtual Element* ElementFromPointHelper(float aX, float aY,
|
||||
bool aIgnoreRootScrollFrame,
|
||||
bool aFlushLayout);
|
||||
bool aFlushLayout) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult NodesFromRectHelper(float aX, float aY,
|
||||
float aTopSize, float aRightSize,
|
||||
float aBottomSize, float aLeftSize,
|
||||
bool aIgnoreRootScrollFrame,
|
||||
bool aFlushLayout,
|
||||
nsIDOMNodeList** aReturn);
|
||||
nsIDOMNodeList** aReturn) MOZ_OVERRIDE;
|
||||
|
||||
virtual void FlushSkinBindings();
|
||||
virtual void FlushSkinBindings() MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult InitializeFrameLoader(nsFrameLoader* aLoader);
|
||||
virtual nsresult FinalizeFrameLoader(nsFrameLoader* aLoader);
|
||||
virtual void TryCancelFrameLoaderInitialization(nsIDocShell* aShell);
|
||||
virtual bool FrameLoaderScheduledToBeFinalized(nsIDocShell* aShell);
|
||||
virtual nsresult InitializeFrameLoader(nsFrameLoader* aLoader) MOZ_OVERRIDE;
|
||||
virtual nsresult FinalizeFrameLoader(nsFrameLoader* aLoader) MOZ_OVERRIDE;
|
||||
virtual void TryCancelFrameLoaderInitialization(nsIDocShell* aShell) MOZ_OVERRIDE;
|
||||
virtual bool FrameLoaderScheduledToBeFinalized(nsIDocShell* aShell) MOZ_OVERRIDE;
|
||||
virtual nsIDocument*
|
||||
RequestExternalResource(nsIURI* aURI,
|
||||
nsINode* aRequestingNode,
|
||||
ExternalResourceLoad** aPendingLoad);
|
||||
ExternalResourceLoad** aPendingLoad) MOZ_OVERRIDE;
|
||||
virtual void
|
||||
EnumerateExternalResources(nsSubDocEnumFunc aCallback, void* aData);
|
||||
EnumerateExternalResources(nsSubDocEnumFunc aCallback, void* aData) MOZ_OVERRIDE;
|
||||
|
||||
nsTArray<nsCString> mHostObjectURIs;
|
||||
|
||||
|
@ -1049,7 +1049,7 @@ public:
|
|||
nsSMILAnimationController* GetAnimationController() MOZ_OVERRIDE;
|
||||
|
||||
virtual mozilla::PendingPlayerTracker*
|
||||
GetPendingPlayerTracker() MOZ_FINAL
|
||||
GetPendingPlayerTracker() MOZ_FINAL MOZ_OVERRIDE
|
||||
{
|
||||
return mPendingPlayerTracker;
|
||||
}
|
||||
|
@ -1135,9 +1135,9 @@ public:
|
|||
virtual void MozSetImageElement(const nsAString& aImageElementId,
|
||||
Element* aElement) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult AddImage(imgIRequest* aImage);
|
||||
virtual nsresult RemoveImage(imgIRequest* aImage, uint32_t aFlags);
|
||||
virtual nsresult SetImageLockingState(bool aLocked);
|
||||
virtual nsresult AddImage(imgIRequest* aImage) MOZ_OVERRIDE;
|
||||
virtual nsresult RemoveImage(imgIRequest* aImage, uint32_t aFlags) MOZ_OVERRIDE;
|
||||
virtual nsresult SetImageLockingState(bool aLocked) MOZ_OVERRIDE;
|
||||
|
||||
// AddPlugin adds a plugin-related element to mPlugins when the element is
|
||||
// added to the tree.
|
||||
|
@ -1312,25 +1312,25 @@ public:
|
|||
mozilla::ErrorResult& rv) MOZ_OVERRIDE;
|
||||
virtual void UseRegistryFromDocument(nsIDocument* aDocument) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsIDocument* MasterDocument()
|
||||
virtual nsIDocument* MasterDocument() MOZ_OVERRIDE
|
||||
{
|
||||
return mMasterDocument ? mMasterDocument.get()
|
||||
: this;
|
||||
}
|
||||
|
||||
virtual void SetMasterDocument(nsIDocument* master)
|
||||
virtual void SetMasterDocument(nsIDocument* master) MOZ_OVERRIDE
|
||||
{
|
||||
MOZ_ASSERT(master);
|
||||
mMasterDocument = master;
|
||||
UseRegistryFromDocument(mMasterDocument);
|
||||
}
|
||||
|
||||
virtual bool IsMasterDocument()
|
||||
virtual bool IsMasterDocument() MOZ_OVERRIDE
|
||||
{
|
||||
return !mMasterDocument;
|
||||
}
|
||||
|
||||
virtual mozilla::dom::ImportManager* ImportManager()
|
||||
virtual mozilla::dom::ImportManager* ImportManager() MOZ_OVERRIDE
|
||||
{
|
||||
if (mImportManager) {
|
||||
MOZ_ASSERT(!mMasterDocument, "Only the master document has ImportManager set");
|
||||
|
@ -1349,22 +1349,22 @@ public:
|
|||
return mImportManager.get();
|
||||
}
|
||||
|
||||
virtual bool HasSubImportLink(nsINode* aLink)
|
||||
virtual bool HasSubImportLink(nsINode* aLink) MOZ_OVERRIDE
|
||||
{
|
||||
return mSubImportLinks.Contains(aLink);
|
||||
}
|
||||
|
||||
virtual uint32_t IndexOfSubImportLink(nsINode* aLink)
|
||||
virtual uint32_t IndexOfSubImportLink(nsINode* aLink) MOZ_OVERRIDE
|
||||
{
|
||||
return mSubImportLinks.IndexOf(aLink);
|
||||
}
|
||||
|
||||
virtual void AddSubImportLink(nsINode* aLink)
|
||||
virtual void AddSubImportLink(nsINode* aLink) MOZ_OVERRIDE
|
||||
{
|
||||
mSubImportLinks.AppendElement(aLink);
|
||||
}
|
||||
|
||||
virtual nsINode* GetSubImportLink(uint32_t aIdx)
|
||||
virtual nsINode* GetSubImportLink(uint32_t aIdx) MOZ_OVERRIDE
|
||||
{
|
||||
return aIdx < mSubImportLinks.Length() ? mSubImportLinks[aIdx].get()
|
||||
: nullptr;
|
||||
|
@ -1562,7 +1562,7 @@ public:
|
|||
// ex. <x-button>, <button is="x-button> (type extension)
|
||||
virtual void SetupCustomElement(Element* aElement,
|
||||
uint32_t aNamespaceID,
|
||||
const nsAString* aTypeExtension);
|
||||
const nsAString* aTypeExtension) MOZ_OVERRIDE;
|
||||
|
||||
static bool IsWebComponentsEnabled(JSContext* aCx, JSObject* aObject);
|
||||
|
||||
|
|
|
@ -1855,7 +1855,7 @@ public:
|
|||
const nsAString& aMessage,
|
||||
const mozilla::dom::StructuredCloneData& aData,
|
||||
JS::Handle<JSObject *> aCpows,
|
||||
nsIPrincipal* aPrincipal)
|
||||
nsIPrincipal* aPrincipal) MOZ_OVERRIDE
|
||||
{
|
||||
if (!nsFrameMessageManager::sPendingSameProcessAsyncMessages) {
|
||||
nsFrameMessageManager::sPendingSameProcessAsyncMessages = new nsTArray<nsCOMPtr<nsIRunnable> >;
|
||||
|
|
|
@ -427,7 +427,7 @@ class nsScriptCacheCleaner MOZ_FINAL : public nsIObserver
|
|||
|
||||
NS_IMETHODIMP Observe(nsISupports *aSubject,
|
||||
const char *aTopic,
|
||||
const char16_t *aData)
|
||||
const char16_t *aData) MOZ_OVERRIDE
|
||||
{
|
||||
nsFrameScriptExecutor::Shutdown();
|
||||
return NS_OK;
|
||||
|
|
|
@ -41,11 +41,11 @@ public:
|
|||
// nsIContent overrides
|
||||
virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
|
||||
nsIContent* aBindingParent,
|
||||
bool aCompileEventHandlers);
|
||||
virtual void UnbindFromTree(bool aDeep, bool aNullParent);
|
||||
virtual EventStates IntrinsicState() const;
|
||||
bool aCompileEventHandlers) MOZ_OVERRIDE;
|
||||
virtual void UnbindFromTree(bool aDeep, bool aNullParent) MOZ_OVERRIDE;
|
||||
virtual EventStates IntrinsicState() const MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult PreHandleEvent(EventChainPreVisitor& aVisitor)
|
||||
virtual nsresult PreHandleEvent(EventChainPreVisitor& aVisitor) MOZ_OVERRIDE
|
||||
{
|
||||
MOZ_ASSERT(IsInNativeAnonymousSubtree());
|
||||
if (aVisitor.mEvent->message == NS_LOAD ||
|
||||
|
|
|
@ -228,7 +228,7 @@ public:
|
|||
protected:
|
||||
virtual ~nsGenericDOMDataNode();
|
||||
|
||||
virtual mozilla::dom::Element* GetNameSpaceElement()
|
||||
virtual mozilla::dom::Element* GetNameSpaceElement() MOZ_OVERRIDE
|
||||
{
|
||||
nsINode *parent = GetParentNode();
|
||||
|
||||
|
|
|
@ -480,14 +480,14 @@ class nsGlobalWindowObserver MOZ_FINAL : public nsIObserver,
|
|||
public:
|
||||
explicit nsGlobalWindowObserver(nsGlobalWindow* aWindow) : mWindow(aWindow) {}
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_IMETHOD Observe(nsISupports* aSubject, const char* aTopic, const char16_t* aData)
|
||||
NS_IMETHOD Observe(nsISupports* aSubject, const char* aTopic, const char16_t* aData) MOZ_OVERRIDE
|
||||
{
|
||||
if (!mWindow)
|
||||
return NS_OK;
|
||||
return mWindow->Observe(aSubject, aTopic, aData);
|
||||
}
|
||||
void Forget() { mWindow = nullptr; }
|
||||
NS_IMETHODIMP GetInterface(const nsIID& aIID, void** aResult)
|
||||
NS_IMETHODIMP GetInterface(const nsIID& aIID, void** aResult) MOZ_OVERRIDE
|
||||
{
|
||||
if (mWindow && aIID.Equals(NS_GET_IID(nsIDOMWindow)) && mWindow) {
|
||||
return mWindow->QueryInterface(aIID, aResult);
|
||||
|
@ -12438,7 +12438,7 @@ nsGlobalWindow::RunTimeout(nsTimeout *aTimeout)
|
|||
dummy_timeout->mFiringDepth = firingDepth;
|
||||
dummy_timeout->mWhen = now;
|
||||
last_expired_timeout->setNext(dummy_timeout);
|
||||
dummy_timeout->AddRef();
|
||||
nsRefPtr<nsTimeout> timeoutExtraRef(dummy_timeout);
|
||||
|
||||
last_insertion_point = mTimeoutInsertionPoint;
|
||||
// If we ever start setting mTimeoutInsertionPoint to a non-dummy timeout,
|
||||
|
@ -12489,6 +12489,7 @@ nsGlobalWindow::RunTimeout(nsTimeout *aTimeout)
|
|||
// through a timeout that fired while a modal (to this window)
|
||||
// dialog was open or through other non-obvious paths.
|
||||
MOZ_ASSERT(dummy_timeout->HasRefCntOne(), "dummy_timeout may leak");
|
||||
unused << timeoutExtraRef.forget().take();
|
||||
|
||||
mTimeoutInsertionPoint = last_insertion_point;
|
||||
|
||||
|
@ -12517,7 +12518,7 @@ nsGlobalWindow::RunTimeout(nsTimeout *aTimeout)
|
|||
|
||||
// Take the dummy timeout off the head of the list
|
||||
dummy_timeout->remove();
|
||||
dummy_timeout->Release();
|
||||
timeoutExtraRef = nullptr;
|
||||
MOZ_ASSERT(dummy_timeout->HasRefCntOne(), "dummy_timeout may leak");
|
||||
|
||||
mTimeoutInsertionPoint = last_insertion_point;
|
||||
|
|
|
@ -358,7 +358,7 @@ public:
|
|||
}
|
||||
|
||||
// nsIGlobalJSObjectHolder
|
||||
virtual JSObject *GetGlobalJSObject();
|
||||
virtual JSObject* GetGlobalJSObject() MOZ_OVERRIDE;
|
||||
|
||||
// nsIScriptGlobalObject
|
||||
JSObject *FastGetGlobalJSObject() const
|
||||
|
@ -368,18 +368,18 @@ public:
|
|||
|
||||
void TraceGlobalJSObject(JSTracer* aTrc);
|
||||
|
||||
virtual nsresult EnsureScriptEnvironment();
|
||||
virtual nsresult EnsureScriptEnvironment() MOZ_OVERRIDE;
|
||||
|
||||
virtual nsIScriptContext *GetScriptContext();
|
||||
virtual nsIScriptContext *GetScriptContext() MOZ_OVERRIDE;
|
||||
|
||||
void PoisonOuterWindowProxy(JSObject *aObject);
|
||||
|
||||
virtual bool IsBlackForCC(bool aTracingNeeded = true);
|
||||
virtual bool IsBlackForCC(bool aTracingNeeded = true) MOZ_OVERRIDE;
|
||||
|
||||
static JSObject* OuterObject(JSContext* aCx, JS::Handle<JSObject*> aObj);
|
||||
|
||||
// nsIScriptObjectPrincipal
|
||||
virtual nsIPrincipal* GetPrincipal();
|
||||
virtual nsIPrincipal* GetPrincipal() MOZ_OVERRIDE;
|
||||
|
||||
// nsIDOMWindow
|
||||
NS_DECL_NSIDOMWINDOW
|
||||
|
@ -412,76 +412,76 @@ public:
|
|||
}
|
||||
|
||||
// nsPIDOMWindow
|
||||
virtual nsPIDOMWindow* GetPrivateRoot();
|
||||
virtual nsPIDOMWindow* GetPrivateRoot() MOZ_OVERRIDE;
|
||||
|
||||
// Outer windows only.
|
||||
virtual void ActivateOrDeactivate(bool aActivate);
|
||||
virtual void SetActive(bool aActive);
|
||||
virtual void SetIsBackground(bool aIsBackground);
|
||||
virtual void SetChromeEventHandler(mozilla::dom::EventTarget* aChromeEventHandler);
|
||||
virtual void ActivateOrDeactivate(bool aActivate) MOZ_OVERRIDE;
|
||||
virtual void SetActive(bool aActive) MOZ_OVERRIDE;
|
||||
virtual void SetIsBackground(bool aIsBackground) MOZ_OVERRIDE;
|
||||
virtual void SetChromeEventHandler(mozilla::dom::EventTarget* aChromeEventHandler) MOZ_OVERRIDE;
|
||||
|
||||
// Outer windows only.
|
||||
virtual void SetInitialPrincipalToSubject();
|
||||
virtual void SetInitialPrincipalToSubject() MOZ_OVERRIDE;
|
||||
|
||||
virtual PopupControlState PushPopupControlState(PopupControlState state, bool aForce) const;
|
||||
virtual void PopPopupControlState(PopupControlState state) const;
|
||||
virtual PopupControlState GetPopupControlState() const;
|
||||
virtual PopupControlState PushPopupControlState(PopupControlState state, bool aForce) const MOZ_OVERRIDE;
|
||||
virtual void PopPopupControlState(PopupControlState state) const MOZ_OVERRIDE;
|
||||
virtual PopupControlState GetPopupControlState() const MOZ_OVERRIDE;
|
||||
|
||||
virtual already_AddRefed<nsISupports> SaveWindowState();
|
||||
virtual nsresult RestoreWindowState(nsISupports *aState);
|
||||
virtual already_AddRefed<nsISupports> SaveWindowState() MOZ_OVERRIDE;
|
||||
virtual nsresult RestoreWindowState(nsISupports *aState) MOZ_OVERRIDE;
|
||||
virtual void SuspendTimeouts(uint32_t aIncrease = 1,
|
||||
bool aFreezeChildren = true);
|
||||
virtual nsresult ResumeTimeouts(bool aThawChildren = true);
|
||||
virtual uint32_t TimeoutSuspendCount();
|
||||
virtual nsresult FireDelayedDOMEvents();
|
||||
virtual bool IsFrozen() const
|
||||
bool aFreezeChildren = true) MOZ_OVERRIDE;
|
||||
virtual nsresult ResumeTimeouts(bool aThawChildren = true) MOZ_OVERRIDE;
|
||||
virtual uint32_t TimeoutSuspendCount() MOZ_OVERRIDE;
|
||||
virtual nsresult FireDelayedDOMEvents() MOZ_OVERRIDE;
|
||||
virtual bool IsFrozen() const MOZ_OVERRIDE
|
||||
{
|
||||
return mIsFrozen;
|
||||
}
|
||||
virtual bool IsRunningTimeout() { return mTimeoutFiringDepth > 0; }
|
||||
virtual bool IsRunningTimeout() MOZ_OVERRIDE { return mTimeoutFiringDepth > 0; }
|
||||
|
||||
// Outer windows only.
|
||||
virtual bool WouldReuseInnerWindow(nsIDocument* aNewDocument);
|
||||
virtual bool WouldReuseInnerWindow(nsIDocument* aNewDocument) MOZ_OVERRIDE;
|
||||
|
||||
virtual void SetDocShell(nsIDocShell* aDocShell);
|
||||
virtual void DetachFromDocShell();
|
||||
virtual void SetDocShell(nsIDocShell* aDocShell) MOZ_OVERRIDE;
|
||||
virtual void DetachFromDocShell() MOZ_OVERRIDE;
|
||||
virtual nsresult SetNewDocument(nsIDocument *aDocument,
|
||||
nsISupports *aState,
|
||||
bool aForceReuseInnerWindow);
|
||||
nsISupports *aState,
|
||||
bool aForceReuseInnerWindow) MOZ_OVERRIDE;
|
||||
|
||||
// Outer windows only.
|
||||
void DispatchDOMWindowCreated();
|
||||
|
||||
virtual void SetOpenerWindow(nsIDOMWindow* aOpener,
|
||||
bool aOriginalOpener);
|
||||
bool aOriginalOpener) MOZ_OVERRIDE;
|
||||
|
||||
// Outer windows only.
|
||||
virtual void EnsureSizeUpToDate();
|
||||
virtual void EnsureSizeUpToDate() MOZ_OVERRIDE;
|
||||
|
||||
virtual void EnterModalState();
|
||||
virtual void LeaveModalState();
|
||||
virtual void EnterModalState() MOZ_OVERRIDE;
|
||||
virtual void LeaveModalState() MOZ_OVERRIDE;
|
||||
|
||||
// Outer windows only.
|
||||
virtual bool CanClose();
|
||||
virtual void ForceClose();
|
||||
virtual bool CanClose() MOZ_OVERRIDE;
|
||||
virtual void ForceClose() MOZ_OVERRIDE;
|
||||
|
||||
virtual void MaybeUpdateTouchState();
|
||||
virtual void UpdateTouchState();
|
||||
virtual void MaybeUpdateTouchState() MOZ_OVERRIDE;
|
||||
virtual void UpdateTouchState() MOZ_OVERRIDE;
|
||||
|
||||
// Outer windows only.
|
||||
virtual bool DispatchCustomEvent(const nsAString& aEventName);
|
||||
virtual bool DispatchCustomEvent(const nsAString& aEventName) MOZ_OVERRIDE;
|
||||
bool DispatchResizeEvent(const mozilla::CSSIntSize& aSize);
|
||||
|
||||
// Inner windows only.
|
||||
virtual void RefreshCompartmentPrincipal();
|
||||
virtual void RefreshCompartmentPrincipal() MOZ_OVERRIDE;
|
||||
|
||||
// Outer windows only.
|
||||
virtual nsresult SetFullScreenInternal(bool aIsFullScreen, bool aRequireTrust,
|
||||
mozilla::gfx::VRHMDInfo *aHMD = nullptr);
|
||||
mozilla::gfx::VRHMDInfo *aHMD = nullptr) MOZ_OVERRIDE;
|
||||
bool FullScreen() const;
|
||||
|
||||
// Inner windows only.
|
||||
virtual void SetHasGamepadEventListener(bool aHasGamepad = true);
|
||||
virtual void SetHasGamepadEventListener(bool aHasGamepad = true) MOZ_OVERRIDE;
|
||||
|
||||
// nsIInterfaceRequestor
|
||||
NS_DECL_NSIINTERFACEREQUESTOR
|
||||
|
@ -632,32 +632,32 @@ public:
|
|||
#endif
|
||||
|
||||
virtual JSObject*
|
||||
GetCachedXBLPrototypeHandler(nsXBLPrototypeHandler* aKey);
|
||||
GetCachedXBLPrototypeHandler(nsXBLPrototypeHandler* aKey) MOZ_OVERRIDE;
|
||||
|
||||
virtual void
|
||||
CacheXBLPrototypeHandler(nsXBLPrototypeHandler* aKey,
|
||||
JS::Handle<JSObject*> aHandler);
|
||||
JS::Handle<JSObject*> aHandler) MOZ_OVERRIDE;
|
||||
|
||||
virtual bool TakeFocus(bool aFocus, uint32_t aFocusMethod);
|
||||
virtual void SetReadyForFocus();
|
||||
virtual void PageHidden();
|
||||
virtual nsresult DispatchAsyncHashchange(nsIURI *aOldURI, nsIURI *aNewURI);
|
||||
virtual nsresult DispatchSyncPopState();
|
||||
virtual bool TakeFocus(bool aFocus, uint32_t aFocusMethod) MOZ_OVERRIDE;
|
||||
virtual void SetReadyForFocus() MOZ_OVERRIDE;
|
||||
virtual void PageHidden() MOZ_OVERRIDE;
|
||||
virtual nsresult DispatchAsyncHashchange(nsIURI *aOldURI, nsIURI *aNewURI) MOZ_OVERRIDE;
|
||||
virtual nsresult DispatchSyncPopState() MOZ_OVERRIDE;
|
||||
|
||||
// Inner windows only.
|
||||
virtual void EnableDeviceSensor(uint32_t aType);
|
||||
virtual void DisableDeviceSensor(uint32_t aType);
|
||||
virtual void EnableDeviceSensor(uint32_t aType) MOZ_OVERRIDE;
|
||||
virtual void DisableDeviceSensor(uint32_t aType) MOZ_OVERRIDE;
|
||||
|
||||
virtual void EnableTimeChangeNotifications();
|
||||
virtual void DisableTimeChangeNotifications();
|
||||
virtual void EnableTimeChangeNotifications() MOZ_OVERRIDE;
|
||||
virtual void DisableTimeChangeNotifications() MOZ_OVERRIDE;
|
||||
|
||||
#ifdef MOZ_B2G
|
||||
// Inner windows only.
|
||||
virtual void EnableNetworkEvent(uint32_t aType);
|
||||
virtual void DisableNetworkEvent(uint32_t aType);
|
||||
virtual void EnableNetworkEvent(uint32_t aType) MOZ_OVERRIDE;
|
||||
virtual void DisableNetworkEvent(uint32_t aType) MOZ_OVERRIDE;
|
||||
#endif // MOZ_B2G
|
||||
|
||||
virtual nsresult SetArguments(nsIArray *aArguments);
|
||||
virtual nsresult SetArguments(nsIArray* aArguments) MOZ_OVERRIDE;
|
||||
|
||||
void MaybeForgiveSpamCount();
|
||||
bool IsClosedOrClosing() {
|
||||
|
@ -673,7 +673,7 @@ public:
|
|||
const nsAString& aPopupWindowName,
|
||||
const nsAString& aPopupWindowFeatures) MOZ_OVERRIDE;
|
||||
|
||||
virtual uint32_t GetSerial() {
|
||||
virtual uint32_t GetSerial() MOZ_OVERRIDE {
|
||||
return mSerial;
|
||||
}
|
||||
|
||||
|
@ -1153,7 +1153,7 @@ protected:
|
|||
OpenNoNavigate(const nsAString& aUrl,
|
||||
const nsAString& aName,
|
||||
const nsAString& aOptions,
|
||||
nsIDOMWindow **_retval);
|
||||
nsIDOMWindow** _retval) MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
/**
|
||||
|
@ -1222,7 +1222,7 @@ public:
|
|||
// |interval| is in milliseconds.
|
||||
nsresult SetTimeoutOrInterval(nsIScriptTimeoutHandler *aHandler,
|
||||
int32_t interval,
|
||||
bool aIsInterval, int32_t *aReturn);
|
||||
bool aIsInterval, int32_t* aReturn) MOZ_OVERRIDE;
|
||||
int32_t SetTimeoutOrInterval(mozilla::dom::Function& aFunction,
|
||||
int32_t aTimeout,
|
||||
const mozilla::dom::Sequence<JS::Value>& aArguments,
|
||||
|
@ -1232,7 +1232,7 @@ public:
|
|||
mozilla::ErrorResult& aError);
|
||||
void ClearTimeoutOrInterval(int32_t aTimerID,
|
||||
mozilla::ErrorResult& aError);
|
||||
nsresult ClearTimeoutOrInterval(int32_t aTimerID)
|
||||
nsresult ClearTimeoutOrInterval(int32_t aTimerID) MOZ_OVERRIDE
|
||||
{
|
||||
mozilla::ErrorResult rv;
|
||||
ClearTimeoutOrInterval(aTimerID, rv);
|
||||
|
@ -1277,10 +1277,10 @@ public:
|
|||
uint32_t GetFuzzTimeMS();
|
||||
nsresult ScheduleActiveTimerCallback();
|
||||
uint32_t FindInsertionIndex(IdleObserverHolder* aIdleObserver);
|
||||
virtual nsresult RegisterIdleObserver(nsIIdleObserver* aIdleObserverPtr);
|
||||
virtual nsresult RegisterIdleObserver(nsIIdleObserver* aIdleObserverPtr) MOZ_OVERRIDE;
|
||||
nsresult FindIndexOfElementToRemove(nsIIdleObserver* aIdleObserver,
|
||||
int32_t* aRemoveElementIndex);
|
||||
virtual nsresult UnregisterIdleObserver(nsIIdleObserver* aIdleObserverPtr);
|
||||
virtual nsresult UnregisterIdleObserver(nsIIdleObserver* aIdleObserverPtr) MOZ_OVERRIDE;
|
||||
|
||||
// Inner windows only.
|
||||
nsresult FireHashchange(const nsAString &aOldURL, const nsAString &aNewURL);
|
||||
|
@ -1362,16 +1362,16 @@ public:
|
|||
|
||||
virtual void SetFocusedNode(nsIContent* aNode,
|
||||
uint32_t aFocusMethod = 0,
|
||||
bool aNeedsFocus = false);
|
||||
bool aNeedsFocus = false) MOZ_OVERRIDE;
|
||||
|
||||
virtual uint32_t GetFocusMethod();
|
||||
virtual uint32_t GetFocusMethod() MOZ_OVERRIDE;
|
||||
|
||||
virtual bool ShouldShowFocusRing();
|
||||
virtual bool ShouldShowFocusRing() MOZ_OVERRIDE;
|
||||
|
||||
virtual void SetKeyboardIndicators(UIStateChangeType aShowAccelerators,
|
||||
UIStateChangeType aShowFocusRings);
|
||||
UIStateChangeType aShowFocusRings) MOZ_OVERRIDE;
|
||||
virtual void GetKeyboardIndicators(bool* aShowAccelerators,
|
||||
bool* aShowFocusRings);
|
||||
bool* aShowFocusRings) MOZ_OVERRIDE;
|
||||
|
||||
// Inner windows only.
|
||||
void UpdateCanvasFocus(bool aFocusChanged, nsIContent* aNewContent);
|
||||
|
@ -1388,7 +1388,7 @@ protected:
|
|||
|
||||
void ClearStatus();
|
||||
|
||||
virtual void UpdateParentTarget();
|
||||
virtual void UpdateParentTarget() MOZ_OVERRIDE;
|
||||
|
||||
inline int32_t DOMMinTimeoutValue() const;
|
||||
|
||||
|
|
|
@ -112,9 +112,9 @@ class nsSelectionCommandsBase : public nsIControllerCommand
|
|||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_IMETHOD IsCommandEnabled(const char * aCommandName, nsISupports *aCommandContext, bool *_retval);
|
||||
NS_IMETHOD GetCommandStateParams(const char * aCommandName, nsICommandParams *aParams, nsISupports *aCommandContext);
|
||||
NS_IMETHOD DoCommandParams(const char * aCommandName, nsICommandParams *aParams, nsISupports *aCommandContext);
|
||||
NS_IMETHOD IsCommandEnabled(const char* aCommandName, nsISupports* aCommandContext, bool* _retval) MOZ_OVERRIDE;
|
||||
NS_IMETHOD GetCommandStateParams(const char* aCommandName, nsICommandParams* aParams, nsISupports* aCommandContext) MOZ_OVERRIDE;
|
||||
NS_IMETHOD DoCommandParams(const char* aCommandName, nsICommandParams* aParams, nsISupports* aCommandContext) MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
virtual ~nsSelectionCommandsBase() {}
|
||||
|
|
|
@ -44,7 +44,7 @@ class HostObjectURLsReporter MOZ_FINAL : public nsIMemoryReporter
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize)
|
||||
nsISupports* aData, bool aAnonymize) MOZ_OVERRIDE
|
||||
{
|
||||
return MOZ_COLLECT_REPORT(
|
||||
"host-object-urls", KIND_OTHER, UNITS_COUNT,
|
||||
|
@ -62,7 +62,7 @@ class BlobURLsReporter MOZ_FINAL : public nsIMemoryReporter
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD CollectReports(nsIHandleReportCallback* aCallback,
|
||||
nsISupports* aData, bool aAnonymize)
|
||||
nsISupports* aData, bool aAnonymize) MOZ_OVERRIDE
|
||||
{
|
||||
EnumArg env;
|
||||
env.mCallback = aCallback;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
[scriptable, uuid(6701600a-17ca-417e-98f9-4ceb175dd15d)]
|
||||
[scriptable, uuid(cce39123-585e-411b-9edd-2513f7cf7e47)]
|
||||
interface nsIConsoleAPIStorage : nsISupports
|
||||
{
|
||||
/**
|
||||
|
@ -27,10 +27,29 @@ interface nsIConsoleAPIStorage : nsISupports
|
|||
* @param string aId
|
||||
* The ID of the inner window for which the event occurred or "jsm" for
|
||||
* messages logged from JavaScript modules..
|
||||
* @param string aOuterId
|
||||
* This ID is used as 3rd parameters for the console-api-log-event
|
||||
* notification.
|
||||
* @param object aEvent
|
||||
* A JavaScript object you want to store.
|
||||
*/
|
||||
void recordEvent(in DOMString aId, in jsval aEvent);
|
||||
void recordEvent(in DOMString aId, in DOMString aOuterId, in jsval aEvent);
|
||||
|
||||
/**
|
||||
* Similar to recordEvent() but these events will be collected
|
||||
* and dispatched with a timer in order to avoid flooding the devtools
|
||||
* webconsole.
|
||||
*
|
||||
* @param string aId
|
||||
* The ID of the inner window for which the event occurred or "jsm" for
|
||||
* messages logged from JavaScript modules..
|
||||
* @param string aOuterId
|
||||
* This ID is used as 3rd parameters for the console-api-log-event
|
||||
* notification.
|
||||
* @param object aEvent
|
||||
* A JavaScript object you want to store.
|
||||
*/
|
||||
void recordPendingEvent(in DOMString aId, in DOMString aOuterId, in jsval aEvent);
|
||||
|
||||
/**
|
||||
* Clear storage data for the given window.
|
||||
|
|
|
@ -2508,7 +2508,7 @@ protected:
|
|||
virtual void MutationEventDispatched(nsINode* aTarget) = 0;
|
||||
friend class mozAutoSubtreeModified;
|
||||
|
||||
virtual Element* GetNameSpaceElement()
|
||||
virtual Element* GetNameSpaceElement() MOZ_OVERRIDE
|
||||
{
|
||||
return GetRootElement();
|
||||
}
|
||||
|
|
|
@ -195,56 +195,56 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIDocumentObserver, NS_IDOCUMENT_OBSERVER_IID)
|
|||
|
||||
#define NS_DECL_NSIDOCUMENTOBSERVER_BEGINUPDATE \
|
||||
virtual void BeginUpdate(nsIDocument* aDocument, \
|
||||
nsUpdateType aUpdateType);
|
||||
nsUpdateType aUpdateType) MOZ_OVERRIDE;
|
||||
|
||||
#define NS_DECL_NSIDOCUMENTOBSERVER_ENDUPDATE \
|
||||
virtual void EndUpdate(nsIDocument* aDocument, nsUpdateType aUpdateType);
|
||||
virtual void EndUpdate(nsIDocument* aDocument, nsUpdateType aUpdateType) MOZ_OVERRIDE;
|
||||
|
||||
#define NS_DECL_NSIDOCUMENTOBSERVER_BEGINLOAD \
|
||||
virtual void BeginLoad(nsIDocument* aDocument);
|
||||
virtual void BeginLoad(nsIDocument* aDocument) MOZ_OVERRIDE;
|
||||
|
||||
#define NS_DECL_NSIDOCUMENTOBSERVER_ENDLOAD \
|
||||
virtual void EndLoad(nsIDocument* aDocument);
|
||||
virtual void EndLoad(nsIDocument* aDocument) MOZ_OVERRIDE;
|
||||
|
||||
#define NS_DECL_NSIDOCUMENTOBSERVER_CONTENTSTATECHANGED \
|
||||
virtual void ContentStateChanged(nsIDocument* aDocument, \
|
||||
nsIContent* aContent, \
|
||||
mozilla::EventStates aStateMask);
|
||||
mozilla::EventStates aStateMask) MOZ_OVERRIDE;
|
||||
|
||||
#define NS_DECL_NSIDOCUMENTOBSERVER_DOCUMENTSTATESCHANGED \
|
||||
virtual void DocumentStatesChanged(nsIDocument* aDocument, \
|
||||
mozilla::EventStates aStateMask);
|
||||
mozilla::EventStates aStateMask) MOZ_OVERRIDE;
|
||||
|
||||
#define NS_DECL_NSIDOCUMENTOBSERVER_STYLESHEETADDED \
|
||||
virtual void StyleSheetAdded(nsIDocument* aDocument, \
|
||||
nsIStyleSheet* aStyleSheet, \
|
||||
bool aDocumentSheet);
|
||||
bool aDocumentSheet) MOZ_OVERRIDE;
|
||||
|
||||
#define NS_DECL_NSIDOCUMENTOBSERVER_STYLESHEETREMOVED \
|
||||
virtual void StyleSheetRemoved(nsIDocument* aDocument, \
|
||||
nsIStyleSheet* aStyleSheet, \
|
||||
bool aDocumentSheet);
|
||||
bool aDocumentSheet) MOZ_OVERRIDE;
|
||||
|
||||
#define NS_DECL_NSIDOCUMENTOBSERVER_STYLESHEETAPPLICABLESTATECHANGED \
|
||||
virtual void StyleSheetApplicableStateChanged(nsIDocument* aDocument, \
|
||||
nsIStyleSheet* aStyleSheet,\
|
||||
bool aApplicable);
|
||||
bool aApplicable) MOZ_OVERRIDE;
|
||||
|
||||
#define NS_DECL_NSIDOCUMENTOBSERVER_STYLERULECHANGED \
|
||||
virtual void StyleRuleChanged(nsIDocument* aDocument, \
|
||||
nsIStyleSheet* aStyleSheet, \
|
||||
nsIStyleRule* aOldStyleRule, \
|
||||
nsIStyleRule* aNewStyleRule);
|
||||
nsIStyleRule* aNewStyleRule) MOZ_OVERRIDE;
|
||||
|
||||
#define NS_DECL_NSIDOCUMENTOBSERVER_STYLERULEADDED \
|
||||
virtual void StyleRuleAdded(nsIDocument* aDocument, \
|
||||
nsIStyleSheet* aStyleSheet, \
|
||||
nsIStyleRule* aStyleRule);
|
||||
nsIStyleRule* aStyleRule) MOZ_OVERRIDE;
|
||||
|
||||
#define NS_DECL_NSIDOCUMENTOBSERVER_STYLERULEREMOVED \
|
||||
virtual void StyleRuleRemoved(nsIDocument* aDocument, \
|
||||
nsIStyleSheet* aStyleSheet, \
|
||||
nsIStyleRule* aStyleRule);
|
||||
nsIStyleRule* aStyleRule) MOZ_OVERRIDE;
|
||||
|
||||
#define NS_DECL_NSIDOCUMENTOBSERVER \
|
||||
NS_DECL_NSIDOCUMENTOBSERVER_BEGINUPDATE \
|
||||
|
|
|
@ -323,51 +323,51 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIMutationObserver, NS_IMUTATION_OBSERVER_IID)
|
|||
#define NS_DECL_NSIMUTATIONOBSERVER_CHARACTERDATAWILLCHANGE \
|
||||
virtual void CharacterDataWillChange(nsIDocument* aDocument, \
|
||||
nsIContent* aContent, \
|
||||
CharacterDataChangeInfo* aInfo);
|
||||
CharacterDataChangeInfo* aInfo) MOZ_OVERRIDE;
|
||||
|
||||
#define NS_DECL_NSIMUTATIONOBSERVER_CHARACTERDATACHANGED \
|
||||
virtual void CharacterDataChanged(nsIDocument* aDocument, \
|
||||
nsIContent* aContent, \
|
||||
CharacterDataChangeInfo* aInfo);
|
||||
CharacterDataChangeInfo* aInfo) MOZ_OVERRIDE;
|
||||
|
||||
#define NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTEWILLCHANGE \
|
||||
virtual void AttributeWillChange(nsIDocument* aDocument, \
|
||||
mozilla::dom::Element* aElement, \
|
||||
int32_t aNameSpaceID, \
|
||||
nsIAtom* aAttribute, \
|
||||
int32_t aModType);
|
||||
int32_t aModType) MOZ_OVERRIDE;
|
||||
|
||||
#define NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTECHANGED \
|
||||
virtual void AttributeChanged(nsIDocument* aDocument, \
|
||||
mozilla::dom::Element* aElement, \
|
||||
int32_t aNameSpaceID, \
|
||||
nsIAtom* aAttribute, \
|
||||
int32_t aModType);
|
||||
int32_t aModType) MOZ_OVERRIDE;
|
||||
|
||||
#define NS_DECL_NSIMUTATIONOBSERVER_CONTENTAPPENDED \
|
||||
virtual void ContentAppended(nsIDocument* aDocument, \
|
||||
nsIContent* aContainer, \
|
||||
nsIContent* aFirstNewContent, \
|
||||
int32_t aNewIndexInContainer);
|
||||
int32_t aNewIndexInContainer) MOZ_OVERRIDE;
|
||||
|
||||
#define NS_DECL_NSIMUTATIONOBSERVER_CONTENTINSERTED \
|
||||
virtual void ContentInserted(nsIDocument* aDocument, \
|
||||
nsIContent* aContainer, \
|
||||
nsIContent* aChild, \
|
||||
int32_t aIndexInContainer);
|
||||
int32_t aIndexInContainer) MOZ_OVERRIDE;
|
||||
|
||||
#define NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED \
|
||||
virtual void ContentRemoved(nsIDocument* aDocument, \
|
||||
nsIContent* aContainer, \
|
||||
nsIContent* aChild, \
|
||||
int32_t aIndexInContainer, \
|
||||
nsIContent* aPreviousSibling);
|
||||
nsIContent* aPreviousSibling) MOZ_OVERRIDE;
|
||||
|
||||
#define NS_DECL_NSIMUTATIONOBSERVER_NODEWILLBEDESTROYED \
|
||||
virtual void NodeWillBeDestroyed(const nsINode* aNode);
|
||||
virtual void NodeWillBeDestroyed(const nsINode* aNode) MOZ_OVERRIDE;
|
||||
|
||||
#define NS_DECL_NSIMUTATIONOBSERVER_PARENTCHAINCHANGED \
|
||||
virtual void ParentChainChanged(nsIContent *aContent);
|
||||
virtual void ParentChainChanged(nsIContent *aContent) MOZ_OVERRIDE;
|
||||
|
||||
#define NS_DECL_NSIMUTATIONOBSERVER \
|
||||
NS_DECL_NSIMUTATIONOBSERVER_CHARACTERDATAWILLCHANGE \
|
||||
|
|
|
@ -239,7 +239,7 @@ private:
|
|||
// defined, it is inherited from nsINode.
|
||||
// This macro isn't actually specific to nodes, and bug 956400 will move it into MFBT.
|
||||
#define NS_DECL_SIZEOF_EXCLUDING_THIS \
|
||||
virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
|
||||
virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
|
||||
|
||||
// Categories of node properties
|
||||
// 0 is global.
|
||||
|
@ -293,7 +293,7 @@ public:
|
|||
// The following members don't need to be measured:
|
||||
// - nsIContent: mPrimaryFrame, because it's non-owning and measured elsewhere
|
||||
//
|
||||
NS_DECL_SIZEOF_EXCLUDING_THIS
|
||||
virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
|
||||
|
||||
// SizeOfIncludingThis doesn't need to be overridden by sub-classes because
|
||||
// sub-classes of nsINode are guaranteed to be laid out in memory in such a
|
||||
|
@ -1877,81 +1877,81 @@ ToCanonicalSupports(nsINode* aPointer)
|
|||
}
|
||||
|
||||
#define NS_FORWARD_NSIDOMNODE_TO_NSINODE_HELPER(...) \
|
||||
NS_IMETHOD GetNodeName(nsAString& aNodeName) __VA_ARGS__ \
|
||||
NS_IMETHOD GetNodeName(nsAString& aNodeName) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
aNodeName = nsINode::NodeName(); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD GetNodeValue(nsAString& aNodeValue) __VA_ARGS__ \
|
||||
NS_IMETHOD GetNodeValue(nsAString& aNodeValue) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
nsINode::GetNodeValue(aNodeValue); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD SetNodeValue(const nsAString& aNodeValue) __VA_ARGS__ \
|
||||
NS_IMETHOD SetNodeValue(const nsAString& aNodeValue) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
mozilla::ErrorResult rv; \
|
||||
nsINode::SetNodeValue(aNodeValue, rv); \
|
||||
return rv.ErrorCode(); \
|
||||
} \
|
||||
NS_IMETHOD GetNodeType(uint16_t* aNodeType) __VA_ARGS__ \
|
||||
NS_IMETHOD GetNodeType(uint16_t* aNodeType) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
*aNodeType = nsINode::NodeType(); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD GetParentNode(nsIDOMNode** aParentNode) __VA_ARGS__ \
|
||||
NS_IMETHOD GetParentNode(nsIDOMNode** aParentNode) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
return nsINode::GetParentNode(aParentNode); \
|
||||
} \
|
||||
NS_IMETHOD GetParentElement(nsIDOMElement** aParentElement) __VA_ARGS__ \
|
||||
NS_IMETHOD GetParentElement(nsIDOMElement** aParentElement) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
return nsINode::GetParentElement(aParentElement); \
|
||||
} \
|
||||
NS_IMETHOD GetChildNodes(nsIDOMNodeList** aChildNodes) __VA_ARGS__ \
|
||||
NS_IMETHOD GetChildNodes(nsIDOMNodeList** aChildNodes) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
return nsINode::GetChildNodes(aChildNodes); \
|
||||
} \
|
||||
NS_IMETHOD GetFirstChild(nsIDOMNode** aFirstChild) __VA_ARGS__ \
|
||||
NS_IMETHOD GetFirstChild(nsIDOMNode** aFirstChild) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
return nsINode::GetFirstChild(aFirstChild); \
|
||||
} \
|
||||
NS_IMETHOD GetLastChild(nsIDOMNode** aLastChild) __VA_ARGS__ \
|
||||
NS_IMETHOD GetLastChild(nsIDOMNode** aLastChild) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
return nsINode::GetLastChild(aLastChild); \
|
||||
} \
|
||||
NS_IMETHOD GetPreviousSibling(nsIDOMNode** aPreviousSibling) __VA_ARGS__ \
|
||||
NS_IMETHOD GetPreviousSibling(nsIDOMNode** aPreviousSibling) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
return nsINode::GetPreviousSibling(aPreviousSibling); \
|
||||
} \
|
||||
NS_IMETHOD GetNextSibling(nsIDOMNode** aNextSibling) __VA_ARGS__ \
|
||||
NS_IMETHOD GetNextSibling(nsIDOMNode** aNextSibling) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
return nsINode::GetNextSibling(aNextSibling); \
|
||||
} \
|
||||
NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument) __VA_ARGS__ \
|
||||
NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
return nsINode::GetOwnerDocument(aOwnerDocument); \
|
||||
} \
|
||||
NS_IMETHOD InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, nsIDOMNode** aResult) __VA_ARGS__ \
|
||||
NS_IMETHOD InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, nsIDOMNode** aResult) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
return ReplaceOrInsertBefore(false, aNewChild, aRefChild, aResult); \
|
||||
} \
|
||||
NS_IMETHOD ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild, nsIDOMNode** aResult) __VA_ARGS__ \
|
||||
NS_IMETHOD ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild, nsIDOMNode** aResult) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
return ReplaceOrInsertBefore(true, aNewChild, aOldChild, aResult); \
|
||||
} \
|
||||
NS_IMETHOD RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aResult) __VA_ARGS__ \
|
||||
NS_IMETHOD RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aResult) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
return nsINode::RemoveChild(aOldChild, aResult); \
|
||||
} \
|
||||
NS_IMETHOD AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aResult) __VA_ARGS__ \
|
||||
NS_IMETHOD AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aResult) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
return InsertBefore(aNewChild, nullptr, aResult); \
|
||||
} \
|
||||
NS_IMETHOD HasChildNodes(bool* aResult) __VA_ARGS__ \
|
||||
NS_IMETHOD HasChildNodes(bool* aResult) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
*aResult = nsINode::HasChildNodes(); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD CloneNode(bool aDeep, uint8_t aArgc, nsIDOMNode** aResult) __VA_ARGS__ \
|
||||
NS_IMETHOD CloneNode(bool aDeep, uint8_t aArgc, nsIDOMNode** aResult) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
if (aArgc == 0) { \
|
||||
aDeep = true; \
|
||||
|
@ -1964,80 +1964,80 @@ ToCanonicalSupports(nsINode* aPointer)
|
|||
*aResult = clone.forget().take()->AsDOMNode(); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD Normalize() __VA_ARGS__ \
|
||||
NS_IMETHOD Normalize() __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
nsINode::Normalize(); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD GetNamespaceURI(nsAString& aNamespaceURI) __VA_ARGS__ \
|
||||
NS_IMETHOD GetNamespaceURI(nsAString& aNamespaceURI) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
nsINode::GetNamespaceURI(aNamespaceURI); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD GetPrefix(nsAString& aPrefix) __VA_ARGS__ \
|
||||
NS_IMETHOD GetPrefix(nsAString& aPrefix) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
nsINode::GetPrefix(aPrefix); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD GetLocalName(nsAString& aLocalName) __VA_ARGS__ \
|
||||
NS_IMETHOD GetLocalName(nsAString& aLocalName) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
aLocalName = nsINode::LocalName(); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD UnusedPlaceholder(bool* aResult) __VA_ARGS__ \
|
||||
NS_IMETHOD UnusedPlaceholder(bool* aResult) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
*aResult = false; \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD GetDOMBaseURI(nsAString& aBaseURI) __VA_ARGS__ \
|
||||
NS_IMETHOD GetDOMBaseURI(nsAString& aBaseURI) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
nsINode::GetBaseURI(aBaseURI); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD CompareDocumentPosition(nsIDOMNode* aOther, uint16_t* aResult) __VA_ARGS__ \
|
||||
NS_IMETHOD CompareDocumentPosition(nsIDOMNode* aOther, uint16_t* aResult) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
return nsINode::CompareDocumentPosition(aOther, aResult); \
|
||||
} \
|
||||
NS_IMETHOD GetTextContent(nsAString& aTextContent) __VA_ARGS__ \
|
||||
NS_IMETHOD GetTextContent(nsAString& aTextContent) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
mozilla::ErrorResult rv; \
|
||||
nsINode::GetTextContent(aTextContent, rv); \
|
||||
return rv.ErrorCode(); \
|
||||
} \
|
||||
NS_IMETHOD SetTextContent(const nsAString& aTextContent) __VA_ARGS__ \
|
||||
NS_IMETHOD SetTextContent(const nsAString& aTextContent) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
mozilla::ErrorResult rv; \
|
||||
nsINode::SetTextContent(aTextContent, rv); \
|
||||
return rv.ErrorCode(); \
|
||||
} \
|
||||
NS_IMETHOD LookupPrefix(const nsAString& aNamespaceURI, nsAString& aResult) __VA_ARGS__ \
|
||||
NS_IMETHOD LookupPrefix(const nsAString& aNamespaceURI, nsAString& aResult) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
nsINode::LookupPrefix(aNamespaceURI, aResult); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD IsDefaultNamespace(const nsAString& aNamespaceURI, bool* aResult) __VA_ARGS__ \
|
||||
NS_IMETHOD IsDefaultNamespace(const nsAString& aNamespaceURI, bool* aResult) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
*aResult = nsINode::IsDefaultNamespace(aNamespaceURI); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD LookupNamespaceURI(const nsAString& aPrefix, nsAString& aResult) __VA_ARGS__ \
|
||||
NS_IMETHOD LookupNamespaceURI(const nsAString& aPrefix, nsAString& aResult) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
nsINode::LookupNamespaceURI(aPrefix, aResult); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD IsEqualNode(nsIDOMNode* aArg, bool* aResult) __VA_ARGS__ \
|
||||
NS_IMETHOD IsEqualNode(nsIDOMNode* aArg, bool* aResult) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
return nsINode::IsEqualNode(aArg, aResult); \
|
||||
} \
|
||||
NS_IMETHOD SetUserData(const nsAString& aKey, nsIVariant* aData, nsIVariant** aResult) __VA_ARGS__ \
|
||||
NS_IMETHOD SetUserData(const nsAString& aKey, nsIVariant* aData, nsIVariant** aResult) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
return nsINode::SetUserData(aKey, aData, aResult); \
|
||||
} \
|
||||
NS_IMETHOD GetUserData(const nsAString& aKey, nsIVariant** aResult) __VA_ARGS__ \
|
||||
NS_IMETHOD GetUserData(const nsAString& aKey, nsIVariant** aResult) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
return nsINode::GetUserData(aKey, aResult); \
|
||||
} \
|
||||
NS_IMETHOD Contains(nsIDOMNode* aOther, bool* aResult) __VA_ARGS__ \
|
||||
NS_IMETHOD Contains(nsIDOMNode* aOther, bool* aResult) __VA_ARGS__ MOZ_OVERRIDE \
|
||||
{ \
|
||||
return nsINode::Contains(aOther, aResult); \
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ public:
|
|||
nsIPrincipal* aPrincipal,
|
||||
JSContext* aCx,
|
||||
uint8_t aArgc,
|
||||
JS::MutableHandle<JS::Value> aRetval)
|
||||
JS::MutableHandle<JS::Value> aRetval) MOZ_OVERRIDE
|
||||
{
|
||||
return mMessageManager
|
||||
? mMessageManager->SendSyncMessage(aMessageName, aObject, aRemote,
|
||||
|
@ -63,7 +63,7 @@ public:
|
|||
nsIPrincipal* aPrincipal,
|
||||
JSContext* aCx,
|
||||
uint8_t aArgc,
|
||||
JS::MutableHandle<JS::Value> aRetval)
|
||||
JS::MutableHandle<JS::Value> aRetval) MOZ_OVERRIDE
|
||||
{
|
||||
return mMessageManager
|
||||
? mMessageManager->SendRpcMessage(aMessageName, aObject, aRemote,
|
||||
|
|
|
@ -2942,7 +2942,7 @@ public:
|
|||
NS_DECL_NSIARRAY
|
||||
|
||||
// nsIJSArgArray
|
||||
nsresult GetArgs(uint32_t *argc, void **argv);
|
||||
nsresult GetArgs(uint32_t* argc, void** argv) MOZ_OVERRIDE;
|
||||
|
||||
void ReleaseJSObjects();
|
||||
|
||||
|
|
|
@ -42,18 +42,18 @@ public:
|
|||
const nsAString& aExpression, bool* aAllowEval,
|
||||
ErrorResult& aError);
|
||||
|
||||
virtual const char16_t *GetHandlerText();
|
||||
virtual Function* GetCallback()
|
||||
virtual const char16_t* GetHandlerText() MOZ_OVERRIDE;
|
||||
virtual Function* GetCallback() MOZ_OVERRIDE
|
||||
{
|
||||
return mFunction;
|
||||
}
|
||||
virtual void GetLocation(const char **aFileName, uint32_t *aLineNo)
|
||||
virtual void GetLocation(const char** aFileName, uint32_t* aLineNo) MOZ_OVERRIDE
|
||||
{
|
||||
*aFileName = mFileName.get();
|
||||
*aLineNo = mLineNo;
|
||||
}
|
||||
|
||||
virtual const nsTArray<JS::Value>& GetArgs()
|
||||
virtual const nsTArray<JS::Value>& GetArgs() MOZ_OVERRIDE
|
||||
{
|
||||
return mArgs;
|
||||
}
|
||||
|
|
|
@ -361,10 +361,10 @@ public:
|
|||
}
|
||||
|
||||
// nsRunnable
|
||||
NS_IMETHOD Run();
|
||||
NS_IMETHOD Run() MOZ_OVERRIDE;
|
||||
|
||||
// nsITimerCallback
|
||||
NS_IMETHOD Notify(nsITimer *timer);
|
||||
NS_IMETHOD Notify(nsITimer* timer) MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
virtual ~nsStopPluginRunnable() {}
|
||||
|
|
|
@ -141,8 +141,8 @@ private:
|
|||
}
|
||||
return NS_OK;
|
||||
}
|
||||
virtual void SetTo(Element* aTo) { mTo = aTo; }
|
||||
virtual void Clear()
|
||||
virtual void SetTo(Element* aTo) MOZ_OVERRIDE { mTo = aTo; }
|
||||
virtual void Clear() MOZ_OVERRIDE
|
||||
{
|
||||
Notification::Clear(); mFrom = nullptr; mTo = nullptr;
|
||||
}
|
||||
|
@ -172,7 +172,7 @@ private:
|
|||
private:
|
||||
virtual ~DocumentLoadNotification() {}
|
||||
|
||||
virtual void SetTo(Element* aTo) { }
|
||||
virtual void SetTo(Element* aTo) MOZ_OVERRIDE { }
|
||||
|
||||
nsString mRef;
|
||||
};
|
||||
|
|
|
@ -124,7 +124,7 @@ public:
|
|||
|
||||
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
|
||||
|
||||
void Notify(const mozilla::hal::ScreenConfiguration& aConfiguration);
|
||||
void Notify(const mozilla::hal::ScreenConfiguration& aConfiguration) MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
nsDeviceContext* GetDeviceContext();
|
||||
|
|
|
@ -36,7 +36,7 @@ protected:
|
|||
|
||||
public:
|
||||
// nsIContent interface methods
|
||||
virtual mozilla::css::StyleRule* GetInlineStyleRule();
|
||||
virtual mozilla::css::StyleRule* GetInlineStyleRule() MOZ_OVERRIDE;
|
||||
virtual nsresult SetInlineStyleRule(mozilla::css::StyleRule* aStyleRule,
|
||||
const nsAString* aSerialized,
|
||||
bool aNotify) MOZ_OVERRIDE;
|
||||
|
|
|
@ -47,15 +47,15 @@ public:
|
|||
|
||||
virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
|
||||
nsIContent* aBindingParent,
|
||||
bool aCompileEventHandlers);
|
||||
bool aCompileEventHandlers) MOZ_OVERRIDE;
|
||||
virtual void UnbindFromTree(bool aDeep = true,
|
||||
bool aNullParent = true);
|
||||
bool aNullParent = true) MOZ_OVERRIDE;
|
||||
|
||||
NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTECHANGED
|
||||
NS_DECL_NSIMUTATIONOBSERVER_NODEWILLBEDESTROYED
|
||||
|
||||
virtual nsGenericDOMDataNode *CloneDataNode(mozilla::dom::NodeInfo *aNodeInfo,
|
||||
bool aCloneText) const
|
||||
bool aCloneText) const MOZ_OVERRIDE
|
||||
{
|
||||
already_AddRefed<mozilla::dom::NodeInfo> ni =
|
||||
nsRefPtr<mozilla::dom::NodeInfo>(aNodeInfo).forget();
|
||||
|
|
|
@ -57,7 +57,7 @@ public:
|
|||
NS_FORWARD_NSIDOMTEXT(nsGenericDOMDataNode::)
|
||||
|
||||
// nsINode
|
||||
virtual bool IsNodeOfType(uint32_t aFlags) const;
|
||||
virtual bool IsNodeOfType(uint32_t aFlags) const MOZ_OVERRIDE;
|
||||
|
||||
virtual nsGenericDOMDataNode* CloneDataNode(mozilla::dom::NodeInfo *aNodeInfo,
|
||||
bool aCloneText) const MOZ_OVERRIDE;
|
||||
|
|
|
@ -175,7 +175,7 @@ private:
|
|||
|
||||
NS_IMETHOD
|
||||
CollectReports(nsIHandleReportCallback* aHandleReport, nsISupports* aData,
|
||||
bool aAnonymize)
|
||||
bool aAnonymize) MOZ_OVERRIDE
|
||||
{
|
||||
return MOZ_COLLECT_REPORT(
|
||||
"ghost-windows", KIND_OTHER, UNITS_COUNT, DistinguishedAmount(),
|
||||
|
|
|
@ -3426,7 +3426,7 @@ public:
|
|||
NS_DECL_CYCLE_COLLECTION_CLASS(AsyncVerifyRedirectCallbackForwarder)
|
||||
|
||||
// nsIAsyncVerifyRedirectCallback implementation
|
||||
NS_IMETHOD OnRedirectVerifyCallback(nsresult result)
|
||||
NS_IMETHOD OnRedirectVerifyCallback(nsresult result) MOZ_OVERRIDE
|
||||
{
|
||||
mXHR->OnRedirectVerifyCallback(result);
|
||||
|
||||
|
|
|
@ -143,7 +143,7 @@ public:
|
|||
IMPL_EVENT_HANDLER(timeout)
|
||||
IMPL_EVENT_HANDLER(loadend)
|
||||
|
||||
virtual void DisconnectFromOwner();
|
||||
virtual void DisconnectFromOwner() MOZ_OVERRIDE;
|
||||
};
|
||||
|
||||
class nsXMLHttpRequestUpload MOZ_FINAL : public nsXHREventTarget,
|
||||
|
@ -289,7 +289,7 @@ public:
|
|||
|
||||
// nsISizeOfEventTarget
|
||||
virtual size_t
|
||||
SizeOfEventTargetIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
|
||||
SizeOfEventTargetIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
|
||||
|
||||
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsXHREventTarget)
|
||||
|
||||
|
|
|
@ -164,17 +164,17 @@ BrowserElementChild.prototype = {
|
|||
|
||||
addEventListener('mozselectionstatechanged',
|
||||
this._selectionStateChangedHandler.bind(this),
|
||||
/* useCapture = */ false,
|
||||
/* useCapture = */ true,
|
||||
/* wantsUntrusted = */ false);
|
||||
|
||||
addEventListener('scrollviewchange',
|
||||
this._ScrollViewChangeHandler.bind(this),
|
||||
/* useCapture = */ false,
|
||||
/* useCapture = */ true,
|
||||
/* wantsUntrusted = */ false);
|
||||
|
||||
addEventListener('touchcarettap',
|
||||
this._touchCaretTapHandler.bind(this),
|
||||
/* useCapture = */ false,
|
||||
/* useCapture = */ true,
|
||||
/* wantsUntrusted = */ false);
|
||||
|
||||
|
||||
|
@ -659,13 +659,13 @@ BrowserElementChild.prototype = {
|
|||
|
||||
// Get correct geometry information if we have nested iframe.
|
||||
let currentWindow = e.target.defaultView;
|
||||
while (currentWindow.top != currentWindow) {
|
||||
let currentRect = currentWindow.frameElement.getBoundingClientRect();
|
||||
while (currentWindow.realFrameElement) {
|
||||
let currentRect = currentWindow.realFrameElement.getBoundingClientRect();
|
||||
detail.rect.top += currentRect.top;
|
||||
detail.rect.bottom += currentRect.top;
|
||||
detail.rect.left += currentRect.left;
|
||||
detail.rect.right += currentRect.left;
|
||||
currentWindow = currentWindow.parent;
|
||||
currentWindow = currentWindow.realFrameElement.ownerDocument.defaultView;
|
||||
}
|
||||
|
||||
sendAsyncMsg('selectionstatechanged', detail);
|
||||
|
|
|
@ -10,14 +10,17 @@ browserElementTestHelpers.setEnabledPref(true);
|
|||
browserElementTestHelpers.setSelectionChangeEnabledPref(true);
|
||||
browserElementTestHelpers.addPermission();
|
||||
const { Services } = SpecialPowers.Cu.import('resource://gre/modules/Services.jsm');
|
||||
|
||||
var gTextarea = null;
|
||||
var mm;
|
||||
var iframe;
|
||||
var iframeOuter;
|
||||
var iframeInner;
|
||||
var state = 0;
|
||||
var stateMeaning;
|
||||
var defaultData;
|
||||
var pasteData;
|
||||
var focusScript;
|
||||
var createEmbededFrame = false;
|
||||
|
||||
function copyToClipboard(str) {
|
||||
gTextarea.value = str;
|
||||
|
@ -46,30 +49,47 @@ function getScriptForSetFocus() {
|
|||
}
|
||||
|
||||
function runTest() {
|
||||
iframe = document.createElement('iframe');
|
||||
iframe.setAttribute('mozbrowser', 'true');
|
||||
document.body.appendChild(iframe);
|
||||
iframeOuter = document.createElement('iframe');
|
||||
iframeOuter.setAttribute('mozbrowser', 'true');
|
||||
if (createEmbededFrame) {
|
||||
iframeOuter.src = "file_NestedFramesOuter_CopyPaste.html";
|
||||
}
|
||||
document.body.appendChild(iframeOuter);
|
||||
|
||||
gTextarea = document.createElement('textarea');
|
||||
document.body.appendChild(gTextarea);
|
||||
|
||||
mm = SpecialPowers.getBrowserFrameMessageManager(iframe);
|
||||
iframeOuter.addEventListener("mozbrowserloadend", function onloadend(e) {
|
||||
iframeOuter.removeEventListener("mozbrowserloadend", onloadend);
|
||||
|
||||
iframe.addEventListener("mozbrowserloadend", function onloadend(e) {
|
||||
iframe.removeEventListener("mozbrowserloadend", onloadend);
|
||||
dispatchTest(e);
|
||||
if (createEmbededFrame) {
|
||||
var contentWin = SpecialPowers.wrap(iframeOuter)
|
||||
.QueryInterface(SpecialPowers.Ci.nsIFrameLoaderOwner)
|
||||
.frameLoader.docShell.contentViewer.DOMDocument.defaultView;
|
||||
var contentDoc = contentWin.document;
|
||||
iframeInner = contentDoc.getElementById('iframeInner');
|
||||
iframeInner.addEventListener("mozbrowserloadend", function onloadendinner(e) {
|
||||
iframeInner.removeEventListener("mozbrowserloadend", onloadendinner);
|
||||
mm = SpecialPowers.getBrowserFrameMessageManager(iframeInner);
|
||||
dispatchTest(e);
|
||||
});
|
||||
} else {
|
||||
iframeInner = iframeOuter;
|
||||
mm = SpecialPowers.getBrowserFrameMessageManager(iframeInner);
|
||||
dispatchTest(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function doCommand(cmd) {
|
||||
Services.obs.notifyObservers({wrappedJSObject: iframe},
|
||||
Services.obs.notifyObservers({wrappedJSObject: SpecialPowers.unwrap(iframeInner)},
|
||||
'copypaste-docommand', cmd);
|
||||
}
|
||||
|
||||
function dispatchTest(e) {
|
||||
iframe.addEventListener("mozbrowserloadend", function onloadend2(e) {
|
||||
iframe.removeEventListener("mozbrowserloadend", onloadend2);
|
||||
iframe.focus();
|
||||
iframeInner.addEventListener("mozbrowserloadend", function onloadend2(e) {
|
||||
iframeInner.removeEventListener("mozbrowserloadend", onloadend2);
|
||||
iframeInner.focus();
|
||||
SimpleTest.executeSoon(function() { testSelectAll(e); });
|
||||
});
|
||||
|
||||
|
@ -77,7 +97,7 @@ function dispatchTest(e) {
|
|||
case 0: // test for textarea
|
||||
defaultData = "Test for selection change event";
|
||||
pasteData = "from parent ";
|
||||
iframe.src = "data:text/html,<html><body>" +
|
||||
iframeInner.src = "data:text/html,<html><body>" +
|
||||
"<textarea id='text'>" + defaultData + "</textarea>" +
|
||||
"</body>" +
|
||||
"</html>";
|
||||
|
@ -87,7 +107,7 @@ function dispatchTest(e) {
|
|||
case 1: // test for input text
|
||||
defaultData = "Test for selection change event";
|
||||
pasteData = "from parent ";
|
||||
iframe.src = "data:text/html,<html><body>" +
|
||||
iframeInner.src = "data:text/html,<html><body>" +
|
||||
"<input type='text' id='text' value='" + defaultData + "'>" +
|
||||
"</body>" +
|
||||
"</html>";
|
||||
|
@ -97,7 +117,7 @@ function dispatchTest(e) {
|
|||
case 2: // test for input number
|
||||
defaultData = "12345";
|
||||
pasteData = "67890";
|
||||
iframe.src = "data:text/html,<html><body>" +
|
||||
iframeInner.src = "data:text/html,<html><body>" +
|
||||
"<input type='number' id='text' value='" + defaultData + "'>" +
|
||||
"</body>" +
|
||||
"</html>";
|
||||
|
@ -107,7 +127,7 @@ function dispatchTest(e) {
|
|||
case 3: // test for div contenteditable
|
||||
defaultData = "Test for selection change event";
|
||||
pasteData = "from parent ";
|
||||
iframe.src = "data:text/html,<html><body>" +
|
||||
iframeInner.src = "data:text/html,<html><body>" +
|
||||
"<div contenteditable='true' id='text'>" + defaultData + "</div>" +
|
||||
"</body>" +
|
||||
"</html>";
|
||||
|
@ -115,11 +135,9 @@ function dispatchTest(e) {
|
|||
focusScript = "var elt=content.document.getElementById('text');elt.focus();";
|
||||
break;
|
||||
case 4: // test for normal div
|
||||
SimpleTest.finish();
|
||||
return;
|
||||
defaultData = "Test for selection change event";
|
||||
pasteData = "from parent ";
|
||||
iframe.src = "data:text/html,<html><body>" +
|
||||
iframeInner.src = "data:text/html,<html><body>" +
|
||||
"<div id='text'>" + defaultData + "</div>" +
|
||||
"</body>" +
|
||||
"</html>";
|
||||
|
@ -129,7 +147,7 @@ function dispatchTest(e) {
|
|||
case 5: // test for normal div with designMode:on
|
||||
defaultData = "Test for selection change event";
|
||||
pasteData = "from parent ";
|
||||
iframe.src = "data:text/html,<html><body id='text'>" +
|
||||
iframeInner.src = "data:text/html,<html><body id='text'>" +
|
||||
defaultData +
|
||||
"</body>" +
|
||||
"<script>document.designMode='on';</script>" +
|
||||
|
@ -138,25 +156,47 @@ function dispatchTest(e) {
|
|||
focusScript = "var elt=content.document.getElementById('text');elt.focus();";
|
||||
break;
|
||||
default:
|
||||
SimpleTest.finish();
|
||||
if (createEmbededFrame || browserElementTestHelpers.getOOPByDefaultPref()) {
|
||||
SimpleTest.finish();
|
||||
} else {
|
||||
createEmbededFrame = true;
|
||||
|
||||
// clean up and run test again.
|
||||
document.body.removeChild(iframeOuter);
|
||||
document.body.removeChild(gTextarea);
|
||||
state = 0;
|
||||
runTest();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function isChildProcess() {
|
||||
return SpecialPowers.Cc["@mozilla.org/xre/app-info;1"]
|
||||
.getService(SpecialPowers.Ci.nsIXULRuntime)
|
||||
.processType != SpecialPowers.Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT;
|
||||
}
|
||||
|
||||
function testSelectAll(e) {
|
||||
iframe.addEventListener("mozbrowserselectionstatechanged", function selectchangeforselectall(e) {
|
||||
iframe.removeEventListener("mozbrowserselectionstatechanged", selectchangeforselectall, true);
|
||||
ok(true, "got mozbrowserselectionstatechanged event." + stateMeaning);
|
||||
ok(e.detail, "event.detail is not null." + stateMeaning);
|
||||
ok(e.detail.width != 0, "event.detail.width is not zero" + stateMeaning);
|
||||
ok(e.detail.height != 0, "event.detail.height is not zero" + stateMeaning);
|
||||
SimpleTest.executeSoon(function() { testCopy1(e); });
|
||||
}, true);
|
||||
// Skip mozbrowser test if we're at child process.
|
||||
if (!isChildProcess()) {
|
||||
iframeOuter.addEventListener("mozbrowserselectionstatechanged", function selectchangeforselectall(e) {
|
||||
iframeOuter.removeEventListener("mozbrowserselectionstatechanged", selectchangeforselectall, true);
|
||||
ok(true, "got mozbrowserselectionstatechanged event." + stateMeaning);
|
||||
ok(e.detail, "event.detail is not null." + stateMeaning);
|
||||
ok(e.detail.width != 0, "event.detail.width is not zero" + stateMeaning);
|
||||
ok(e.detail.height != 0, "event.detail.height is not zero" + stateMeaning);
|
||||
SimpleTest.executeSoon(function() { testCopy1(e); });
|
||||
}, true);
|
||||
}
|
||||
|
||||
mm.addMessageListener('content-focus', function messageforfocus(msg) {
|
||||
mm.removeMessageListener('content-focus', messageforfocus);
|
||||
// test selectall command, after calling this the selectionstatechanged event should be fired.
|
||||
doCommand('selectall');
|
||||
if (isChildProcess()) {
|
||||
SimpleTest.executeSoon(function() { testCopy1(e); });
|
||||
}
|
||||
});
|
||||
|
||||
mm.loadFrameScript(getScriptForSetFocus(), false);
|
||||
|
@ -242,9 +282,11 @@ function testCut1(e) {
|
|||
}
|
||||
|
||||
let compareData = pasteData;
|
||||
if (state == 3 && browserElementTestHelpers.getOOPByDefaultPref()) {
|
||||
// Something weird when we doCommand with content editable element in OOP.
|
||||
// Always true in this case
|
||||
// Something weird when we doCommand with content editable element in OOP.
|
||||
// Always true in this case
|
||||
// Normal div case cannot cut, always true as well.
|
||||
if ((state == 3 && browserElementTestHelpers.getOOPByDefaultPref()) ||
|
||||
state == 4) {
|
||||
compareData = function() { return true; }
|
||||
}
|
||||
|
||||
|
@ -271,4 +313,15 @@ function testCut2(e) {
|
|||
mm.loadFrameScript(getScriptForGetContent(), false);
|
||||
}
|
||||
|
||||
addEventListener('testready', runTest);
|
||||
// Give our origin permission to open browsers, and remove it when the test is complete.
|
||||
var principal = SpecialPowers.wrap(document).nodePrincipal;
|
||||
var context = { 'url': SpecialPowers.wrap(principal.URI).spec,
|
||||
'appId': principal.appId,
|
||||
'isInBrowserElement': true };
|
||||
|
||||
addEventListener('testready', function() {
|
||||
SpecialPowers.pushPermissions([
|
||||
{'type': 'browser', 'allow': 1, 'context': context}
|
||||
], runTest);
|
||||
});
|
||||
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<html>
|
||||
<body>
|
||||
<p>file_NestedFramesOuter_CopyPaste.html</p>
|
||||
<script>
|
||||
|
||||
addEventListener('load', function() {
|
||||
setTimeout(createIframe, 0);
|
||||
});
|
||||
|
||||
function createIframe()
|
||||
{
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.setAttribute('id', 'iframeInner');
|
||||
iframe.setAttribute('mozbrowser', true);
|
||||
iframe.setAttribute('remote', 'false');
|
||||
document.body.appendChild(iframe);
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -113,6 +113,7 @@ support-files =
|
|||
file_inputmethod.html
|
||||
file_post_request.html
|
||||
file_wyciwyg.html
|
||||
file_NestedFramesOuter_CopyPaste.html
|
||||
|
||||
# Note: browserElementTestHelpers.js looks at the test's filename to determine
|
||||
# whether the test should be OOP. "_oop_" signals OOP, "_inproc_" signals in
|
||||
|
|
|
@ -578,7 +578,7 @@ public:
|
|||
return mTarget;
|
||||
}
|
||||
|
||||
DrawTarget* operator->()
|
||||
DrawTarget* operator->() MOZ_NO_ADDREF_RELEASE_ON_RETURN
|
||||
{
|
||||
return mTarget;
|
||||
}
|
||||
|
@ -3252,6 +3252,22 @@ CanvasRenderingContext2D::GetHitRegionRect(Element* aElement, nsRect& aRect)
|
|||
*/
|
||||
struct MOZ_STACK_CLASS CanvasBidiProcessor : public nsBidiPresUtils::BidiProcessor
|
||||
{
|
||||
CanvasBidiProcessor()
|
||||
: nsBidiPresUtils::BidiProcessor()
|
||||
{
|
||||
if (Preferences::GetBool(GFX_MISSING_FONTS_NOTIFY_PREF)) {
|
||||
mMissingFonts = new gfxMissingFontRecorder();
|
||||
}
|
||||
}
|
||||
|
||||
~CanvasBidiProcessor()
|
||||
{
|
||||
// notify front-end code if we encountered missing glyphs in any script
|
||||
if (mMissingFonts) {
|
||||
mMissingFonts->Flush();
|
||||
}
|
||||
}
|
||||
|
||||
typedef CanvasRenderingContext2D::ContextState ContextState;
|
||||
|
||||
virtual void SetText(const char16_t* text, int32_t length, nsBidiDirection direction)
|
||||
|
@ -3268,7 +3284,8 @@ struct MOZ_STACK_CLASS CanvasBidiProcessor : public nsBidiPresUtils::BidiProcess
|
|||
length,
|
||||
mThebes,
|
||||
mAppUnitsPerDevPixel,
|
||||
flags);
|
||||
flags,
|
||||
mMissingFonts);
|
||||
}
|
||||
|
||||
virtual nscoord GetWidth()
|
||||
|
@ -3514,6 +3531,10 @@ struct MOZ_STACK_CLASS CanvasBidiProcessor : public nsBidiPresUtils::BidiProcess
|
|||
// current font
|
||||
gfxFontGroup* mFontgrp;
|
||||
|
||||
// to record any unsupported characters found in the text,
|
||||
// and notify front-end if it is interested
|
||||
nsAutoPtr<gfxMissingFontRecorder> mMissingFonts;
|
||||
|
||||
// dev pixel conversion factor
|
||||
int32_t mAppUnitsPerDevPixel;
|
||||
|
||||
|
|
|
@ -3375,9 +3375,11 @@ WebGLContext::CompileShader(WebGLShader* shader)
|
|||
size_t len = lenWithNull - 1;
|
||||
|
||||
nsAutoCString info;
|
||||
info.SetLength(len); // Allocates len+1, for the null-term.
|
||||
ShGetInfoLog(compiler, info.BeginWriting());
|
||||
|
||||
if (len) {
|
||||
// Don't allocate or try to write to zero length string
|
||||
info.SetLength(len); // Allocates len+1, for the null-term.
|
||||
ShGetInfoLog(compiler, info.BeginWriting());
|
||||
}
|
||||
shader->SetTranslationFailure(info);
|
||||
}
|
||||
ShDestruct(compiler);
|
||||
|
|
|
@ -219,7 +219,7 @@ public:
|
|||
return get();
|
||||
}
|
||||
|
||||
T* operator->() const {
|
||||
T* operator->() const MOZ_NO_ADDREF_RELEASE_ON_RETURN {
|
||||
MOZ_ASSERT(mRawPtr != 0, "You can't dereference a nullptr WebGLRefPtr with operator->()!");
|
||||
return get();
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
{}
|
||||
|
||||
// nsIDOMEventListener
|
||||
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent)
|
||||
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) MOZ_OVERRIDE
|
||||
{
|
||||
nsString type;
|
||||
nsresult rv = aEvent->GetType(type);
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
indexedDB::IDBTransaction* Transaction() const;
|
||||
|
||||
// nsIDOMEventListener
|
||||
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent);
|
||||
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
~DataStoreDB();
|
||||
|
|
|
@ -38,7 +38,7 @@ public:
|
|||
DataStoreRevisionCallback* aCallback);
|
||||
|
||||
// nsIDOMEventListener
|
||||
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent);
|
||||
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
~DataStoreRevision() {}
|
||||
|
|
|
@ -110,7 +110,7 @@ public:
|
|||
mInternalHeaders->SetGuard(aGuard, aRv);
|
||||
}
|
||||
|
||||
virtual JSObject* WrapObject(JSContext* aCx);
|
||||
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
|
||||
nsISupports* GetParentObject() const { return mOwner; }
|
||||
|
||||
private:
|
||||
|
|
|
@ -36,7 +36,7 @@ public:
|
|||
Request(nsIGlobalObject* aOwner, InternalRequest* aRequest);
|
||||
|
||||
JSObject*
|
||||
WrapObject(JSContext* aCx)
|
||||
WrapObject(JSContext* aCx) MOZ_OVERRIDE
|
||||
{
|
||||
return RequestBinding::Wrap(aCx, this);
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ public:
|
|||
Response(const Response& aOther) MOZ_DELETE;
|
||||
|
||||
JSObject*
|
||||
WrapObject(JSContext* aCx)
|
||||
WrapObject(JSContext* aCx) MOZ_OVERRIDE
|
||||
{
|
||||
return ResponseBinding::Wrap(aCx, this);
|
||||
}
|
||||
|
|
|
@ -163,14 +163,56 @@ function enter4(event) {
|
|||
} while (n && n.matches);
|
||||
|
||||
// Remove full-screen ancestor element from document, verify it stops being reported as current FSE.
|
||||
addFullscreenChangeContinuation("exit", exit4);
|
||||
addFullscreenChangeContinuation("exit", exit_to_arg_test_1);
|
||||
container.parentNode.removeChild(container);
|
||||
ok(!document.mozFullScreen, "36. Should exit full-screen mode after removing full-screen element ancestor from document");
|
||||
is(document.mozFullScreenElement, null, "37. Should not have a full-screen element again.");
|
||||
}
|
||||
|
||||
function exit_to_arg_test_1(event) {
|
||||
ok(!document.mozFullScreen, "Should have left full-screen mode (third time).");
|
||||
addFullscreenChangeContinuation("enter", enter_from_arg_test_1);
|
||||
var threw = false;
|
||||
try {
|
||||
fullScreenElement().mozRequestFullScreen(123);
|
||||
} catch (e) {
|
||||
threw = true;
|
||||
// trigger normal fullscreen so that we continue
|
||||
fullScreenElement().mozRequestFullScreen();
|
||||
}
|
||||
ok(!threw, "mozRequestFullScreen with bogus arg (123) shouldn't throw exception");
|
||||
}
|
||||
|
||||
function enter_from_arg_test_1(event) {
|
||||
ok(document.mozFullScreen, "Should have entered full-screen after calling with bogus (ignored) argument (fourth time)");
|
||||
addFullscreenChangeContinuation("exit", exit_to_arg_test_2);
|
||||
document.mozCancelFullScreen();
|
||||
ok(!document.mozFullScreen, "Should have left full-screen mode.");
|
||||
}
|
||||
|
||||
function exit_to_arg_test_2(event) {
|
||||
ok(!document.mozFullScreen, "Should have left full-screen mode (fourth time).");
|
||||
addFullscreenChangeContinuation("enter", enter_from_arg_test_2);
|
||||
var threw = false;
|
||||
try {
|
||||
fullScreenElement().mozRequestFullScreen({ vrDisplay: null });
|
||||
} catch (e) {
|
||||
threw = true;
|
||||
// trigger normal fullscreen so that we continue
|
||||
fullScreenElement().mozRequestFullScreen();
|
||||
}
|
||||
ok(!threw, "mozRequestFullScreen with { vrDisplay: null } shouldn't throw exception");
|
||||
}
|
||||
|
||||
function enter_from_arg_test_2(event) {
|
||||
ok(document.mozFullScreen, "Should have entered full-screen after calling with vrDisplay null argument (fifth time)");
|
||||
addFullscreenChangeContinuation("exit", exit4);
|
||||
document.mozCancelFullScreen();
|
||||
ok(!document.mozFullScreen, "Should have left full-screen mode.");
|
||||
}
|
||||
|
||||
function exit4(event) {
|
||||
ok(!document.mozFullScreen, "38. Should be back in non-full-screen mode (third time)");
|
||||
ok(!document.mozFullScreen, "38. Should be back in non-full-screen mode (fifth time)");
|
||||
setRequireTrustedContext(true);
|
||||
|
||||
addFullscreenErrorContinuation(error2);
|
||||
|
|
|
@ -3667,7 +3667,7 @@ public:
|
|||
}
|
||||
|
||||
mozIStorageStatement*
|
||||
operator->()
|
||||
operator->() MOZ_NO_ADDREF_RELEASE_ON_RETURN
|
||||
{
|
||||
MOZ_ASSERT(mStatement);
|
||||
return mStatement;
|
||||
|
@ -4077,7 +4077,7 @@ struct FactoryOp::MaybeBlockedDatabaseInfo MOZ_FINAL
|
|||
}
|
||||
|
||||
Database*
|
||||
operator->()
|
||||
operator->() MOZ_NO_ADDREF_RELEASE_ON_RETURN
|
||||
{
|
||||
return mDatabase;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,15 @@
|
|||
|
||||
interface nsIDOMMozNamedAttrMap;
|
||||
|
||||
%{C++
|
||||
// Undo the windows.h damage
|
||||
#undef GetMessage
|
||||
#undef CreateEvent
|
||||
#undef GetClassName
|
||||
#undef GetBinaryType
|
||||
#undef RemoveDirectory
|
||||
%}
|
||||
|
||||
/**
|
||||
* The nsIDOMElement interface represents an element in an HTML or
|
||||
* XML document.
|
||||
|
|
|
@ -1606,6 +1606,25 @@ ContentParent::OnChannelError()
|
|||
PContentParent::OnChannelError();
|
||||
}
|
||||
|
||||
void
|
||||
ContentParent::OnBeginSyncTransaction() {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
nsCOMPtr<nsIConsoleService> console(do_GetService(NS_CONSOLESERVICE_CONTRACTID));
|
||||
JSContext *cx = nsContentUtils::GetCurrentJSContext();
|
||||
if (console && cx) {
|
||||
nsAutoString filename;
|
||||
uint32_t lineno = 0;
|
||||
nsJSUtils::GetCallingLocation(cx, filename, &lineno);
|
||||
nsCOMPtr<nsIScriptError> error(do_CreateInstance(NS_SCRIPTERROR_CONTRACTID));
|
||||
error->Init(NS_LITERAL_STRING("unsafe CPOW usage"), filename, EmptyString(),
|
||||
lineno, 0, nsIScriptError::warningFlag, "chrome javascript");
|
||||
console->LogMessage(error);
|
||||
} else {
|
||||
NS_WARNING("Unsafe synchronous IPC message");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ContentParent::OnChannelConnected(int32_t pid)
|
||||
{
|
||||
|
|
|
@ -253,6 +253,8 @@ public:
|
|||
|
||||
virtual void OnChannelError() MOZ_OVERRIDE;
|
||||
|
||||
virtual void OnBeginSyncTransaction() MOZ_OVERRIDE;
|
||||
|
||||
virtual PCrashReporterParent*
|
||||
AllocPCrashReporterParent(const NativeThreadId& tid,
|
||||
const uint32_t& processType) MOZ_OVERRIDE;
|
||||
|
|
|
@ -1561,7 +1561,10 @@ void MediaDecoder::UnpinForSeek()
|
|||
bool MediaDecoder::CanPlayThrough()
|
||||
{
|
||||
Statistics stats = GetStatistics();
|
||||
if ((stats.mTotalBytes < 0 && stats.mDownloadRateReliable) ||
|
||||
|
||||
NS_ASSERTION(mDecoderStateMachine, "CanPlayThrough should have state machine!");
|
||||
if (mDecoderStateMachine->IsRealTime() ||
|
||||
(stats.mTotalBytes < 0 && stats.mDownloadRateReliable) ||
|
||||
(stats.mTotalBytes >= 0 && stats.mTotalBytes == stats.mDownloadPosition)) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -229,8 +229,8 @@ MediaDecoderStateMachine::MediaDecoderStateMachine(MediaDecoder* aDecoder,
|
|||
mAmpleVideoFrames =
|
||||
std::max<uint32_t>(Preferences::GetUint("media.video-queue.default-size", 10), 3);
|
||||
|
||||
mBufferingWait = mScheduler->IsRealTime() ? 0 : 30;
|
||||
mLowDataThresholdUsecs = mScheduler->IsRealTime() ? 0 : LOW_DATA_THRESHOLD_USECS;
|
||||
mBufferingWait = IsRealTime() ? 0 : 30;
|
||||
mLowDataThresholdUsecs = IsRealTime() ? 0 : LOW_DATA_THRESHOLD_USECS;
|
||||
|
||||
#ifdef XP_WIN
|
||||
// Ensure high precision timers are enabled on Windows, otherwise the state
|
||||
|
@ -1351,6 +1351,10 @@ double MediaDecoderStateMachine::GetCurrentTime() const
|
|||
return static_cast<double>(mCurrentFrameTime) / static_cast<double>(USECS_PER_S);
|
||||
}
|
||||
|
||||
bool MediaDecoderStateMachine::IsRealTime() const {
|
||||
return mScheduler->IsRealTime();
|
||||
}
|
||||
|
||||
int64_t MediaDecoderStateMachine::GetDuration()
|
||||
{
|
||||
AssertCurrentThreadInMonitor();
|
||||
|
@ -1988,6 +1992,12 @@ int64_t MediaDecoderStateMachine::AudioDecodedUsecs()
|
|||
// already decoded and pushed to the hardware, plus the amount of audio
|
||||
// data waiting to be pushed to the hardware.
|
||||
int64_t pushed = (mAudioEndTime != -1) ? (mAudioEndTime - GetMediaTime()) : 0;
|
||||
|
||||
// Currently for real time streams, AudioQueue().Duration() produce
|
||||
// wrong values (Bug 1114434), so we use frame counts to calculate duration.
|
||||
if (IsRealTime()) {
|
||||
return pushed + FramesToUsecs(AudioQueue().FrameCount(), mInfo.mAudio.mRate).value();
|
||||
}
|
||||
return pushed + AudioQueue().Duration();
|
||||
}
|
||||
|
||||
|
@ -2187,7 +2197,7 @@ MediaDecoderStateMachine::DecodeFirstFrame()
|
|||
VideoQueue().AddPopListener(decodeTask, DecodeTaskQueue());
|
||||
}
|
||||
|
||||
if (mScheduler->IsRealTime()) {
|
||||
if (IsRealTime()) {
|
||||
SetStartTime(0);
|
||||
nsresult res = FinishDecodeFirstFrame();
|
||||
NS_ENSURE_SUCCESS(res, res);
|
||||
|
@ -2226,7 +2236,7 @@ MediaDecoderStateMachine::FinishDecodeFirstFrame()
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
if (!mScheduler->IsRealTime() && !mDecodingFrozenAtStateMetadata) {
|
||||
if (!IsRealTime() && !mDecodingFrozenAtStateMetadata) {
|
||||
const VideoData* v = VideoQueue().PeekFront();
|
||||
const AudioData* a = AudioQueue().PeekFront();
|
||||
SetStartTime(mReader->ComputeStartTime(v, a));
|
||||
|
@ -2839,7 +2849,7 @@ void MediaDecoderStateMachine::RenderVideoFrame(VideoData* aData,
|
|||
if (container) {
|
||||
container->SetCurrentFrame(ThebesIntSize(aData->mDisplay), aData->mImage,
|
||||
aTarget);
|
||||
MOZ_ASSERT(container->GetFrameDelay() >= 0 || mScheduler->IsRealTime());
|
||||
MOZ_ASSERT(container->GetFrameDelay() >= 0 || IsRealTime());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2937,7 +2947,7 @@ void MediaDecoderStateMachine::AdvanceFrame()
|
|||
#ifdef PR_LOGGING
|
||||
int32_t droppedFrames = 0;
|
||||
#endif
|
||||
while (mScheduler->IsRealTime() || clock_time >= frame->mTime) {
|
||||
while (IsRealTime() || clock_time >= frame->mTime) {
|
||||
mVideoFrameEndTime = frame->GetEndTime();
|
||||
#ifdef PR_LOGGING
|
||||
if (currentFrame) {
|
||||
|
@ -3006,7 +3016,7 @@ void MediaDecoderStateMachine::AdvanceFrame()
|
|||
// zero if it's a initial frame.
|
||||
int64_t frameTime = currentFrame->mTime - mStartTime;
|
||||
if (frameTime > 0 || (frameTime == 0 && mPlayDuration == 0) ||
|
||||
mScheduler->IsRealTime()) {
|
||||
IsRealTime()) {
|
||||
ReentrantMonitorAutoExit exitMon(mDecoder->GetReentrantMonitor());
|
||||
// If we have video, we want to increment the clock in steps of the frame
|
||||
// duration.
|
||||
|
|
|
@ -165,6 +165,8 @@ public:
|
|||
void ShutdownReader();
|
||||
void FinishShutdown();
|
||||
|
||||
bool IsRealTime() const;
|
||||
|
||||
// Called from the main thread to get the duration. The decoder monitor
|
||||
// must be obtained before calling this. It is in units of microseconds.
|
||||
int64_t GetDuration();
|
||||
|
|
|
@ -744,7 +744,7 @@ class MOZ_STACK_CLASS AutoPinned {
|
|||
}
|
||||
|
||||
operator T*() const { return mResource; }
|
||||
T* operator->() const { return mResource; }
|
||||
T* operator->() const MOZ_NO_ADDREF_RELEASE_ON_RETURN { return mResource; }
|
||||
|
||||
private:
|
||||
T* mResource;
|
||||
|
|
|
@ -280,7 +280,7 @@ private:
|
|||
mPtr = nullptr;
|
||||
}
|
||||
|
||||
Type* operator->() const {
|
||||
Type* operator->() const MOZ_NO_ADDREF_RELEASE_ON_RETURN {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
return mPtr;
|
||||
}
|
||||
|
|
|
@ -62,7 +62,6 @@ GMPParent::GMPParent()
|
|||
, mAbnormalShutdownInProgress(false)
|
||||
, mAsyncShutdownRequired(false)
|
||||
, mAsyncShutdownInProgress(false)
|
||||
, mHasAccessedStorage(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -697,12 +696,6 @@ GMPParent::ActorDestroy(ActorDestroyReason aWhy)
|
|||
}
|
||||
}
|
||||
|
||||
bool
|
||||
GMPParent::HasAccessedStorage() const
|
||||
{
|
||||
return mHasAccessedStorage;
|
||||
}
|
||||
|
||||
mozilla::dom::PCrashReporterParent*
|
||||
GMPParent::AllocPCrashReporterParent(const NativeThreadId& aThread)
|
||||
{
|
||||
|
@ -809,7 +802,6 @@ GMPParent::RecvPGMPStorageConstructor(PGMPStorageParent* aActor)
|
|||
if (NS_WARN_IF(NS_FAILED(p->Init()))) {
|
||||
return false;
|
||||
}
|
||||
mHasAccessedStorage = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -113,6 +113,7 @@ public:
|
|||
|
||||
// Specifies that a GMP can only work with the specified NodeIds.
|
||||
void SetNodeId(const nsACString& aNodeId);
|
||||
const nsACString& GetNodeId() const { return mNodeId; }
|
||||
|
||||
// Returns true if a plugin can be or is being used across multiple NodeIds.
|
||||
bool CanBeSharedCrossNodeIds() const;
|
||||
|
@ -131,8 +132,6 @@ public:
|
|||
|
||||
void AbortAsyncShutdown();
|
||||
|
||||
bool HasAccessedStorage() const;
|
||||
|
||||
private:
|
||||
~GMPParent();
|
||||
nsRefPtr<GeckoMediaPluginService> mService;
|
||||
|
@ -197,7 +196,6 @@ private:
|
|||
|
||||
bool mAsyncShutdownRequired;
|
||||
bool mAsyncShutdownInProgress;
|
||||
bool mHasAccessedStorage;
|
||||
};
|
||||
|
||||
} // namespace gmp
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "nsDirectoryServiceDefs.h"
|
||||
#include "nsHashKeys.h"
|
||||
#include "nsIFile.h"
|
||||
#include "nsISimpleEnumerator.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -63,6 +64,7 @@ GetGMPLog()
|
|||
|
||||
namespace gmp {
|
||||
|
||||
static const uint32_t NodeIdSaltLength = 32;
|
||||
static StaticRefPtr<GeckoMediaPluginService> sSingletonService;
|
||||
|
||||
class GMPServiceCreateHelper MOZ_FINAL : public nsRunnable
|
||||
|
@ -323,18 +325,25 @@ GeckoMediaPluginService::Observe(nsISupports* aSubject,
|
|||
// open a PB mode origin-pair, we'll re-generate new salt.
|
||||
mTempNodeIds.Clear();
|
||||
} else if (!strcmp("gmp-clear-storage", aTopic)) {
|
||||
nsCOMPtr<nsIThread> thread;
|
||||
nsresult rv = GetThread(getter_AddRefs(thread));
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
thread->Dispatch(
|
||||
NS_NewRunnableMethod(this, &GeckoMediaPluginService::ClearStorage),
|
||||
NS_DISPATCH_NORMAL);
|
||||
nsresult rv = GMPDispatch(
|
||||
NS_NewRunnableMethod(this, &GeckoMediaPluginService::ClearStorage));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
GeckoMediaPluginService::GMPDispatch(nsIRunnable* event, uint32_t flags)
|
||||
{
|
||||
nsCOMPtr<nsIRunnable> r(event);
|
||||
nsCOMPtr<nsIThread> thread;
|
||||
nsresult rv = GetThread(getter_AddRefs(thread));
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
return thread->Dispatch(r, flags);
|
||||
}
|
||||
|
||||
// always call with getter_AddRefs, because it does
|
||||
NS_IMETHODIMP
|
||||
GeckoMediaPluginService::GetThread(nsIThread** aThread)
|
||||
|
@ -631,28 +640,14 @@ NS_IMETHODIMP
|
|||
GeckoMediaPluginService::AddPluginDirectory(const nsAString& aDirectory)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
nsCOMPtr<nsIThread> thread;
|
||||
nsresult rv = GetThread(getter_AddRefs(thread));
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
nsCOMPtr<nsIRunnable> r = new PathRunnable(this, aDirectory, true);
|
||||
thread->Dispatch(r, NS_DISPATCH_NORMAL);
|
||||
return NS_OK;
|
||||
return GMPDispatch(new PathRunnable(this, aDirectory, true));
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GeckoMediaPluginService::RemovePluginDirectory(const nsAString& aDirectory)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
nsCOMPtr<nsIThread> thread;
|
||||
nsresult rv = GetThread(getter_AddRefs(thread));
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
nsCOMPtr<nsIRunnable> r = new PathRunnable(this, aDirectory, false);
|
||||
thread->Dispatch(r, NS_DISPATCH_NORMAL);
|
||||
return NS_OK;
|
||||
return GMPDispatch(new PathRunnable(this, aDirectory, false));
|
||||
}
|
||||
|
||||
class DummyRunnable : public nsRunnable {
|
||||
|
@ -676,12 +671,8 @@ GeckoMediaPluginService::HasPluginForAPI(const nsACString& aAPI,
|
|||
// cause an event to be dispatched to which scans for plugins. We
|
||||
// dispatch a sync event to the GMP thread here in order to wait until
|
||||
// after the GMP thread has scanned any paths in MOZ_GMP_PATH.
|
||||
nsCOMPtr<nsIThread> thread;
|
||||
nsresult rv = GetThread(getter_AddRefs(thread));
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
thread->Dispatch(new DummyRunnable(), NS_DISPATCH_SYNC);
|
||||
nsresult rv = GMPDispatch(new DummyRunnable(), NS_DISPATCH_SYNC);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
MOZ_ASSERT(mScannedPluginOnDisk, "Should have scanned MOZ_GMP_PATH by now");
|
||||
}
|
||||
|
||||
|
@ -979,6 +970,14 @@ ReadFromFile(nsIFile* aPath,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
static nsresult
|
||||
ReadSalt(nsIFile* aPath, nsCString& aOutData)
|
||||
{
|
||||
return ReadFromFile(aPath, NS_LITERAL_CSTRING("salt"),
|
||||
aOutData, NodeIdSaltLength);
|
||||
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GeckoMediaPluginService::IsPersistentStorageAllowed(const nsACString& aNodeId,
|
||||
bool* aOutAllowed)
|
||||
|
@ -1007,7 +1006,6 @@ GeckoMediaPluginService::GetNodeId(const nsAString& aOrigin,
|
|||
#endif
|
||||
|
||||
nsresult rv;
|
||||
const uint32_t NodeIdSaltLength = 32;
|
||||
|
||||
if (aOrigin.EqualsLiteral("null") ||
|
||||
aOrigin.IsEmpty() ||
|
||||
|
@ -1131,10 +1129,7 @@ GeckoMediaPluginService::GetNodeId(const nsAString& aOrigin,
|
|||
}
|
||||
|
||||
} else {
|
||||
rv = ReadFromFile(path,
|
||||
NS_LITERAL_CSTRING("salt"),
|
||||
salt,
|
||||
NodeIdSaltLength);
|
||||
rv = ReadSalt(path, salt);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
|
@ -1146,6 +1141,162 @@ GeckoMediaPluginService::GetNodeId(const nsAString& aOrigin,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
static bool
|
||||
MatchOrigin(nsIFile* aPath, const nsACString& aOrigin)
|
||||
{
|
||||
// http://en.wikipedia.org/wiki/Domain_Name_System#Domain_name_syntax
|
||||
static const uint32_t MaxDomainLength = 253;
|
||||
|
||||
nsresult rv;
|
||||
nsCString str;
|
||||
rv = ReadFromFile(aPath, NS_LITERAL_CSTRING("origin"), str, MaxDomainLength);
|
||||
if (NS_SUCCEEDED(rv) && aOrigin.Equals(str)) {
|
||||
return true;
|
||||
}
|
||||
rv = ReadFromFile(aPath, NS_LITERAL_CSTRING("topLevelOrigin"), str, MaxDomainLength);
|
||||
if (NS_SUCCEEDED(rv) && aOrigin.Equals(str)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
template<typename T> static void
|
||||
KillPlugins(const nsTArray<nsRefPtr<GMPParent>>& aPlugins,
|
||||
Mutex& aMutex, T&& aFilter)
|
||||
{
|
||||
// Shutdown the plugins when |aFilter| evaluates to true.
|
||||
// After we clear storage data, node IDs will become invalid and shouldn't be
|
||||
// used anymore. We need to kill plugins with such nodeIDs.
|
||||
// Note: we can't shut them down while holding the lock,
|
||||
// as the lock is not re-entrant and shutdown requires taking the lock.
|
||||
// The plugin list is only edited on the GMP thread, so this should be OK.
|
||||
nsTArray<nsRefPtr<GMPParent>> pluginsToKill;
|
||||
{
|
||||
MutexAutoLock lock(aMutex);
|
||||
for (size_t i = 0; i < aPlugins.Length(); i++) {
|
||||
nsRefPtr<GMPParent> parent(aPlugins[i]);
|
||||
if (aFilter(parent)) {
|
||||
pluginsToKill.AppendElement(parent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < pluginsToKill.Length(); i++) {
|
||||
pluginsToKill[i]->CloseActive(false);
|
||||
// Abort async shutdown because we're going to wipe the plugin's storage,
|
||||
// so we don't want it writing more data in its async shutdown path.
|
||||
pluginsToKill[i]->AbortAsyncShutdown();
|
||||
}
|
||||
}
|
||||
|
||||
static nsresult
|
||||
DeleteDir(nsIFile* aPath)
|
||||
{
|
||||
bool exists = false;
|
||||
nsresult rv = aPath->Exists(&exists);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
if (exists) {
|
||||
return aPath->Remove(true);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
struct NodeFilter {
|
||||
explicit NodeFilter(const nsTArray<nsCString>& nodeIDs) : mNodeIDs(nodeIDs) {}
|
||||
bool operator()(GMPParent* aParent) {
|
||||
return mNodeIDs.Contains(aParent->GetNodeId());
|
||||
}
|
||||
private:
|
||||
const nsTArray<nsCString>& mNodeIDs;
|
||||
};
|
||||
|
||||
void
|
||||
GeckoMediaPluginService::ForgetThisSiteOnGMPThread(const nsACString& aOrigin)
|
||||
{
|
||||
#define ERR_RET(x) NS_ENSURE_SUCCESS_VOID(x)
|
||||
#define ERR_CONT(x) if (NS_FAILED(x)) { continue; }
|
||||
|
||||
MOZ_ASSERT(NS_GetCurrentThread() == mGMPThread);
|
||||
LOGD(("%s::%s: origin=%s", __CLASS__, __FUNCTION__, aOrigin.Data()));
|
||||
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIFile> path;
|
||||
|
||||
// $profileDir/gmp/
|
||||
ERR_RET(GetStorageDir(getter_AddRefs(path)));
|
||||
|
||||
// $profileDir/gmp/id/
|
||||
ERR_RET(path->AppendNative(NS_LITERAL_CSTRING("id")));
|
||||
|
||||
// Iterate all sub-folders of $profileDir/gmp/id/
|
||||
nsCOMPtr<nsISimpleEnumerator> iter;
|
||||
ERR_RET(path->GetDirectoryEntries(getter_AddRefs(iter)));
|
||||
|
||||
bool hasMore = false;
|
||||
nsTArray<nsCString> nodeIDsToClear;
|
||||
while (NS_SUCCEEDED(iter->HasMoreElements(&hasMore)) && hasMore) {
|
||||
nsCOMPtr<nsISupports> supports;
|
||||
ERR_CONT(iter->GetNext(getter_AddRefs(supports)));
|
||||
|
||||
// $profileDir/gmp/id/$hash
|
||||
nsCOMPtr<nsIFile> dirEntry(do_QueryInterface(supports, &rv));
|
||||
ERR_CONT(rv);
|
||||
|
||||
// Skip non-directory files.
|
||||
bool isDirectory = false;
|
||||
ERR_CONT(dirEntry->IsDirectory(&isDirectory));
|
||||
if (!isDirectory) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Check if origin or topLevelOrigin match the origin being forgotten.
|
||||
if (!MatchOrigin(dirEntry, aOrigin)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
nsAutoCString salt;
|
||||
if (NS_SUCCEEDED(ReadSalt(dirEntry, salt))) {
|
||||
// Keep node IDs to clear data/plugins associated with them later.
|
||||
nodeIDsToClear.AppendElement(salt);
|
||||
// Also remove node IDs from the table.
|
||||
mPersistentStorageAllowed.Remove(salt);
|
||||
}
|
||||
// Now we can remove the directory for the origin pair.
|
||||
if (NS_FAILED(dirEntry->Remove(true))) {
|
||||
NS_WARNING("Failed to delete the directory for the origin pair");
|
||||
}
|
||||
}
|
||||
|
||||
// Kill plugins that have node IDs to be cleared.
|
||||
KillPlugins(mPlugins, mMutex, NodeFilter(nodeIDsToClear));
|
||||
|
||||
// Clear all matching $profileDir/gmp/storage/$nodeId/
|
||||
ERR_RET(GetStorageDir(getter_AddRefs(path)));
|
||||
ERR_RET(path->AppendNative(NS_LITERAL_CSTRING("storage")));
|
||||
for (size_t i = 0; i < nodeIDsToClear.Length(); i++) {
|
||||
nsCOMPtr<nsIFile> dirEntry;
|
||||
ERR_CONT(path->Clone(getter_AddRefs(dirEntry)));
|
||||
ERR_CONT(dirEntry->AppendNative(nodeIDsToClear[i]));
|
||||
if (NS_FAILED(DeleteDir(dirEntry))) {
|
||||
NS_WARNING("Failed to delete GMP storage directory for the node");
|
||||
}
|
||||
}
|
||||
|
||||
#undef ERR_RET
|
||||
#undef ERR_CONT
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GeckoMediaPluginService::ForgetThisSite(const nsAString& aOrigin)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
return GMPDispatch(NS_NewRunnableMethodWithArg<nsCString>(
|
||||
this, &GeckoMediaPluginService::ForgetThisSiteOnGMPThread,
|
||||
NS_ConvertUTF16toUTF8(aOrigin)));
|
||||
}
|
||||
|
||||
class StorageClearedTask : public nsRunnable {
|
||||
public:
|
||||
NS_IMETHOD Run() {
|
||||
|
@ -1159,6 +1310,10 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
static bool IsNodeIdValid(GMPParent* aParent) {
|
||||
return !aParent->GetNodeId().IsEmpty();
|
||||
}
|
||||
|
||||
void
|
||||
GeckoMediaPluginService::ClearStorage()
|
||||
{
|
||||
|
@ -1170,30 +1325,8 @@ GeckoMediaPluginService::ClearStorage()
|
|||
return;
|
||||
#endif
|
||||
|
||||
// Shutdown plugins that have touched storage, as they could have
|
||||
// state that depends on storage. We don't want them to write data
|
||||
// after we've cleared storage, as they could end up in an inconsistent
|
||||
// state, so we must ensure they're shutdown before we actually clear
|
||||
// storage. Note: we can't shut them down while holding the lock,
|
||||
// as the lock is not re-entrant and shutdown requires taking the lock.
|
||||
// The plugin list is only edited on the GMP thread, so this should be OK.
|
||||
nsTArray<nsRefPtr<GMPParent>> pluginsToKill;
|
||||
{
|
||||
MutexAutoLock lock(mMutex);
|
||||
for (size_t i = 0; i < mPlugins.Length(); i++) {
|
||||
nsRefPtr<GMPParent> parent(mPlugins[i]);
|
||||
if (parent->HasAccessedStorage()) {
|
||||
pluginsToKill.AppendElement(parent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < pluginsToKill.Length(); i++) {
|
||||
pluginsToKill[i]->CloseActive(false);
|
||||
// Abort async shutdown because we're going to wipe the plugin's storage,
|
||||
// so we don't want it writing more data in its async shutdown path.
|
||||
pluginsToKill[i]->AbortAsyncShutdown();
|
||||
}
|
||||
// Kill plugins with valid nodeIDs.
|
||||
KillPlugins(mPlugins, mMutex, &IsNodeIdValid);
|
||||
|
||||
nsCOMPtr<nsIFile> path; // $profileDir/gmp/
|
||||
nsresult rv = GetStorageDir(getter_AddRefs(path));
|
||||
|
@ -1201,10 +1334,7 @@ GeckoMediaPluginService::ClearStorage()
|
|||
return;
|
||||
}
|
||||
|
||||
bool exists = false;
|
||||
if (NS_SUCCEEDED(path->Exists(&exists)) &&
|
||||
exists &&
|
||||
NS_FAILED(path->Remove(true))) {
|
||||
if (NS_FAILED(DeleteDir(path))) {
|
||||
NS_WARNING("Failed to delete GMP storage directory");
|
||||
}
|
||||
NS_DispatchToMainThread(new StorageClearedTask(), NS_DISPATCH_NORMAL);
|
||||
|
|
|
@ -52,6 +52,8 @@ public:
|
|||
private:
|
||||
~GeckoMediaPluginService();
|
||||
|
||||
nsresult GMPDispatch(nsIRunnable* event, uint32_t flags = NS_DISPATCH_NORMAL);
|
||||
|
||||
void ClearStorage();
|
||||
|
||||
GMPParent* SelectPluginForAPI(const nsACString& aNodeId,
|
||||
|
@ -74,6 +76,8 @@ private:
|
|||
|
||||
nsresult SetAsyncShutdownTimeout();
|
||||
|
||||
void ForgetThisSiteOnGMPThread(const nsACString& aOrigin);
|
||||
|
||||
protected:
|
||||
friend class GMPParent;
|
||||
void ReAddOnGMPThread(nsRefPtr<GMPParent>& aOld);
|
||||
|
|
|
@ -26,7 +26,7 @@ class GMPVideoHost;
|
|||
[ptr] native GMPDecryptorProxy(GMPDecryptorProxy);
|
||||
[ptr] native GMPAudioDecoderProxy(GMPAudioDecoderProxy);
|
||||
|
||||
[scriptable, uuid(657443a4-6b5d-4181-98b0-56997b35bd57)]
|
||||
[scriptable, uuid(4aaf58d3-181f-4325-9a2f-41172d995a70)]
|
||||
interface mozIGeckoMediaPluginService : nsISupports
|
||||
{
|
||||
|
||||
|
@ -96,6 +96,11 @@ interface mozIGeckoMediaPluginService : nsISupports
|
|||
in AString topLevelOrigin,
|
||||
in bool inPrivateBrowsingMode);
|
||||
|
||||
/**
|
||||
* Clears storage data associated with the origin.
|
||||
*/
|
||||
void forgetThisSite(in AString origin);
|
||||
|
||||
/**
|
||||
* Returns true if the given node id is allowed to store things
|
||||
* persistently on disk. Private Browsing and local content are not
|
||||
|
|
|
@ -135,6 +135,8 @@ MediaEngineTabVideoSource::Allocate(const VideoTrackConstraintsN& aConstraints,
|
|||
cHeight.mMax >= advanced[i].mHeight.mMin && cHeight.mMin <= advanced[i].mHeight.mMax) {
|
||||
cWidth.mMin = std::max(cWidth.mMin, advanced[i].mWidth.mMin);
|
||||
cHeight.mMin = std::max(cHeight.mMin, advanced[i].mHeight.mMin);
|
||||
cWidth.mMax = std::min(cWidth.mMax, advanced[i].mWidth.mMax);
|
||||
cHeight.mMax = std::min(cHeight.mMax, advanced[i].mHeight.mMax);
|
||||
}
|
||||
|
||||
if (mWindowId == -1 && advanced[i].mBrowserWindow.WasPassed()) {
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "mozilla/Preferences.h"
|
||||
#include "nsString.h"
|
||||
#include "mozilla/dom/ipc/BlobChild.h"
|
||||
#include "mozilla/unused.h"
|
||||
|
||||
using namespace mozilla::dom;
|
||||
using namespace mozilla::dom::mobilemessage;
|
||||
|
@ -70,7 +71,8 @@ SendCursorRequest(const IPCMobileMessageCursor& aRequest,
|
|||
|
||||
// Add an extra ref for IPDL. Will be released in
|
||||
// SmsChild::DeallocPMobileMessageCursor().
|
||||
actor->AddRef();
|
||||
nsRefPtr<MobileMessageCursorChild> actorCopy(actor);
|
||||
mozilla::unused << actorCopy.forget().take();
|
||||
|
||||
smsChild->SendPMobileMessageCursorConstructor(actor, aRequest);
|
||||
|
||||
|
|
|
@ -124,12 +124,13 @@ interface Element : Node {
|
|||
* Requests that this element be made the full-screen element, as per the DOM
|
||||
* full-screen api.
|
||||
*
|
||||
* The fsOptions parameter is non-standard.
|
||||
* The options parameter is non-standard. In Gecko, it can be:
|
||||
* a RequestFullscreenOptions object
|
||||
*
|
||||
* @see <https://wiki.mozilla.org/index.php?title=Gecko:FullScreenAPI>
|
||||
*/
|
||||
[UnsafeInPrerendering]
|
||||
void mozRequestFullScreen(optional RequestFullscreenOptions fsOptions);
|
||||
[Throws, UnsafeInPrerendering]
|
||||
void mozRequestFullScreen(optional any options);
|
||||
|
||||
/**
|
||||
* Requests that this element be made the pointer-locked element, as per the DOM
|
||||
|
|
|
@ -34,8 +34,8 @@ public:
|
|||
|
||||
explicit ServiceWorkerContainer(nsPIDOMWindow* aWindow);
|
||||
|
||||
JSObject*
|
||||
WrapObject(JSContext* aCx);
|
||||
virtual JSObject*
|
||||
WrapObject(JSContext* aCx) MOZ_OVERRIDE;
|
||||
|
||||
already_AddRefed<Promise>
|
||||
Register(const nsAString& aScriptURL,
|
||||
|
|
|
@ -115,7 +115,7 @@ public:
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
UnregisterSucceeded(bool aState)
|
||||
UnregisterSucceeded(bool aState) MOZ_OVERRIDE
|
||||
{
|
||||
AssertIsOnMainThread();
|
||||
mPromise->MaybeResolve(aState);
|
||||
|
@ -123,7 +123,7 @@ public:
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
UnregisterFailed()
|
||||
UnregisterFailed() MOZ_OVERRIDE
|
||||
{
|
||||
AssertIsOnMainThread();
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
const nsAString& aScope);
|
||||
|
||||
JSObject*
|
||||
WrapObject(JSContext* aCx);
|
||||
WrapObject(JSContext* aCx) MOZ_OVERRIDE;
|
||||
|
||||
already_AddRefed<workers::ServiceWorker>
|
||||
GetInstalling();
|
||||
|
|
|
@ -2025,7 +2025,7 @@ public:
|
|||
|
||||
NS_IMETHOD
|
||||
CollectReports(nsIMemoryReporterCallback* aCallback,
|
||||
nsISupports* aClosure, bool aAnonymize)
|
||||
nsISupports* aClosure, bool aAnonymize) MOZ_OVERRIDE
|
||||
{
|
||||
AssertIsOnMainThread();
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@ support-files =
|
|||
relativeLoad_worker.js
|
||||
relativeLoad_worker2.js
|
||||
rvals_worker.js
|
||||
sharedWorker_console.js
|
||||
sharedWorker_sharedWorker.js
|
||||
simpleThread_worker.js
|
||||
suspend_iframe.html
|
||||
|
@ -115,6 +116,7 @@ support-files =
|
|||
[test_closeOnGC.html]
|
||||
[test_console.html]
|
||||
[test_consoleReplaceable.html]
|
||||
[test_consoleSharedWorkers.html]
|
||||
[test_contentWorker.html]
|
||||
[test_csp.html]
|
||||
skip-if = (toolkit == 'gonk' && debug) #debug-only failure
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
"use strict";
|
||||
|
||||
onconnect = function(evt) {
|
||||
console.profile("Hello profiling from a SharedWorker!");
|
||||
console.log("Hello world from a SharedWorker!");
|
||||
evt.ports[0].postMessage('ok!');
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test for console API in SharedWorker</title>
|
||||
<script src="/tests/SimpleTest/SimpleTest.js">
|
||||
</script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
|
||||
function consoleListener() {
|
||||
SpecialPowers.addObserver(this, "console-api-log-event", false);
|
||||
SpecialPowers.addObserver(this, "console-api-profiler", false);
|
||||
}
|
||||
|
||||
var order = 0;
|
||||
consoleListener.prototype = {
|
||||
observe: function(aSubject, aTopic, aData) {
|
||||
ok(true, "Something has been received");
|
||||
|
||||
if (aTopic == "console-api-profiler") {
|
||||
var obj = aSubject.wrappedJSObject;
|
||||
is (obj.arguments[0], "Hello profiling from a SharedWorker!", "A message from a SharedWorker \\o/");
|
||||
is (order++, 0, "First a profiler message.");
|
||||
|
||||
SpecialPowers.removeObserver(this, "console-api-profiler");
|
||||
return;
|
||||
}
|
||||
|
||||
if (aTopic == "console-api-log-event") {
|
||||
var obj = aSubject.wrappedJSObject;
|
||||
is (obj.arguments[0], "Hello world from a SharedWorker!", "A message from a SharedWorker \\o/");
|
||||
is (aData, "SharedWorker", "The ID is SharedWorker");
|
||||
is (order++, 1, "Then a log message.");
|
||||
|
||||
SpecialPowers.removeObserver(this, "console-api-log-event");
|
||||
SimpleTest.finish();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var cl = new consoleListener();
|
||||
|
||||
SpecialPowers.pushPrefEnv({ set: [["dom.workers.sharedWorkers.enabled", true]] }, function() {
|
||||
new SharedWorker('sharedWorker_console.js');
|
||||
});
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -60,7 +60,7 @@ public:
|
|||
/*const*/ nsIRDFResource* operator*() const {
|
||||
return *mCurrent; }
|
||||
|
||||
/*const*/ nsIRDFResource* operator->() const {
|
||||
/*const*/ nsIRDFResource* operator->() const MOZ_NO_ADDREF_RELEASE_ON_RETURN {
|
||||
return *mCurrent; }
|
||||
|
||||
bool operator==(const ConstIterator& aConstIterator) const {
|
||||
|
|
|
@ -42,7 +42,7 @@ public:
|
|||
nsresult Init() {
|
||||
return CallCreateInstance(NS_DIALOGPARAMBLOCK_CONTRACTID, &mBlock);
|
||||
}
|
||||
nsIDialogParamBlock * operator->() const { return mBlock; }
|
||||
nsIDialogParamBlock * operator->() const MOZ_NO_ADDREF_RELEASE_ON_RETURN { return mBlock; }
|
||||
operator nsIDialogParamBlock * const () { return mBlock; }
|
||||
|
||||
private:
|
||||
|
|
|
@ -59,7 +59,7 @@ public:
|
|||
nsresult Init() {
|
||||
return CallCreateInstance(NS_DIALOGPARAMBLOCK_CONTRACTID, &mBlock);
|
||||
}
|
||||
nsIDialogParamBlock * operator->() const { return mBlock; }
|
||||
nsIDialogParamBlock * operator->() const MOZ_NO_ADDREF_RELEASE_ON_RETURN { return mBlock; }
|
||||
operator nsIDialogParamBlock * const () { return mBlock; }
|
||||
|
||||
private:
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,4 +1,4 @@
|
|||
57244
|
||||
57245
|
||||
0/nm
|
||||
0th/pt
|
||||
1/n1
|
||||
|
@ -24588,6 +24588,7 @@ course/EDGMS
|
|||
coursebook/S
|
||||
courser/MS
|
||||
coursework
|
||||
court-martial/SGD
|
||||
court/SMDYG
|
||||
courteous/EY
|
||||
courteousness/M
|
||||
|
@ -43380,7 +43381,7 @@ pickings/M
|
|||
pickle/MGDS
|
||||
pickpocket/SMG
|
||||
pickup/MS
|
||||
picky/TR
|
||||
picky/TRP
|
||||
picnic/MS
|
||||
picnicked
|
||||
picnicker/SM
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче