зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-central to autoland
This commit is contained in:
Коммит
eb5f79ce29
|
@ -8,4 +8,6 @@ DIRS += ['communicator']
|
|||
|
||||
JAR_MANIFESTS += ['jar.mn']
|
||||
|
||||
DEFINES['CAN_DRAW_IN_TITLEBAR'] = 1
|
||||
|
||||
include('../tab-svgs.mozbuild')
|
||||
|
|
|
@ -8,4 +8,6 @@ DIRS += ['communicator']
|
|||
|
||||
JAR_MANIFESTS += ['jar.mn']
|
||||
|
||||
DEFINES['CAN_DRAW_IN_TITLEBAR'] = 1
|
||||
|
||||
include('../tab-svgs.mozbuild')
|
||||
|
|
|
@ -20,7 +20,7 @@ function ReadOnlyEditor(container, node) {
|
|||
this.tag.classList.add("theme-fg-color5");
|
||||
this.tag.textContent = node.isBeforePseudoElement ? "::before" : "::after";
|
||||
} else if (node.nodeType == nodeConstants.DOCUMENT_TYPE_NODE) {
|
||||
this.elt.classList.add("comment");
|
||||
this.elt.classList.add("comment", "doctype");
|
||||
this.tag.textContent = node.doctypeString;
|
||||
} else {
|
||||
this.tag.textContent = node.nodeName;
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
}
|
||||
|
||||
:root[platform="linux"] .devtools-monospace {
|
||||
font-size: 80%;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
/* Override wrong system font from forms.css */
|
||||
|
|
|
@ -299,6 +299,7 @@ ul.children + .tag-line::before {
|
|||
|
||||
.theme-firebug .theme-fg-color3 {
|
||||
color: var(--theme-graphs-full-blue);
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.theme-firebug .open,
|
||||
|
@ -335,10 +336,19 @@ ul.children + .tag-line::before {
|
|||
color: var(--theme-selection-color);
|
||||
}
|
||||
|
||||
/* Applicable to the DOCTYPE */
|
||||
.doctype {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.theme-firebug .doctype {
|
||||
color: #787878;
|
||||
}
|
||||
|
||||
/* In case a node isn't displayed in the page, we fade the syntax highlighting */
|
||||
.not-displayed .open,
|
||||
.not-displayed .close {
|
||||
opacity: .7;
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
/* Events */
|
||||
|
|
|
@ -19,11 +19,6 @@
|
|||
|
||||
/* Rule View Tabpanel */
|
||||
|
||||
.theme-firebug .ruleview {
|
||||
font-family: monospace;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#sidebar-panel-ruleview {
|
||||
margin: 0;
|
||||
display: flex;
|
||||
|
|
|
@ -135,7 +135,7 @@
|
|||
}
|
||||
|
||||
:root.theme-firebug {
|
||||
--theme-body-background: #fcfcfc;
|
||||
--theme-body-background: #fff;
|
||||
--theme-sidebar-background: #fcfcfc;
|
||||
--theme-contrast-background: #e6b064;
|
||||
|
||||
|
@ -145,7 +145,7 @@
|
|||
--theme-selection-background-semitransparent: rgba(128,128,128,0.2);
|
||||
--theme-selection-color: white;
|
||||
--theme-splitter-color: #aabccf;
|
||||
--theme-comment: green;
|
||||
--theme-comment: darkgreen;
|
||||
|
||||
--theme-body-color: #000000;
|
||||
--theme-body-color-alt: #585959;
|
||||
|
@ -156,10 +156,10 @@
|
|||
--theme-highlight-green: #2cbb0f;
|
||||
--theme-highlight-blue: #3455db;
|
||||
--theme-highlight-bluegrey: #0072ab;
|
||||
--theme-highlight-purple: #887ce6;
|
||||
--theme-highlight-purple: #000080;
|
||||
--theme-highlight-lightorange: #d97e00;
|
||||
--theme-highlight-orange: #f13c00;
|
||||
--theme-highlight-red: #e22f6f;
|
||||
--theme-highlight-red: #f00;
|
||||
--theme-highlight-pink: #b82ee5;
|
||||
--theme-highlight-gray: #dde1e4;
|
||||
|
||||
|
|
|
@ -15,12 +15,10 @@ NS_IMPL_ISUPPORTS0(ArchiveItem)
|
|||
|
||||
ArchiveItem::ArchiveItem()
|
||||
{
|
||||
MOZ_COUNT_CTOR(ArchiveItem);
|
||||
}
|
||||
|
||||
ArchiveItem::~ArchiveItem()
|
||||
{
|
||||
MOZ_COUNT_DTOR(ArchiveItem);
|
||||
}
|
||||
|
||||
|
||||
|
@ -43,7 +41,6 @@ ArchiveItem::SetType(const nsCString& aType)
|
|||
ArchiveReaderEvent::ArchiveReaderEvent(ArchiveReader* aArchiveReader)
|
||||
: mArchiveReader(aArchiveReader)
|
||||
{
|
||||
MOZ_COUNT_CTOR(ArchiveReaderEvent);
|
||||
}
|
||||
|
||||
ArchiveReaderEvent::~ArchiveReaderEvent()
|
||||
|
@ -51,8 +48,6 @@ ArchiveReaderEvent::~ArchiveReaderEvent()
|
|||
if (!NS_IsMainThread()) {
|
||||
NS_ReleaseOnMainThread(mMimeService.forget());
|
||||
}
|
||||
|
||||
MOZ_COUNT_DTOR(ArchiveReaderEvent);
|
||||
}
|
||||
|
||||
// From the filename to the mimetype:
|
||||
|
|
|
@ -26,13 +26,11 @@ public:
|
|||
explicit ArchiveRequestEvent(ArchiveRequest* aRequest)
|
||||
: mRequest(aRequest)
|
||||
{
|
||||
MOZ_COUNT_CTOR(ArchiveRequestEvent);
|
||||
}
|
||||
|
||||
protected:
|
||||
~ArchiveRequestEvent()
|
||||
{
|
||||
MOZ_COUNT_DTOR(ArchiveRequestEvent);
|
||||
}
|
||||
|
||||
private: //data
|
||||
|
@ -56,8 +54,6 @@ ArchiveRequest::ArchiveRequest(nsPIDOMWindowInner* aWindow,
|
|||
{
|
||||
MOZ_ASSERT(aReader);
|
||||
|
||||
MOZ_COUNT_CTOR(ArchiveRequest);
|
||||
|
||||
/* An event to make this request asynchronous: */
|
||||
RefPtr<ArchiveRequestEvent> event = new ArchiveRequestEvent(this);
|
||||
NS_DispatchToCurrentThread(event);
|
||||
|
@ -65,7 +61,6 @@ ArchiveRequest::ArchiveRequest(nsPIDOMWindowInner* aWindow,
|
|||
|
||||
ArchiveRequest::~ArchiveRequest()
|
||||
{
|
||||
MOZ_COUNT_DTOR(ArchiveRequest);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
|
|
@ -28,12 +28,10 @@ ArchiveZipItem::ArchiveZipItem(const char* aFilename,
|
|||
mCentralStruct(aCentralStruct),
|
||||
mEncoding(aEncoding)
|
||||
{
|
||||
MOZ_COUNT_CTOR(ArchiveZipItem);
|
||||
}
|
||||
|
||||
ArchiveZipItem::~ArchiveZipItem()
|
||||
{
|
||||
MOZ_COUNT_DTOR(ArchiveZipItem);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
|
|
@ -36,8 +36,6 @@ public:
|
|||
mLength(aLength),
|
||||
mStatus(NotStarted)
|
||||
{
|
||||
MOZ_COUNT_CTOR(ArchiveInputStream);
|
||||
|
||||
// Reset the data:
|
||||
memset(&mData, 0, sizeof(mData));
|
||||
|
||||
|
@ -52,7 +50,6 @@ public:
|
|||
private:
|
||||
virtual ~ArchiveInputStream()
|
||||
{
|
||||
MOZ_COUNT_DTOR(ArchiveInputStream);
|
||||
Close();
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,6 @@ public:
|
|||
mFilename(aName)
|
||||
{
|
||||
MOZ_ASSERT(mBlobImpl);
|
||||
MOZ_COUNT_CTOR(ArchiveZipBlobImpl);
|
||||
}
|
||||
|
||||
ArchiveZipBlobImpl(const nsAString& aName,
|
||||
|
@ -52,7 +51,6 @@ public:
|
|||
mFilename(aName)
|
||||
{
|
||||
MOZ_ASSERT(mBlobImpl);
|
||||
MOZ_COUNT_CTOR(ArchiveZipBlobImpl);
|
||||
}
|
||||
|
||||
// Overrides:
|
||||
|
@ -62,7 +60,6 @@ public:
|
|||
protected:
|
||||
virtual ~ArchiveZipBlobImpl()
|
||||
{
|
||||
MOZ_COUNT_DTOR(ArchiveZipBlobImpl);
|
||||
}
|
||||
|
||||
virtual already_AddRefed<BlobImpl>
|
||||
|
|
|
@ -360,7 +360,6 @@ public:
|
|||
{
|
||||
MOZ_ASSERT(XRE_IsParentProcess());
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_COUNT_CTOR(ParentRunnable);
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -369,7 +368,6 @@ private:
|
|||
MOZ_ASSERT(mState == eFinished);
|
||||
MOZ_ASSERT(!mDirectoryLock);
|
||||
MOZ_ASSERT(mActorDestroyed);
|
||||
MOZ_COUNT_DTOR(ParentRunnable);
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -1233,7 +1231,6 @@ public:
|
|||
mOpened(false)
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
MOZ_COUNT_CTOR(ChildRunnable);
|
||||
}
|
||||
|
||||
JS::AsmJSCacheResult
|
||||
|
@ -1282,7 +1279,6 @@ private:
|
|||
MOZ_ASSERT(!mOpened);
|
||||
MOZ_ASSERT(mState == eFinished);
|
||||
MOZ_ASSERT(mActorDestroyed);
|
||||
MOZ_COUNT_DTOR(ChildRunnable);
|
||||
}
|
||||
|
||||
// IPDL methods.
|
||||
|
|
|
@ -32,12 +32,10 @@ NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(Crypto, mParent, mSubtle)
|
|||
|
||||
Crypto::Crypto()
|
||||
{
|
||||
MOZ_COUNT_CTOR(Crypto);
|
||||
}
|
||||
|
||||
Crypto::~Crypto()
|
||||
{
|
||||
MOZ_COUNT_DTOR(Crypto);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -44,12 +44,10 @@ PostMessageEvent::PostMessageEvent(nsGlobalWindow* aSource,
|
|||
mSourceDocument(aSourceDocument),
|
||||
mTrustedCaller(aTrustedCaller)
|
||||
{
|
||||
MOZ_COUNT_CTOR(PostMessageEvent);
|
||||
}
|
||||
|
||||
PostMessageEvent::~PostMessageEvent()
|
||||
{
|
||||
MOZ_COUNT_DTOR(PostMessageEvent);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -242,7 +242,7 @@ ResponsiveImageSelector::SetSizesFromDescriptor(const nsAString & aSizes)
|
|||
nsCSSParser cssParser;
|
||||
|
||||
return cssParser.ParseSourceSizeList(aSizes, nullptr, 0,
|
||||
mSizeQueries, mSizeValues, true);
|
||||
mSizeQueries, mSizeValues);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -739,12 +739,10 @@ NS_IMPL_RELEASE_INHERITED(ShadowRootStyleSheetList, StyleSheetList)
|
|||
ShadowRootStyleSheetList::ShadowRootStyleSheetList(ShadowRoot* aShadowRoot)
|
||||
: mShadowRoot(aShadowRoot)
|
||||
{
|
||||
MOZ_COUNT_CTOR(ShadowRootStyleSheetList);
|
||||
}
|
||||
|
||||
ShadowRootStyleSheetList::~ShadowRootStyleSheetList()
|
||||
{
|
||||
MOZ_COUNT_DTOR(ShadowRootStyleSheetList);
|
||||
}
|
||||
|
||||
StyleSheet*
|
||||
|
|
|
@ -574,12 +574,10 @@ nsContentPermissionRequestProxy::nsContentPermissionRequesterProxy
|
|||
|
||||
nsContentPermissionRequestProxy::nsContentPermissionRequestProxy()
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsContentPermissionRequestProxy);
|
||||
}
|
||||
|
||||
nsContentPermissionRequestProxy::~nsContentPermissionRequestProxy()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsContentPermissionRequestProxy);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
|
|
@ -589,6 +589,15 @@ static nsresult AppendImagePromise(nsITransferable* aTransferable,
|
|||
nsresult rv;
|
||||
|
||||
NS_ENSURE_TRUE(aImgRequest, NS_OK);
|
||||
|
||||
uint32_t imageStatus;
|
||||
rv = aImgRequest->GetImageStatus(&imageStatus);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (!(imageStatus & imgIRequest::STATUS_FRAME_COMPLETE) ||
|
||||
(imageStatus & imgIRequest::STATUS_ERROR)) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsINode> node = do_QueryInterface(aImageElement, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
|
|
@ -791,16 +791,6 @@ nsDOMClassInfo::PreCreate(nsISupports *nativeObj, JSContext *cx,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMClassInfo::AddProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
|
||||
JSObject *obj, jsid id, JS::Handle<JS::Value> val,
|
||||
bool *_retval)
|
||||
{
|
||||
NS_WARNING("nsDOMClassInfo::AddProperty Don't call me!");
|
||||
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMClassInfo::GetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
|
||||
JSObject *obj, jsid id, JS::Value *vp,
|
||||
|
@ -1964,16 +1954,6 @@ nsEventTargetSH::PreCreate(nsISupports *nativeObj, JSContext *cx,
|
|||
return *parentObj ? NS_OK : NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsEventTargetSH::AddProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
|
||||
JSObject *obj, jsid id, JS::Handle<JS::Value> val,
|
||||
bool *_retval)
|
||||
{
|
||||
nsEventTargetSH::PreserveWrapper(GetNative(wrapper, obj));
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
nsEventTargetSH::PreserveWrapper(nsISupports *aNative)
|
||||
{
|
||||
|
|
|
@ -175,16 +175,8 @@ protected:
|
|||
public:
|
||||
NS_IMETHOD PreCreate(nsISupports *nativeObj, JSContext *cx,
|
||||
JSObject *globalObj, JSObject **parentObj) override;
|
||||
NS_IMETHOD AddProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
|
||||
JSObject *obj, jsid id, JS::Handle<JS::Value> val,
|
||||
bool *_retval) override;
|
||||
|
||||
virtual void PreserveWrapper(nsISupports *aNative) override;
|
||||
|
||||
static nsIClassInfo *doCreate(nsDOMClassInfoData* aData)
|
||||
{
|
||||
return new nsEventTargetSH(aData);
|
||||
}
|
||||
};
|
||||
|
||||
// A place to hang some static methods that we should really consider
|
||||
|
|
|
@ -1218,13 +1218,11 @@ public:
|
|||
explicit SelectorCacheKeyDeleter(SelectorCacheKey* aToDelete)
|
||||
: mSelector(aToDelete)
|
||||
{
|
||||
MOZ_COUNT_CTOR(SelectorCacheKeyDeleter);
|
||||
}
|
||||
|
||||
protected:
|
||||
~SelectorCacheKeyDeleter()
|
||||
{
|
||||
MOZ_COUNT_DTOR(SelectorCacheKeyDeleter);
|
||||
}
|
||||
|
||||
public:
|
||||
|
|
|
@ -2823,8 +2823,7 @@ nsGlobalWindow::SetNewDocument(nsIDocument* aDocument,
|
|||
newInnerWindow->mPerformance =
|
||||
Performance::CreateForMainThread(newInnerWindow->AsInner(),
|
||||
currentInner->mPerformance->GetDOMTiming(),
|
||||
currentInner->mPerformance->GetChannel(),
|
||||
currentInner->mPerformance->GetParentPerformance());
|
||||
currentInner->mPerformance->GetChannel());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4033,22 +4032,7 @@ nsPIDOMWindowInner::CreatePerformanceObjectIfNeeded()
|
|||
timedChannel = nullptr;
|
||||
}
|
||||
if (timing) {
|
||||
// If we are dealing with an iframe, we will need the parent's performance
|
||||
// object (so we can add the iframe as a resource of that page).
|
||||
Performance* parentPerformance = nullptr;
|
||||
nsCOMPtr<nsPIDOMWindowOuter> parentWindow = GetScriptableParentOrNull();
|
||||
if (parentWindow) {
|
||||
nsPIDOMWindowInner* parentInnerWindow = nullptr;
|
||||
if (parentWindow) {
|
||||
parentInnerWindow = parentWindow->GetCurrentInnerWindow();
|
||||
}
|
||||
if (parentInnerWindow) {
|
||||
parentPerformance = parentInnerWindow->GetPerformance();
|
||||
}
|
||||
}
|
||||
mPerformance =
|
||||
Performance::CreateForMainThread(this, timing, timedChannel,
|
||||
parentPerformance);
|
||||
mPerformance = Performance::CreateForMainThread(this, timing, timedChannel);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6412,7 +6396,6 @@ public:
|
|||
, mStage(eBeforeToggle)
|
||||
, mFullscreen(aFullscreen)
|
||||
{
|
||||
MOZ_COUNT_CTOR(FullscreenTransitionTask);
|
||||
}
|
||||
|
||||
NS_IMETHOD Run() override;
|
||||
|
@ -6420,7 +6403,6 @@ public:
|
|||
private:
|
||||
~FullscreenTransitionTask() override
|
||||
{
|
||||
MOZ_COUNT_DTOR(FullscreenTransitionTask);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -10864,7 +10846,9 @@ nsGlobalWindow::GetLocalStorage(ErrorResult& aError)
|
|||
}
|
||||
}
|
||||
|
||||
MOZ_DIAGNOSTIC_ASSERT((principal->GetPrivateBrowsingId() > 0) == IsPrivateBrowsing());
|
||||
//XXX huseby -- was causing crashes see bug 1321969. Bug 1322760 covers
|
||||
//investigating and fixing the following assert.
|
||||
//MOZ_DIAGNOSTIC_ASSERT((principal->GetPrivateBrowsingId() > 0) == IsPrivateBrowsing());
|
||||
|
||||
nsCOMPtr<nsIDOMStorage> storage;
|
||||
aError = storageManager->CreateStorage(AsInner(), principal, documentURI,
|
||||
|
|
|
@ -102,13 +102,11 @@ nsScriptNameSpaceManager::nsScriptNameSpaceManager()
|
|||
: mGlobalNames(&hash_table_ops, sizeof(GlobalNameMapEntry),
|
||||
GLOBALNAME_HASHTABLE_INITIAL_LENGTH)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsScriptNameSpaceManager);
|
||||
}
|
||||
|
||||
nsScriptNameSpaceManager::~nsScriptNameSpaceManager()
|
||||
{
|
||||
UnregisterWeakMemoryReporter(this);
|
||||
MOZ_COUNT_DTOR(nsScriptNameSpaceManager);
|
||||
}
|
||||
|
||||
nsGlobalNameStruct *
|
||||
|
|
|
@ -25,7 +25,6 @@ class ImageData final : public nsISupports
|
|||
{
|
||||
~ImageData()
|
||||
{
|
||||
MOZ_COUNT_DTOR(ImageData);
|
||||
DropData();
|
||||
}
|
||||
|
||||
|
@ -35,7 +34,6 @@ public:
|
|||
, mHeight(aHeight)
|
||||
, mData(&aData)
|
||||
{
|
||||
MOZ_COUNT_CTOR(ImageData);
|
||||
HoldData();
|
||||
}
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ private:
|
|||
mSeekableStream(do_QueryInterface(aStream)),
|
||||
mSerializableInputStream(do_QueryInterface(aStream))
|
||||
{
|
||||
NS_ASSERTION(mSeekableStream, "Somebody gave us the wrong stream!");
|
||||
MOZ_ASSERT(mSeekableStream, "Somebody gave us the wrong stream!");
|
||||
}
|
||||
|
||||
RefPtr<DataOwner> mDataOwner;
|
||||
|
@ -108,7 +108,7 @@ nsresult DataOwnerAdapter::Create(DataOwner* aDataOwner,
|
|||
nsIInputStream** _retval)
|
||||
{
|
||||
nsresult rv;
|
||||
NS_ASSERTION(aDataOwner, "Uh ...");
|
||||
MOZ_ASSERT(aDataOwner, "Uh ...");
|
||||
|
||||
nsCOMPtr<nsIInputStream> stream;
|
||||
|
||||
|
@ -672,28 +672,28 @@ NS_IMPL_ISUPPORTS_INHERITED0(BlobImplFile, BlobImpl)
|
|||
void
|
||||
BlobImplBase::GetName(nsAString& aName) const
|
||||
{
|
||||
NS_ASSERTION(mIsFile, "Should only be called on files");
|
||||
MOZ_ASSERT(mIsFile, "Should only be called on files");
|
||||
aName = mName;
|
||||
}
|
||||
|
||||
void
|
||||
BlobImplBase::GetPath(nsAString& aPath) const
|
||||
{
|
||||
NS_ASSERTION(mIsFile, "Should only be called on files");
|
||||
MOZ_ASSERT(mIsFile, "Should only be called on files");
|
||||
aPath = mPath;
|
||||
}
|
||||
|
||||
void
|
||||
BlobImplBase::SetPath(const nsAString& aPath)
|
||||
{
|
||||
NS_ASSERTION(mIsFile, "Should only be called on files");
|
||||
MOZ_ASSERT(mIsFile, "Should only be called on files");
|
||||
mPath = aPath;
|
||||
}
|
||||
|
||||
void
|
||||
BlobImplBase::GetMozFullPath(nsAString& aFileName, ErrorResult& aRv) const
|
||||
{
|
||||
NS_ASSERTION(mIsFile, "Should only be called on files");
|
||||
MOZ_ASSERT(mIsFile, "Should only be called on files");
|
||||
|
||||
aFileName.Truncate();
|
||||
|
||||
|
@ -733,7 +733,7 @@ BlobImplBase::GetType(nsAString& aType)
|
|||
int64_t
|
||||
BlobImplBase::GetLastModified(ErrorResult& aRv)
|
||||
{
|
||||
NS_ASSERTION(mIsFile, "Should only be called on files");
|
||||
MOZ_ASSERT(mIsFile, "Should only be called on files");
|
||||
if (IsDateUnknown()) {
|
||||
mLastModificationDate = PR_Now();
|
||||
}
|
||||
|
@ -840,7 +840,7 @@ BlobImplFile::CreateSlice(uint64_t aStart, uint64_t aLength,
|
|||
void
|
||||
BlobImplFile::GetMozFullPathInternal(nsAString& aFilename, ErrorResult& aRv) const
|
||||
{
|
||||
NS_ASSERTION(mIsFile, "Should only be called on files");
|
||||
MOZ_ASSERT(mIsFile, "Should only be called on files");
|
||||
aRv = mFile->GetPath(aFilename);
|
||||
}
|
||||
|
||||
|
@ -848,7 +848,7 @@ uint64_t
|
|||
BlobImplFile::GetSize(ErrorResult& aRv)
|
||||
{
|
||||
if (BlobImplBase::IsSizeUnknown()) {
|
||||
NS_ASSERTION(mWholeFile,
|
||||
MOZ_ASSERT(mWholeFile,
|
||||
"Should only use lazy size when using the whole file");
|
||||
int64_t fileSize;
|
||||
aRv = mFile->GetFileSize(&fileSize);
|
||||
|
@ -907,8 +907,8 @@ BlobImplFile::GetType(nsAString& aType)
|
|||
aType.Truncate();
|
||||
|
||||
if (mContentType.IsVoid()) {
|
||||
NS_ASSERTION(mWholeFile,
|
||||
"Should only use lazy ContentType when using the whole file");
|
||||
MOZ_ASSERT(mWholeFile,
|
||||
"Should only use lazy ContentType when using the whole file");
|
||||
|
||||
if (!NS_IsMainThread()) {
|
||||
WorkerPrivate* workerPrivate = GetCurrentThreadWorkerPrivate();
|
||||
|
@ -952,7 +952,7 @@ BlobImplFile::GetType(nsAString& aType)
|
|||
int64_t
|
||||
BlobImplFile::GetLastModified(ErrorResult& aRv)
|
||||
{
|
||||
NS_ASSERTION(mIsFile, "Should only be called on files");
|
||||
MOZ_ASSERT(mIsFile, "Should only be called on files");
|
||||
if (BlobImplBase::IsDateUnknown()) {
|
||||
PRTime msecs;
|
||||
aRv = mFile->GetLastModifiedTime(&msecs);
|
||||
|
|
|
@ -394,8 +394,7 @@ public:
|
|||
, mLastModificationDate(INT64_MAX)
|
||||
, mSerialNumber(NextSerialNumber())
|
||||
{
|
||||
NS_ASSERTION(aLength != UINT64_MAX,
|
||||
"Must know length when creating slice");
|
||||
MOZ_ASSERT(aLength != UINT64_MAX, "Must know length when creating slice");
|
||||
// Ensure non-null mContentType by default
|
||||
mContentType.SetIsVoid(false);
|
||||
}
|
||||
|
@ -551,7 +550,7 @@ public:
|
|||
: BlobImplBase(aName, aContentType, aLength, aLastModifiedDate)
|
||||
, mDataOwner(new DataOwner(aMemoryBuffer, aLength))
|
||||
{
|
||||
NS_ASSERTION(mDataOwner && mDataOwner->mData, "must have data");
|
||||
MOZ_ASSERT(mDataOwner && mDataOwner->mData, "must have data");
|
||||
}
|
||||
|
||||
BlobImplMemory(void* aMemoryBuffer, uint64_t aLength,
|
||||
|
@ -559,7 +558,7 @@ public:
|
|||
: BlobImplBase(aContentType, aLength)
|
||||
, mDataOwner(new DataOwner(aMemoryBuffer, aLength))
|
||||
{
|
||||
NS_ASSERTION(mDataOwner && mDataOwner->mData, "must have data");
|
||||
MOZ_ASSERT(mDataOwner && mDataOwner->mData, "must have data");
|
||||
}
|
||||
|
||||
virtual void GetInternalStream(nsIInputStream** aStream,
|
||||
|
@ -626,7 +625,7 @@ private:
|
|||
: BlobImplBase(aContentType, aOther->mStart + aStart, aLength)
|
||||
, mDataOwner(aOther->mDataOwner)
|
||||
{
|
||||
NS_ASSERTION(mDataOwner && mDataOwner->mData, "must have data");
|
||||
MOZ_ASSERT(mDataOwner && mDataOwner->mData, "must have data");
|
||||
mImmutable = aOther->mImmutable;
|
||||
}
|
||||
|
||||
|
@ -683,7 +682,7 @@ public:
|
|||
, mWholeFile(true)
|
||||
, mIsTemporary(aTemporary)
|
||||
{
|
||||
NS_ASSERTION(mFile, "must have file");
|
||||
MOZ_ASSERT(mFile, "must have file");
|
||||
// Lazily get the content type and size
|
||||
mContentType.SetIsVoid(true);
|
||||
mFile->GetLeafName(mName);
|
||||
|
@ -697,7 +696,7 @@ public:
|
|||
, mWholeFile(true)
|
||||
, mIsTemporary(false)
|
||||
{
|
||||
NS_ASSERTION(mFile, "must have file");
|
||||
MOZ_ASSERT(mFile, "must have file");
|
||||
}
|
||||
|
||||
BlobImplFile(const nsAString& aName, const nsAString& aContentType,
|
||||
|
@ -708,7 +707,7 @@ public:
|
|||
, mWholeFile(true)
|
||||
, mIsTemporary(false)
|
||||
{
|
||||
NS_ASSERTION(mFile, "must have file");
|
||||
MOZ_ASSERT(mFile, "must have file");
|
||||
}
|
||||
|
||||
// Create as a file with custom name
|
||||
|
@ -719,7 +718,7 @@ public:
|
|||
, mWholeFile(true)
|
||||
, mIsTemporary(false)
|
||||
{
|
||||
NS_ASSERTION(mFile, "must have file");
|
||||
MOZ_ASSERT(mFile, "must have file");
|
||||
if (aContentType.IsEmpty()) {
|
||||
// Lazily get the content type and size
|
||||
mContentType.SetIsVoid(true);
|
||||
|
@ -766,7 +765,7 @@ private:
|
|||
, mWholeFile(false)
|
||||
, mIsTemporary(false)
|
||||
{
|
||||
NS_ASSERTION(mFile, "must have file");
|
||||
MOZ_ASSERT(mFile, "must have file");
|
||||
mImmutable = aOther->mImmutable;
|
||||
}
|
||||
|
||||
|
|
|
@ -61,23 +61,6 @@ public:
|
|||
return mFiles.Clear();
|
||||
}
|
||||
|
||||
static FileList* FromSupports(nsISupports* aSupports)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
{
|
||||
nsCOMPtr<nsIDOMFileList> list_qi = do_QueryInterface(aSupports);
|
||||
|
||||
// If this assertion fires the QI implementation for the object in
|
||||
// question doesn't use the nsIDOMFileList pointer as the nsISupports
|
||||
// pointer. That must be fixed, or we'll crash...
|
||||
NS_ASSERTION(list_qi == static_cast<nsIDOMFileList*>(aSupports),
|
||||
"Uh, fix QI!");
|
||||
}
|
||||
#endif
|
||||
|
||||
return static_cast<FileList*>(aSupports);
|
||||
}
|
||||
|
||||
File* Item(uint32_t aIndex) const;
|
||||
|
||||
File* IndexedGetter(uint32_t aIndex, bool& aFound) const;
|
||||
|
|
|
@ -303,7 +303,7 @@ FileReader::DoReadData(uint64_t aCount)
|
|||
if (mDataFormat == FILE_AS_BINARY) {
|
||||
//Continuously update our binary string as data comes in
|
||||
uint32_t oldLen = mResult.Length();
|
||||
NS_ASSERTION(mResult.Length() == mDataLen, "unexpected mResult length");
|
||||
MOZ_ASSERT(mResult.Length() == mDataLen, "unexpected mResult length");
|
||||
if (uint64_t(oldLen) + aCount > UINT32_MAX)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
char16_t *buf = nullptr;
|
||||
|
@ -313,7 +313,7 @@ FileReader::DoReadData(uint64_t aCount)
|
|||
uint32_t bytesRead = 0;
|
||||
mAsyncStream->ReadSegments(ReadFuncBinaryString, buf + oldLen, aCount,
|
||||
&bytesRead);
|
||||
NS_ASSERTION(bytesRead == aCount, "failed to read data");
|
||||
MOZ_ASSERT(bytesRead == aCount, "failed to read data");
|
||||
}
|
||||
else {
|
||||
CheckedInt<uint64_t> size = mDataLen;
|
||||
|
@ -334,7 +334,7 @@ FileReader::DoReadData(uint64_t aCount)
|
|||
|
||||
uint32_t bytesRead = 0;
|
||||
mAsyncStream->Read(mFileData + mDataLen, aCount, &bytesRead);
|
||||
NS_ASSERTION(bytesRead == aCount, "failed to read data");
|
||||
MOZ_ASSERT(bytesRead == aCount, "failed to read data");
|
||||
}
|
||||
|
||||
mDataLen += aCount;
|
||||
|
|
|
@ -328,7 +328,7 @@ MultipartBlobImpl::InitializeChromeFile(Blob& aBlob,
|
|||
const ChromeFilePropertyBag& aBag,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
NS_ASSERTION(!mImmutable, "Something went wrong ...");
|
||||
MOZ_ASSERT(!mImmutable, "Something went wrong ...");
|
||||
|
||||
if (mImmutable) {
|
||||
aRv.Throw(NS_ERROR_UNEXPECTED);
|
||||
|
@ -362,7 +362,7 @@ MultipartBlobImpl::InitializeChromeFile(nsPIDOMWindowInner* aWindow,
|
|||
bool aIsFromNsIFile,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
NS_ASSERTION(!mImmutable, "Something went wrong ...");
|
||||
MOZ_ASSERT(!mImmutable, "Something went wrong ...");
|
||||
if (mImmutable) {
|
||||
aRv.Throw(NS_ERROR_UNEXPECTED);
|
||||
return;
|
||||
|
|
|
@ -809,7 +809,7 @@ nsHostObjectProtocolHandler::NewChannel2(nsIURI* uri,
|
|||
nsCOMPtr<nsIURIWithPrincipal> uriPrinc = do_QueryInterface(uri);
|
||||
nsCOMPtr<nsIPrincipal> principal;
|
||||
uriPrinc->GetPrincipal(getter_AddRefs(principal));
|
||||
NS_ASSERTION(info->mPrincipal == principal, "Wrong principal!");
|
||||
MOZ_ASSERT(info->mPrincipal == principal, "Wrong principal!");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -886,8 +886,6 @@ nsFontTableProtocolHandler::GetScheme(nsACString &result)
|
|||
nsresult
|
||||
NS_GetBlobForBlobURI(nsIURI* aURI, BlobImpl** aBlob)
|
||||
{
|
||||
NS_ASSERTION(IsBlobURI(aURI), "Only call this with blob URIs");
|
||||
|
||||
*aBlob = nullptr;
|
||||
|
||||
DataInfo* info = GetDataInfoFromURI(aURI);
|
||||
|
@ -936,8 +934,6 @@ NS_GetStreamForBlobURI(nsIURI* aURI, nsIInputStream** aStream)
|
|||
nsresult
|
||||
NS_GetStreamForMediaStreamURI(nsIURI* aURI, mozilla::DOMMediaStream** aStream)
|
||||
{
|
||||
NS_ASSERTION(IsMediaStreamURI(aURI), "Only call this with mediastream URIs");
|
||||
|
||||
DataInfo* info = GetDataInfoFromURI(aURI);
|
||||
if (!info || info->mObjectType != DataInfo::eMediaStream) {
|
||||
return NS_ERROR_DOM_BAD_URI;
|
||||
|
@ -985,8 +981,6 @@ nsFontTableProtocolHandler::NewURI(const nsACString& aSpec,
|
|||
nsresult
|
||||
NS_GetSourceForMediaSourceURI(nsIURI* aURI, mozilla::dom::MediaSource** aSource)
|
||||
{
|
||||
NS_ASSERTION(IsMediaSourceURI(aURI), "Only call this with mediasource URIs");
|
||||
|
||||
*aSource = nullptr;
|
||||
|
||||
DataInfo* info = GetDataInfoFromURI(aURI);
|
||||
|
|
|
@ -333,8 +333,6 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(DistributedContentList)
|
|||
DistributedContentList::DistributedContentList(HTMLContentElement* aHostElement)
|
||||
: mParent(aHostElement)
|
||||
{
|
||||
MOZ_COUNT_CTOR(DistributedContentList);
|
||||
|
||||
if (aHostElement->IsInsertionPoint()) {
|
||||
if (aHostElement->MatchedNodes().IsEmpty()) {
|
||||
// Fallback content.
|
||||
|
@ -352,7 +350,6 @@ DistributedContentList::DistributedContentList(HTMLContentElement* aHostElement)
|
|||
|
||||
DistributedContentList::~DistributedContentList()
|
||||
{
|
||||
MOZ_COUNT_DTOR(DistributedContentList);
|
||||
}
|
||||
|
||||
nsIContent*
|
||||
|
|
|
@ -77,7 +77,7 @@ HTMLSourceElement::WouldMatchMediaForDocument(const nsAString& aMedia,
|
|||
|
||||
nsCSSParser cssParser;
|
||||
RefPtr<nsMediaList> mediaList = new nsMediaList();
|
||||
cssParser.ParseMediaList(aMedia, nullptr, 0, mediaList, false);
|
||||
cssParser.ParseMediaList(aMedia, nullptr, 0, mediaList);
|
||||
|
||||
return pctx && mediaList->Matches(pctx, nullptr);
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ HTMLSourceElement::UpdateMediaList(const nsAttrValue* aValue)
|
|||
|
||||
nsCSSParser cssParser;
|
||||
mMediaList = new nsMediaList();
|
||||
cssParser.ParseMediaList(mediaStr, nullptr, 0, mMediaList, false);
|
||||
cssParser.ParseMediaList(mediaStr, nullptr, 0, mMediaList);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
|
|
@ -245,7 +245,6 @@ MemoryReportRequestChild::MemoryReportRequestChild(
|
|||
bool aAnonymize, const MaybeFileDesc& aDMDFile)
|
||||
: mAnonymize(aAnonymize)
|
||||
{
|
||||
MOZ_COUNT_CTOR(MemoryReportRequestChild);
|
||||
if (aDMDFile.type() == MaybeFileDesc::TFileDescriptor) {
|
||||
mDMDFile = aDMDFile.get_FileDescriptor();
|
||||
}
|
||||
|
@ -253,7 +252,6 @@ MemoryReportRequestChild::MemoryReportRequestChild(
|
|||
|
||||
MemoryReportRequestChild::~MemoryReportRequestChild()
|
||||
{
|
||||
MOZ_COUNT_DTOR(MemoryReportRequestChild);
|
||||
}
|
||||
|
||||
// IPC sender for remote GC/CC logging.
|
||||
|
|
|
@ -1791,6 +1791,7 @@ ContentParent::LaunchSubprocess(ProcessPriority aInitialPriority /* = PROCESS_PR
|
|||
ContentParent::ContentParent(ContentParent* aOpener,
|
||||
const nsAString& aRemoteType)
|
||||
: nsIContentParent()
|
||||
, mLaunchTS(TimeStamp::Now())
|
||||
, mOpener(aOpener)
|
||||
, mRemoteType(aRemoteType)
|
||||
, mIsForBrowser(!mRemoteType.IsEmpty())
|
||||
|
@ -2505,6 +2506,10 @@ ContentParent::RecvGetXPCOMProcessAttributes(bool* aIsOffline,
|
|||
OptionalURIParams* aUserContentCSSURL,
|
||||
nsTArray<LookAndFeelInt>* aLookAndFeelIntCache)
|
||||
{
|
||||
Telemetry::Accumulate(Telemetry::CONTENT_PROCESS_LAUNCH_TIME_MS,
|
||||
static_cast<uint32_t>((TimeStamp::Now() - mLaunchTS)
|
||||
.ToMilliseconds()));
|
||||
|
||||
nsCOMPtr<nsIIOService> io(do_GetIOService());
|
||||
MOZ_ASSERT(io, "No IO service?");
|
||||
DebugOnly<nsresult> rv = io->GetOffline(aIsOffline);
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "mozilla/HalTypes.h"
|
||||
#include "mozilla/LinkedList.h"
|
||||
#include "mozilla/StaticPtr.h"
|
||||
#include "mozilla/TimeStamp.h"
|
||||
#include "mozilla/UniquePtr.h"
|
||||
|
||||
#include "nsDataHashtable.h"
|
||||
|
@ -1096,6 +1097,7 @@ private:
|
|||
// details.
|
||||
|
||||
GeckoChildProcessHost* mSubprocess;
|
||||
const TimeStamp mLaunchTS; // used to calculate time to start content process
|
||||
ContentParent* mOpener;
|
||||
|
||||
nsString mRemoteType;
|
||||
|
|
|
@ -1079,8 +1079,6 @@ ProcessHangMonitor::ProcessHangMonitor()
|
|||
{
|
||||
MOZ_RELEASE_ASSERT(NS_IsMainThread());
|
||||
|
||||
MOZ_COUNT_CTOR(ProcessHangMonitor);
|
||||
|
||||
if (XRE_IsContentProcess()) {
|
||||
nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
|
||||
obs->AddObserver(this, "xpcom-shutdown", false);
|
||||
|
@ -1097,8 +1095,6 @@ ProcessHangMonitor::~ProcessHangMonitor()
|
|||
{
|
||||
MOZ_RELEASE_ASSERT(NS_IsMainThread());
|
||||
|
||||
MOZ_COUNT_DTOR(ProcessHangMonitor);
|
||||
|
||||
MOZ_ASSERT(sInstance == this);
|
||||
sInstance = nullptr;
|
||||
|
||||
|
|
|
@ -30,13 +30,11 @@ public:
|
|||
mPrincipal(aPrincipal),
|
||||
mContentType(aContentType)
|
||||
{
|
||||
MOZ_COUNT_CTOR(BufferMediaResource);
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual ~BufferMediaResource()
|
||||
{
|
||||
MOZ_COUNT_DTOR(BufferMediaResource);
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
@ -84,7 +84,6 @@ class MediaStreamTrackSourceGetter : public nsISupports
|
|||
public:
|
||||
MediaStreamTrackSourceGetter()
|
||||
{
|
||||
MOZ_COUNT_CTOR(MediaStreamTrackSourceGetter);
|
||||
}
|
||||
|
||||
virtual already_AddRefed<dom::MediaStreamTrackSource>
|
||||
|
@ -93,7 +92,6 @@ public:
|
|||
protected:
|
||||
virtual ~MediaStreamTrackSourceGetter()
|
||||
{
|
||||
MOZ_COUNT_DTOR(MediaStreamTrackSourceGetter);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -38,7 +38,6 @@ FileBlockCache::FileBlockCache()
|
|||
mIsWriteScheduled(false),
|
||||
mIsOpen(false)
|
||||
{
|
||||
MOZ_COUNT_CTOR(FileBlockCache);
|
||||
}
|
||||
|
||||
FileBlockCache::~FileBlockCache()
|
||||
|
@ -57,7 +56,6 @@ FileBlockCache::~FileBlockCache()
|
|||
mFD = nullptr;
|
||||
}
|
||||
}
|
||||
MOZ_COUNT_DTOR(FileBlockCache);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -417,7 +417,6 @@ MediaDecoder::MediaDecoder(MediaDecoderOwner* aOwner)
|
|||
, INIT_CANONICAL(mIsVisible, !aOwner->IsHidden())
|
||||
, mTelemetryReported(false)
|
||||
{
|
||||
MOZ_COUNT_CTOR(MediaDecoder);
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MediaMemoryTracker::AddMediaDecoder(this);
|
||||
|
||||
|
@ -516,7 +515,6 @@ MediaDecoder::~MediaDecoder()
|
|||
mResourceCallback->Disconnect();
|
||||
MediaMemoryTracker::RemoveMediaDecoder(this);
|
||||
UnpinForSeek();
|
||||
MOZ_COUNT_DTOR(MediaDecoder);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -424,7 +424,6 @@ public:
|
|||
, mSelectedVideoTrackID(TRACK_NONE)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_COUNT_CTOR(MediaRecorder::Session);
|
||||
|
||||
uint32_t maxMem = Preferences::GetUint("media.recorder.max_memory",
|
||||
MAX_ALLOW_MEMORY_BUFFER);
|
||||
|
@ -589,7 +588,6 @@ private:
|
|||
// Only DestroyRunnable is allowed to delete Session object.
|
||||
virtual ~Session()
|
||||
{
|
||||
MOZ_COUNT_DTOR(MediaRecorder::Session);
|
||||
LOG(LogLevel::Debug, ("Session.~Session (%p)", this));
|
||||
CleanupStreams();
|
||||
if (mReadThread) {
|
||||
|
|
|
@ -410,13 +410,11 @@ protected:
|
|||
mContentType(aContentType),
|
||||
mLoadInBackground(false)
|
||||
{
|
||||
MOZ_COUNT_CTOR(BaseMediaResource);
|
||||
NS_ASSERTION(!mContentType.IsEmpty(), "Must know content type");
|
||||
mURI->GetSpec(mContentURL);
|
||||
}
|
||||
virtual ~BaseMediaResource()
|
||||
{
|
||||
MOZ_COUNT_DTOR(BaseMediaResource);
|
||||
}
|
||||
|
||||
const nsCString& GetContentType() const override
|
||||
|
|
|
@ -23,13 +23,11 @@ MediaShutdownManager::MediaShutdownManager()
|
|||
, mIsDoingXPCOMShutDown(false)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_COUNT_CTOR(MediaShutdownManager);
|
||||
}
|
||||
|
||||
MediaShutdownManager::~MediaShutdownManager()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_COUNT_DTOR(MediaShutdownManager);
|
||||
}
|
||||
|
||||
// Note that we don't use ClearOnShutdown() on this StaticRefPtr, as that
|
||||
|
|
|
@ -66,7 +66,6 @@ public:
|
|||
mLabel(aLabel),
|
||||
mStopped(false)
|
||||
{
|
||||
MOZ_COUNT_CTOR(MediaStreamTrackSource);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -166,7 +165,6 @@ public:
|
|||
protected:
|
||||
virtual ~MediaStreamTrackSource()
|
||||
{
|
||||
MOZ_COUNT_DTOR(MediaStreamTrackSource);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -53,13 +53,9 @@ DirectShowDecoder::IsEnabled()
|
|||
DirectShowDecoder::DirectShowDecoder(MediaDecoderOwner* aOwner)
|
||||
: MediaDecoder(aOwner)
|
||||
{
|
||||
MOZ_COUNT_CTOR(DirectShowDecoder);
|
||||
}
|
||||
|
||||
DirectShowDecoder::~DirectShowDecoder()
|
||||
{
|
||||
MOZ_COUNT_DTOR(DirectShowDecoder);
|
||||
}
|
||||
DirectShowDecoder::~DirectShowDecoder() = default;
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
|
|
|
@ -166,7 +166,6 @@ SourceBufferResource::Ended()
|
|||
SourceBufferResource::~SourceBufferResource()
|
||||
{
|
||||
SBR_DEBUG("");
|
||||
MOZ_COUNT_DTOR(SourceBufferResource);
|
||||
}
|
||||
|
||||
SourceBufferResource::SourceBufferResource(const nsACString& aType)
|
||||
|
@ -177,7 +176,6 @@ SourceBufferResource::SourceBufferResource(const nsACString& aType)
|
|||
, mEnded(false)
|
||||
{
|
||||
SBR_DEBUG("");
|
||||
MOZ_COUNT_CTOR(SourceBufferResource);
|
||||
}
|
||||
|
||||
#undef SBR_DEBUG
|
||||
|
|
|
@ -1075,15 +1075,12 @@ CamerasParent::CamerasParent()
|
|||
return NS_OK;
|
||||
});
|
||||
NS_DispatchToMainThread(threadStart);
|
||||
|
||||
MOZ_COUNT_CTOR(CamerasParent);
|
||||
}
|
||||
|
||||
CamerasParent::~CamerasParent()
|
||||
{
|
||||
LOG(("~CamerasParent: %p", this));
|
||||
|
||||
MOZ_COUNT_DTOR(CamerasParent);
|
||||
#ifdef DEBUG
|
||||
// Verify we have shut down the webrtc engines, this is
|
||||
// supposed to happen in ActorDestroy.
|
||||
|
|
|
@ -19,13 +19,11 @@ BufferDecoder::BufferDecoder(MediaResource* aResource, GMPCrashHelper* aCrashHel
|
|||
, mCrashHelper(aCrashHelper)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_COUNT_CTOR(BufferDecoder);
|
||||
}
|
||||
|
||||
BufferDecoder::~BufferDecoder()
|
||||
{
|
||||
// The dtor may run on any thread, we cannot be sure.
|
||||
MOZ_COUNT_DTOR(BufferDecoder);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "MediaBufferDecoder.h"
|
||||
#include "BufferDecoder.h"
|
||||
#include "mozilla/dom/AudioContextBinding.h"
|
||||
#include "mozilla/dom/DOMException.h"
|
||||
#include "mozilla/dom/ScriptSettings.h"
|
||||
#include <speex/speex_resampler.h>
|
||||
#include "nsXPCOMCIDInternal.h"
|
||||
|
@ -611,7 +612,11 @@ WebAudioDecodeJob::OnFailure(ErrorCode aErrorCode)
|
|||
// Ignore errors in calling the callback, since there is not much that we can
|
||||
// do about it here.
|
||||
if (mFailureCallback) {
|
||||
mFailureCallback->Call();
|
||||
nsAutoCString errorString(errorMessage);
|
||||
RefPtr<DOMException> exception =
|
||||
DOMException::Create(NS_ERROR_DOM_ENCODING_NOT_SUPPORTED_ERR,
|
||||
errorString);
|
||||
mFailureCallback->Call(*exception);
|
||||
}
|
||||
|
||||
mPromise->MaybeReject(NS_ERROR_DOM_ENCODING_NOT_SUPPORTED_ERR);
|
||||
|
|
|
@ -326,7 +326,9 @@ function runTest(test, response, callback) {
|
|||
test.expectedBuffer = asyncResult;
|
||||
test.nativeContext = cx;
|
||||
runResampling(test, compressedAudio, callback);
|
||||
}, function onFailure() {
|
||||
}, function onFailure(e) {
|
||||
ok(e instanceof DOMException, "We want to see an exception here");
|
||||
is(e.name, "EncodingError", "Exception name matches");
|
||||
ok(expectCallback, "Failure callback should fire asynchronously");
|
||||
ok(!test.valid, "Did expect failure for test " + test.url);
|
||||
callback();
|
||||
|
|
|
@ -29,12 +29,10 @@ RTCIdentityProviderRegistrar::RTCIdentityProviderRegistrar(
|
|||
, mGenerateAssertionCallback(nullptr)
|
||||
, mValidateAssertionCallback(nullptr)
|
||||
{
|
||||
MOZ_COUNT_CTOR(RTCIdentityProviderRegistrar);
|
||||
}
|
||||
|
||||
RTCIdentityProviderRegistrar::~RTCIdentityProviderRegistrar()
|
||||
{
|
||||
MOZ_COUNT_DTOR(RTCIdentityProviderRegistrar);
|
||||
}
|
||||
|
||||
nsIGlobalObject*
|
||||
|
|
|
@ -103,14 +103,12 @@ NS_IMPL_RELEASE_INHERITED(Performance, DOMEventTargetHelper)
|
|||
/* static */ already_AddRefed<Performance>
|
||||
Performance::CreateForMainThread(nsPIDOMWindowInner* aWindow,
|
||||
nsDOMNavigationTiming* aDOMTiming,
|
||||
nsITimedChannel* aChannel,
|
||||
Performance* aParentPerformance)
|
||||
nsITimedChannel* aChannel)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
RefPtr<Performance> performance =
|
||||
new PerformanceMainThread(aWindow, aDOMTiming, aChannel,
|
||||
aParentPerformance);
|
||||
new PerformanceMainThread(aWindow, aDOMTiming, aChannel);
|
||||
return performance.forget();
|
||||
}
|
||||
|
||||
|
|
|
@ -46,8 +46,7 @@ public:
|
|||
static already_AddRefed<Performance>
|
||||
CreateForMainThread(nsPIDOMWindowInner* aWindow,
|
||||
nsDOMNavigationTiming* aDOMTiming,
|
||||
nsITimedChannel* aChannel,
|
||||
Performance* aParentPerformance);
|
||||
nsITimedChannel* aChannel);
|
||||
|
||||
static already_AddRefed<Performance>
|
||||
CreateForWorker(workers::WorkerPrivate* aWorkerPrivate);
|
||||
|
@ -104,8 +103,6 @@ public:
|
|||
|
||||
virtual nsITimedChannel* GetChannel() const = 0;
|
||||
|
||||
virtual Performance* GetParentPerformance() const = 0;
|
||||
|
||||
protected:
|
||||
Performance();
|
||||
explicit Performance(nsPIDOMWindowInner* aWindow);
|
||||
|
|
|
@ -16,8 +16,7 @@ NS_IMPL_CYCLE_COLLECTION_CLASS(PerformanceMainThread)
|
|||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(PerformanceMainThread,
|
||||
Performance)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mTiming,
|
||||
mNavigation,
|
||||
mParentPerformance)
|
||||
mNavigation)
|
||||
tmp->mMozMemory = nullptr;
|
||||
mozilla::DropJSObjects(this);
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
|
@ -25,8 +24,7 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
|||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(PerformanceMainThread,
|
||||
Performance)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mTiming,
|
||||
mNavigation,
|
||||
mParentPerformance)
|
||||
mNavigation)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
|
||||
|
@ -46,12 +44,10 @@ NS_INTERFACE_MAP_END_INHERITING(Performance)
|
|||
|
||||
PerformanceMainThread::PerformanceMainThread(nsPIDOMWindowInner* aWindow,
|
||||
nsDOMNavigationTiming* aDOMTiming,
|
||||
nsITimedChannel* aChannel,
|
||||
Performance* aParentPerformance)
|
||||
nsITimedChannel* aChannel)
|
||||
: Performance(aWindow)
|
||||
, mDOMTiming(aDOMTiming)
|
||||
, mChannel(aChannel)
|
||||
, mParentPerformance(aParentPerformance)
|
||||
{
|
||||
MOZ_ASSERT(aWindow, "Parent window object should be provided");
|
||||
}
|
||||
|
|
|
@ -17,8 +17,7 @@ class PerformanceMainThread final : public Performance
|
|||
public:
|
||||
PerformanceMainThread(nsPIDOMWindowInner* aWindow,
|
||||
nsDOMNavigationTiming* aDOMTiming,
|
||||
nsITimedChannel* aChannel,
|
||||
Performance* aParentPerformance);
|
||||
nsITimedChannel* aChannel);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(PerformanceMainThread,
|
||||
|
@ -51,11 +50,6 @@ public:
|
|||
return mChannel;
|
||||
}
|
||||
|
||||
virtual Performance* GetParentPerformance() const override
|
||||
{
|
||||
return mParentPerformance;
|
||||
}
|
||||
|
||||
protected:
|
||||
~PerformanceMainThread();
|
||||
|
||||
|
@ -77,7 +71,6 @@ protected:
|
|||
nsCOMPtr<nsITimedChannel> mChannel;
|
||||
RefPtr<PerformanceTiming> mTiming;
|
||||
RefPtr<PerformanceNavigation> mNavigation;
|
||||
RefPtr<Performance> mParentPerformance;
|
||||
JS::Heap<JSObject*> mMozMemory;
|
||||
};
|
||||
|
||||
|
|
|
@ -64,12 +64,6 @@ public:
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
virtual Performance* GetParentPerformance() const override
|
||||
{
|
||||
MOZ_CRASH("This should not be called on workers.");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
protected:
|
||||
~PerformanceWorker();
|
||||
|
||||
|
|
|
@ -110,13 +110,10 @@ NS_IMPL_ISUPPORTS(PresentationBuilderParent,
|
|||
PresentationBuilderParent::PresentationBuilderParent(PresentationParent* aParent)
|
||||
: mParent(aParent)
|
||||
{
|
||||
MOZ_COUNT_CTOR(PresentationBuilderParent);
|
||||
}
|
||||
|
||||
PresentationBuilderParent::~PresentationBuilderParent()
|
||||
{
|
||||
MOZ_COUNT_DTOR(PresentationBuilderParent);
|
||||
|
||||
if (mNeedDestroyActor) {
|
||||
Unused << NS_WARN_IF(!Send__delete__(this));
|
||||
}
|
||||
|
|
|
@ -93,12 +93,10 @@ NS_IMPL_ISUPPORTS(PresentationParent,
|
|||
|
||||
PresentationParent::PresentationParent()
|
||||
{
|
||||
MOZ_COUNT_CTOR(PresentationParent);
|
||||
}
|
||||
|
||||
/* virtual */ PresentationParent::~PresentationParent()
|
||||
{
|
||||
MOZ_COUNT_DTOR(PresentationParent);
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -388,12 +386,10 @@ PresentationRequestParent::PresentationRequestParent(nsIPresentationService* aSe
|
|||
: mService(aService)
|
||||
, mChildId(aContentParentId)
|
||||
{
|
||||
MOZ_COUNT_CTOR(PresentationRequestParent);
|
||||
}
|
||||
|
||||
PresentationRequestParent::~PresentationRequestParent()
|
||||
{
|
||||
MOZ_COUNT_DTOR(PresentationRequestParent);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
*/
|
||||
|
||||
callback DecodeSuccessCallback = void (AudioBuffer decodedData);
|
||||
callback DecodeErrorCallback = void ();
|
||||
callback DecodeErrorCallback = void (DOMException error);
|
||||
|
||||
enum AudioContextState {
|
||||
"suspended",
|
||||
|
|
|
@ -161,7 +161,6 @@ public:
|
|||
explicit nsAnonymousContentList(nsIContent* aParent)
|
||||
: mParent(aParent)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsAnonymousContentList);
|
||||
}
|
||||
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
|
@ -183,7 +182,6 @@ public:
|
|||
private:
|
||||
virtual ~nsAnonymousContentList()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsAnonymousContentList);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIContent> mParent;
|
||||
|
|
|
@ -426,7 +426,7 @@ nsXBLBinding::GenerateAnonymousContent()
|
|||
nsIPresShell* presShell = mBoundElement->OwnerDoc()->GetShell();
|
||||
ServoStyleSet* servoSet = presShell->StyleSet()->GetAsServo();
|
||||
if (servoSet) {
|
||||
servoSet->StyleNewChildren(mBoundElement);
|
||||
servoSet->StyleNewChildren(mBoundElement->AsElement());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -102,7 +102,6 @@ nsXULTemplateBuilder::nsXULTemplateBuilder(void)
|
|||
mTop(nullptr),
|
||||
mObservedDocument(nullptr)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsXULTemplateBuilder);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -132,8 +131,6 @@ nsXULTemplateBuilder::~nsXULTemplateBuilder(void)
|
|||
NS_IF_RELEASE(gScriptSecurityManager);
|
||||
NS_IF_RELEASE(gObserverService);
|
||||
}
|
||||
|
||||
MOZ_COUNT_DTOR(nsXULTemplateBuilder);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -12,12 +12,10 @@
|
|||
|
||||
nsWebBrowserContentPolicy::nsWebBrowserContentPolicy()
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsWebBrowserContentPolicy);
|
||||
}
|
||||
|
||||
nsWebBrowserContentPolicy::~nsWebBrowserContentPolicy()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsWebBrowserContentPolicy);
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsWebBrowserContentPolicy, nsIContentPolicy)
|
||||
|
|
|
@ -24,12 +24,10 @@ NS_IMPL_ISUPPORTS(MockWebBrowserPrint, nsIWebBrowserPrint);
|
|||
MockWebBrowserPrint::MockWebBrowserPrint(const PrintData &aData)
|
||||
: mData(aData)
|
||||
{
|
||||
MOZ_COUNT_CTOR(MockWebBrowserPrint);
|
||||
}
|
||||
|
||||
MockWebBrowserPrint::~MockWebBrowserPrint()
|
||||
{
|
||||
MOZ_COUNT_DTOR(MockWebBrowserPrint);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -22,7 +22,6 @@ PrintProgressDialogChild::PrintProgressDialogChild(
|
|||
nsIObserver* aOpenObserver) :
|
||||
mOpenObserver(aOpenObserver)
|
||||
{
|
||||
MOZ_COUNT_CTOR(PrintProgressDialogChild);
|
||||
}
|
||||
|
||||
PrintProgressDialogChild::~PrintProgressDialogChild()
|
||||
|
@ -32,7 +31,6 @@ PrintProgressDialogChild::~PrintProgressDialogChild()
|
|||
// the parent to decrement its refcount, as well as prevent it from attempting
|
||||
// to contact us further.
|
||||
Unused << Send__delete__(this);
|
||||
MOZ_COUNT_DTOR(PrintProgressDialogChild);
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult
|
||||
|
|
|
@ -17,12 +17,10 @@ NS_IMPL_ISUPPORTS(PrintProgressDialogParent, nsIObserver)
|
|||
PrintProgressDialogParent::PrintProgressDialogParent() :
|
||||
mActive(true)
|
||||
{
|
||||
MOZ_COUNT_CTOR(PrintProgressDialogParent);
|
||||
}
|
||||
|
||||
PrintProgressDialogParent::~PrintProgressDialogParent()
|
||||
{
|
||||
MOZ_COUNT_DTOR(PrintProgressDialogParent);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -308,8 +308,6 @@ PrintingParent::SerializeAndEnsureRemotePrintJob(
|
|||
|
||||
PrintingParent::PrintingParent()
|
||||
{
|
||||
MOZ_COUNT_CTOR(PrintingParent);
|
||||
|
||||
mPrintSettingsSvc =
|
||||
do_GetService("@mozilla.org/gfx/printsettings-service;1");
|
||||
MOZ_ASSERT(mPrintSettingsSvc);
|
||||
|
@ -317,7 +315,6 @@ PrintingParent::PrintingParent()
|
|||
|
||||
PrintingParent::~PrintingParent()
|
||||
{
|
||||
MOZ_COUNT_DTOR(PrintingParent);
|
||||
}
|
||||
|
||||
} // namespace embedding
|
||||
|
|
|
@ -214,12 +214,10 @@ Layer::Layer(LayerManager* aManager, void* aImplData) :
|
|||
#endif
|
||||
mAnimationGeneration(0)
|
||||
{
|
||||
MOZ_COUNT_CTOR(Layer);
|
||||
}
|
||||
|
||||
Layer::~Layer()
|
||||
{
|
||||
MOZ_COUNT_DTOR(Layer);
|
||||
}
|
||||
|
||||
Animation*
|
||||
|
@ -1122,13 +1120,11 @@ ContainerLayer::ContainerLayer(LayerManager* aManager, void* aImplData)
|
|||
mChildrenChanged(false),
|
||||
mEventRegionsOverride(EventRegionsOverride::NoOverride)
|
||||
{
|
||||
MOZ_COUNT_CTOR(ContainerLayer);
|
||||
mContentFlags = 0; // Clear NO_TEXT, NO_TEXT_OVER_TRANSPARENT
|
||||
}
|
||||
|
||||
ContainerLayer::~ContainerLayer()
|
||||
{
|
||||
MOZ_COUNT_DTOR(ContainerLayer);
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -28,12 +28,10 @@ CompositableChild::CompositableChild()
|
|||
mAsyncID(0),
|
||||
mCanSend(true)
|
||||
{
|
||||
MOZ_COUNT_CTOR(CompositableChild);
|
||||
}
|
||||
|
||||
CompositableChild::~CompositableChild()
|
||||
{
|
||||
MOZ_COUNT_DTOR(CompositableChild);
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -57,12 +57,10 @@ CompositableClient::CompositableClient(CompositableForwarder* aForwarder,
|
|||
: mForwarder(aForwarder)
|
||||
, mTextureFlags(aTextureFlags)
|
||||
{
|
||||
MOZ_COUNT_CTOR(CompositableClient);
|
||||
}
|
||||
|
||||
CompositableClient::~CompositableClient()
|
||||
{
|
||||
MOZ_COUNT_DTOR(CompositableClient);
|
||||
Destroy();
|
||||
}
|
||||
|
||||
|
|
|
@ -53,15 +53,12 @@ CompositorThreadHolder::CompositorThreadHolder()
|
|||
: mCompositorThread(CreateCompositorThread())
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_COUNT_CTOR(CompositorThreadHolder);
|
||||
}
|
||||
|
||||
CompositorThreadHolder::~CompositorThreadHolder()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
MOZ_COUNT_DTOR(CompositorThreadHolder);
|
||||
|
||||
DestroyCompositorThread(mCompositorThread);
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ using mozilla::services::GetObserverService;
|
|||
class nsFontCache final : public nsIObserver
|
||||
{
|
||||
public:
|
||||
nsFontCache() { MOZ_COUNT_CTOR(nsFontCache); }
|
||||
nsFontCache() {}
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIOBSERVER
|
||||
|
@ -62,7 +62,7 @@ public:
|
|||
void Flush();
|
||||
|
||||
protected:
|
||||
~nsFontCache() { MOZ_COUNT_DTOR(nsFontCache); }
|
||||
~nsFontCache() {}
|
||||
|
||||
nsDeviceContext* mContext; // owner
|
||||
nsCOMPtr<nsIAtom> mLocaleLanguage;
|
||||
|
|
|
@ -76,8 +76,6 @@ gfxContext::gfxContext(DrawTarget *aTarget, const Point& aDeviceOffset)
|
|||
gfxCriticalError() << "Don't create a gfxContext without a DrawTarget";
|
||||
}
|
||||
|
||||
MOZ_COUNT_CTOR(gfxContext);
|
||||
|
||||
mStateStack.SetLength(1);
|
||||
CurrentState().drawTarget = mDT;
|
||||
CurrentState().deviceOffset = aDeviceOffset;
|
||||
|
@ -119,7 +117,6 @@ gfxContext::~gfxContext()
|
|||
}
|
||||
}
|
||||
mDT->Flush();
|
||||
MOZ_COUNT_DTOR(gfxContext);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -154,7 +154,6 @@ gfxTextRun::gfxTextRun(const gfxTextRunFactory::Parameters *aParams,
|
|||
, mShapingState(eShapingState_Normal)
|
||||
{
|
||||
NS_ASSERTION(mAppUnitsPerDevUnit > 0, "Invalid app unit scale");
|
||||
MOZ_COUNT_CTOR(gfxTextRun);
|
||||
NS_ADDREF(mFontGroup);
|
||||
|
||||
#ifndef RELEASE_OR_BETA
|
||||
|
@ -199,8 +198,6 @@ gfxTextRun::~gfxTextRun()
|
|||
#endif
|
||||
NS_RELEASE(mFontGroup);
|
||||
}
|
||||
|
||||
MOZ_COUNT_DTOR(gfxTextRun);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -47,7 +47,6 @@ VRManagerChild::VRManagerChild()
|
|||
, mFrameRequestCallbackCounter(0)
|
||||
, mBackend(layers::LayersBackend::LAYERS_NONE)
|
||||
{
|
||||
MOZ_COUNT_CTOR(VRManagerChild);
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
mStartTimeStamp = TimeStamp::Now();
|
||||
|
@ -56,7 +55,6 @@ VRManagerChild::VRManagerChild()
|
|||
VRManagerChild::~VRManagerChild()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_COUNT_DTOR(VRManagerChild);
|
||||
}
|
||||
|
||||
/*static*/ void
|
||||
|
|
|
@ -94,7 +94,8 @@ nsIconDecoder::ReadRowOfPixels(const char* aData, size_t aLength)
|
|||
return AsVariant(WriteState::NEED_MORE_DATA); // Done with this row.
|
||||
}
|
||||
|
||||
uint32_t pixel = *reinterpret_cast<const uint32_t*>(aData);
|
||||
uint32_t pixel;
|
||||
memcpy(&pixel, aData, 4);
|
||||
aData += 4;
|
||||
aLength -= 4;
|
||||
|
||||
|
|
|
@ -1698,6 +1698,7 @@ Parser<FullParseHandler>::newFunctionScopeData(ParseContext::Scope& scope, bool
|
|||
Vector<BindingName> vars(context);
|
||||
|
||||
bool allBindingsClosedOver = pc->sc()->allBindingsClosedOver();
|
||||
bool hasDuplicateParams = pc->functionBox()->hasDuplicateParameters;
|
||||
|
||||
// Positional parameter names must be added in order of appearance as they are
|
||||
// referenced using argument slots.
|
||||
|
@ -1711,8 +1712,22 @@ Parser<FullParseHandler>::newFunctionScopeData(ParseContext::Scope& scope, bool
|
|||
// Do not consider any positional formal parameters closed over if
|
||||
// there are parameter defaults. It is the binding in the defaults
|
||||
// scope that is closed over instead.
|
||||
bindName = BindingName(name, (allBindingsClosedOver ||
|
||||
(p && p->value()->closedOver())));
|
||||
bool closedOver = allBindingsClosedOver ||
|
||||
(p && p->value()->closedOver());
|
||||
|
||||
// If the parameter name has duplicates, only the final parameter
|
||||
// name should be on the environment, as otherwise the environment
|
||||
// object would have multiple, same-named properties.
|
||||
if (hasDuplicateParams) {
|
||||
for (size_t j = pc->positionalFormalParameterNames().length() - 1; j > i; j--) {
|
||||
if (pc->positionalFormalParameterNames()[j] == name) {
|
||||
closedOver = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bindName = BindingName(name, closedOver);
|
||||
}
|
||||
|
||||
if (!positionalFormals.append(bindName))
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
(function(x, x) {
|
||||
eval(`
|
||||
var y = 1;
|
||||
function f() {
|
||||
return delete y;
|
||||
}
|
||||
f();
|
||||
`);
|
||||
})()
|
|
@ -207,6 +207,8 @@ assertEq(testTrunc(13.37), 1);
|
|||
testBinary64('rotl', "0x1234567812345678", 4, "0x2345678123456781");
|
||||
testBinary64('rotl', "0x1234567812345678", 60, "0x8123456781234567");
|
||||
testBinary64('rotr', "0x1234567812345678", 60, "0x2345678123456781");
|
||||
testBinary64('rotl', "0x0000000000001000", 127, "0x0000000000000800");
|
||||
testBinary64('rotr', "0x0000000000001000", 127, "0x0000000000002000");
|
||||
testBinary64('rotr', 40, 0, 40);
|
||||
testBinary64('rotl', 40, 0, 40);
|
||||
testBinary64('and', 42, 0, 0);
|
||||
|
|
|
@ -1677,14 +1677,9 @@ IonBuilder::visitBackEdge(CFGBackEdge* ins, bool* restarted)
|
|||
// phis may have generated incorrect nodes. The new types have been
|
||||
// incorporated into the header phis, so remove all blocks for the
|
||||
// loop body and restart with the new types.
|
||||
GraphSpewer& gs = graphSpewer();
|
||||
gs.spewPass("beforeloop");
|
||||
|
||||
*restarted = true;
|
||||
if (!restartLoop(ins->getSuccessor(0)))
|
||||
return false;
|
||||
|
||||
gs.spewPass("afterloop");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1852,6 +1852,8 @@ ControlFlowGenerator::processTableSwitch(JSOp op, jssrcnote* sn)
|
|||
// Create cases
|
||||
jsbytecode* casepc = nullptr;
|
||||
for (int i = 0; i < high-low+1; i++) {
|
||||
if (!alloc().ensureBallast())
|
||||
return ControlStatus::Error;
|
||||
casepc = pc + GET_JUMP_OFFSET(pc2);
|
||||
|
||||
MOZ_ASSERT(casepc >= pc && casepc <= exitpc);
|
||||
|
|
|
@ -766,7 +766,7 @@ class MacroAssembler : public MacroAssemblerSpecific
|
|||
|
||||
inline void add64(Register64 src, Register64 dest) PER_ARCH;
|
||||
inline void add64(Imm32 imm, Register64 dest) PER_ARCH;
|
||||
inline void add64(Imm64 imm, Register64 dest) DEFINED_ON(x86, x64, arm, mips32, mips64);
|
||||
inline void add64(Imm64 imm, Register64 dest) PER_ARCH;
|
||||
inline void add64(const Operand& src, Register64 dest) DEFINED_ON(x64, mips64);
|
||||
|
||||
inline void addFloat32(FloatRegister src, FloatRegister dest) PER_SHARED_ARCH;
|
||||
|
@ -785,7 +785,7 @@ class MacroAssembler : public MacroAssemblerSpecific
|
|||
inline void subPtr(const Address& addr, Register dest) DEFINED_ON(mips_shared, arm, arm64, x86, x64);
|
||||
|
||||
inline void sub64(Register64 src, Register64 dest) PER_ARCH;
|
||||
inline void sub64(Imm64 imm, Register64 dest) DEFINED_ON(x86, x64, arm, mips32, mips64);
|
||||
inline void sub64(Imm64 imm, Register64 dest) PER_ARCH;
|
||||
inline void sub64(const Operand& src, Register64 dest) DEFINED_ON(x64, mips64);
|
||||
|
||||
inline void subFloat32(FloatRegister src, FloatRegister dest) PER_SHARED_ARCH;
|
||||
|
@ -900,7 +900,7 @@ class MacroAssembler : public MacroAssemblerSpecific
|
|||
inline void rotateLeft64(Imm32 count, Register64 input, Register64 dest) DEFINED_ON(x64);
|
||||
inline void rotateLeft64(Register count, Register64 input, Register64 dest) DEFINED_ON(x64);
|
||||
inline void rotateLeft64(Imm32 count, Register64 input, Register64 dest, Register temp)
|
||||
DEFINED_ON(x86, x64, arm, mips32, mips64);
|
||||
PER_ARCH;
|
||||
inline void rotateLeft64(Register count, Register64 input, Register64 dest, Register temp)
|
||||
PER_ARCH;
|
||||
|
||||
|
@ -909,7 +909,7 @@ class MacroAssembler : public MacroAssemblerSpecific
|
|||
inline void rotateRight64(Imm32 count, Register64 input, Register64 dest) DEFINED_ON(x64);
|
||||
inline void rotateRight64(Register count, Register64 input, Register64 dest) DEFINED_ON(x64);
|
||||
inline void rotateRight64(Imm32 count, Register64 input, Register64 dest, Register temp)
|
||||
DEFINED_ON(x86, x64, arm, mips32, mips64);
|
||||
PER_ARCH;
|
||||
inline void rotateRight64(Register count, Register64 input, Register64 dest, Register temp)
|
||||
PER_ARCH;
|
||||
|
||||
|
|
|
@ -306,6 +306,12 @@ MacroAssembler::add64(Imm32 imm, Register64 dest)
|
|||
Add(ARMRegister(dest.reg, 64), ARMRegister(dest.reg, 64), Operand(imm.value));
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::add64(Imm64 imm, Register64 dest)
|
||||
{
|
||||
Add(ARMRegister(dest.reg, 64), ARMRegister(dest.reg, 64), Operand(imm.value));
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::addDouble(FloatRegister src, FloatRegister dest)
|
||||
{
|
||||
|
@ -381,6 +387,12 @@ MacroAssembler::sub64(Register64 src, Register64 dest)
|
|||
MOZ_CRASH("NYI: sub64");
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::sub64(Imm64 imm, Register64 dest)
|
||||
{
|
||||
MOZ_CRASH("NYI: sub64");
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::subDouble(FloatRegister src, FloatRegister dest)
|
||||
{
|
||||
|
@ -725,12 +737,24 @@ MacroAssembler::rotateLeft64(Register count, Register64 input, Register64 dest,
|
|||
MOZ_CRASH("NYI: rotateLeft64");
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::rotateLeft64(Imm32 count, Register64 input, Register64 dest, Register temp)
|
||||
{
|
||||
MOZ_CRASH("NYI: rotateLeft64");
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::rotateRight64(Register count, Register64 input, Register64 dest, Register temp)
|
||||
{
|
||||
MOZ_CRASH("NYI: rotateRight64");
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::rotateRight64(Imm32 count, Register64 input, Register64 dest, Register temp)
|
||||
{
|
||||
MOZ_CRASH("NYI: rotateRight64");
|
||||
}
|
||||
|
||||
// ===============================================================
|
||||
// Bit counting functions
|
||||
|
||||
|
|
|
@ -301,9 +301,9 @@ struct PerformanceMonitoring {
|
|||
|
||||
#if WINVER >= 0x0600
|
||||
struct cpuid_t {
|
||||
WORD group_;
|
||||
BYTE number_;
|
||||
cpuid_t(WORD group, BYTE number)
|
||||
uint16_t group_;
|
||||
uint8_t number_;
|
||||
cpuid_t(uint16_t group, uint8_t number)
|
||||
: group_(group),
|
||||
number_(number)
|
||||
{ }
|
||||
|
|
|
@ -1692,6 +1692,15 @@ class BaseCompiler
|
|||
return true;
|
||||
}
|
||||
|
||||
MOZ_MUST_USE bool popConstI64(int64_t& c) {
|
||||
Stk& v = stk_.back();
|
||||
if (v.kind() != Stk::ConstI64)
|
||||
return false;
|
||||
c = v.i64val();
|
||||
stk_.popBack();
|
||||
return true;
|
||||
}
|
||||
|
||||
// TODO / OPTIMIZE (Bug 1316818): At the moment we use ReturnReg
|
||||
// for JoinReg. It is possible other choices would lead to better
|
||||
// register allocation, as ReturnReg is often first in the
|
||||
|
@ -2690,6 +2699,14 @@ class BaseCompiler
|
|||
#endif
|
||||
}
|
||||
|
||||
bool rotate64NeedsTemp() const {
|
||||
#if defined(JS_CODEGEN_X86)
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
void maskShiftCount32(RegI32 r) {
|
||||
#if defined(JS_CODEGEN_ARM)
|
||||
masm.and32(Imm32(31), r);
|
||||
|
@ -3987,18 +4004,23 @@ BaseCompiler::emitAddI32()
|
|||
void
|
||||
BaseCompiler::emitAddI64()
|
||||
{
|
||||
// TODO / OPTIMIZE: Ditto check for constant here (Bug 1316803)
|
||||
RegI64 r0, r1;
|
||||
pop2xI64(&r0, &r1);
|
||||
masm.add64(r1, r0);
|
||||
freeI64(r1);
|
||||
pushI64(r0);
|
||||
int64_t c;
|
||||
if (popConstI64(c)) {
|
||||
RegI64 r = popI64();
|
||||
masm.add64(Imm64(c), r);
|
||||
pushI64(r);
|
||||
} else {
|
||||
RegI64 r0, r1;
|
||||
pop2xI64(&r0, &r1);
|
||||
masm.add64(r1, r0);
|
||||
freeI64(r1);
|
||||
pushI64(r0);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
BaseCompiler::emitAddF64()
|
||||
{
|
||||
// TODO / OPTIMIZE: Ditto check for constant here (Bug 1316803)
|
||||
RegF64 r0, r1;
|
||||
pop2xF64(&r0, &r1);
|
||||
masm.addDouble(r1, r0);
|
||||
|
@ -4009,7 +4031,6 @@ BaseCompiler::emitAddF64()
|
|||
void
|
||||
BaseCompiler::emitAddF32()
|
||||
{
|
||||
// TODO / OPTIMIZE: Ditto check for constant here (Bug 1316803)
|
||||
RegF32 r0, r1;
|
||||
pop2xF32(&r0, &r1);
|
||||
masm.addFloat32(r1, r0);
|
||||
|
@ -4020,21 +4041,35 @@ BaseCompiler::emitAddF32()
|
|||
void
|
||||
BaseCompiler::emitSubtractI32()
|
||||
{
|
||||
RegI32 r0, r1;
|
||||
pop2xI32(&r0, &r1);
|
||||
masm.sub32(r1, r0);
|
||||
freeI32(r1);
|
||||
pushI32(r0);
|
||||
int32_t c;
|
||||
if (popConstI32(c)) {
|
||||
RegI32 r = popI32();
|
||||
masm.sub32(Imm32(c), r);
|
||||
pushI32(r);
|
||||
} else {
|
||||
RegI32 r0, r1;
|
||||
pop2xI32(&r0, &r1);
|
||||
masm.sub32(r1, r0);
|
||||
freeI32(r1);
|
||||
pushI32(r0);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
BaseCompiler::emitSubtractI64()
|
||||
{
|
||||
RegI64 r0, r1;
|
||||
pop2xI64(&r0, &r1);
|
||||
masm.sub64(r1, r0);
|
||||
freeI64(r1);
|
||||
pushI64(r0);
|
||||
int64_t c;
|
||||
if (popConstI64(c)) {
|
||||
RegI64 r = popI64();
|
||||
masm.sub64(Imm64(c), r);
|
||||
pushI64(r);
|
||||
} else {
|
||||
RegI64 r0, r1;
|
||||
pop2xI64(&r0, &r1);
|
||||
masm.sub64(r1, r0);
|
||||
freeI64(r1);
|
||||
pushI64(r0);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -4404,61 +4439,103 @@ BaseCompiler::emitCopysignF64()
|
|||
void
|
||||
BaseCompiler::emitOrI32()
|
||||
{
|
||||
RegI32 r0, r1;
|
||||
pop2xI32(&r0, &r1);
|
||||
masm.or32(r1, r0);
|
||||
freeI32(r1);
|
||||
pushI32(r0);
|
||||
int32_t c;
|
||||
if (popConstI32(c)) {
|
||||
RegI32 r = popI32();
|
||||
masm.or32(Imm32(c), r);
|
||||
pushI32(r);
|
||||
} else {
|
||||
RegI32 r0, r1;
|
||||
pop2xI32(&r0, &r1);
|
||||
masm.or32(r1, r0);
|
||||
freeI32(r1);
|
||||
pushI32(r0);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
BaseCompiler::emitOrI64()
|
||||
{
|
||||
RegI64 r0, r1;
|
||||
pop2xI64(&r0, &r1);
|
||||
masm.or64(r1, r0);
|
||||
freeI64(r1);
|
||||
pushI64(r0);
|
||||
int64_t c;
|
||||
if (popConstI64(c)) {
|
||||
RegI64 r = popI64();
|
||||
masm.or64(Imm64(c), r);
|
||||
pushI64(r);
|
||||
} else {
|
||||
RegI64 r0, r1;
|
||||
pop2xI64(&r0, &r1);
|
||||
masm.or64(r1, r0);
|
||||
freeI64(r1);
|
||||
pushI64(r0);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
BaseCompiler::emitAndI32()
|
||||
{
|
||||
RegI32 r0, r1;
|
||||
pop2xI32(&r0, &r1);
|
||||
masm.and32(r1, r0);
|
||||
freeI32(r1);
|
||||
pushI32(r0);
|
||||
int32_t c;
|
||||
if (popConstI32(c)) {
|
||||
RegI32 r = popI32();
|
||||
masm.and32(Imm32(c), r);
|
||||
pushI32(r);
|
||||
} else {
|
||||
RegI32 r0, r1;
|
||||
pop2xI32(&r0, &r1);
|
||||
masm.and32(r1, r0);
|
||||
freeI32(r1);
|
||||
pushI32(r0);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
BaseCompiler::emitAndI64()
|
||||
{
|
||||
RegI64 r0, r1;
|
||||
pop2xI64(&r0, &r1);
|
||||
masm.and64(r1, r0);
|
||||
freeI64(r1);
|
||||
pushI64(r0);
|
||||
int64_t c;
|
||||
if (popConstI64(c)) {
|
||||
RegI64 r = popI64();
|
||||
masm.and64(Imm64(c), r);
|
||||
pushI64(r);
|
||||
} else {
|
||||
RegI64 r0, r1;
|
||||
pop2xI64(&r0, &r1);
|
||||
masm.and64(r1, r0);
|
||||
freeI64(r1);
|
||||
pushI64(r0);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
BaseCompiler::emitXorI32()
|
||||
{
|
||||
RegI32 r0, r1;
|
||||
pop2xI32(&r0, &r1);
|
||||
masm.xor32(r1, r0);
|
||||
freeI32(r1);
|
||||
pushI32(r0);
|
||||
int32_t c;
|
||||
if (popConstI32(c)) {
|
||||
RegI32 r = popI32();
|
||||
masm.xor32(Imm32(c), r);
|
||||
pushI32(r);
|
||||
} else {
|
||||
RegI32 r0, r1;
|
||||
pop2xI32(&r0, &r1);
|
||||
masm.xor32(r1, r0);
|
||||
freeI32(r1);
|
||||
pushI32(r0);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
BaseCompiler::emitXorI64()
|
||||
{
|
||||
RegI64 r0, r1;
|
||||
pop2xI64(&r0, &r1);
|
||||
masm.xor64(r1, r0);
|
||||
freeI64(r1);
|
||||
pushI64(r0);
|
||||
int64_t c;
|
||||
if (popConstI64(c)) {
|
||||
RegI64 r = popI64();
|
||||
masm.xor64(Imm64(c), r);
|
||||
pushI64(r);
|
||||
} else {
|
||||
RegI64 r0, r1;
|
||||
pop2xI64(&r0, &r1);
|
||||
masm.xor64(r1, r0);
|
||||
freeI64(r1);
|
||||
pushI64(r0);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -4482,12 +4559,18 @@ BaseCompiler::emitShlI32()
|
|||
void
|
||||
BaseCompiler::emitShlI64()
|
||||
{
|
||||
// TODO / OPTIMIZE: Constant rhs (Bug 1316803)
|
||||
RegI64 r0, r1;
|
||||
pop2xI64ForShiftOrRotate(&r0, &r1);
|
||||
masm.lshift64(lowPart(r1), r0);
|
||||
freeI64(r1);
|
||||
pushI64(r0);
|
||||
int64_t c;
|
||||
if (popConstI64(c)) {
|
||||
RegI64 r = popI64();
|
||||
masm.lshift64(Imm32(c & 63), r);
|
||||
pushI64(r);
|
||||
} else {
|
||||
RegI64 r0, r1;
|
||||
pop2xI64ForShiftOrRotate(&r0, &r1);
|
||||
masm.lshift64(lowPart(r1), r0);
|
||||
freeI64(r1);
|
||||
pushI64(r0);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -4511,12 +4594,18 @@ BaseCompiler::emitShrI32()
|
|||
void
|
||||
BaseCompiler::emitShrI64()
|
||||
{
|
||||
// TODO / OPTIMIZE: Constant rhs (Bug 1316803)
|
||||
RegI64 r0, r1;
|
||||
pop2xI64ForShiftOrRotate(&r0, &r1);
|
||||
masm.rshift64Arithmetic(lowPart(r1), r0);
|
||||
freeI64(r1);
|
||||
pushI64(r0);
|
||||
int64_t c;
|
||||
if (popConstI64(c)) {
|
||||
RegI64 r = popI64();
|
||||
masm.rshift64Arithmetic(Imm32(c & 63), r);
|
||||
pushI64(r);
|
||||
} else {
|
||||
RegI64 r0, r1;
|
||||
pop2xI64ForShiftOrRotate(&r0, &r1);
|
||||
masm.rshift64Arithmetic(lowPart(r1), r0);
|
||||
freeI64(r1);
|
||||
pushI64(r0);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -4540,56 +4629,96 @@ BaseCompiler::emitShrU32()
|
|||
void
|
||||
BaseCompiler::emitShrU64()
|
||||
{
|
||||
// TODO / OPTIMIZE: Constant rhs (Bug 1316803)
|
||||
RegI64 r0, r1;
|
||||
pop2xI64ForShiftOrRotate(&r0, &r1);
|
||||
masm.rshift64(lowPart(r1), r0);
|
||||
freeI64(r1);
|
||||
pushI64(r0);
|
||||
int64_t c;
|
||||
if (popConstI64(c)) {
|
||||
RegI64 r = popI64();
|
||||
masm.rshift64(Imm32(c & 63), r);
|
||||
pushI64(r);
|
||||
} else {
|
||||
RegI64 r0, r1;
|
||||
pop2xI64ForShiftOrRotate(&r0, &r1);
|
||||
masm.rshift64(lowPart(r1), r0);
|
||||
freeI64(r1);
|
||||
pushI64(r0);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
BaseCompiler::emitRotrI32()
|
||||
{
|
||||
// TODO / OPTIMIZE: Constant rhs (Bug 1316803)
|
||||
RegI32 r0, r1;
|
||||
pop2xI32ForShiftOrRotate(&r0, &r1);
|
||||
masm.rotateRight(r1, r0, r0);
|
||||
freeI32(r1);
|
||||
pushI32(r0);
|
||||
int32_t c;
|
||||
if (popConstI32(c)) {
|
||||
RegI32 r = popI32();
|
||||
masm.rotateRight(Imm32(c & 31), r, r);
|
||||
pushI32(r);
|
||||
} else {
|
||||
RegI32 r0, r1;
|
||||
pop2xI32ForShiftOrRotate(&r0, &r1);
|
||||
masm.rotateRight(r1, r0, r0);
|
||||
freeI32(r1);
|
||||
pushI32(r0);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
BaseCompiler::emitRotrI64()
|
||||
{
|
||||
// TODO / OPTIMIZE: Constant rhs (Bug 1316803)
|
||||
RegI64 r0, r1;
|
||||
pop2xI64ForShiftOrRotate(&r0, &r1);
|
||||
masm.rotateRight64(lowPart(r1), r0, r0, maybeHighPart(r1));
|
||||
freeI64(r1);
|
||||
pushI64(r0);
|
||||
int64_t c;
|
||||
if (popConstI64(c)) {
|
||||
RegI64 r = popI64();
|
||||
RegI32 temp;
|
||||
if (rotate64NeedsTemp())
|
||||
temp = needI32();
|
||||
masm.rotateRight64(Imm32(c & 63), r, r, temp);
|
||||
if (temp != Register::Invalid())
|
||||
freeI32(temp);
|
||||
pushI64(r);
|
||||
} else {
|
||||
RegI64 r0, r1;
|
||||
pop2xI64ForShiftOrRotate(&r0, &r1);
|
||||
masm.rotateRight64(lowPart(r1), r0, r0, maybeHighPart(r1));
|
||||
freeI64(r1);
|
||||
pushI64(r0);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
BaseCompiler::emitRotlI32()
|
||||
{
|
||||
// TODO / OPTIMIZE: Constant rhs (Bug 1316803)
|
||||
RegI32 r0, r1;
|
||||
pop2xI32ForShiftOrRotate(&r0, &r1);
|
||||
masm.rotateLeft(r1, r0, r0);
|
||||
freeI32(r1);
|
||||
pushI32(r0);
|
||||
int32_t c;
|
||||
if (popConstI32(c)) {
|
||||
RegI32 r = popI32();
|
||||
masm.rotateLeft(Imm32(c & 31), r, r);
|
||||
pushI32(r);
|
||||
} else {
|
||||
RegI32 r0, r1;
|
||||
pop2xI32ForShiftOrRotate(&r0, &r1);
|
||||
masm.rotateLeft(r1, r0, r0);
|
||||
freeI32(r1);
|
||||
pushI32(r0);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
BaseCompiler::emitRotlI64()
|
||||
{
|
||||
// TODO / OPTIMIZE: Constant rhs (Bug 1316803)
|
||||
RegI64 r0, r1;
|
||||
pop2xI64ForShiftOrRotate(&r0, &r1);
|
||||
masm.rotateLeft64(lowPart(r1), r0, r0, maybeHighPart(r1));
|
||||
freeI64(r1);
|
||||
pushI64(r0);
|
||||
int64_t c;
|
||||
if (popConstI64(c)) {
|
||||
RegI64 r = popI64();
|
||||
RegI32 temp;
|
||||
if (rotate64NeedsTemp())
|
||||
temp = needI32();
|
||||
masm.rotateLeft64(Imm32(c & 63), r, r, temp);
|
||||
if (temp != Register::Invalid())
|
||||
freeI32(temp);
|
||||
pushI64(r);
|
||||
} else {
|
||||
RegI64 r0, r1;
|
||||
pop2xI64ForShiftOrRotate(&r0, &r1);
|
||||
masm.rotateLeft64(lowPart(r1), r0, r0, maybeHighPart(r1));
|
||||
freeI64(r1);
|
||||
pushI64(r0);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -40,7 +40,7 @@ interface nsIXPCScriptable : nsISupports
|
|||
const uint32_t WANT_PRECREATE = 1 << 0;
|
||||
// unused bit here
|
||||
// unused bit here
|
||||
const uint32_t WANT_ADDPROPERTY = 1 << 3;
|
||||
// unused bit here
|
||||
// unused bit here
|
||||
const uint32_t WANT_GETPROPERTY = 1 << 5;
|
||||
const uint32_t WANT_SETPROPERTY = 1 << 6;
|
||||
|
@ -77,10 +77,6 @@ interface nsIXPCScriptable : nsISupports
|
|||
void preCreate(in nsISupports nativeObj, in JSContextPtr cx,
|
||||
in JSObjectPtr globalObj, out JSObjectPtr parentObj);
|
||||
|
||||
boolean addProperty(in nsIXPConnectWrappedNative wrapper,
|
||||
in JSContextPtr cx, in JSObjectPtr obj, in jsid id,
|
||||
in jsval val);
|
||||
|
||||
boolean getProperty(in nsIXPConnectWrappedNative wrapper,
|
||||
in JSContextPtr cx, in JSObjectPtr obj, in jsid id,
|
||||
in JSValPtr vp);
|
||||
|
|
|
@ -34,9 +34,6 @@ XPC_MAP_CLASSNAME::GetScriptableFlags()
|
|||
#ifdef XPC_MAP_WANT_PRECREATE
|
||||
nsIXPCScriptable::WANT_PRECREATE |
|
||||
#endif
|
||||
#ifdef XPC_MAP_WANT_ADDPROPERTY
|
||||
nsIXPCScriptable::WANT_ADDPROPERTY |
|
||||
#endif
|
||||
#ifdef XPC_MAP_WANT_GETPROPERTY
|
||||
nsIXPCScriptable::WANT_GETPROPERTY |
|
||||
#endif
|
||||
|
@ -77,11 +74,6 @@ NS_IMETHODIMP XPC_MAP_CLASSNAME::PreCreate(nsISupports* nativeObj, JSContext * c
|
|||
{NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
|
||||
#endif
|
||||
|
||||
#ifndef XPC_MAP_WANT_ADDPROPERTY
|
||||
NS_IMETHODIMP XPC_MAP_CLASSNAME::AddProperty(nsIXPConnectWrappedNative* wrapper, JSContext * cx, JSObject * obj, jsid id, JS::HandleValue val, bool* _retval)
|
||||
{NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
|
||||
#endif
|
||||
|
||||
#ifndef XPC_MAP_WANT_GETPROPERTY
|
||||
NS_IMETHODIMP XPC_MAP_CLASSNAME::GetProperty(nsIXPConnectWrappedNative* wrapper, JSContext * cx, JSObject * obj, jsid id, JS::Value * vp, bool* _retval)
|
||||
{NS_WARNING("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
|
||||
|
@ -127,10 +119,8 @@ NS_IMETHODIMP XPC_MAP_CLASSNAME::HasInstance(nsIXPConnectWrappedNative* wrapper,
|
|||
{NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
|
||||
#endif
|
||||
|
||||
#ifndef XPC_MAP_WANT_POST_CREATE_PROTOTYPE
|
||||
NS_IMETHODIMP XPC_MAP_CLASSNAME::PostCreatePrototype(JSContext* cx, JSObject* proto)
|
||||
{return NS_OK;}
|
||||
#endif
|
||||
|
||||
/**************************************************************/
|
||||
|
||||
|
@ -141,10 +131,6 @@ NS_IMETHODIMP XPC_MAP_CLASSNAME::PostCreatePrototype(JSContext* cx, JSObject* pr
|
|||
#undef XPC_MAP_WANT_PRECREATE
|
||||
#endif
|
||||
|
||||
#ifdef XPC_MAP_WANT_ADDPROPERTY
|
||||
#undef XPC_MAP_WANT_ADDPROPERTY
|
||||
#endif
|
||||
|
||||
#ifdef XPC_MAP_WANT_GETPROPERTY
|
||||
#undef XPC_MAP_WANT_GETPROPERTY
|
||||
#endif
|
||||
|
@ -181,10 +167,6 @@ NS_IMETHODIMP XPC_MAP_CLASSNAME::PostCreatePrototype(JSContext* cx, JSObject* pr
|
|||
#undef XPC_MAP_WANT_HASINSTANCE
|
||||
#endif
|
||||
|
||||
#ifdef XPC_MAP_WANT_POST_CREATE_PROTOTYPE
|
||||
#undef XPC_MAP_WANT_POST_CREATE_PROTOTYPE
|
||||
#endif
|
||||
|
||||
#ifdef XPC_MAP_FLAGS
|
||||
#undef XPC_MAP_FLAGS
|
||||
#endif
|
||||
|
|
|
@ -715,15 +715,6 @@ XPC_WN_MaybeResolvingDeletePropertyStub(JSContext* cx, HandleObject obj, HandleI
|
|||
return Throw(rv, cx); \
|
||||
return retval ? result.succeed() : result.failMethod();
|
||||
|
||||
static bool
|
||||
XPC_WN_Helper_AddProperty(JSContext* cx, HandleObject obj, HandleId id,
|
||||
HandleValue v)
|
||||
{
|
||||
PRE_HELPER_STUB
|
||||
AddProperty(wrapper, cx, obj, id, v, &retval);
|
||||
POST_HELPER_STUB
|
||||
}
|
||||
|
||||
bool
|
||||
XPC_WN_Helper_GetProperty(JSContext* cx, HandleObject obj, HandleId id,
|
||||
MutableHandleValue vp)
|
||||
|
@ -987,9 +978,7 @@ XPCNativeScriptableShared::XPCNativeScriptableShared(uint32_t aFlags,
|
|||
memset(cOps, 0, sizeof(js::ClassOps));
|
||||
mJSClass.cOps = cOps;
|
||||
|
||||
if (mFlags.WantAddProperty())
|
||||
cOps->addProperty = XPC_WN_Helper_AddProperty;
|
||||
else if (mFlags.UseJSStubForAddProperty())
|
||||
if (mFlags.UseJSStubForAddProperty())
|
||||
cOps->addProperty = nullptr;
|
||||
else if (mFlags.AllowPropModsDuringResolve())
|
||||
cOps->addProperty = XPC_WN_MaybeResolvingPropertyStub;
|
||||
|
|
|
@ -1428,7 +1428,6 @@ public:
|
|||
#define GET_IT(f_) const { return 0 != (mFlags & nsIXPCScriptable:: f_ ); }
|
||||
|
||||
bool WantPreCreate() GET_IT(WANT_PRECREATE)
|
||||
bool WantAddProperty() GET_IT(WANT_ADDPROPERTY)
|
||||
bool WantGetProperty() GET_IT(WANT_GETPROPERTY)
|
||||
bool WantSetProperty() GET_IT(WANT_SETPROPERTY)
|
||||
bool WantEnumerate() GET_IT(WANT_ENUMERATE)
|
||||
|
|
|
@ -4281,8 +4281,8 @@ nsCSSFrameConstructor::GetAnonymousContent(nsIContent* aParent,
|
|||
// if the content doesn't have an explicit style context (if it does, we
|
||||
// don't need the normal computed values).
|
||||
for (auto& info : aContent) {
|
||||
if (!info.mStyleContext) {
|
||||
styleSet->StyleNewSubtree(info.mContent);
|
||||
if (!info.mStyleContext && info.mContent->IsElement()) {
|
||||
styleSet->StyleNewSubtree(info.mContent->AsElement());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7390,11 +7390,7 @@ nsCSSFrameConstructor::ContentAppended(nsIContent* aContainer,
|
|||
// We need the styles for (a). In the case of (b), the Servo traversal has
|
||||
// already happened, so we don't need to do it again.
|
||||
if (!RestyleManager()->AsBase()->IsInStyleRefresh()) {
|
||||
if (aFirstNewContent->GetNextSibling()) {
|
||||
set->StyleNewChildren(aContainer);
|
||||
} else {
|
||||
set->StyleNewSubtree(aFirstNewContent);
|
||||
}
|
||||
set->StyleNewChildren(aContainer->AsElement());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7855,7 +7851,7 @@ nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aContainer,
|
|||
// We need the styles for (a). In the case of (b), the Servo traversal has
|
||||
// already happened, so we don't need to do it again.
|
||||
if (!RestyleManager()->AsBase()->IsInStyleRefresh()) {
|
||||
set->StyleNewSubtree(aStartChild);
|
||||
set->StyleNewChildren(aContainer->AsElement());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -383,13 +383,11 @@ public:
|
|||
explicit nsResizeDropdownAtFinalPosition(nsComboboxControlFrame* aFrame)
|
||||
: mFrame(aFrame)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsResizeDropdownAtFinalPosition);
|
||||
}
|
||||
|
||||
protected:
|
||||
~nsResizeDropdownAtFinalPosition()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsResizeDropdownAtFinalPosition);
|
||||
}
|
||||
|
||||
public:
|
||||
|
|
|
@ -606,7 +606,6 @@ public:
|
|||
nsGlyphTableList()
|
||||
: mUnicodeTable(NS_LITERAL_STRING("Unicode"))
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsGlyphTableList);
|
||||
}
|
||||
|
||||
nsresult Initialize();
|
||||
|
@ -623,7 +622,6 @@ public:
|
|||
private:
|
||||
~nsGlyphTableList()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsGlyphTableList);
|
||||
}
|
||||
|
||||
nsPropertiesTable* PropertiesTableAt(int32_t aIndex) {
|
||||
|
|
|
@ -18,7 +18,6 @@ NS_IMPL_ISUPPORTS(RemotePrintJobChild,
|
|||
|
||||
RemotePrintJobChild::RemotePrintJobChild()
|
||||
{
|
||||
MOZ_COUNT_CTOR(RemotePrintJobChild);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -141,7 +140,6 @@ RemotePrintJobChild::OnSecurityChange(nsIWebProgress* aProgress,
|
|||
|
||||
RemotePrintJobChild::~RemotePrintJobChild()
|
||||
{
|
||||
MOZ_COUNT_DTOR(RemotePrintJobChild);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -646,10 +646,7 @@ void
|
|||
nsMediaList::SetText(const nsAString& aMediaText)
|
||||
{
|
||||
nsCSSParser parser;
|
||||
|
||||
bool htmlMode = mStyleSheet && mStyleSheet->GetOwnerNode();
|
||||
|
||||
parser.ParseMediaList(aMediaText, nullptr, 0, this, htmlMode);
|
||||
parser.ParseMediaList(aMediaText, nullptr, 0, this);
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -109,13 +109,10 @@ FontFace::FontFace(nsISupports* aParent, FontFaceSet* aFontFaceSet)
|
|||
, mFontFaceSet(aFontFaceSet)
|
||||
, mInFontFaceSet(false)
|
||||
{
|
||||
MOZ_COUNT_CTOR(FontFace);
|
||||
}
|
||||
|
||||
FontFace::~FontFace()
|
||||
{
|
||||
MOZ_COUNT_DTOR(FontFace);
|
||||
|
||||
SetUserFontEntry(nullptr);
|
||||
|
||||
if (mSourceBuffer) {
|
||||
|
|
|
@ -104,8 +104,6 @@ FontFaceSet::FontFaceSet(nsPIDOMWindowInner* aWindow, nsIDocument* aDocument)
|
|||
, mHasLoadingFontFacesIsDirty(false)
|
||||
, mDelayedLoadCheck(false)
|
||||
{
|
||||
MOZ_COUNT_CTOR(FontFaceSet);
|
||||
|
||||
nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(aWindow);
|
||||
|
||||
// If the pref is not set, don't create the Promise (which the page wouldn't
|
||||
|
@ -127,8 +125,6 @@ FontFaceSet::FontFaceSet(nsPIDOMWindowInner* aWindow, nsIDocument* aDocument)
|
|||
|
||||
FontFaceSet::~FontFaceSet()
|
||||
{
|
||||
MOZ_COUNT_DTOR(FontFaceSet);
|
||||
|
||||
Disconnect();
|
||||
for (auto it = mLoaders.Iter(); !it.Done(); it.Next()) {
|
||||
it.Get()->GetKey()->Cancel();
|
||||
|
|
|
@ -1300,7 +1300,7 @@ Loader::PrepareSheet(StyleSheet* aSheet,
|
|||
|
||||
// We have aMediaString only when linked from link elements, style
|
||||
// elements, or PIs, so pass true.
|
||||
mediumParser.ParseMediaList(aMediaString, nullptr, 0, mediaList, true);
|
||||
mediumParser.ParseMediaList(aMediaString, nullptr, 0, mediaList);
|
||||
}
|
||||
|
||||
sheet->SetMedia(mediaList);
|
||||
|
|
|
@ -24,7 +24,7 @@ MediaQueryList::MediaQueryList(nsIDocument *aDocument,
|
|||
PR_INIT_CLIST(this);
|
||||
|
||||
nsCSSParser parser;
|
||||
parser.ParseMediaList(aMediaQueryList, nullptr, 0, mMediaList, false);
|
||||
parser.ParseMediaList(aMediaQueryList, nullptr, 0, mMediaList);
|
||||
}
|
||||
|
||||
MediaQueryList::~MediaQueryList()
|
||||
|
|
|
@ -159,7 +159,7 @@ SERVO_BINDING_FUNC(Servo_ResolveStyle, ServoComputedValuesStrong,
|
|||
// Restyle the given subtree.
|
||||
SERVO_BINDING_FUNC(Servo_TraverseSubtree, void,
|
||||
RawGeckoElementBorrowed root, RawServoStyleSetBorrowed set,
|
||||
mozilla::SkipRootBehavior skip_root)
|
||||
mozilla::TraversalRootBehavior root_behavior)
|
||||
|
||||
// Assert that the tree has no pending or unconsumed restyles.
|
||||
SERVO_BINDING_FUNC(Servo_AssertTreeIsClean, void, RawGeckoElementBorrowed root)
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче