diff --git a/variability/variability_index.html b/variability/variability_index.html new file mode 100644 index 0000000..c6925bc --- /dev/null +++ b/variability/variability_index.html @@ -0,0 +1,33515 @@ + + + +
+ + + + +
+
+
+
|
+ Times Different | +|||||
31602 | +}else if( eFileLock==EXCLUSIVE_LOCK ){ | +4 | +||||
31603 | +pFile->eFileLock = PENDING_LOCK; | +4 | +||||
31604 | +pInode->eFileLock = PENDING_LOCK; | +4 | +||||
53425 | +&& pPager->journalMode==PAGER_JOURNALMODE_PERSIST | +10 | +||||
61460 | +p->pNext = pSib; | +2 | +||||
61461 | +p->pPrev = 0; | +2 | +||||
61462 | +pSib->pPrev = p; | +2 | +
+
+
+
|
+ Times Different | +|||||
2457 | +obs->Reflow(aStart, aEnd); | +6 | +
+
+
+
|
+ Times Different | +|||||
568 | +nsSHistory::GetEntryAtIndex(int32_t aIndex, bool aModifyIndex, | +6 | +||||
575 | +rv = GetTransactionAtIndex(aIndex, getter_AddRefs(txn)); | +6 | +||||
576 | +if (NS_SUCCEEDED(rv) && txn) { | +6 | +||||
578 | +rv = txn->GetSHEntry(aResult); | +6 | +||||
579 | +if (NS_SUCCEEDED(rv) && (*aResult)) { | +6 | +||||
581 | +if (aModifyIndex) { | +6 | +||||
587 | +return rv; | +6 | +
+
+
+
|
+ Times Different | +|||||
147 | +std::max(std::min(StickyTimeDuration(localTime - aTiming.Delay()), | +7 | +||||
148 | +result.mActiveDuration), | +7 | +||||
149 | +zeroDuration); | +7 | +||||
205 | +progress == 0.0 && | +7 | +||||
207 | +(result.mActiveTime != zeroDuration || | +7 | +||||
213 | +MOZ_ASSERT(result.mCurrentIteration != 0, | +7 | +||||
215 | +progress = 1.0; | +7 | +||||
216 | +if (result.mCurrentIteration != UINT64_MAX) { | +7 | +||||
217 | +result.mCurrentIteration--; | +7 | +
+
+
+
|
+ Times Different | +|||||
222 | +aDriver->RemoveRefreshObserver(this, FlushType::Style); | +4 | +||||
223 | +mIsObservingRefreshDriver = false; | +4 | +
+
+
+
|
+ Times Different | +|||||
343 | +bool& postedRestyle = iter.Data(); | +6 | +||||
344 | +if (postedRestyle) { | +6 | +||||
350 | +cascadeLevel); | +2 | +||||
351 | +postedRestyle = true; | +2 | +
+
+
+
|
+ Times Different | +|||||
725 | +KeyframeEffectReadOnly::IsRunningOnCompositor() const | +2 | +||||
731 | +for (const AnimationProperty& property : mProperties) { | +2 | +||||
732 | +if (property.mIsRunningOnCompositor) { | +2 | +||||
736 | +return false; | +2 | +
+
+
+
|
+ Times Different | +|||||
1685 | +MarkUncollectableForCCGeneration(nsCCUncollectableMarker::sGeneration); | +2 | +||||
1687 | +for (uint32_t i = 0; i < grayNodes.Length(); ++i) { | +2 | +||||
1697 | +nsIContent* purple = nodesToUnpurple[i]; | +2 | +||||
1699 | +if (purple != aNode) { | +2 | +||||
1700 | +purple->RemovePurple(); | +4 | +||||
1721 | +uint32_t len = gNodesToUnbind->Length(); | +4 | +||||
1722 | +for (uint32_t i = 0; i < len; ++i) { | +4 | +||||
1723 | +nsIContent* c = gNodesToUnbind->ElementAt(i); | +4 | +||||
1724 | +c->SetIsPurpleRoot(false); | +4 | +||||
1725 | +ContentUnbinder::Append(c); | +4 | +||||
1727 | +delete gNodesToUnbind; | +4 | +||||
1728 | +gNodesToUnbind = nullptr; | +4 | +||||
1841 | +if (node->IsPurple() && (node != aNode || aRemovingAllowed)) { | +6 | +||||
1842 | +node->RemovePurple(); | +6 | +||||
1844 | +MarkNodeChildren(node); | +6 | +||||
1858 | +if (!gNodesToUnbind) { | +4 | +||||
1859 | + gNodesToUnbind = new AutoTArray |
+ 4 | +||||
1861 | + gNodesToUnbind->AppendElement(static_cast |
+ 4 | +||||
1862 | +for (uint32_t i = 0; i < nodesToClear.Length(); ++i) { | +4 | +||||
1863 | +nsIContent* n = nodesToClear[i]; | +4 | +||||
1864 | +if ((n != aNode || aRemovingAllowed) && n->IsPurple()) { | +4 | +||||
1865 | +n->RemovePurple(); | +4 | +||||
1892 | +nsIContent* n = nodesToClear[i]; | +6 | +||||
1893 | +MarkNodeChildren(n); | +6 | +||||
1896 | +if ((n != aNode || aRemovingAllowed) && n->IsPurple()) { | +6 | +||||
1897 | +n->RemovePurple(); | +6 | +
+
+
+
|
+ Times Different | +|||||
707 | +mExecutor->Cancel(); | +6 | +||||
709 | +OrderedTimeoutIterator iter(mNormalTimeouts, mTrackingTimeouts); | +6 | +||||
710 | +Timeout* nextTimeout = iter.Next(); | +6 | +||||
711 | +if (nextTimeout) { | +6 | +||||
712 | +MOZ_ALWAYS_SUCCEEDS(MaybeSchedule(nextTimeout->When())); | +6 | +||||
713 | +} | +6 | +||||
724 | +return; | +6 | +||||
770 | +deadline = aTargetDeadline; | +4 | +||||
839 | +return; | +6 | +
+
+
+
|
+ Times Different | +|||||
138 | + static_cast |
+ 6 | +||||
139 | +EventListenerManager* elm = et->GetExistingListenerManager(); | +6 | +||||
140 | +if (elm) { | +6 | +||||
141 | +elm->MarkForCC(); | +6 | +||||
144 | +} | +6 | +||||
239 | +MarkSHEntry(nsISHEntry* aSHEntry, bool aCleanupJS, bool aPrepareForCC) | +6 | +||||
241 | +if (!aSHEntry) { | +6 | +||||
246 | +aSHEntry->GetContentViewer(getter_AddRefs(cview)); | +6 | +||||
247 | +MarkContentViewer(cview, aCleanupJS, aPrepareForCC); | +6 | +||||
249 | + nsCOMPtr |
+ 6 | +||||
250 | +int32_t i = 0; | +6 | +||||
251 | +while (NS_SUCCEEDED(aSHEntry->ChildShellAt(i++, getter_AddRefs(child))) && | +6 | +||||
256 | + nsCOMPtr |
+ 6 | +||||
258 | +shCont->GetChildCount(&count); | +6 | +||||
259 | +for (i = 0; i < count; ++i) { | +6 | +||||
263 | +} | +6 | +||||
287 | +history->GetEntryAtIndex(i, false, getter_AddRefs(shEntry)); | +6 | +||||
289 | +MarkSHEntry(shEntry, aCleanupJS, aPrepareForCC); | +6 | +||||
290 | +} | +6 | +
+
+
+
|
+ Times Different | +|||||
60 | +NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(nsBaseContentList) | +6 | +||||
61 | +if (nsCCUncollectableMarker::sGeneration && tmp->HasKnownLiveWrapper()) { | +6 | +||||
62 | +for (uint32_t i = 0; i < tmp->mElements.Length(); ++i) { | +6 | +||||
63 | +nsIContent* c = tmp->mElements[i]; | +6 | +||||
64 | +if (c->IsPurple()) { | +6 | +||||
65 | +c->RemovePurple(); | +6 | +||||
67 | +Element::MarkNodeChildren(c); | +6 | +
+
+
+
|
+ Times Different | +|||||
189 | + nsCOMPtr |
+ 10 | +||||
190 | +isTopLevel = topWindow == window; | +10 | +
+
+
+
|
+ Times Different | +|||||
241 | +if (mDeferredFlushTags) { | +2 | +||||
244 | +if (mDeferredLayoutStart) { | +2 | +||||
251 | +StartLayout(false); | +2 | +||||
255 | +ScrollToRef(); | +2 | +||||
1321 | +mDeferredFlushTags = true; | +7 | +
+
+
+
|
+ Times Different | +|||||
313 | +virtual bool OwnedOnlyByTheDOMTree() override | +2 | +||||
315 | +return GetParent() && mRefCnt.get() == 1; | +2 | +||||
322 | +virtual void RemovePurple() override | +6 | +||||
324 | +mRefCnt.RemovePurple(); | +6 | +||||
325 | +} | +6 | +
+
+
+
|
+ Times Different | +|||||
1779 | +js::SetProxyReservedSlot(proxy, 0, js::PrivateValue(nullptr)); | +6 | +||||
2304 | +tmp->mTimeoutManager->ForEachUnorderedTimeout([&cb](Timeout* timeout) { | +8 | +||||
2305 | +cb.NoteNativeChild(timeout, NS_CYCLE_COLLECTION_PARTICIPANT(Timeout)); | +8 | +||||
2326 | +cb.NoteNativeChild(request, NS_CYCLE_COLLECTION_PARTICIPANT(IdleRequest)); | +8 | +
+
+
+
|
+ Times Different | +|||||
119 | +nsInProcessTabChildGlobal::MarkForCC() | +6 | +||||
121 | +MarkScopesForCC(); | +6 | +||||
122 | +return mMessageManager ? mMessageManager->MarkForCC() : false; | +6 | +
+
+
+
|
+ Times Different | +|||||
1470 | +idleDuration = aDeadline - startTimeStamp; | +6 | +||||
2079 | +ccDelay = NS_CC_DELAY / 3; | +2 | +||||
2081 | +PRTime now = PR_Now(); | +2 | +||||
2082 | +if (sCCLockedOutTime == 0) { | +2 | +||||
2088 | +sCCRunnerFireCount = 0; | +2 | +||||
2089 | +sCCLockedOutTime = now; | +2 | +||||
2090 | +return false; | +2 | +||||
2092 | +if (now - sCCLockedOutTime < NS_MAX_CC_LOCKEDOUT_TIME) { | +2 | +||||
2272 | +sNeedsGCAfterCC = true; | +2 | +||||
2273 | +return; | +2 | +
+
+
+
|
+ Times Different | +|||||
414 | + buff = static_cast |
+ 4 | +||||
415 | +if (!buff) { | +4 | +||||
419 | +memcpy(buff, m1b, mState.mLength); | +4 | +||||
420 | +mState.mInHeap = true; | +4 | +
+
+
+
|
+ Times Different | +|||||
657 | +mCheckTimerWaitingForCCEnd = true; | +2 | +||||
658 | +return; | +2 | +
+
+
+
|
+ Times Different | +|||||
22 | + const_cast |
+ 4 | +||||
23 | +return nullptr; | +4 | +||||
56 | +*hasGrayObjects = true; | +6 | +
+
+
+
|
+ Times Different | +|||||
600 | + TErrorResult |
+ 2 | +||||
602 | +AssertInOwningThread(); | +2 | +||||
603 | +if (JS_IsExceptionPending(aCx)) { | +2 | +||||
606 | +mResult = NS_ERROR_UNCATCHABLE_EXCEPTION; | +2 | +||||
608 | +} | +2 | +
+
+
+
|
+ Times Different | +|||||
32 | +NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(CustomEvent, Event) | +6 | +||||
33 | +tmp->mDetail.setUndefined(); | +6 | +||||
35 | +NS_IMPL_CYCLE_COLLECTION_UNLINK_END | +6 | +
+
+
+
|
+ Times Different | +|||||
374 | +DOMEventTargetHelper::GetContextForEventHandlers(nsresult* aRv) | +4 | +||||
376 | +*aRv = CheckInnerWindowCorrectness(); | +4 | +||||
377 | +if (NS_FAILED(*aRv)) { | +4 | +||||
380 | +nsPIDOMWindowInner* owner = GetOwner(); | +4 | +||||
382 | +: nullptr; | +4 | +
+
+
+
|
+ Times Different | +|||||
151 | +NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(Event) | +6 | +||||
152 | +if (tmp->mEventIsInternal) { | +6 | +||||
153 | +tmp->mEvent->mTarget = nullptr; | +6 | +||||
154 | +tmp->mEvent->mCurrentTarget = nullptr; | +6 | +||||
155 | +tmp->mEvent->mOriginalTarget = nullptr; | +6 | +||||
156 | +switch (tmp->mEvent->mClass) { | +6 | +||||
183 | +NS_IMPL_CYCLE_COLLECTION_UNLINK(mPresContext); | +6 | +||||
184 | +NS_IMPL_CYCLE_COLLECTION_UNLINK(mExplicitOriginalTarget); | +6 | +||||
185 | +NS_IMPL_CYCLE_COLLECTION_UNLINK(mOwner); | +6 | +||||
186 | +NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER | +6 | +||||
187 | +NS_IMPL_CYCLE_COLLECTION_UNLINK_END | +6 | +||||
220 | +NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mEvent->mRelatedTarget"); | +2 | +||||
221 | +cb.NoteXPCOMChild(tmp->mEvent->AsFocusEvent()->mRelatedTarget); | +2 | +||||
222 | +break; | +2 | +
+
+
+
|
+ Times Different | +|||||
1318 | +aEvent->mFlags.mExceptionWasRaised = true; | +2 | +
+
+
+
|
+ Times Different | +|||||
4262 | +targetElement = mDocument->GetRootElement(); | +6 | +||||
4746 | +mCurrentTarget->GetContentForEvent(aEvent, getter_AddRefs(content)); | +6 | +
+
+
+
|
+ Times Different | +|||||
148 | +NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(IMEContentObserver) | +2 | +||||
149 | +NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mWidget) | +2 | +||||
150 | +NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mFocusedWidget) | +2 | +||||
151 | +NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSelection) | +2 | +||||
152 | +NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mRootContent) | +2 | +||||
153 | +NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mEditableNode) | +2 | +||||
154 | +NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mDocShell) | +2 | +||||
155 | +NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mEditorBase) | +2 | +||||
156 | +NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mDocumentObserver) | +2 | +||||
157 | +NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mEndOfAddedTextCache.mContainerNode) | +2 | +||||
158 | +NS_IMPL_CYCLE_COLLECTION_TRAVERSE( | +2 | +||||
160 | +NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END | +2 | +||||
734 | +IMEContentObserver::Reflow(DOMHighResTimeStamp aStart, | +6 | +||||
737 | +if (!NeedsPositionChangeNotification()) { | +6 | +||||
741 | +MaybeNotifyIMEOfPositionChange(); | +6 | +||||
742 | +return NS_OK; | +6 | +||||
1746 | +return; | +11 | +||||
2160 | +return; | +9 | +||||
2164 | +MOZ_LOG(sIMECOLog, LogLevel::Debug, | +9 | +||||
2262 | +NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(IMEContentObserver::DocumentObserver) | +2 | +||||
2263 | +NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mIMEContentObserver) | +2 | +||||
2264 | +NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mDocument) | +2 | +||||
2265 | +NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END | +2 | +
+
+
+
|
+ Times Different | +|||||
217 | +return rv.StealNSResult(); | +2 | +
+
+
+
|
+ Times Different | +|||||
2849 | +if (aRead && !history->HasStates()) { | +7 | +
+
+
+
|
+ Times Different | +|||||
5715 | +return mIdleTime < aOther.mIdleTime; | +3 | +||||
5736 | +operator==(const IdleThreadInfo& aOther) const | +3 | +||||
5738 | +return mThreadInfo.mRunnable == aOther.mThreadInfo.mRunnable && | +3 | +||||
5739 | +mThreadInfo.mThread == aOther.mThreadInfo.mThread; | +3 | +||||
5745 | +return mIdleTime < aOther.mIdleTime; | +3 | +||||
12083 | +IdleThreadInfo& info = self->mIdleThreads[index]; | +3 | +||||
12084 | +MOZ_ASSERT(info.mThreadInfo.mThread); | +3 | +||||
12085 | +MOZ_ASSERT(info.mThreadInfo.mRunnable); | +3 | +||||
12087 | +if (now >= info.mIdleTime) { | +3 | +||||
12447 | +(newTargetIdleTime.IsNull() || mTargetIdleTime != newTargetIdleTime)) { | +3 | +||||
12636 | +const uint32_t lastIndex = mIdleThreads.Length() - 1; | +3 | +||||
12638 | +ThreadInfo& threadInfo = mIdleThreads[lastIndex].mThreadInfo; | +3 | +||||
12640 | +dbInfo->mThreadInfo.mRunnable.swap(threadInfo.mRunnable); | +3 | +||||
12641 | +dbInfo->mThreadInfo.mThread.swap(threadInfo.mThread); | +3 | +||||
12643 | +mIdleThreads.RemoveElementAt(lastIndex); | +3 | +||||
12645 | +AdjustIdleTimer(); | +3 | +
+
+
+
|
+ Times Different | +|||||
2420 | +&ScriptLoader::ProcessPendingRequests); | +7 | +||||
2421 | +if (mDocument) { | +7 | +||||
2422 | +mDocument->Dispatch("ScriptLoader", TaskCategory::Other, task.forget()); | +7 | +||||
2425 | +} | +7 | +
+
+
+
|
+ Times Different | +|||||
536 | +WarningOnlyErrorReporter(JSContext* aCx, JSErrorReport* aRep) | +2 | +||||
538 | +MOZ_ASSERT(JSREPORT_IS_WARNING(aRep->flags)); | +2 | +||||
539 | +if (!NS_IsMainThread()) { | +2 | +||||
547 | +workers::WorkerPrivate* worker = workers::GetWorkerPrivateFromContext(aCx); | +2 | +||||
548 | +MOZ_ASSERT(worker); | +2 | +||||
550 | +worker->ReportError(aCx, JS::ConstUTF8CharsZ(), aRep); | +2 | +||||
551 | +return; | +2 | +
+
+
+
|
+ Times Different | +|||||
399 | +nsIPresShell *presShell = doc->GetShell(); | +8 | +||||
400 | +if (!presShell) | +8 | +
+
+
+
|
+ Times Different | +|||||
2347 | +NS_ASSERTION(!workers->IsEmpty(), "Should have been removed!"); | +4 | +||||
2348 | +aWorkers.AppendElements(*workers); | +4 | +||||
2364 | +for (uint32_t index = 0; index < workers.Length(); index++) { | +4 | +||||
2365 | +WorkerPrivate*& worker = workers[index]; | +4 | +||||
2367 | +if (worker->IsSharedWorker()) { | +4 | +||||
2370 | +worker->Cancel(); | +4 | +
+
+
+
|
+ Times Different | +|||||
1685 | +NS_IMETHOD_(bool) IsOnCurrentThreadInfallible() override | +7 | +||||
1687 | +MutexAutoLock lock(mMutex); | +7 | +||||
1689 | +if (!mWorkerPrivate) { | +7 | +||||
1693 | +return mWorkerPrivate->IsOnCurrentThread(); | +7 | +||||
1697 | +IsOnCurrentThread(bool* aIsOnCurrentThread) override | +7 | +||||
1699 | +MOZ_ASSERT(aIsOnCurrentThread); | +7 | +||||
1700 | +*aIsOnCurrentThread = IsOnCurrentThreadInfallible(); | +7 | +||||
1701 | +return NS_OK; | +7 | +||||
5305 | +mayContinue = false; | +2 | +||||
5337 | +NS_ASSERTION(!JS_IsExceptionPending(aCx), | +2 | +||||
5349 | +WorkerPrivate::IsOnCurrentThread() | +7 | +||||
5353 | +MOZ_ASSERT(mPRThread); | +7 | +||||
5354 | +return PR_GetCurrentThread() == mPRThread; | +7 | +||||
5833 | +normalRunnablesPending = NS_HasPendingEvents(mThread); | +2 | +||||
5838 | +if (loopInfo->mCompleted) { | +2 | +||||
6261 | +WorkerPrivate::ReportError(JSContext* aCx, JS::ConstUTF8CharsZ aToStringResult, | +2 | +||||
6264 | +AssertIsOnWorkerThread(); | +2 | +||||
6266 | +if (!MayContinueRunning() || mErrorHandlerRecursionCount == 2) { | +2 | +||||
6267 | +return; | +2 | +
+
+
+
|
+ Times Different | +|||||
354 | +Cancel() | +4 | +||||
356 | +return Notify(Canceling); | +4 | +
+
+
+
|
+ Times Different | +|||||
376 | +XMLHttpRequestMainThread::IsCertainlyAliveForCC() const | +2 | +||||
378 | +return mWaitingForOnStopRequest; | +2 | +||||
3711 | +XMLHttpRequestMainThread::Notify(nsITimer* aTimer) | +6 | +||||
3713 | +if (mProgressNotifier == aTimer) { | +6 | +||||
3714 | +HandleProgressTimerCallback(); | +6 | +||||
3715 | +return NS_OK; | +6 | +||||
3734 | +XMLHttpRequestMainThread::HandleProgressTimerCallback() | +6 | +||||
3737 | +if (!mLoadTotal && mLoadTransferred) { | +6 | +||||
3741 | +mProgressTimerIsActive = false; | +6 | +||||
3743 | +if (!mProgressSinceLastProgressEvent || mErrorLoad != ErrorType::eOK) { | +6 | +||||
3951 | +XMLHttpRequestMainThread::GetName(nsACString& aName) | +6 | +||||
3953 | +aName.AssignLiteral("XMLHttpRequest"); | +6 | +||||
3954 | +return NS_OK; | +6 | +
+
+
+
|
+ Times Different | +|||||
765 | +++mInNotification; | +4 | +||||
769 | +--mInNotification; | +4 | +
+
+
+
|
+ Times Different | +|||||
72 | +NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(nsXULPopupListener) | +6 | +||||
74 | +if (tmp->mElement) { | +6 | +||||
75 | +return mozilla::dom::FragmentOrElement::CanSkip(tmp->mElement, true); | +6 | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
530 | +return Rect(); | +7 | +
+
+
+
|
+ Times Different | +|||||
81 | + static IntPointTyped |
+ 12 | +||||
82 | +return IntPointTyped(int32_t(floorf(aX + 0.5)), int32_t(floorf(aY + 0.5))); | +12 | +||||
189 | + IntPointTyped |
+ 12 | +||||
191 | +return IntPointTyped::Round(aPoint.x, aPoint.y); | +12 | +
+
+
+
|
+ Times Different | +|||||
237 | +RectTyped() : Super() {} | +7 | +
+
+
+
|
+ Times Different | +|||||
223 | +step = 1; | +5 | +||||
329 | +step = 1; | +4 | +||||
460 | +step = 1; | +2 | +
+
+
+
|
+ Times Different | +|||||
103 | +info->src_format == src_format && | +9 | +||||
104 | +info->mask_format == mask_format && | +9 | +||||
105 | +info->dest_format == dest_format && | +9 | +||||
106 | +info->src_flags == src_flags && | +9 | +||||
107 | +info->mask_flags == mask_flags && | +9 | +||||
108 | +info->dest_flags == dest_flags && | +9 | +||||
109 | +info->func) | +9 | +||||
111 | +*out_imp = cache->cache[i].imp; | +9 | +||||
112 | +*out_func = cache->cache[i].fast_path.func; | +9 | +||||
114 | +goto update_cache; | +9 | +
+
+
+
|
+ Times Different | +|||||
1534 | +EXCHANGE_RECTS (i, j); | +3 | +||||
1798 | +reg->extents.y2 = hreg->extents.y2; | +9 | +||||
2158 | +part_out = FALSE; | +9 | +||||
2159 | +part_in = FALSE; | +9 | +||||
2162 | +x = prect->x1; | +9 | +||||
2163 | +y = prect->y1; | +9 | +||||
2166 | +for (pbox = PIXREGION_BOXPTR (region), pbox_end = pbox + numRects; | +9 | +||||
2171 | +if (pbox->y2 <= y) | +9 | +||||
2177 | +if (pbox->y1 > y) | +9 | +||||
2185 | +if (pbox->x2 <= x) | +9 | +||||
2188 | +if (pbox->x1 > x) | +9 | +||||
2190 | +part_out = TRUE; /* missed part of rectangle to left */ | +9 | +||||
2191 | +if (part_in) | +9 | +||||
2195 | +if (pbox->x1 < prect->x2) | +9 | +||||
2197 | +part_in = TRUE; /* definitely overlap */ | +9 | +||||
2198 | +if (part_out) | +9 | +||||
2223 | +if (part_in) | +9 | +||||
2225 | +if (y < prect->y2) | +9 | +
+
+
+
|
+ Times Different | +|||||
371 | +BufferTextureData::UpdateFromSurface(gfx::SourceSurface* aSurface) | +12 | +||||
373 | +if (mDescriptor.type() != BufferDescriptor::TRGBDescriptor) { | +12 | +||||
376 | +const RGBDescriptor& rgb = mDescriptor.get_RGBDescriptor(); | +12 | +||||
378 | +uint32_t stride = ImageDataSerializer::GetRGBStride(rgb); | +12 | +||||
380 | +gfx::Factory::CreateWrappingDataSourceSurface(GetBuffer(), stride, | +12 | +||||
381 | +rgb.size(), rgb.format()); | +12 | +||||
383 | +if (!surface) { | +12 | +||||
388 | + RefPtr |
+ 12 | +||||
390 | +if (!srcSurf) { | +12 | +||||
395 | +if (surface->GetSize() != srcSurf->GetSize() || surface->GetFormat() != srcSurf->GetFormat()) { | +12 | +||||
402 | +if (!srcSurf->Map(gfx::DataSourceSurface::READ, &sourceMap)) { | +12 | +||||
407 | +if (!surface->Map(gfx::DataSourceSurface::WRITE, &destMap)) { | +12 | +||||
414 | +for (int y = 0; y < srcSurf->GetSize().height; y++) { | +12 | +||||
415 | +memcpy(destMap.mData + destMap.mStride * y, | +12 | +||||
416 | +sourceMap.mData + sourceMap.mStride * y, | +12 | +||||
417 | +srcSurf->GetSize().width * BytesPerPixel(srcSurf->GetFormat())); | +12 | +||||
420 | +srcSurf->Unmap(); | +12 | +||||
421 | +surface->Unmap(); | +12 | +||||
423 | +return true; | +12 | +
+
+
+
|
+ Times Different | +|||||
58 | +BufferRecycleBin::BufferRecycleBin() | +12 | +||||
63 | +, mRecycledBufferSize(0) | +12 | +||||
65 | +} | +12 | +||||
156 | +ImageContainer::ImageContainer(Mode flag) | +12 | +||||
158 | +mGenerationCounter(++sGenerationCounter), | +12 | +||||
163 | +mIsAsync(flag == ASYNCHRONOUS), | +12 | +||||
164 | +mCurrentProducerID(-1) | +12 | +||||
166 | +if (flag == ASYNCHRONOUS) { | +12 | +||||
169 | +} | +12 | +||||
185 | +ImageContainer::~ImageContainer() | +12 | +||||
187 | +if (mNotifyCompositeListener) { | +12 | +||||
190 | +if (mAsyncContainerHandle) { | +12 | +||||
195 | +} | +12 | +||||
220 | + ImageContainer::SetCurrentImageInternal(const nsTArray |
+ 12 | +||||
222 | +ReentrantMonitorAutoEnter mon(mReentrantMonitor); | +12 | +||||
224 | +mGenerationCounter = ++sGenerationCounter; | +12 | +||||
226 | +if (!aImages.IsEmpty()) { | +12 | +||||
227 | +NS_ASSERTION(mCurrentImages.IsEmpty() || | +12 | +||||
231 | +if (aImages[0].mProducerID != mCurrentProducerID) { | +12 | +||||
232 | +mFrameIDsNotYetComposited.Clear(); | +12 | +||||
233 | +mCurrentProducerID = aImages[0].mProducerID; | +12 | +||||
234 | +} else if (!aImages[0].mTimeStamp.IsNull()) { | +6 | +||||
260 | +for (uint32_t i = 0; i < aImages.Length(); ++i) { | +12 | +||||
261 | +NS_ASSERTION(aImages[i].mImage, "image can't be null"); | +12 | +||||
262 | +NS_ASSERTION(!aImages[i].mTimeStamp.IsNull() || aImages.Length() == 1, | +12 | +||||
264 | +if (i > 0) { | +12 | +||||
272 | +OwningImage* img = newImages.AppendElement(); | +12 | +||||
273 | +img->mImage = aImages[i].mImage; | +12 | +||||
274 | +img->mTimeStamp = aImages[i].mTimeStamp; | +12 | +||||
275 | +img->mFrameID = aImages[i].mFrameID; | +12 | +||||
276 | +img->mProducerID = aImages[i].mProducerID; | +12 | +||||
277 | +for (auto& oldImg : mCurrentImages) { | +12 | +||||
278 | +if (oldImg.mFrameID == img->mFrameID && | +6 | +||||
286 | +mCurrentImages.SwapElements(newImages); | +12 | +||||
287 | +} | +12 | +||||
297 | + ImageContainer::SetCurrentImages(const nsTArray |
+ 6 | +||||
299 | +MOZ_ASSERT(!aImages.IsEmpty()); | +6 | +||||
300 | +ReentrantMonitorAutoEnter mon(mReentrantMonitor); | +6 | +||||
301 | +if (mImageClient) { | +6 | +||||
306 | +SetCurrentImageInternal(aImages); | +6 | +||||
307 | +} | +6 | +||||
348 | + ImageContainer::SetCurrentImagesInTransaction(const nsTArray |
+ 12 | +||||
350 | +NS_ASSERTION(NS_IsMainThread(), "Should be on main thread."); | +12 | +||||
351 | +NS_ASSERTION(!mImageClient, "Should use async image transfer with ImageBridge."); | +12 | +||||
353 | +SetCurrentImageInternal(aImages); | +12 | +||||
354 | +} | +12 | +||||
356 | +bool ImageContainer::IsAsync() const | +12 | +||||
358 | +return mIsAsync; | +12 | +||||
378 | + ImageContainer::GetCurrentImages(nsTArray |
+ 12 | +||||
381 | +ReentrantMonitorAutoEnter mon(mReentrantMonitor); | +12 | +||||
383 | +*aImages = mCurrentImages; | +12 | +||||
384 | +if (aGenerationCounter) { | +12 | +||||
385 | +*aGenerationCounter = mGenerationCounter; | +12 | +||||
386 | +} | +12 | +||||
387 | +} | +12 | +||||
390 | +ImageContainer::GetCurrentSize() | +12 | +||||
392 | +ReentrantMonitorAutoEnter mon(mReentrantMonitor); | +12 | +||||
394 | +if (mCurrentImages.IsEmpty()) { | +12 | +||||
398 | +return mCurrentImages[0].mImage->GetSize(); | +12 | +||||
805 | +SourceSurfaceImage::SourceSurfaceImage(gfx::SourceSurface* aSourceSurface) | +12 | +||||
807 | +mSize(aSourceSurface->GetSize()), | +12 | +||||
809 | +mTextureFlags(TextureFlags::DEFAULT) | +12 | +||||
810 | +{} | +12 | +||||
815 | +SourceSurfaceImage::GetTextureClient(KnowsCompositor* aForwarder) | +12 | +||||
817 | +if (!aForwarder) { | +12 | +||||
821 | +auto entry = mTextureClients.LookupForAdd(aForwarder->GetSerial()); | +12 | +||||
822 | +if (entry) { | +12 | +||||
826 | + RefPtr |
+ 12 | +||||
827 | + RefPtr |
+ 12 | +||||
828 | +MOZ_ASSERT(surface); | +12 | +||||
829 | +if (surface) { | +12 | +||||
831 | +textureClient = | +12 | +||||
836 | +ALLOC_DEFAULT); | +12 | +||||
838 | +if (textureClient) { | +12 | +||||
839 | +textureClient->SyncWithObject(aForwarder->GetSyncObject()); | +12 | +||||
840 | +entry.OrInsert([&textureClient](){ return textureClient; }); | +12 | +||||
841 | +return textureClient; | +12 | +||||
846 | +return nullptr; | +12 | +
+
+
+
|
+ Times Different | +|||||
95 | + class nsAutoRefTraits |
+ 12 | +||||
118 | +void Release(RawRef aRawRef) | +12 | +||||
120 | +MOZ_ASSERT(mOwningEventTarget); | +12 | +||||
121 | +if (mOwningEventTarget->IsOnCurrentThread()) { | +12 | +||||
122 | +aRawRef->Release(); | +12 | +||||
123 | +return; | +12 | +||||
128 | +void AddRef(RawRef aRawRef) | +12 | +||||
130 | +MOZ_ASSERT(!mOwningEventTarget); | +12 | +||||
131 | +mOwningEventTarget = mozilla::GetCurrentThreadSerialEventTarget(); | +12 | +||||
132 | +aRawRef->AddRef(); | +12 | +||||
133 | +} | +12 | +||||
200 | +NS_INLINE_DECL_THREADSAFE_REFCOUNTING(Image) | +12 | +||||
207 | +virtual gfx::IntPoint GetOrigin() | +12 | +||||
209 | +return gfx::IntPoint(0, 0); | +12 | +||||
211 | +virtual gfx::IntRect GetPictureRect() | +12 | +||||
213 | +return gfx::IntRect(GetOrigin().x, GetOrigin().y, GetSize().width, GetSize().height); | +12 | +||||
225 | +virtual bool IsValid() { return true; } | +12 | +||||
249 | +Image(void* aImplData, ImageFormat aFormat) : | +12 | +||||
251 | +mSerial(++sSerialCounter), | +12 | +||||
252 | +mFormat(aFormat) | +12 | +||||
253 | +{} | +12 | +||||
256 | +virtual ~Image() {} | +12 | +||||
278 | +NS_INLINE_DECL_THREADSAFE_REFCOUNTING(BufferRecycleBin) | +12 | +||||
293 | +~BufferRecycleBin() | +12 | +||||
294 | +{ | +12 | +||||
295 | +} | +12 | +||||
326 | +NS_INLINE_DECL_THREADSAFE_REFCOUNTING(ImageFactory) | +12 | +||||
330 | +ImageFactory() {} | +12 | +||||
331 | +virtual ~ImageFactory() {} | +12 | +||||
382 | +NS_INLINE_DECL_THREADSAFE_REFCOUNTING(ImageContainer) | +12 | +||||
508 | +struct OwningImage { | +12 | +||||
509 | +OwningImage() : mFrameID(0), mProducerID(0), mComposited(false) {} | +12 | +||||
682 | +class AutoLockImage | +12 | +||||
685 | +explicit AutoLockImage(ImageContainer *aContainer) | +12 | +||||
686 | +{ | +12 | +||||
687 | +aContainer->GetCurrentImages(&mImages); | +12 | +||||
688 | +} | +12 | +||||
690 | +bool HasImage() const { return !mImages.IsEmpty(); } | +12 | +||||
932 | +class SourceSurfaceImage final : public Image { | +12 | +||||
934 | + virtual already_AddRefed |
+ 12 | +||||
936 | + RefPtr |
+ 12 | +||||
937 | +return surface.forget(); | +12 | +||||
943 | +virtual gfx::IntSize GetSize() override { return mSize; } | +12 | +
+
+
+
|
+ Times Different | +|||||
16 | +ImageLayer::ImageLayer(LayerManager* aManager, void* aImplData) | +12 | +||||
18 | +, mScaleMode(ScaleMode::SCALE_NONE) | +12 | +||||
19 | +{} | +12 | +||||
21 | +ImageLayer::~ImageLayer() | +12 | +||||
22 | +{} | +12 | +||||
24 | +void ImageLayer::SetContainer(ImageContainer* aContainer) | +12 | +||||
26 | +mContainer = aContainer; | +12 | +||||
27 | +} | +12 | +||||
29 | +void ImageLayer::ComputeEffectiveTransforms(const gfx::Matrix4x4& aTransformToSurface) | +12 | +||||
31 | +gfx::Matrix4x4 local = GetLocalTransform(); | +12 | +||||
35 | +if (mContainer) { | +12 | +||||
36 | +sourceRect.SizeTo(SizeDouble(mContainer->GetCurrentSize())); | +12 | +||||
43 | +SnapTransform(local, sourceRect, nullptr) * | +12 | +||||
44 | +SnapTransformTranslation(aTransformToSurface, nullptr); | +12 | +||||
46 | +if (mScaleMode != ScaleMode::SCALE_NONE && | +12 | +||||
57 | +mEffectiveTransformForBuffer = mEffectiveTransform; | +12 | +||||
60 | +ComputeEffectiveTransformForMaskLayers(aTransformToSurface); | +12 | +||||
61 | +} | +12 | +
+
+
+
|
+ Times Different | +|||||
41 | +void SetSamplingFilter(gfx::SamplingFilter aSamplingFilter) | +12 | +||||
43 | +if (mSamplingFilter != aSamplingFilter) { | +12 | +||||
48 | +} | +12 | +||||
54 | +void SetScaleToSize(const gfx::IntSize &aSize, ScaleMode aMode) | +12 | +||||
56 | +if (mScaleToSize != aSize || mScaleMode != aMode) { | +12 | +||||
61 | +} | +12 | +||||
64 | +ImageContainer* GetContainer() { return mContainer; } | +12 | +||||
66 | +const gfx::IntSize& GetScaleToSize() { return mScaleToSize; } | +12 | +||||
69 | +MOZ_LAYER_DECL_NAME("ImageLayer", TYPE_IMAGE) | +12 | +||||
73 | +virtual const gfx::Matrix4x4& GetEffectiveTransformForBuffer() const override | +12 | +||||
75 | +return mEffectiveTransformForBuffer; | +12 | +||||
78 | +virtual ImageLayer* AsImageLayer() override { return this; } | +12 | +
+
+
+
|
+ Times Different | +|||||
593 | +static ImageHost* GetImageHost(Layer* aLayer) | +12 | +||||
595 | +HostLayer* compositor = aLayer->AsHostLayer(); | +12 | +||||
596 | +if (compositor) { | +12 | +||||
597 | + return static_cast |
+ 12 | +||||
602 | +struct ImageLayerProperties : public LayerPropertiesBase | +12 | +||||
604 | +explicit ImageLayerProperties(ImageLayer* aImage, bool aIsMask) | +12 | +||||
608 | +, mSamplingFilter(aImage->GetSamplingFilter()) | +12 | +||||
610 | +, mScaleMode(aImage->GetScaleMode()) | +12 | +||||
613 | +, mIsMask(aIsMask) | +12 | +||||
615 | +if (mImageHost) { | +12 | +||||
616 | +mLastProducerID = mImageHost->GetLastProducerID(); | +12 | +||||
617 | +mLastFrameID = mImageHost->GetLastFrameID(); | +12 | +||||
619 | +} | +12 | +||||
621 | +nsIntRegion ComputeChangeInternal(const char* aPrefix, | +12 | +||||
624 | + ImageLayer* imageLayer = static_cast |
+ 12 | +||||
626 | +if (!imageLayer->GetLocalVisibleRegion().ToUnknownRegion().IsEqual(mVisibleRegion)) { | +12 | +||||
632 | +ImageContainer* container = imageLayer->GetContainer(); | +12 | +||||
633 | +ImageHost* host = GetImageHost(imageLayer); | +12 | +||||
634 | +if (mContainer != container || | +12 | +||||
635 | +mSamplingFilter != imageLayer->GetSamplingFilter() || | +12 | +||||
636 | +mScaleToSize != imageLayer->GetScaleToSize() || | +12 | +||||
637 | +mScaleMode != imageLayer->GetScaleMode() || | +12 | +||||
638 | +host != mImageHost || | +12 | +||||
639 | +(host && host->GetProducerID() != mLastProducerID) || | +12 | +||||
640 | +(host && host->GetFrameID() != mLastFrameID)) { | +12 | +||||
642 | +if (mIsMask) { | +8 | +||||
657 | +return NewTransformedBounds(); | +8 | +||||
660 | +return IntRect(); | +12 | +||||
718 | + return MakeUnique |
+ 12 | +
+
+
+
|
+ Times Different | +|||||
161 | +LayerManager::CreateImageContainer(ImageContainer::Mode flag) | +12 | +||||
163 | + RefPtr |
+ 12 | +||||
164 | +return container.forget(); | +12 | +||||
501 | +Layer::SnapTransform(const Matrix4x4& aTransform, | +12 | +||||
505 | +if (aResidualTransform) { | +12 | +||||
509 | +Matrix matrix2D; | +12 | +||||
510 | +Matrix4x4 result; | +12 | +||||
511 | +if (mManager->IsSnappingEffectiveTransforms() && | +12 | +||||
512 | +aTransform.Is2D(&matrix2D) && | +12 | +||||
513 | +gfxSize(1.0, 1.0) <= aSnapRect.Size() && | +12 | +||||
514 | +matrix2D.PreservesAxisAlignedRectangles()) { | +12 | +||||
515 | +auto transformedTopLeft = IntPoint::Round(matrix2D.TransformPoint(ToPoint(aSnapRect.TopLeft()))); | +12 | +||||
516 | +auto transformedTopRight = IntPoint::Round(matrix2D.TransformPoint(ToPoint(aSnapRect.TopRight()))); | +12 | +||||
517 | +auto transformedBottomRight = IntPoint::Round(matrix2D.TransformPoint(ToPoint(aSnapRect.BottomRight()))); | +12 | +||||
520 | +transformedTopLeft, transformedTopRight, transformedBottomRight); | +12 | +||||
522 | +result = Matrix4x4::From2D(snappedMatrix); | +12 | +||||
523 | +if (aResidualTransform && !snappedMatrix.IsSingular()) { | +12 | +||||
534 | +return result; | +12 | +
+
+
+
|
+ Times Different | +|||||
53 | +result.x = 0; | +7 | +||||
54 | +result.width = mBufferRotation.x; | +7 | +||||
392 | +*aRotationPoint += aSize; | +4 | +||||
457 | +} else if (neededRegion.GetBounds().Size() <= mBufferRect.Size()) { | +4 | +||||
460 | +destBufferRect = IntRect(neededRegion.GetBounds().TopLeft(), mBufferRect.Size()); | +4 | +
+
+
+
|
+ Times Different | +|||||
354 | +BasicCompositor::SupportsEffect(EffectTypes aEffect) | +12 | +||||
356 | +return aEffect != EffectTypes::YCBCR && aEffect != EffectTypes::COMPONENT_ALPHA; | +12 | +
+
+
+
|
+ Times Different | +|||||
28 | +explicit ClientImageLayer(ClientLayerManager* aLayerManager) | +12 | +||||
30 | +, mImageClientTypeContainer(CompositableType::UNKNOWN) | +12 | +||||
32 | +MOZ_COUNT_CTOR(ClientImageLayer); | +12 | +||||
33 | +} | +12 | +||||
36 | +virtual ~ClientImageLayer() | +12 | +||||
37 | +{ | +12 | +||||
38 | +DestroyBackBuffer(); | +12 | +||||
39 | +MOZ_COUNT_DTOR(ClientImageLayer); | +12 | +||||
40 | +} | +12 | +||||
42 | +virtual void SetContainer(ImageContainer* aContainer) override | +12 | +||||
44 | +ImageLayer::SetContainer(aContainer); | +12 | +||||
45 | +mImageClientTypeContainer = CompositableType::UNKNOWN; | +12 | +||||
46 | +} | +12 | +||||
48 | +virtual void SetVisibleRegion(const LayerIntRegion& aRegion) override | +12 | +||||
50 | +NS_ASSERTION(ClientManager()->InConstruction(), | +12 | +||||
52 | +ImageLayer::SetVisibleRegion(aRegion); | +12 | +||||
53 | +} | +12 | +||||
77 | +virtual void FillSpecificAttributes(SpecificLayerAttributes& aAttrs) override | +12 | +||||
79 | +aAttrs = ImageLayerAttributes(mSamplingFilter, mScaleToSize, mScaleMode); | +12 | +||||
80 | +} | +12 | +||||
82 | +virtual Layer* AsLayer() override { return this; } | +12 | +||||
83 | +virtual ShadowableLayer* AsShadowableLayer() override { return this; } | +12 | +||||
90 | +void DestroyBackBuffer() | +12 | +||||
92 | +if (mImageClient) { | +12 | +||||
93 | +mImageClient->SetLayer(nullptr); | +12 | +||||
94 | +mImageClient->OnDetach(); | +12 | +||||
95 | +mImageClient = nullptr; | +12 | +||||
97 | +} | +12 | +||||
110 | +CompositableType GetImageClientType() | +12 | +||||
112 | +if (mImageClientTypeContainer != CompositableType::UNKNOWN) { | +12 | +||||
116 | +if (mContainer->IsAsync()) { | +12 | +||||
121 | +AutoLockImage autoLock(mContainer); | +12 | +||||
124 | +? CompositableType::IMAGE : CompositableType::UNKNOWN; | +12 | +||||
125 | +return mImageClientTypeContainer; | +12 | +||||
133 | +ClientImageLayer::RenderLayer() | +12 | +||||
135 | +RenderMaskLayers(this); | +12 | +||||
137 | +if (!mContainer) { | +12 | +||||
141 | +if (!mImageClient || | +12 | +||||
142 | +!mImageClient->UpdateImage(mContainer, GetContentFlags())) { | +8 | +||||
143 | +CompositableType type = GetImageClientType(); | +12 | +||||
144 | +if (type == CompositableType::UNKNOWN) { | +12 | +||||
147 | +TextureFlags flags = TextureFlags::DEFAULT; | +12 | +||||
148 | +mImageClient = ImageClient::CreateImageClient(type, | +12 | +||||
149 | +ClientManager()->AsShadowForwarder(), | +12 | +||||
150 | +flags); | +12 | +||||
151 | +if (!mImageClient) { | +12 | +||||
154 | +mImageClient->SetLayer(this); | +12 | +||||
155 | +if (HasShadow() && !mContainer->IsAsync()) { | +12 | +||||
156 | +mImageClient->Connect(); | +12 | +||||
157 | +ClientManager()->AsShadowForwarder()->Attach(mImageClient, this); | +12 | +||||
159 | +if (!mImageClient->UpdateImage(mContainer, GetContentFlags())) { | +12 | +||||
163 | +ClientManager()->Hold(this); | +12 | +||||
167 | +ClientLayerManager::CreateImageLayer() | +12 | +||||
169 | +NS_ASSERTION(InConstruction(), "Only allowed in construction phase"); | +12 | +||||
171 | +new ClientImageLayer(this); | +12 | +||||
172 | +CREATE_SHADOW(Image); | +12 | +||||
173 | +return layer.forget(); | +12 | +
+
+
+
|
+ Times Different | +|||||
493 | +ClientLayerManager::ScheduleComposite() | +2 | +||||
495 | +mForwarder->Composite(); | +2 | +||||
496 | +} | +2 | +
+
+
+
|
+ Times Different | +|||||
42 | +ImageClient::CreateImageClient(CompositableType aCompositableHostType, | +12 | +||||
47 | +switch (aCompositableHostType) { | +12 | +||||
49 | +result = new ImageClientSingle(aForwarder, aFlags, CompositableType::IMAGE); | +12 | +||||
61 | +NS_ASSERTION(result, "Failed to create ImageClient"); | +12 | +||||
63 | +return result.forget(); | +12 | +||||
67 | +ImageClient::RemoveTexture(TextureClient* aTexture) | +8 | +||||
69 | +GetForwarder()->RemoveTextureFromCompositable(this, aTexture); | +8 | +||||
70 | +} | +8 | +||||
72 | +ImageClientSingle::ImageClientSingle(CompositableForwarder* aFwd, | +12 | +||||
75 | +: ImageClient(aFwd, aFlags, aType) | +12 | +||||
77 | +} | +12 | +||||
79 | +TextureInfo ImageClientSingle::GetTextureInfo() const | +12 | +||||
81 | +return TextureInfo(CompositableType::IMAGE); | +12 | +||||
173 | +ImageClientSingle::UpdateImage(ImageContainer* aContainer, uint32_t aContentFlags) | +12 | +||||
175 | + AutoTArray |
+ 12 | +||||
177 | +aContainer->GetCurrentImages(&images, &generationCounter); | +12 | +||||
179 | +if (mLastUpdateGenerationCounter == generationCounter) { | +12 | +||||
182 | +mLastUpdateGenerationCounter = generationCounter; | +12 | +||||
184 | +for (int32_t i = images.Length() - 1; i >= 0; --i) { | +12 | +||||
185 | +if (!images[i].mImage->IsValid()) { | +12 | +||||
190 | +if (images.IsEmpty()) { | +12 | +||||
205 | + AutoTArray |
+ 12 | +||||
207 | +for (auto& img : images) { | +12 | +||||
208 | +Image* image = img.mImage; | +12 | +||||
210 | + RefPtr |
+ 12 | +||||
211 | +const bool hasTextureClient = !!texture; | +12 | +||||
213 | +for (int32_t i = mBuffers.Length() - 1; i >= 0; --i) { | +12 | +||||
214 | +if (mBuffers[i].mImageSerial == image->GetSerial()) { | +8 | +||||
226 | +if (!texture) { | +12 | +||||
233 | +if (!texture) { | +12 | +||||
240 | +if (!texture->GetAllocator()->IPCOpen()) { | +12 | +||||
243 | +if (!AddTextureClient(texture)) { | +12 | +||||
247 | +CompositableForwarder::TimedTextureClient* t = textures.AppendElement(); | +12 | +||||
248 | +t->mTextureClient = texture; | +12 | +||||
249 | +t->mTimeStamp = img.mTimeStamp; | +12 | +||||
250 | +t->mPictureRect = image->GetPictureRect(); | +12 | +||||
251 | +t->mFrameID = img.mFrameID; | +12 | +||||
252 | +t->mProducerID = img.mProducerID; | +12 | +||||
254 | +Buffer* newBuf = newBuffers.AppendElement(); | +12 | +||||
255 | +newBuf->mImageSerial = image->GetSerial(); | +12 | +||||
256 | +newBuf->mTextureClient = texture; | +12 | +||||
258 | +texture->SyncWithObject(GetForwarder()->GetSyncObject()); | +12 | +||||
259 | +} | +12 | +||||
261 | +GetForwarder()->UseTextures(this, textures); | +12 | +||||
263 | +for (auto& b : mBuffers) { | +12 | +||||
264 | +RemoveTexture(b.mTextureClient); | +8 | +||||
266 | +mBuffers.SwapElements(newBuffers); | +12 | +||||
268 | +return true; | +12 | +||||
272 | +ImageClientSingle::AddTextureClient(TextureClient* aTexture) | +12 | +||||
274 | +MOZ_ASSERT((mTextureFlags & aTexture->GetFlags()) == mTextureFlags); | +12 | +||||
275 | +return CompositableClient::AddTextureClient(aTexture); | +12 | +||||
279 | +ImageClientSingle::OnDetach() | +12 | +||||
281 | +mBuffers.Clear(); | +12 | +||||
282 | +} | +12 | +||||
284 | +ImageClient::ImageClient(CompositableForwarder* aFwd, TextureFlags aFlags, | +12 | +||||
289 | +, mLastUpdateGenerationCounter(0) | +12 | +||||
290 | +{} | +12 | +
+
+
+
|
+ Times Different | +|||||
49 | +virtual ~ImageClient() {} | +12 | +||||
87 | +class ImageClientSingle : public ImageClient | +12 | +||||
109 | +struct Buffer { | +12 | +
+
+
+
|
+ Times Different | +|||||
599 | +aDescriptor = null_t(); | +12 | +||||
600 | +return false; | +12 | +||||
610 | +TextureClient::UpdateFromSurface(gfx::SourceSurface* aSurface) | +12 | +||||
612 | +MOZ_ASSERT(IsValid()); | +12 | +||||
613 | +MOZ_ASSERT(mIsLocked); | +12 | +||||
614 | +MOZ_ASSERT(aSurface); | +12 | +||||
617 | +MOZ_ASSERT(!mBorrowedDrawTarget); | +12 | +||||
624 | +if (mData->UpdateFromSurface(aSurface)) { | +12 | +||||
1132 | +TextureClient::CreateFromSurface(KnowsCompositor* aAllocator, | +12 | +||||
1139 | +if (!aAllocator || !aAllocator->GetTextureForwarder()->IPCOpen()) { | +12 | +||||
1143 | +gfx::IntSize size = aSurface->GetSize(); | +12 | +||||
1145 | +if (!gfx::Factory::AllowedSurfaceSize(size)) { | +12 | +||||
1149 | +TextureData* data = nullptr; | +12 | +||||
1174 | +TextureAllocationFlags allocFlags = TextureAllocationFlags(aAllocFlags | ALLOC_UPDATE_FROM_SURFACE); | +12 | +||||
1175 | + RefPtr |
+ 12 | +||||
1176 | +aSelector, aTextureFlags, allocFlags); | +12 | +||||
1177 | +if (!client) { | +12 | +||||
1181 | +TextureClientAutoLock autoLock(client, OpenMode::OPEN_WRITE_ONLY); | +12 | +||||
1182 | +if (!autoLock.Succeeded()) { | +12 | +||||
1186 | +client->UpdateFromSurface(aSurface); | +12 | +||||
1187 | +return client.forget(); | +12 | +
+
+
+
|
+ Times Different | +|||||
132 | +if (gfxVars::UseWebRender()) { | +12 | +||||
135 | +result = new ImageHost(aTextureInfo); | +12 | +||||
169 | +CompositableHost::GetLayerManager() const | +12 | +||||
171 | +if (!mLayer || !mLayer->Manager()) { | +12 | +||||
174 | +return mLayer->Manager()->AsHostLayerManager(); | +12 | +
+
+
+
|
+ Times Different | +|||||
16 | +ImageComposite::ImageComposite() | +12 | +||||
19 | +, mBias(BIAS_NONE) | +12 | +||||
20 | +{} | +12 | +||||
22 | +ImageComposite::~ImageComposite() | +12 | +||||
24 | +} | +12 | +||||
40 | +ImageComposite::UpdateBias(const TimeStamp& aCompositionTime, | +12 | +||||
45 | +if (aCompositedImageTime.IsNull()) { | +12 | +||||
81 | +ImageComposite::ChooseImageIndex() const | +12 | +||||
83 | +if (mImages.IsEmpty()) { | +12 | +||||
86 | +TimeStamp now = GetCompositionTime(); | +12 | +||||
88 | +if (now.IsNull()) { | +12 | +||||
101 | +while (result + 1 < mImages.Length() && | +12 | +||||
102 | +GetBiasedTime(mImages[result + 1].mTimeStamp, mBias) <= now) { | +12 | +||||
105 | +return result; | +12 | +||||
108 | +const ImageComposite::TimedImage* ImageComposite::ChooseImage() const | +12 | +||||
110 | +int index = ChooseImageIndex(); | +12 | +||||
111 | +return index >= 0 ? &mImages[index] : nullptr; | +12 | +||||
114 | +ImageComposite::TimedImage* ImageComposite::ChooseImage() | +12 | +||||
116 | +int index = ChooseImageIndex(); | +12 | +||||
117 | +return index >= 0 ? &mImages[index] : nullptr; | +12 | +
+
+
+
|
+ Times Different | +|||||
27 | +ImageHost::ImageHost(const TextureInfo& aTextureInfo) | +12 | +||||
30 | +, mLocked(false) | +12 | +||||
31 | +{} | +12 | +||||
33 | +ImageHost::~ImageHost() | +12 | +||||
35 | +} | +12 | +||||
38 | + ImageHost::UseTextureHost(const nsTArray |
+ 12 | +||||
40 | +MOZ_ASSERT(!mLocked); | +12 | +||||
42 | +CompositableHost::UseTextureHost(aTextures); | +12 | +||||
43 | +MOZ_ASSERT(aTextures.Length() >= 1); | +12 | +||||
47 | +for (uint32_t i = 0; i < aTextures.Length(); ++i) { | +12 | +||||
48 | +const TimedTexture& t = aTextures[i]; | +12 | +||||
49 | +MOZ_ASSERT(t.mTexture); | +12 | +||||
50 | +if (i + 1 < aTextures.Length() && | +12 | +||||
51 | +t.mProducerID == mLastProducerID && t.mFrameID < mLastFrameID) { | +12 | +||||
58 | +TimedImage& img = *newImages.AppendElement(); | +12 | +||||
59 | +img.mTextureHost = t.mTexture; | +12 | +||||
60 | +img.mTimeStamp = t.mTimeStamp; | +12 | +||||
61 | +img.mPictureRect = t.mPictureRect; | +12 | +||||
62 | +img.mFrameID = t.mFrameID; | +12 | +||||
63 | +img.mProducerID = t.mProducerID; | +12 | +||||
64 | +img.mTextureHost->SetCropRect(img.mPictureRect); | +12 | +||||
65 | +img.mTextureHost->Updated(); | +12 | +||||
68 | +mImages.SwapElements(newImages); | +12 | +||||
69 | +newImages.Clear(); | +12 | +||||
73 | +if (mImages.Length() == 1) { | +12 | +||||
74 | +SetCurrentTextureHost(mImages[0].mTextureHost); | +12 | +||||
77 | +HostLayerManager* lm = GetLayerManager(); | +12 | +||||
83 | +if (lm && mLastFrameID >= 0) { | +12 | +||||
84 | +for (size_t i = 0; i < mImages.Length(); ++i) { | +6 | +||||
85 | +bool frameComesAfter = mImages[i].mFrameID > mLastFrameID || | +6 | +||||
86 | +mImages[i].mProducerID != mLastProducerID; | +6 | +||||
87 | +if (frameComesAfter && !mImages[i].mTimeStamp.IsNull()) { | +6 | +||||
94 | +} | +12 | +||||
97 | +ImageHost::SetCurrentTextureHost(TextureHost* aTexture) | +12 | +||||
99 | +if (aTexture == mCurrentTextureHost.get()) { | +12 | +||||
100 | +return; | +12 | +||||
103 | +bool swapTextureSources = !!mCurrentTextureHost && !!mCurrentTextureSource | +12 | +||||
104 | +&& mCurrentTextureHost->HasIntermediateBuffer(); | +12 | +||||
106 | +if (swapTextureSources) { | +12 | +||||
123 | +mExtraTextureSource = nullptr; | +12 | +||||
126 | +mCurrentTextureHost = aTexture; | +12 | +||||
127 | +mCurrentTextureHost->PrepareTextureSource(mCurrentTextureSource); | +12 | +||||
131 | +ImageHost::CleanupResources() | +12 | +||||
133 | +mExtraTextureSource = nullptr; | +12 | +||||
134 | +mCurrentTextureSource = nullptr; | +12 | +||||
135 | +mCurrentTextureHost = nullptr; | +12 | +||||
136 | +} | +12 | +||||
139 | +ImageHost::RemoveTextureHost(TextureHost* aTexture) | +8 | +||||
141 | +MOZ_ASSERT(!mLocked); | +8 | +||||
143 | +CompositableHost::RemoveTextureHost(aTexture); | +8 | +||||
145 | +for (int32_t i = mImages.Length() - 1; i >= 0; --i) { | +8 | +||||
146 | +if (mImages[i].mTextureHost == aTexture) { | +8 | +||||
151 | +} | +8 | +||||
154 | +ImageHost::GetCompositionTime() const | +12 | +||||
156 | +TimeStamp time; | +12 | +||||
157 | +if (HostLayerManager* lm = GetLayerManager()) { | +12 | +||||
158 | +time = lm->GetCompositionTime(); | +12 | +||||
160 | +return time; | +12 | +||||
176 | +void ImageHost::Attach(Layer* aLayer, | +12 | +||||
180 | +CompositableHost::Attach(aLayer, aProvider, aFlags); | +12 | +||||
181 | +for (auto& img : mImages) { | +12 | +||||
185 | +} | +12 | +||||
188 | +ImageHost::Composite(Compositor* aCompositor, | +12 | +||||
199 | +if (!PrepareToRender(aCompositor, &info)) { | +12 | +||||
203 | +TimedImage* img = info.img; | +12 | +||||
206 | +AutoLockCompositableHost autoLock(this); | +12 | +||||
207 | +if (autoLock.Failed()) { | +12 | +||||
212 | +if (!mCurrentTextureHost->BindTextureSource(mCurrentTextureSource)) { | +12 | +||||
216 | +if (!mCurrentTextureSource) { | +12 | +||||
223 | +!(mCurrentTextureHost->GetFlags() & TextureFlags::NON_PREMULTIPLIED); | +12 | +||||
226 | +mCurrentTextureSource.get(), aSamplingFilter, isAlphaPremultiplied); | +12 | +||||
227 | +if (!effect) { | +12 | +||||
231 | +if (!aCompositor->SupportsEffect(effect->mType)) { | +12 | +||||
235 | +DiagnosticFlags diagnosticFlags = DiagnosticFlags::IMAGE; | +12 | +||||
236 | +if (effect->mType == EffectTypes::NV12) { | +12 | +||||
238 | +} else if (effect->mType == EffectTypes::YCBCR) { | +12 | +||||
242 | +aEffectChain.mPrimaryEffect = effect; | +12 | +||||
243 | +gfx::Rect pictureRect(0, 0, img->mPictureRect.width, img->mPictureRect.height); | +12 | +||||
244 | +BigImageIterator* it = mCurrentTextureSource->AsBigImageIterator(); | +12 | +||||
245 | +if (it) { | +12 | +||||
286 | +IntSize textureSize = mCurrentTextureSource->GetSize(); | +12 | +||||
287 | +effect->mTextureCoords = Rect(Float(img->mPictureRect.x) / textureSize.width, | +12 | +||||
290 | +Float(img->mPictureRect.height) / textureSize.height); | +12 | +||||
292 | +if (img->mTextureHost->GetFlags() & TextureFlags::ORIGIN_BOTTOM_LEFT) { | +12 | +||||
298 | +aOpacity, aTransform, aGeometry); | +12 | +||||
301 | +aTransform, mFlashCounter); | +12 | +||||
302 | +} | +12 | +||||
305 | +FinishRendering(info); | +12 | +||||
309 | +ImageHost::PrepareToRender(TextureSourceProvider* aProvider, RenderInfo* aOutInfo) | +12 | +||||
311 | +HostLayerManager* lm = GetLayerManager(); | +12 | +||||
312 | +if (!lm) { | +12 | +||||
316 | +int imageIndex = ChooseImageIndex(); | +12 | +||||
317 | +if (imageIndex < 0) { | +12 | +||||
321 | +if (uint32_t(imageIndex) + 1 < mImages.Length()) { | +12 | +||||
325 | +TimedImage* img = &mImages[imageIndex]; | +12 | +||||
326 | +img->mTextureHost->SetTextureSourceProvider(aProvider); | +12 | +||||
327 | +SetCurrentTextureHost(img->mTextureHost); | +12 | +||||
329 | +aOutInfo->imageIndex = imageIndex; | +12 | +||||
330 | +aOutInfo->img = img; | +12 | +||||
331 | +aOutInfo->host = mCurrentTextureHost; | +12 | +||||
332 | +return true; | +12 | +||||
346 | +ImageHost::FinishRendering(const RenderInfo& aInfo) | +12 | +||||
348 | +HostLayerManager* lm = GetLayerManager(); | +12 | +||||
349 | +TimedImage* img = aInfo.img; | +12 | +||||
350 | +int imageIndex = aInfo.imageIndex; | +12 | +||||
352 | +if (mLastFrameID != img->mFrameID || mLastProducerID != img->mProducerID) { | +12 | +||||
353 | +if (mAsyncRef) { | +12 | +||||
362 | +mLastFrameID = img->mFrameID; | +12 | +||||
363 | +mLastProducerID = img->mProducerID; | +12 | +||||
372 | +lm->GetCompositionTime(), mImages[imageIndex].mTimeStamp, | +12 | +||||
373 | +uint32_t(imageIndex + 1) < mImages.Length() ? | +12 | +||||
375 | +mBias); | +12 | +||||
376 | +} | +12 | +||||
379 | +ImageHost::SetTextureSourceProvider(TextureSourceProvider* aProvider) | +12 | +||||
381 | +if (mTextureSourceProvider != aProvider) { | +12 | +||||
382 | +for (auto& img : mImages) { | +12 | +||||
386 | +CompositableHost::SetTextureSourceProvider(aProvider); | +12 | +||||
387 | +} | +12 | +||||
429 | +ImageHost::Lock() | +12 | +||||
431 | +MOZ_ASSERT(!mLocked); | +12 | +||||
432 | +TimedImage* img = ChooseImage(); | +12 | +||||
433 | +if (!img) { | +12 | +||||
437 | +SetCurrentTextureHost(img->mTextureHost); | +12 | +||||
439 | +if (!mCurrentTextureHost->Lock()) { | +12 | +||||
442 | +mLocked = true; | +12 | +||||
443 | +return true; | +12 | +||||
447 | +ImageHost::Unlock() | +12 | +||||
449 | +MOZ_ASSERT(mLocked); | +12 | +||||
451 | +if (mCurrentTextureHost) { | +12 | +||||
452 | +mCurrentTextureHost->Unlock(); | +12 | +||||
454 | +mLocked = false; | +12 | +||||
455 | +} | +12 | +||||
458 | +ImageHost::GetImageSize() const | +12 | +||||
460 | +const TimedImage* img = ChooseImage(); | +12 | +||||
461 | +if (img) { | +12 | +||||
462 | +return IntSize(img->mPictureRect.width, img->mPictureRect.height); | +12 | +
+
+
+
|
+ Times Different | +|||||
46 | +virtual CompositableType GetType() override { return mTextureInfo.mCompositableType; } | +12 | +||||
93 | +struct RenderInfo { | +12 | +||||
98 | +RenderInfo() : imageIndex(-1), img(nullptr) | +12 | +
+
+
+
|
+ Times Different | +|||||
32 | +ImageLayerComposite::ImageLayerComposite(LayerManagerComposite* aManager) | +12 | +||||
35 | +, mImageHost(nullptr) | +12 | +||||
37 | +MOZ_COUNT_CTOR(ImageLayerComposite); | +12 | +||||
38 | + mImplData = static_cast |
+ 12 | +||||
39 | +} | +12 | +||||
41 | +ImageLayerComposite::~ImageLayerComposite() | +12 | +||||
43 | +MOZ_COUNT_DTOR(ImageLayerComposite); | +12 | +||||
44 | +MOZ_ASSERT(mDestroyed); | +12 | +||||
46 | +CleanupResources(); | +12 | +||||
47 | +} | +12 | +||||
50 | +ImageLayerComposite::SetCompositableHost(CompositableHost* aHost) | +12 | +||||
52 | +switch (aHost->GetType()) { | +12 | +||||
54 | + mImageHost = static_cast |
+ 12 | +||||
55 | +return true; | +12 | +||||
62 | +ImageLayerComposite::Disconnect() | +12 | +||||
64 | +Destroy(); | +12 | +||||
65 | +} | +12 | +||||
68 | +ImageLayerComposite::GetLayer() | +12 | +||||
70 | +return this; | +12 | +||||
84 | +ImageLayerComposite::RenderLayer(const IntRect& aClipRect, | +12 | +||||
87 | +if (!mImageHost || !mImageHost->IsAttached()) { | +12 | +||||
88 | +return; | +12 | +||||
92 | +if (gfxEnv::DumpCompositorTextures()) { | +12 | +||||
100 | +mCompositor->MakeCurrent(); | +12 | +||||
103 | +[&](EffectChain& effectChain, const IntRect& clipRect) { | +12 | +||||
104 | +mImageHost->SetTextureSourceProvider(mCompositor); | +12 | +||||
105 | +mImageHost->Composite(mCompositor, this, effectChain, | +12 | +||||
107 | +GetEffectiveTransformForBuffer(), | +12 | +||||
109 | +clipRect); | +12 | +||||
110 | +}); | +12 | +||||
111 | +mImageHost->BumpFlashCounter(); | +12 | +||||
115 | +ImageLayerComposite::ComputeEffectiveTransforms(const gfx::Matrix4x4& aTransformToSurface) | +12 | +||||
117 | +gfx::Matrix4x4 local = GetLocalTransform(); | +12 | +||||
121 | +if (mImageHost && | +12 | +||||
122 | +mImageHost->IsAttached()) { | +12 | +||||
123 | +IntSize size = mImageHost->GetImageSize(); | +12 | +||||
124 | +sourceRect.SizeTo(size.width, size.height); | +12 | +||||
131 | +SnapTransform(local, sourceRect, nullptr) * | +12 | +||||
132 | +SnapTransformTranslation(aTransformToSurface, nullptr); | +12 | +||||
134 | +if (mScaleMode != ScaleMode::SCALE_NONE && | +12 | +||||
145 | +mEffectiveTransformForBuffer = mEffectiveTransform; | +12 | +||||
148 | +ComputeEffectiveTransformForMaskLayers(aTransformToSurface); | +12 | +||||
149 | +} | +12 | +||||
152 | +ImageLayerComposite::IsOpaque() | +12 | +||||
154 | +if (!mImageHost || | +12 | +||||
155 | +!mImageHost->IsAttached()) { | +12 | +||||
159 | +if (mScaleMode == ScaleMode::STRETCH) { | +12 | +||||
183 | +ImageLayerComposite::GetCompositableHost() | +12 | +||||
185 | +if (mImageHost && mImageHost->IsAttached()) { | +12 | +||||
186 | +return mImageHost.get(); | +12 | +||||
193 | +ImageLayerComposite::CleanupResources() | +12 | +||||
195 | +if (mImageHost) { | +12 | +||||
196 | +mImageHost->CleanupResources(); | +12 | +||||
197 | +mImageHost->Detach(this); | +12 | +||||
199 | +mImageHost = nullptr; | +12 | +||||
200 | +} | +12 | +||||
205 | +return mSamplingFilter; | +12 | +
+
+
+
|
+ Times Different | +|||||
57 | +virtual HostLayer* AsHostLayer() override { return this; } | +12 | +||||
59 | +virtual const char* Name() const override { return "ImageLayerComposite"; } | +12 | +
+
+
+
|
+ Times Different | +|||||
1339 | +LayerManagerComposite::CreateImageLayer() | +12 | +||||
1341 | +if (mDestroyed) { | +12 | +||||
1345 | + return RefPtr |
+ 12 | +||||
1450 | +LayerComposite::Destroy() | +12 | +||||
1452 | +if (!mDestroyed) { | +12 | +||||
1453 | +mDestroyed = true; | +12 | +||||
1454 | +CleanupResources(); | +12 | +||||
1456 | +} | +12 | +
+
+
+
|
+ Times Different | +|||||
874 | +BufferTextureHost::GetFormat() const | +12 | +||||
881 | +if (mFormat == gfx::SurfaceFormat::YUV && | +12 | +||||
882 | +mProvider && | +12 | +||||
886 | +return mFormat; | +12 | +||||
1250 | +TextureHost::ReceivedDestroy(PTextureParent* aActor) | +6 | +||||
1252 | + static_cast |
+ 6 | +||||
1253 | +} | +6 | +
+
+
+
|
+ Times Different | +|||||
144 | +const OpRemoveTexture& op = aEdit.detail().get_OpRemoveTexture(); | +9 | +||||
146 | + RefPtr |
+ 9 | +||||
148 | +MOZ_ASSERT(tex.get()); | +9 | +||||
149 | +compositable->RemoveTextureHost(tex); | +9 | +||||
150 | +break; | +9 | +||||
224 | +CompositableParentManager::DestroyActor(const OpDestroy& aOp) | +7 | +||||
226 | +switch (aOp.type()) { | +7 | +||||
228 | +auto actor = aOp.get_PTextureParent(); | +7 | +||||
229 | +TextureHost::ReceivedDestroy(actor); | +7 | +||||
230 | +break; | +7 | +||||
240 | +} | +7 | +
+
+
+
|
+ Times Different | +|||||
1274 | +CompositorBridgeParent::ForceComposite(LayerTransactionParent* aLayerTree) | +2 | +||||
1276 | +ScheduleComposition(); | +2 | +||||
1277 | +} | +2 | +
+
+
+
|
+ Times Different | +|||||
125 | +mLayerTransaction->DestroyActor(op); | +6 | +||||
211 | +MOZ_LAYERS_LOG(("[ParentSide] CreateImageLayer")); | +12 | +||||
213 | + RefPtr |
+ 12 | +||||
214 | +if (!BindLayer(layer, edit.get_OpCreateImageLayer())) { | +12 | +||||
218 | +UpdateHitTestingTree(layer, "CreateImageLayer"); | +12 | +||||
219 | +break; | +12 | +||||
666 | +MOZ_LAYERS_LOG(("[ParentSide] image layer")); | +12 | +||||
668 | +ImageLayer* imageLayer = layer->AsImageLayer(); | +12 | +||||
669 | +if (!imageLayer) { | +12 | +||||
672 | +const ImageLayerAttributes& attrs = specific.get_ImageLayerAttributes(); | +12 | +||||
673 | +imageLayer->SetSamplingFilter(attrs.samplingFilter()); | +12 | +||||
674 | +imageLayer->SetScaleToSize(attrs.scaleToSize(), attrs.scaleMode()); | +12 | +||||
675 | +break; | +12 | +||||
899 | +LayerTransactionParent::RecvForceComposite() | +2 | +||||
901 | +mCompositorBridge->ForceComposite(this); | +2 | +||||
902 | +return IPC_OK(); | +2 | +
+
+
+
|
+ Times Different | +|||||
291 | +ShadowLayerForwarder::CreatedImageLayer(ShadowableLayer* aImage) | +12 | +||||
293 | + CreatedLayer |
+ 12 | +||||
294 | +} | +12 | +||||
527 | +aTxn->mDestroyedActors.AppendElement(op); | +6 | +||||
528 | +return true; | +6 | +||||
544 | +ShadowLayerForwarder::RemoveTextureFromCompositable(CompositableClient* aCompositable, | +8 | +||||
547 | +MOZ_ASSERT(aCompositable); | +8 | +||||
548 | +MOZ_ASSERT(aTexture); | +8 | +||||
549 | +MOZ_ASSERT(aTexture->GetIPDLActor()); | +8 | +||||
550 | +MOZ_RELEASE_ASSERT(aTexture->GetIPDLActor()->GetIPCChannel() == mShadowManager->GetIPCChannel()); | +8 | +||||
551 | +if (!aCompositable->IsConnected() || !aTexture->GetIPDLActor()) { | +8 | +||||
553 | +return; | +8 | +||||
559 | +OpRemoveTexture(nullptr, aTexture->GetIPDLActor()))); | +8 | +||||
901 | +void ShadowLayerForwarder::Composite() | +2 | +||||
903 | +if (!IPCOpen()) { | +2 | +||||
904 | +return; | +2 | +||||
906 | +mShadowManager->SendForceComposite(); | +2 | +
+
+
+
|
+ Times Different | +|||||
25 | +void operator()(Fn&& fn, Args&&... args) { | +7 | +||||
26 | +auto state = fState.load(std::memory_order_acquire); | +7 | +||||
28 | +if (state == Done) { | +7 | +||||
29 | +return; | +7 | +||||
33 | +if (state == NotStarted && fState.compare_exchange_strong(state, Claimed, | +7 | +||||
35 | +std::memory_order_relaxed)) { | +7 | +||||
37 | + fn(std::forward |
+ 7 | +||||
38 | +return fState.store(Done, std::memory_order_release); | +7 | +
+
+
+
|
+ Times Different | +|||||
168 | + return const_cast |
+ 7 | +
+
+
+
|
+ Times Different | +|||||
286 | +*riteZ = *leftZ; | +11 | +||||
540 | +return this->setEmpty(); | +6 | +||||
1064 | +this->addRun(x + width, y, rightAlpha, 1); | +7 | +||||
1089 | +return target->setEmpty(); | +9 | +||||
1252 | +fBuilder->addRun(fLeft, y - 1, 0, fRight - fLeft); | +11 | +||||
1723 | +return this->setEmpty(); | +9 | +||||
1804 | +if (SkRegion::kIntersect_Op == op) { | +5 | +||||
1805 | +return this->setEmpty(); | +5 | +
+
+
+
|
+ Times Different | +|||||
29 | +void SkAlphaRuns::assertValid(int y, int maxStep) const { | +9 | +||||
42 | +} | +9 | +
+
+
+
|
+ Times Different | +|||||
65 | +if (startAlpha) { | +9 | +||||
66 | +SkAlphaRuns::Break(runs, alpha, x, 1); | +9 | +||||
72 | +unsigned tmp = alpha[x] + startAlpha; | +9 | +||||
73 | +SkASSERT(tmp <= 256); | +9 | +||||
74 | +alpha[x] = SkToU8(tmp - (tmp >> 8)); // was (tmp >> 7), but that seems wrong if we're trying to catch 256 | +9 | +||||
76 | +runs += x + 1; | +9 | +||||
77 | +alpha += x + 1; | +9 | +||||
78 | +x = 0; | +9 | +||||
79 | +SkDEBUGCODE(this->validate();) | +9 | +||||
99 | +if (stopAlpha) { | +9 | +||||
100 | +SkAlphaRuns::Break(runs, alpha, x, 1); | +9 | +||||
101 | +alpha += x; | +9 | +||||
102 | +alpha[0] = SkToU8(alpha[0] + stopAlpha); | +9 | +||||
103 | +SkDEBUGCODE(this->validate();) | +9 | +||||
104 | +lastAlpha = alpha; | +9 | +
+
+
+
|
+ Times Different | +|||||
447 | +colors += n; | +2 | +||||
448 | +ix = 0; | +2 | +||||
449 | +} | +2 | +
+
+
+
|
+ Times Different | +|||||
196 | +static inline U16CPU int_repeat(int x, int n) { | +7 | +||||
197 | +return sk_int_mod(x, n); | +7 | +
+
+
+
|
+ Times Different | +|||||
815 | +bool deviceIsOpaque = kRGB_565_SkColorType == device.colorType(); | +7 | +||||
816 | +switch (SkInterpretXfermode(*paint, deviceIsOpaque)) { | +7 | +||||
897 | +SkASSERT(!drawCoverage); // Handled above. | +7 | +||||
898 | +if (shader) { | +7 | +||||
899 | + blitter = alloc->make |
+ 7 | +
+
+
+
|
+ Times Different | +|||||
229 | +SkA8_Shader_Blitter::SkA8_Shader_Blitter(const SkPixmap& device, const SkPaint& paint, | +7 | +||||
231 | +: INHERITED(device, paint, shaderContext) | +7 | +||||
233 | +fXfermode = SkXfermode::Peek(paint.getBlendMode()); | +7 | +||||
234 | +SkASSERT(!fXfermode || fShaderContext); | +7 | +||||
236 | +int width = device.width(); | +7 | +||||
237 | +fBuffer = (SkPMColor*)sk_malloc_throw(sizeof(SkPMColor) * (width + (SkAlign4(width) >> 2))); | +7 | +||||
238 | +fAAExpand = (uint8_t*)(fBuffer + width); | +7 | +||||
239 | +} | +7 | +||||
241 | +SkA8_Shader_Blitter::~SkA8_Shader_Blitter() { | +7 | +||||
242 | +sk_free(fBuffer); | +7 | +||||
243 | +} | +7 | +||||
245 | +void SkA8_Shader_Blitter::blitH(int x, int y, int width) { | +7 | +||||
246 | +SkASSERT(x >= 0 && y >= 0 && | +7 | +||||
249 | +uint8_t* device = fDevice.writable_addr8(x, y); | +7 | +||||
250 | +SkShader::Context* shaderContext = fShaderContext; | +7 | +||||
252 | +if ((shaderContext->getFlags() & SkShader::kOpaqueAlpha_Flag) && !fXfermode) { | +7 | +||||
255 | +SkPMColor* span = fBuffer; | +7 | +||||
257 | +shaderContext->shadeSpan(x, y, span, width); | +7 | +||||
258 | +if (fXfermode) { | +7 | +||||
261 | +for (int i = width - 1; i >= 0; --i) { | +7 | +||||
262 | +unsigned srcA = SkGetPackedA32(span[i]); | +7 | +||||
263 | +unsigned scale = 256 - SkAlpha255To256(srcA); | +7 | +||||
265 | +device[i] = SkToU8(srcA + SkAlphaMul(device[i], scale)); | +7 | +||||
269 | +} | +7 | +
+
+
+
|
+ Times Different | +|||||
356 | +if (fXfermode->asMode(&mode)) { | +7 | +||||
357 | +if (SkXfermode::kSrc_Mode == mode) { | +7 | +||||
358 | +fShadeDirectlyIntoDevice = true; | +7 | +||||
359 | +fProc32Blend = blend_srcmode; | +7 | +
+
+
+
|
+ Times Different | +|||||
39 | +SkASSERT(0 == intervals); | +2 | +||||
40 | +SkASSERT(SkRegion::kRunTypeSentinel == runs[0]); | +2 | +||||
900 | +oper.addSpan(top, gSentinel, gSentinel); | +2 | +||||
1337 | +fRect.fTop = runs[0]; | +2 | +||||
1338 | +runs += 3; | +2 | +||||
1368 | +fIter.next(); | +8 | +||||
1389 | +fIter.next(); | +8 | +
+
+
+
|
+ Times Different | +|||||
87 | +static RunHead* Alloc(int count, int yspancount, int intervalCount) { | +7 | +||||
88 | +if (yspancount <= 0 || intervalCount <= 1) { | +7 | +||||
92 | +RunHead* head = Alloc(count); | +7 | +||||
93 | +if (!head) { | +7 | +||||
96 | +head->fYSpanCount = yspancount; | +7 | +||||
97 | +head->fIntervalCount = intervalCount; | +7 | +||||
98 | +return head; | +7 | +||||
116 | +writable = Alloc(fRunCount, fYSpanCount, fIntervalCount); | +7 | +||||
117 | +memcpy(writable->writable_runs(), this->readonly_runs(), | +7 | +||||
118 | +fRunCount * sizeof(RunType)); | +7 | +||||
123 | +if (sk_atomic_dec(&fRefCnt) == 1) { | +7 | +
+
+
+
|
+ Times Different | +|||||
584 | +static inline SkFixed approximateIntersection(SkFixed l1, SkFixed r1, SkFixed l2, SkFixed r2) { | +9 | +||||
585 | +if (l1 > r1) { SkTSwap(l1, r1); } | +9 | +||||
586 | +if (l2 > r2) { SkTSwap(l2, r2); } | +9 | +||||
587 | +return (SkTMax(l1, l2) + SkTMin(r1, r2)) >> 1; | +9 | +||||
823 | +ll = lr = approximateIntersection(ul, ll, ur, lr); | +9 | +||||
1104 | +f2a(SkFixedMul(partialTop, partialRite))); | +7 | +||||
1127 | +f2a(SkFixedMul(partialBot, partialRite))); | +7 | +||||
1253 | +*nextNextY = nextY + (SK_Fixed1 >> SkAnalyticEdge::kDefaultAccuracy); | +9 | +
+
+
+
|
+ Times Different | +|||||
107 | +~SuperBlitter() override { | +9 | +||||
108 | +this->flush(); | +9 | +||||
109 | +} | +9 | +||||
133 | +int getRunsSz() const { return (fWidth + 1 + (fWidth + 2)/2) * sizeof(int16_t); } | +9 | +||||
138 | +void advanceRuns() { | +9 | +||||
139 | +const size_t kRunsSz = this->getRunsSz(); | +9 | +||||
140 | +fCurrentRun = (fCurrentRun + 1) % fRunsToBuffer; | +9 | +||||
142 | + reinterpret_cast |
+ 9 | +||||
143 | + fRuns.fAlpha = reinterpret_cast |
+ 9 | +||||
144 | +fRuns.reset(fWidth); | +9 | +||||
145 | +} | +9 | +||||
150 | +SuperBlitter::SuperBlitter(SkBlitter* realBlitter, const SkIRect& ir, const SkRegion& clip, | +9 | +||||
152 | +: BaseSuperBlitter(realBlitter, ir, clip, isInverse) | +9 | +||||
154 | +fRunsToBuffer = realBlitter->requestRowsPreserved(); | +9 | +||||
155 | +fRunsBuffer = realBlitter->allocBlitMemory(fRunsToBuffer * this->getRunsSz()); | +9 | +||||
156 | +fCurrentRun = -1; | +9 | +||||
158 | +this->advanceRuns(); | +9 | +||||
160 | +fOffsetX = 0; | +9 | +||||
161 | +} | +9 | +||||
163 | +void SuperBlitter::flush() { | +9 | +||||
164 | +if (fCurrIY >= fTop) { | +9 | +||||
166 | +SkASSERT(fCurrentRun < fRunsToBuffer); | +9 | +||||
167 | +if (!fRuns.empty()) { | +9 | +||||
169 | +fRealBlitter->blitAntiH(fLeft, fCurrIY, fRuns.fAlpha, fRuns.fRuns); | +9 | +||||
170 | +this->advanceRuns(); | +9 | +||||
171 | +fOffsetX = 0; | +9 | +||||
174 | +fCurrIY = fTop - 1; | +9 | +||||
175 | +SkDEBUGCODE(fCurrX = -1;) | +9 | +||||
177 | +} | +9 | +||||
199 | +void SuperBlitter::blitH(int x, int y, int width) { | +9 | +||||
200 | +SkASSERT(width > 0); | +9 | +||||
202 | +int iy = y >> SHIFT; | +9 | +||||
203 | +SkASSERT(iy >= fCurrIY); | +9 | +||||
205 | +x -= fSuperLeft; | +9 | +||||
207 | +if (x < 0) { | +9 | +||||
213 | +SkASSERT(y != fCurrY || x >= fCurrX); | +9 | +||||
215 | +SkASSERT(y >= fCurrY); | +9 | +||||
216 | +if (fCurrY != y) { | +9 | +||||
217 | +fOffsetX = 0; | +9 | +||||
218 | +fCurrY = y; | +9 | +||||
221 | +if (iy != fCurrIY) { // new scanline | +9 | +||||
222 | +this->flush(); | +9 | +||||
223 | +fCurrIY = iy; | +9 | +||||
226 | +int start = x; | +9 | +||||
227 | +int stop = x + width; | +9 | +||||
229 | +SkASSERT(start >= 0 && stop > start); | +9 | +||||
231 | +int fb = start & MASK; | +9 | +||||
232 | +int fe = stop & MASK; | +9 | +||||
233 | +int n = (stop >> SHIFT) - (start >> SHIFT) - 1; | +9 | +||||
235 | +if (n < 0) { | +9 | +||||
240 | +if (fb == 0) { | +9 | +||||
243 | +fb = SCALE - fb; | +9 | +||||
249 | +(1 << (8 - SHIFT)) - (((y & MASK) + 1) >> SHIFT), | +9 | +||||
250 | +fOffsetX); | +9 | +||||
253 | +fRuns.assertValid(y & MASK, (1 << (8 - SHIFT))); | +9 | +||||
254 | +fCurrX = x + width; | +9 | +||||
256 | +} | +9 | +||||
724 | +SuperBlitter superBlit(blitter, ir, *clipRgn, isInverse); | +9 | +||||
726 | +superClipRect == nullptr); | +9 | +||||
785 | +SkRegion tmp; | +9 | +||||
786 | +SkAAClipBlitter aaBlitter; | +9 | +||||
788 | +tmp.setRect(clip.getBounds()); | +9 | +||||
789 | +aaBlitter.init(blitter, &clip.aaRgn()); | +9 | +||||
790 | +SkScan::AntiFillPath(path, tmp, &aaBlitter, true); | +9 | +
+
+
+
|
+ Times Different | +|||||
1115 | +bool SkProcCoeffXfermode::asMode(Mode* mode) const { | +7 | +||||
1116 | +if (mode) { | +7 | +||||
1117 | +*mode = (Mode)fMode; | +7 | +||||
1119 | +return true; | +7 | +||||
1326 | +const int COUNT_BLENDMODES = (int)SkBlendMode::kLastMode + 1; | +7 | +||||
1329 | +static SkOnce once[COUNT_BLENDMODES]; | +7 | +||||
1332 | +once[(int)mode]([mode] { | +7 | +||||
1333 | +ProcCoeff rec = gProcCoeffs[(int)mode]; | +7 | +||||
1334 | +if (auto xfermode = SkOpts::create_xfermode(rec, mode)) { | +7 | +||||
1335 | +cached[(int)mode] = xfermode; | +7 | +||||
1339 | +}); | +7 | +||||
1340 | +return sk_ref_sp(cached[(int)mode]); | +7 | +
+
+
+
|
+ Times Different | +|||||
11 | +static bool just_solid_color(const SkPaint& p) { | +7 | +||||
12 | +return SK_AlphaOPAQUE == p.getAlpha() && !p.getColorFilter() && !p.getShader(); | +7 | +||||
15 | +SkXfermodeInterpretation SkInterpretXfermode(const SkPaint& paint, bool dstIsOpaque) { | +7 | +||||
16 | +switch (paint.getBlendMode()) { | +7 | +||||
20 | +if (just_solid_color(paint)) { | +7 | +||||
23 | +return kNormal_SkXfermodeInterpretation; | +7 | +
+
+
+
|
+ Times Different | +|||||
169 | +SkASSERT(!xfer->unique()); | +7 | +||||
170 | +return xfer.get(); | +7 | +||||
286 | +SkXfermode() {} | +7 | +
+
+
+
|
+ Times Different | +|||||
25 | +SkProcCoeffXfermode(const ProcCoeff& rec, SkBlendMode mode) { | +7 | +||||
26 | +fMode = mode; | +7 | +||||
27 | +fProc = rec.fProc; | +7 | +||||
29 | +fSrcCoeff = rec.fSC; | +7 | +||||
30 | +fDstCoeff = rec.fDC; | +7 | +
+
+
+
|
+ Times Different | +|||||
684 | +find_backward(const SkLinearGradient::LinearGradientContext::Rec rec[], float tiledX) { | +7 | +||||
685 | +SkASSERT(tiledX >= 0 && tiledX <= 1); | +7 | +||||
687 | +SkASSERT(rec[0].fPos >= 0 && rec[0].fPos <= 1); | +7 | +||||
688 | +SkASSERT(rec[1].fPos >= 0 && rec[1].fPos <= 1); | +7 | +||||
689 | +SkASSERT(rec[0].fPos <= rec[1].fPos); | +7 | +||||
690 | +while (tiledX < rec->fPos || rec[1].fPosScale == 0) { | +7 | +||||
691 | +rec -= 1; | +12 | +||||
692 | +SkASSERT(rec[0].fPos >= 0 && rec[0].fPos <= 1); | +12 | +||||
693 | +SkASSERT(rec[1].fPos >= 0 && rec[1].fPos <= 1); | +12 | +||||
694 | +SkASSERT(rec[0].fPos <= rec[1].fPos); | +12 | +||||
696 | +return rec; | +7 | +||||
770 | + template |
+ 7 | +||||
772 | +Sk4f dc2 = dc + dc; | +7 | +||||
773 | +Sk4f dc4 = dc2 + dc2; | +7 | +||||
774 | + Sk4f cd0 = pre_bias |
+ 7 | +||||
775 | + Sk4f cd1 = pre_bias |
+ 7 | +||||
776 | +Sk4f cd2 = cd0 + dc2; | +7 | +||||
777 | +Sk4f cd3 = cd1 + dc2; | +7 | +||||
778 | +while (n >= 4) { | +7 | +||||
783 | + *dstC++ = trunc_from_255 |
+ 7 | +||||
784 | + *dstC++ = trunc_from_255 |
+ 7 | +||||
785 | + *dstC++ = trunc_from_255 |
+ 7 | +||||
786 | + *dstC++ = trunc_from_255 |
+ 7 | +||||
788 | +cd0 = cd0 + dc4; | +7 | +||||
789 | +cd1 = cd1 + dc4; | +7 | +||||
790 | +cd2 = cd2 + dc4; | +7 | +||||
791 | +cd3 = cd3 + dc4; | +7 | +||||
792 | +n -= 4; | +7 | +||||
794 | +if (n & 2) { | +7 | +||||
795 | + *dstC++ = trunc_from_255 |
+ 11 | +||||
796 | + *dstC++ = trunc_from_255 |
+ 11 | +||||
797 | +cd0 = cd0 + dc2; | +11 | +||||
799 | +if (n & 1) { | +7 | +||||
800 | + *dstC++ = trunc_from_255 |
+ 8 | +||||
802 | +} | +7 | +||||
805 | +void SkLinearGradient::LinearGradientContext::shade4_dx_clamp(SkPMColor dstC[], int count, | +7 | +||||
808 | +Sk4f dither0(dither[0]); | +7 | +||||
809 | +Sk4f dither1(dither[1]); | +7 | +||||
810 | +const Rec* rec = fRecs.begin(); | +7 | +||||
813 | +SkDEBUGCODE(SkPMColor* endDstC = dstC + count;) | +7 | +||||
832 | +if (fx > 1) { | +7 | +||||
848 | +SkASSERT(count >= 0); | +7 | +||||
854 | +r = fRecs.begin() + fRecs.count() - 2; // start at the end | +7 | +||||
857 | +while (count > 0) { | +7 | +||||
864 | +if (fx <= 0) { | +7 | +||||
873 | +r = find_backward(r, fx); | +7 | +||||
875 | +SkASSERT(r >= fRecs.begin() && r < fRecs.begin() + fRecs.count() - 1); | +7 | +||||
877 | +const float p0 = r[0].fPos; | +7 | +||||
878 | +const Sk4f c0 = r[0].fColor; | +7 | +||||
879 | +const float p1 = r[1].fPos; | +7 | +||||
880 | +const Sk4f diffc = Sk4f(r[1].fColor) - c0; | +7 | +||||
881 | +const float scale = r[1].fPosScale; | +7 | +||||
882 | +const float t = (fx - p0) * scale; | +7 | +||||
883 | +const Sk4f c = c0 + Sk4f(t) * diffc; | +7 | +||||
884 | +const Sk4f dc = diffc * dx4 * Sk4f(scale); | +7 | +||||
890 | +n = SkTMin((int)((p0 - fx) * invDx) + 1, count); | +7 | +||||
893 | +fx += n * dx; | +7 | +||||
899 | +fx = SkTMin(fx, p0); | +7 | +||||
902 | + ramp |
+ 7 | +||||
903 | +dstC += n; | +7 | +||||
904 | +SkASSERT(dstC <= endDstC); | +7 | +||||
906 | +if (n & 1) { | +7 | +||||
910 | +count -= n; | +7 | +||||
911 | +SkASSERT(count >= 0); | +7 | +||||
953 | +SkASSERT(0.f != dx); | +7 | +||||
954 | +const float invDx = 1 / dx; | +7 | +||||
955 | +if (dx > 0) { | +7 | +||||
962 | +if (fApplyAlphaAfterInterp) { | +7 | +||||
963 | + this->shade4_dx_clamp |
+ 7 | +
+
+
+
|
+ Times Different | +|||||
221 | +: INHERITED(rec, mode) {} | +7 | +||||
318 | +static SkXfermode* create_xfermode(const ProcCoeff& rec, SkBlendMode mode) { | +7 | +||||
319 | +switch (mode) { | +7 | +||||
323 | +CASE(Src); | +7 | +
+
+
+
|
+ Times Different | +|||||
161 | +AnimationState::InitAnimationFrameTimeIfNecessary() | +6 | +||||
163 | +if (mCurrentAnimationFrameTime.IsNull()) { | +6 | +||||
166 | +} | +6 | +||||
169 | +AnimationState::SetAnimationFrameTime(const TimeStamp& aTime) | +6 | +||||
171 | +mCurrentAnimationFrameTime = aTime; | +6 | +||||
172 | +} | +6 | +||||
175 | +AnimationState::GetCurrentAnimationFrameIndex() const | +6 | +||||
177 | +return mCurrentAnimationFrameIndex; | +6 | +||||
181 | +AnimationState::LoopLength() const | +8 | +||||
184 | +if (!mLoopLength) { | +8 | +||||
188 | +MOZ_ASSERT(mHasBeenDecoded, "We know the loop length but decoding isn't done?"); | +8 | +||||
191 | +if (mAnimationMode != imgIContainer::kNormalAnimMode) { | +8 | +||||
195 | +return *mLoopLength; | +8 | +||||
204 | +FrameAnimator::GetCurrentImgFrameEndTime(AnimationState& aState, | +6 | +||||
207 | +TimeStamp currentFrameTime = aState.mCurrentAnimationFrameTime; | +6 | +||||
209 | +GetTimeoutForFrame(aState, aFrames, aState.mCurrentAnimationFrameIndex); | +6 | +||||
211 | +if (timeout.isNothing()) { | +6 | +||||
216 | +if (*timeout == FrameTimeout::Forever()) { | +6 | +||||
228 | +TimeDuration::FromMilliseconds(double(timeout->AsMilliseconds())); | +6 | +||||
229 | +TimeStamp currentFrameEndTime = currentFrameTime + durationOfTimeout; | +6 | +||||
235 | +FrameAnimator::AdvanceFrame(AnimationState& aState, | +8 | +||||
239 | +NS_ASSERTION(aTime <= TimeStamp::Now(), | +8 | +||||
241 | +AUTO_PROFILER_LABEL("FrameAnimator::AdvanceFrame", GRAPHICS); | +8 | +||||
243 | +RefreshResult ret; | +8 | +||||
246 | +uint32_t currentFrameIndex = aState.mCurrentAnimationFrameIndex; | +8 | +||||
247 | +uint32_t nextFrameIndex = currentFrameIndex + 1; | +8 | +||||
251 | +if (aState.FrameCount() == Some(nextFrameIndex)) { | +8 | +||||
276 | +if (nextFrameIndex >= aState.KnownFrameCount()) { | +8 | +||||
296 | +MOZ_ASSERT(nextFrameIndex < aState.KnownFrameCount()); | +8 | +||||
297 | +RawAccessFrameRef nextFrame = GetRawFrame(aFrames, nextFrameIndex); | +8 | +||||
303 | +if (!nextFrame || !nextFrame->IsFinished()) { | +8 | +||||
309 | + Maybe |
+ 8 | +||||
312 | +MOZ_ASSERT(nextFrameTimeout.isSome()); | +8 | +||||
313 | +if (*nextFrameTimeout == FrameTimeout::Forever()) { | +8 | +||||
317 | +if (nextFrameIndex == 0) { | +8 | +||||
320 | +MOZ_ASSERT(nextFrameIndex == currentFrameIndex + 1); | +8 | +||||
323 | +if (!DoBlend(aFrames, &ret.mDirtyRect, currentFrameIndex, nextFrameIndex)) { | +8 | +||||
335 | +nextFrame->SetCompositingFailed(false); | +8 | +||||
338 | + Maybe |
+ 8 | +||||
339 | +MOZ_ASSERT(currentFrameEndTime.isSome()); | +8 | +||||
340 | +aState.mCurrentAnimationFrameTime = *currentFrameEndTime; | +8 | +||||
348 | +FrameTimeout loopTime = aState.LoopLength(); | +8 | +||||
349 | +if (loopTime != FrameTimeout::Forever() && | +8 | +||||
350 | +(aState.LoopCount() < 0 || aState.mLoopRemainingCount >= 0)) { | +8 | +||||
351 | +TimeDuration delay = aTime - aState.mCurrentAnimationFrameTime; | +8 | +||||
352 | +if (delay.ToMilliseconds() > loopTime.AsMilliseconds()) { | +8 | +||||
375 | +aState.mCurrentAnimationFrameIndex = nextFrameIndex; | +8 | +||||
378 | +ret.mFrameAdvanced = true; | +8 | +||||
380 | +return ret; | +8 | +||||
384 | +FrameAnimator::RequestRefresh(AnimationState& aState, | +6 | +||||
389 | +RefreshResult ret; | +6 | +||||
391 | +if (aState.IsDiscarded()) { | +6 | +||||
403 | +PlaybackType::eAnimated)); | +6 | +||||
405 | +ret.mDirtyRect = aState.UpdateStateInternal(result, aAnimationFinished, mSize); | +6 | +||||
406 | +if (aState.IsDiscarded() || !result) { | +6 | +||||
416 | +GetCurrentImgFrameEndTime(aState, result.Surface()); | +6 | +||||
417 | +if (currentFrameEndTime.isNothing()) { | +6 | +||||
426 | +while (*currentFrameEndTime <= aTime) { | +6 | +||||
427 | +TimeStamp oldFrameEndTime = *currentFrameEndTime; | +8 | +||||
429 | +RefreshResult frameRes = AdvanceFrame(aState, result.Surface(), aTime); | +8 | +||||
432 | +ret.Accumulate(frameRes); | +8 | +||||
434 | +currentFrameEndTime = GetCurrentImgFrameEndTime(aState, result.Surface()); | +8 | +||||
436 | +MOZ_ASSERT(currentFrameEndTime.isSome()); | +8 | +||||
441 | +if (!frameRes.mFrameAdvanced && (*currentFrameEndTime == oldFrameEndTime)) { | +8 | +||||
447 | +if (*currentFrameEndTime > aTime) { | +6 | +||||
448 | +aState.mCompositedFrameInvalid = false; | +6 | +||||
449 | +ret.mDirtyRect = IntRect(IntPoint(0,0), mSize); | +6 | +||||
452 | +MOZ_ASSERT(!aState.mIsCurrentlyDecoded || !aState.mCompositedFrameInvalid); | +6 | +||||
478 | +(uint32_t(mLastCompositedFrameIndex) == aState.mCurrentAnimationFrameIndex)) { | +8 | +||||
480 | +MatchType::EXACT); | +8 | +||||
491 | +if (NS_FAILED(result.Surface().Seek(aState.mCurrentAnimationFrameIndex))) { | +6 | +||||
498 | +MOZ_ASSERT(!result.Surface()->GetIsPaletted(), | +6 | +||||
501 | +return result; | +6 | +||||
505 | +FrameAnimator::GetTimeoutForFrame(AnimationState& aState, | +6 | +||||
509 | +RawAccessFrameRef frame = GetRawFrame(aFrames, aFrameNum); | +6 | +||||
510 | +if (frame) { | +6 | +||||
511 | +AnimationData data = frame->GetAnimationData(); | +6 | +||||
512 | +return Some(data.mTimeout); | +6 | +||||
516 | +return Nothing(); | +6 | +||||
565 | +FrameAnimator::GetRawFrame(DrawableSurface& aFrames, uint32_t aFrameNum) const | +6 | +||||
570 | +if (NS_FAILED(aFrames.Seek(aFrameNum))) { | +6 | +||||
574 | +return aFrames->RawAccessRef(); | +6 | +||||
581 | +FrameAnimator::DoBlend(DrawableSurface& aFrames, | +8 | +||||
586 | +RawAccessFrameRef prevFrame = GetRawFrame(aFrames, aPrevFrameIndex); | +8 | +||||
587 | +RawAccessFrameRef nextFrame = GetRawFrame(aFrames, aNextFrameIndex); | +8 | +||||
589 | +MOZ_ASSERT(prevFrame && nextFrame, "Should have frames here"); | +8 | +||||
591 | +AnimationData prevFrameData = prevFrame->GetAnimationData(); | +8 | +||||
592 | +if (prevFrameData.mDisposalMethod == DisposalMethod::RESTORE_PREVIOUS && | +8 | +||||
598 | +? prevFrameData.mRect.Intersect(*prevFrameData.mBlendRect) | +8 | +||||
599 | +: prevFrameData.mRect; | +8 | +||||
601 | +bool isFullPrevFrame = prevRect.x == 0 && prevRect.y == 0 && | +8 | +||||
602 | +prevRect.width == mSize.width && | +8 | +||||
603 | +prevRect.height == mSize.height; | +8 | +||||
607 | +if (isFullPrevFrame && | +8 | +||||
608 | +(prevFrameData.mDisposalMethod == DisposalMethod::CLEAR)) { | +8 | +||||
612 | +AnimationData nextFrameData = nextFrame->GetAnimationData(); | +8 | +||||
615 | +? nextFrameData.mRect.Intersect(*nextFrameData.mBlendRect) | +8 | +||||
616 | +: nextFrameData.mRect; | +8 | +||||
618 | +bool isFullNextFrame = nextRect.x == 0 && nextRect.y == 0 && | +8 | +||||
619 | +nextRect.width == mSize.width && | +8 | +||||
620 | +nextRect.height == mSize.height; | +8 | +||||
622 | +if (!nextFrame->GetIsPaletted()) { | +8 | +||||
625 | +if (prevFrameData.mDisposalMethod == DisposalMethod::CLEAR_ALL) { | +8 | +||||
632 | +if (isFullNextFrame && | +8 | +||||
633 | +(nextFrameData.mDisposalMethod != DisposalMethod::RESTORE_PREVIOUS) && | +8 | +||||
634 | +!nextFrameData.mHasAlpha) { | +8 | +||||
641 | +switch (prevFrameData.mDisposalMethod) { | +8 | +||||
646 | +*aDirtyRect = nextRect; | +8 | +||||
647 | +break; | +8 | +||||
676 | +if (mLastCompositedFrameIndex == int32_t(aNextFrameIndex)) { | +8 | +||||
680 | +bool needToBlankComposite = false; | +8 | +||||
683 | +if (!mCompositingFrame) { | +8 | +||||
684 | + RefPtr |
+ 8 | +||||
686 | +SurfaceFormat::B8G8R8A8); | +8 | +||||
687 | +if (NS_FAILED(rv)) { | +8 | +||||
691 | +mCompositingFrame = newFrame->RawAccessRef(); | +8 | +||||
692 | +needToBlankComposite = true; | +8 | +||||
693 | +} else if (int32_t(aNextFrameIndex) != mLastCompositedFrameIndex+1) { | +8 | +||||
700 | +AnimationData compositingFrameData = mCompositingFrame->GetAnimationData(); | +8 | +||||
708 | +bool doDisposal = true; | +8 | +||||
709 | +if (!nextFrameData.mHasAlpha && | +8 | +||||
728 | +if (doDisposal) { | +8 | +||||
730 | +switch (prevFrameData.mDisposalMethod) { | +8 | +||||
784 | +if (mLastCompositedFrameIndex != int32_t(aNextFrameIndex - 1)) { | +8 | +||||
785 | +if (isFullPrevFrame && !prevFrame->GetIsPaletted()) { | +8 | +||||
790 | +compositingFrameData.mRect); | +8 | +||||
819 | +if ((nextFrameData.mDisposalMethod == DisposalMethod::RESTORE_PREVIOUS) && | +8 | +||||
854 | +nextFrameData.mBlendRect); | +8 | +||||
857 | +mCompositingFrame->Finish(); | +8 | +||||
859 | +mLastCompositedFrameIndex = int32_t(aNextFrameIndex); | +8 | +||||
861 | +return true; | +8 | +||||
902 | +FrameAnimator::CopyFrameImage(const uint8_t* aDataSrc, | +8 | +||||
907 | +uint32_t dataLengthSrc = aRectSrc.width * aRectSrc.height * 4; | +8 | +||||
908 | +uint32_t dataLengthDest = aRectDest.width * aRectDest.height * 4; | +8 | +||||
910 | +if (!aDataDest || !aDataSrc || dataLengthSrc != dataLengthDest) { | +8 | +||||
914 | +memcpy(aDataDest, aDataSrc, dataLengthDest); | +8 | +||||
916 | +return true; | +8 | +||||
920 | +FrameAnimator::DrawFrameTo(const uint8_t* aSrcData, const IntRect& aSrcRect, | +8 | +||||
925 | +NS_ENSURE_ARG_POINTER(aSrcData); | +8 | +||||
926 | +NS_ENSURE_ARG_POINTER(aDstPixels); | +8 | +||||
929 | +if (aSrcRect.x < 0 || aSrcRect.y < 0) { | +8 | +||||
934 | +if ((aSrcRect.x > aDstRect.width) || (aSrcRect.y > aDstRect.height)) { | +8 | +||||
938 | +if (aSrcPaletteLength) { | +8 | +||||
988 | +aSrcRect.width * 4); | +8 | +||||
989 | +if (!src) { | +8 | +||||
997 | +aDstRect.width * 4); | +8 | +||||
998 | +if (!dst) { | +8 | +||||
1017 | +: PIXMAN_OP_OVER; | +8 | +||||
1019 | +if (aBlendMethod == BlendMethod::OVER || !aBlendRect || | +8 | +||||
1020 | +(aBlendMethod == BlendMethod::SOURCE && aSrcRect.IsEqualEdges(*aBlendRect))) { | +8 | +||||
1030 | +aSrcRect.width, aSrcRect.height); | +8 | +||||
1051 | +pixman_image_unref(src); | +8 | +||||
1052 | +pixman_image_unref(dst); | +8 | +
+
+
+
|
+ Times Different | +|||||
243 | +RefreshResult() | +6 | +||||
245 | +, mAnimationFinished(false) | +6 | +||||
246 | +{ } | +6 | +||||
249 | +void Accumulate(const RefreshResult& aOther) | +8 | +||||
251 | +mFrameAdvanced = mFrameAdvanced || aOther.mFrameAdvanced; | +8 | +||||
252 | +mAnimationFinished = mAnimationFinished || aOther.mAnimationFinished; | +8 | +||||
253 | +mDirtyRect = mDirtyRect.Union(aOther.mDirtyRect); | +8 | +||||
254 | +} | +8 | +
+
+
+
|
+ Times Different | +|||||
89 | +uint32_t AsMilliseconds() const | +6 | +||||
91 | +if (*this == Forever()) { | +6 | +||||
96 | +return uint32_t(mTimeout); | +6 | +
+
+
+
|
+ Times Different | +|||||
119 | +ImageResource::HadRecentRefresh(const TimeStamp& aTime) | +6 | +||||
125 | +TimeDuration::FromMilliseconds(nsRefreshDriver::DefaultInterval() / 2.0); | +6 | +||||
127 | +if (!mLastRefreshTime.IsNull() && | +6 | +||||
128 | +aTime - mLastRefreshTime < recentThreshold) { | +6 | +||||
134 | +mLastRefreshTime = aTime; | +6 | +||||
135 | +return false; | +6 | +||||
142 | +nsresult rv = StartAnimation(); | +6 | +||||
143 | +mAnimating = NS_SUCCEEDED(rv); | +6 | +
+
+
+
|
+ Times Different | +|||||
108 | +status |= imgIRequest::STATUS_IS_ANIMATED; | +3 | +
+
+
+
|
+ Times Different | +|||||
161 | +RasterImage::RequestRefresh(const TimeStamp& aTime) | +6 | +||||
163 | +if (HadRecentRefresh(aTime)) { | +6 | +||||
167 | +EvaluateAnimation(); | +6 | +||||
169 | +if (!mAnimating) { | +6 | +||||
173 | +RefreshResult res; | +6 | +||||
174 | +if (mAnimationState) { | +6 | +||||
175 | +MOZ_ASSERT(mFrameAnimator); | +6 | +||||
176 | +res = mFrameAnimator->RequestRefresh(*mAnimationState, aTime, mAnimationFinished); | +6 | +||||
179 | +if (res.mFrameAdvanced) { | +6 | +||||
184 | +mFramesNotified++; | +8 | +||||
187 | +NotifyProgress(NoProgress, res.mDirtyRect); | +8 | +||||
190 | +if (res.mAnimationFinished) { | +6 | +||||
497 | +*aAnimated = true; | +3 | +||||
498 | +return NS_OK; | +3 | +||||
529 | +MOZ_ASSERT(mAnimationState, "Animated images should have an AnimationState"); | +3 | +||||
530 | +return mAnimationState->FirstFrameTimeout().AsEncodedValueDeprecated(); | +3 | +||||
592 | +RasterImage::GetCurrentImage(ImageContainer* aContainer, uint32_t aFlags) | +12 | +||||
594 | +MOZ_ASSERT(NS_IsMainThread()); | +12 | +||||
595 | +MOZ_ASSERT(aContainer); | +12 | +||||
599 | +Tie(drawResult, surface) = | +12 | +||||
600 | +GetFrameInternal(mSize, FRAME_CURRENT, aFlags | FLAG_ASYNC_NOTIFY); | +12 | +||||
601 | +if (!surface) { | +12 | +||||
607 | + RefPtr |
+ 12 | +||||
608 | +return MakePair(drawResult, Move(image)); | +12 | +||||
612 | +RasterImage::IsImageContainerAvailable(LayerManager* aManager, uint32_t aFlags) | +5 | +||||
614 | +int32_t maxTextureSize = aManager->GetMaxTextureSize(); | +5 | +||||
615 | +if (!mHasSize || | +5 | +||||
616 | +mSize.width > maxTextureSize || | +6 | +||||
617 | +mSize.height > maxTextureSize) { | +6 | +||||
621 | +return true; | +6 | +||||
625 | +RasterImage::GetImageContainer(LayerManager* aManager, uint32_t aFlags) | +12 | +||||
627 | +MOZ_ASSERT(NS_IsMainThread()); | +12 | +||||
628 | +MOZ_ASSERT(aManager); | +12 | +||||
629 | +MOZ_ASSERT((aFlags & ~(FLAG_SYNC_DECODE | | +12 | +||||
635 | +int32_t maxTextureSize = aManager->GetMaxTextureSize(); | +12 | +||||
636 | +if (!mHasSize || | +12 | +||||
637 | +mSize.width > maxTextureSize || | +12 | +||||
638 | +mSize.height > maxTextureSize) { | +12 | +||||
642 | +if (mAnimationConsumers == 0) { | +12 | +||||
646 | + RefPtr |
+ 12 | +||||
649 | +(aFlags & (FLAG_SYNC_DECODE | FLAG_SYNC_DECODE_IF_FAST)) && | +12 | +||||
650 | +mLastImageContainerDrawResult != DrawResult::SUCCESS && | +12 | +||||
651 | +mLastImageContainerDrawResult != DrawResult::BAD_IMAGE; | +12 | +||||
653 | +if (container && !mustRedecode) { | +12 | +||||
658 | +container = LayerManager::CreateImageContainer(); | +12 | +||||
661 | + RefPtr |
+ 12 | +||||
662 | +Tie(drawResult, image) = GetCurrentImage(container, aFlags); | +12 | +||||
663 | +if (!image) { | +12 | +||||
670 | + AutoTArray |
+ 12 | +||||
673 | +mImageProducerID)); | +12 | +||||
674 | +container->SetCurrentImagesInTransaction(imageList); | +12 | +||||
676 | +mLastImageContainerDrawResult = drawResult; | +12 | +||||
677 | +mImageContainer = container; | +12 | +||||
679 | +return container.forget(); | +12 | +||||
693 | + RefPtr |
+ 6 | +||||
694 | +Tie(drawResult, image) = GetCurrentImage(container, FLAG_NONE); | +6 | +||||
695 | +if (!image) { | +6 | +||||
699 | +mLastImageContainerDrawResult = drawResult; | +6 | +||||
700 | + AutoTArray |
+ 6 | +||||
703 | +mImageProducerID)); | +6 | +||||
704 | +container->SetCurrentImages(imageList); | +6 | +||||
821 | +RasterImage::StartAnimation() | +6 | +||||
823 | +if (mError) { | +6 | +||||
827 | +MOZ_ASSERT(ShouldAnimate(), "Should not animate!"); | +6 | +||||
831 | +mPendingAnimation = !mAnimationState || mAnimationState->KnownFrameCount() < 1; | +6 | +||||
832 | +if (mPendingAnimation) { | +6 | +||||
837 | +if (mAnimationState->GetCurrentAnimationFrameIndex() == 0 && | +6 | +||||
838 | +mAnimationState->FirstFrameTimeout() == FrameTimeout::Forever()) { | +6 | +||||
845 | +mAnimationState->InitAnimationFrameTimeIfNecessary(); | +6 | +||||
847 | +return NS_OK; | +6 | +||||
902 | +RasterImage::SetAnimationStartTime(const TimeStamp& aTime) | +6 | +||||
904 | +if (mError || mAnimationMode == kDontAnimMode || mAnimating || !mAnimationState) { | +6 | +||||
905 | +return; | +6 | +||||
908 | +mAnimationState->SetAnimationFrameTime(aTime); | +6 | +||||
1637 | +RasterImage::ShouldAnimate() | +6 | +||||
1639 | +return ImageResource::ShouldAnimate() && | +6 | +||||
1640 | +mAnimationState && | +6 | +||||
1641 | +mAnimationState->KnownFrameCount() >= 1 && | +6 | +||||
1642 | +!mAnimationFinished; | +6 | +
+
+
+
|
+ Times Different | +|||||
541 | +return; | +8 | +
+
+
+
|
+ Times Different | +|||||
694 | +imgFrame::GetIsPaletted() const | +6 | +||||
917 | +imgFrame::SetCompositingFailed(bool val) | +8 | +||||
919 | +MOZ_ASSERT(NS_IsMainThread()); | +8 | +||||
920 | +mCompositingFailed = val; | +8 | +||||
921 | +} | +8 | +
+
+
+
|
+ Times Different | +|||||
117 | +nsresult InitForAnimator(const nsIntSize& aSize, | +9 | +||||
121 | +aFormat, 0, false, true); | +9 | +
+
+
+
|
+ Times Different | +|||||
306 | +LOG_SCOPE(gImgLog, "imgRequestProxy::Cancel"); | +6 | +||||
308 | +mCanceled = true; | +6 | +||||
310 | + nsCOMPtr |
+ 6 | +||||
311 | +return NS_DispatchToCurrentThread(ev); | +6 | +||||
315 | +imgRequestProxy::DoCancel(nsresult status) | +6 | +||||
317 | +if (GetOwner()) { | +6 | +||||
318 | +GetOwner()->RemoveProxy(this, status); | +6 | +||||
321 | +NullOutListener(); | +6 | +||||
322 | +} | +6 | +
+
+
+
|
+ Times Different | +|||||
601 | +if (delayed_run_time > other.delayed_run_time) | +7 | +
+
+
+
|
+ Times Different | +|||||
426 | +const size_t prev_size = input_overflow_fds_.size(); | +1 | +||||
427 | +input_overflow_fds_.resize(prev_size + num_wire_fds); | +1 | +||||
428 | +memcpy(&input_overflow_fds_[prev_size], wire_fds, | +1 | +||||
429 | +num_wire_fds * sizeof(int)); | +1 | +||||
430 | +fds = &input_overflow_fds_[0]; | +1 | +||||
431 | +num_fds = input_overflow_fds_.size(); | +1 | +||||
680 | +switch (errno) { | +2 | +
+
+
+
|
+ Times Different | +|||||
650 | +PrintErrorMessage(Side side, const char* channelName, const char* msg) | +10 | +||||
654 | +: ((side == ParentSide) ? "Parent" : "Unknown"); | +10 | +||||
655 | +printf_stderr("\n###!!! [%s][%s] Error: %s\n\n", from, channelName, msg); | +10 | +||||
656 | +} | +10 | +||||
742 | +task->Clear(); | +10 | +||||
1188 | +MOZ_RELEASE_ASSERT(mPending.getLast()->Msg().compress_type() == | +2 | +||||
1190 | +mPending.getLast()->Msg() = Move(aMsg); | +2 | +||||
1192 | +reuseTask = true; | +2 | +||||
1280 | +const Message &msg = it->Msg(); | +7 | +||||
1281 | +if (!aInvoke(msg)) { | +7 | +||||
1849 | +ReportConnectionError("RunMessage"); | +10 | +||||
1850 | +return; | +10 | +||||
1970 | +MessageChannel::MessageTask::Clear() | +10 | +||||
1972 | +mChannel->AssertWorkerThread(); | +10 | +||||
1974 | +mChannel = nullptr; | +10 | +||||
1975 | +} | +10 | +||||
2409 | +MessageChannel::ReportConnectionError(const char* aChannelName, Message* aMsg) const | +10 | +||||
2411 | +AssertWorkerThread(); | +10 | +||||
2412 | +mMonitor->AssertCurrentThreadOwns(); | +10 | +||||
2414 | +const char* errorMsg = nullptr; | +10 | +||||
2415 | +switch (mChannelState) { | +10 | +||||
2426 | +errorMsg = "Channel closing: too late to send/recv, messages will be lost"; | +10 | +||||
2427 | +break; | +10 | +||||
2436 | +if (aMsg) { | +10 | +||||
2443 | +PrintErrorMessage(mSide, aChannelName, errorMsg); | +10 | +||||
2446 | +MonitorAutoUnlock unlock(*mMonitor); | +10 | +||||
2447 | +mListener->ProcessingError(MsgDropped, errorMsg); | +10 | +||||
2448 | +} | +10 | +
+
+
+
|
+ Times Different | +|||||
1166 | +js::RegExpTesterRaw(JSContext* cx, HandleObject regexp, HandleString input, | +8 | +||||
1169 | +MOZ_ASSERT(lastIndex >= 0); | +8 | +||||
1171 | +size_t endIndexTmp = 0; | +8 | +||||
1173 | +nullptr, &endIndexTmp, UpdateRegExpStatics); | +8 | +||||
1175 | +if (status == RegExpRunStatus_Success) { | +8 | +||||
1180 | +if (status == RegExpRunStatus_Success_NotFound) { | +8 | +||||
1181 | +*endIndex = -1; | +8 | +||||
1182 | +return true; | +8 | +
+
+
+
|
+ Times Different | +|||||
83 | +SparseBitmap::bitwiseOrInto(DenseBitmap& other) const | +6 | +||||
85 | +for (Data::Range r(data.all()); !r.empty(); r.popFront()) { | +6 | +||||
86 | +BitBlock& block = *r.front().value(); | +6 | +||||
87 | +size_t blockWord = r.front().key() * WordsInBlock; | +6 | +||||
88 | +size_t numWords = wordIntersectCount(blockWord, other); | +6 | +||||
91 | +for (size_t i = numWords; i < WordsInBlock; i++) | +6 | +||||
92 | +MOZ_ASSERT(!block[i]); | +4 | +||||
94 | +for (size_t i = 0; i < numWords; i++) | +6 | +||||
95 | +other.word(blockWord + i) |= block[i]; | +6 | +||||
97 | +} | +6 | +
+
+
+
|
+ Times Different | +|||||
45 | +uintptr_t& word(size_t i) { return data[i]; } | +6 | +
+
+
+
|
+ Times Different | +|||||
755 | +*y = x >> 1; | +6 | +||||
756 | +return 1; | +6 | +||||
758 | +*y = x >> 2; | +10 | +||||
759 | +return 2; | +10 | +||||
767 | +k += 8; | +8 | +||||
768 | +x >>= 8; | +8 | +||||
775 | +k += 2; | +5 | +||||
776 | +x >>= 2; | +5 | +||||
779 | +k++; | +5 | +||||
780 | +x >>= 1; | +5 | +||||
781 | +if (!x) | +5 | +||||
1059 | +if (xa <= xa0) | +7 | +||||
1087 | +c = Balloc(PASS_STATE 0); | +7 | +||||
1088 | +c->wds = 1; | +7 | +||||
1089 | +c->x[0] = 0; | +7 | +||||
1090 | +return c; | +7 | +||||
1319 | +x[0] = y; | +7 | +
+
+
+
|
+ Times Different | +|||||
8181 | +return false; | +2 | +||||
8186 | +return false; | +2 | +
+
+
+
|
+ Times Different | +|||||
3170 | +return false; | +2 | +
+
+
+
|
+ Times Different | +|||||
1359 | +hadUnicodeEscape = false; | +7 | +||||
1360 | +goto identifier; | +7 | +||||
1915 | +reportError(JSMSG_ILLEGAL_CHARACTER); | +1 | +||||
1967 | +ungetCharIgnoreEOL(c); | +4 | +
+
+
+
|
+ Times Different | +|||||
344 | +maybeLock.emplace(rt); | +9 | +||||
397 | +arena->setNextAllocDuringSweep(arenasAllocatedDuringSweep); | +9 | +||||
398 | +arenasAllocatedDuringSweep = arena; | +9 | +
+
+
+
|
+ Times Different | +|||||
144 | +zone->markedAtoms().bitwiseOrInto(markedUnion); | +6 | +
+
+
+
|
+ Times Different | +|||||
81 | +CurrentThreadIsIonCompilingSafeForMinorGC() | +9 | +||||
83 | +return TlsContext.get()->ionCompilingSafeForMinorGC; | +9 | +
+
+
+
|
+ Times Different | +|||||
131 | +for (Node* v = first; v; v = v->gcNextGraphNode) | +5 | +||||
132 | +v->gcNextGraphComponent = nullptr; | +5 | +||||
139 | +processNode(w); | +11 | +||||
140 | +cur->gcLowLink = Min(cur->gcLowLink, w->gcLowLink); | +11 | +
+
+
+
|
+ Times Different | +|||||
759 | +helperState.waitBackgroundSweepEnd(); | +7 | +||||
760 | +allocTask.cancel(GCParallelTask::CancelAndWait); | +7 | +||||
791 | +bool isShrinkingGC() const { return invocationKind == GC_SHRINK; } | +11 | +
+
+
+
|
+ Times Different | +|||||
701 | +Arena* getNextAllocDuringSweep() const { | +9 | +||||
702 | +MOZ_ASSERT(allocatedDuringIncremental); | +9 | +||||
703 | + return reinterpret_cast |
+ 9 | +||||
706 | +void setNextAllocDuringSweep(Arena* arena) { | +9 | +||||
707 | +MOZ_ASSERT(!(uintptr_t(arena) & ArenaMask)); | +9 | +||||
708 | +MOZ_ASSERT(!auxNextLink && !allocatedDuringIncremental); | +9 | +||||
709 | +allocatedDuringIncremental = 1; | +9 | +||||
710 | +if (arena) | +9 | +||||
711 | +auxNextLink = arena->address() >> ArenaShift; | +9 | +||||
712 | +} | +9 | +||||
714 | +void unsetAllocDuringSweep() { | +9 | +||||
715 | +MOZ_ASSERT(allocatedDuringIncremental); | +9 | +||||
716 | +allocatedDuringIncremental = 0; | +9 | +||||
717 | +auxNextLink = 0; | +9 | +||||
718 | +} | +9 | +
+
+
+
|
+ Times Different | +|||||
596 | +js::TraceManuallyBarrieredCrossCompartmentEdge(JSTracer* trc, JSObject* src, T* dst, | +6 | +||||
599 | +if (ShouldTraceCrossCompartment(trc, src, *dst)) | +6 | +||||
600 | +DispatchToTracer(trc, dst, name); | +6 | +||||
601 | +} | +6 | +||||
649 | +js::TraceGenericPointerRoot(JSTracer* trc, Cell** thingp, const char* name) | +12 | +||||
651 | +MOZ_ASSERT(thingp); | +12 | +||||
652 | +if (!*thingp) | +12 | +||||
653 | +return; | +12 | +||||
655 | +DispatchTraceKindTyped(f, (*thingp)->getTraceKind(), trc, thingp, name); | +12 | +||||
1202 | +next = &right->asRope(); | +4 | +||||
1222 | +MOZ_ASSERT(savedPos < stack.position()); | +4 | +||||
1223 | +rope = stack.popPtr().asTempRope(); | +4 | +||||
1610 | +if (!markDelayedChildren(budget)) { | +13 | +||||
1611 | +saveValueRanges(); | +10 | +||||
1612 | +return false; | +10 | +||||
1997 | +MarkStack::TaggedPtr::asTempRope() const | +4 | +||||
1999 | +MOZ_ASSERT(tag() == TempRopeTag); | +4 | +||||
2000 | +MOZ_ASSERT(ptr()->asTenured().getTraceKind() == JS::TraceKind::String); | +4 | +||||
2001 | + return static_cast |
+ 4 | +||||
2106 | +return pushTaggedPtr(TempRopeTag, rope); | +4 | +||||
2498 | +GCMarker::markDelayedChildren(Arena* arena) | +13 | +||||
2500 | +if (arena->markOverflow) { | +13 | +||||
2512 | +MOZ_ASSERT(arena->allocatedDuringIncremental); | +13 | +||||
2513 | +PushArena(this, arena); | +13 | +||||
2515 | +arena->allocatedDuringIncremental = 0; | +13 | +||||
2521 | +} | +13 | +||||
2524 | +GCMarker::markDelayedChildren(SliceBudget& budget) | +13 | +||||
2526 | +GCRuntime& gc = runtime()->gc; | +13 | +||||
2527 | +gcstats::AutoPhase ap(gc.stats(), gc.state() == State::Mark, gcstats::PhaseKind::MARK_DELAYED); | +13 | +||||
2529 | +MOZ_ASSERT(unmarkedArenaStackTop); | +13 | +||||
2530 | +do { | +13 | +||||
2536 | +Arena* arena = unmarkedArenaStackTop; | +13 | +||||
2537 | +MOZ_ASSERT(arena->hasDelayedMarking); | +13 | +||||
2538 | +MOZ_ASSERT(markLaterArenas); | +13 | +||||
2539 | +unmarkedArenaStackTop = arena->getNextDelayedMarking(); | +13 | +||||
2540 | +arena->unsetDelayedMarking(); | +13 | +||||
2542 | +markLaterArenas--; | +13 | +||||
2544 | +markDelayedChildren(arena); | +13 | +||||
2546 | +budget.step(150); | +13 | +||||
2547 | +if (budget.isOverBudget()) | +13 | +||||
2549 | +} while (unmarkedArenaStackTop); | +13 | +||||
2550 | +MOZ_ASSERT(!markLaterArenas); | +11 | +||||
2557 | +PushArenaTyped(GCMarker* gcmarker, Arena* arena) | +13 | +||||
2559 | +for (ArenaCellIterUnderGC i(arena); !i.done(); i.next()) | +13 | +||||
2560 | + gcmarker->traverse(i.get |
+ 13 | +||||
2561 | +} | +13 | +||||
2565 | + PushArenaTyped |
+ 13 | +||||
2570 | +gc::PushArena(GCMarker* gcmarker, Arena* arena) | +13 | +||||
2573 | +MapAllocToTraceKind(arena->getAllocKind()), gcmarker, arena); | +13 | +||||
2574 | +} | +13 | +||||
2747 | +jitcode->traceChildren(&mover); | +9 | +||||
2780 | + TraceBufferedCells |
+ 9 | +||||
2781 | +break; | +9 | +
+
+
+
|
+ Times Different | +|||||
248 | +JSObject* tmp = JS_FUNC_TO_DATA_PTR(JSObject*, setter); | +6 | +||||
249 | +TraceRoot(trc, &tmp, "Descriptor::set"); | +6 | +||||
250 | +setter = JS_DATA_TO_FUNC_PTR(JSSetterOp, tmp); | +6 | +
+
+
+
|
+ Times Different | +|||||
771 | +CheckSelfTime(Phase parent, | +4 | +||||
777 | +if (selfTimes[parent] < childTime) { | +4 | +||||
788 | +} | +4 | +||||
791 | +LongestPhaseSelfTime(const Statistics::PhaseTimeTable& times) | +4 | +||||
794 | +Statistics::PhaseTimeTable selfTimes(times); | +4 | +||||
799 | +for (auto i : AllPhases()) { | +4 | +||||
800 | +Phase parent = phases[i].parent; | +4 | +||||
801 | +if (parent != Phase::NONE) { | +4 | +||||
802 | +CheckSelfTime(parent, i, times, selfTimes, times[i]); | +4 | +||||
803 | +selfTimes[parent] -= times[i]; | +4 | +||||
809 | +for (auto i : AllPhaseKinds()) | +4 | +||||
810 | +phaseTimes[i] = SumPhase(i, selfTimes); | +4 | +||||
813 | +TimeDuration longestTime = 0; | +4 | +||||
814 | +PhaseKind longestPhase = PhaseKind::NONE; | +4 | +||||
815 | +for (auto i : AllPhaseKinds()) { | +4 | +||||
816 | +if (phaseTimes[i] > longestTime) { | +4 | +||||
817 | +longestTime = phaseTimes[i]; | +4 | +||||
818 | +longestPhase = i; | +4 | +||||
822 | +return longestPhase; | +4 | +||||
975 | +reportLongestPhase(slice.phaseTimes, JS_TELEMETRY_GC_SLOW_PHASE); | +4 | +||||
978 | +TimeDuration joinTime = SumPhase(PhaseKind::JOIN_PARALLEL_TASKS, slice.phaseTimes); | +4 | +||||
979 | +if (joinTime.ToMilliseconds() > budget_ms) | +4 | +||||
980 | +reportLongestPhase(slice.parallelTimes, JS_TELEMETRY_GC_SLOW_TASK); | +4 | +||||
1022 | +Statistics::reportLongestPhase(const PhaseTimeTable& times, int telemetryId) | +4 | +||||
1024 | +PhaseKind longest = LongestPhaseSelfTime(times); | +4 | +||||
1025 | +if (longest == PhaseKind::NONE) | +4 | +||||
1026 | +return; | +4 | +||||
1028 | +uint8_t bucket = phaseKinds[longest].telemetryBucket; | +4 | +||||
1029 | +runtime->addTelemetry(telemetryId, bucket); | +4 | +
+
+
+
|
+ Times Different | +|||||
404 | +: stats(stats), phaseKind(phaseKind), enabled(condition) | +13 | +||||
406 | +if (enabled) | +13 | +||||
407 | +stats.beginPhase(phaseKind); | +13 | +||||
411 | +if (enabled) | +13 | +
+
+
+
|
+ Times Different | +|||||
141 | +zone->group()->storeBuffer().setAboutToOverflow(); | +10 | +
+
+
+
|
+ Times Different | +|||||
138 | +MOZ_ASSERT(isGCSweepingOrCompacting()); | +6 | +||||
139 | + for (auto iter = cellIter |
+ 6 | +||||
140 | +JSScript* script = iter; | +6 | +||||
141 | +if (!script->hasAnyBreakpointsOrStepMode()) | +6 | +||||
142 | +continue; | +6 | +||||
319 | +if (!r.front()->debuggeeIsBeingCollected(rt->gc.majorGCCount())) { | +4 | +
+
+
+
|
+ Times Different | +|||||
1835 | +interpreted_assembler.emplace(cx, &alloc, shared, (data->capture_count + 1) * 2); | +6 | +||||
1836 | +assembler = interpreted_assembler.ptr(); | +6 | +||||
4172 | +if (preload_characters > 1) | +6 | +||||
4173 | +preload_characters = 1; | +6 | +
+
+
+
|
+ Times Different | +|||||
45 | +class MOZ_STACK_CLASS RegExpStackCursor | +6 | +||||
49 | +: cx(cx), cursor(nullptr) | +6 | +||||
52 | +bool init() { | +6 | +||||
53 | +if (!stack.init()) { | +6 | +||||
57 | +cursor = base(); | +6 | +||||
58 | +return true; | +6 | +||||
61 | +bool push(int32_t value) { | +6 | +||||
62 | +*cursor++ = value; | +6 | +||||
63 | +if (cursor >= stack.limit()) { | +6 | +||||
74 | +int32_t pop() { | +6 | +||||
75 | +MOZ_ASSERT(cursor > base()); | +6 | +||||
76 | +return *--cursor; | +6 | +||||
100 | +int32_t* base() { return (int32_t*) stack.base(); } | +6 | +||||
104 | +Load32Aligned(const uint8_t* pc) | +6 | +||||
106 | + MOZ_ASSERT((reinterpret_cast |
+ 6 | +||||
107 | + return *reinterpret_cast |
+ 6 | +||||
121 | +irregexp::InterpretCode(JSContext* cx, const uint8_t* byteCode, const CharT* chars, size_t current, | +6 | +||||
124 | +const uint8_t* pc = byteCode; | +6 | +||||
126 | +uint32_t current_char = current ? chars[current - 1] : '\n'; | +6 | +||||
130 | +if (!stack.init()) | +6 | +||||
133 | +int32_t numRegisters = Load32Aligned(pc); | +6 | +||||
134 | +pc += 4; | +6 | +||||
136 | + Vector |
+ 6 | +||||
137 | +if (!registers.growByUninitialized(numRegisters)) { | +6 | +||||
141 | +for (size_t i = 0; i < (size_t) numRegisters; i++) | +6 | +||||
142 | +registers[i] = -1; | +6 | +||||
145 | +int32_t insn = Load32Aligned(pc); | +6 | +||||
146 | +switch (insn & BYTECODE_MASK) { | +6 | +||||
155 | +if (!stack.push(Load32Aligned(pc + 4))) | +6 | +||||
157 | +pc += BC_PUSH_BT_LENGTH; | +6 | +||||
158 | +break; | +6 | +||||
193 | +if (!CheckForInterrupt(cx)) | +6 | +||||
195 | +pc = byteCode + stack.pop(); | +6 | +||||
196 | +break; | +6 | +||||
210 | +current += insn >> BYTECODE_SHIFT; | +2 | +||||
211 | +pc += BC_ADVANCE_CP_LENGTH; | +2 | +||||
212 | +break; | +2 | +||||
217 | +current += insn >> BYTECODE_SHIFT; | +3 | +||||
218 | +pc = byteCode + Load32Aligned(pc + 4); | +3 | +||||
219 | +break; | +3 | +||||
229 | +size_t pos = current + (insn >> BYTECODE_SHIFT); | +6 | +||||
230 | +if (pos >= length) { | +6 | +||||
231 | +pc = byteCode + Load32Aligned(pc + 4); | +5 | +||||
233 | +current_char = chars[pos]; | +6 | +||||
234 | +pc += BC_LOAD_CURRENT_CHAR_LENGTH; | +6 | +||||
275 | +uint32_t c = (insn >> BYTECODE_SHIFT); | +6 | +||||
276 | +if (c == current_char) | +6 | +||||
279 | +pc += BC_CHECK_CHAR_LENGTH; | +6 | +||||
291 | +uint32_t c = (insn >> BYTECODE_SHIFT); | +8 | +||||
292 | +if (c != current_char) | +8 | +||||
293 | +pc = byteCode + Load32Aligned(pc + 4); | +8 | +||||
295 | +pc += BC_CHECK_NOT_CHAR_LENGTH; | +2 | +||||
359 | +int mask = RegExpMacroAssembler::kTableMask; | +3 | +||||
360 | +uint8_t b = pc[8 + ((current_char & mask) >> kBitsPerByteLog2)]; | +3 | +||||
361 | +int bit = (current_char & (kBitsPerByte - 1)); | +3 | +||||
362 | +if ((b & (1 << bit)) != 0) | +3 | +||||
365 | +pc += BC_CHECK_BIT_IN_TABLE_LENGTH; | +3 | +||||
479 | +if (current == 0) | +8 | +||||
480 | +pc += BC_CHECK_NOT_AT_START_LENGTH; | +8 | +
+
+
+
|
+ Times Different | +|||||
100 | +InterpretedRegExpMacroAssembler::InterpretedRegExpMacroAssembler(JSContext* cx, LifoAlloc* alloc, | +6 | +||||
109 | +length_(0) | +6 | +||||
112 | +Emit32(0); | +6 | +||||
113 | +} | +6 | +||||
115 | +InterpretedRegExpMacroAssembler::~InterpretedRegExpMacroAssembler() | +6 | +||||
117 | +js_free(buffer_); | +6 | +||||
118 | +} | +6 | +||||
121 | +InterpretedRegExpMacroAssembler::GenerateCode(JSContext* cx, bool match_only) | +6 | +||||
123 | +Bind(&backtrack_); | +6 | +||||
127 | +*(int32_t*)buffer_ = num_registers_; | +6 | +||||
130 | +res.byteCode = buffer_; | +6 | +||||
131 | +buffer_ = nullptr; | +6 | +||||
132 | +return res; | +6 | +||||
136 | +InterpretedRegExpMacroAssembler::AdvanceCurrentPosition(int by) | +6 | +||||
138 | +MOZ_ASSERT(by >= kMinCPOffset); | +6 | +||||
139 | +MOZ_ASSERT(by <= kMaxCPOffset); | +6 | +||||
140 | +advance_current_start_ = pc_; | +6 | +||||
141 | +advance_current_offset_ = by; | +6 | +||||
142 | +Emit(BC_ADVANCE_CP, by); | +6 | +||||
143 | +advance_current_end_ = pc_; | +6 | +||||
144 | +} | +6 | +||||
155 | +InterpretedRegExpMacroAssembler::Backtrack() | +8 | +||||
158 | +} | +8 | +||||
161 | +InterpretedRegExpMacroAssembler::Bind(jit::Label* label) | +6 | +||||
163 | +advance_current_end_ = kInvalidPC; | +6 | +||||
164 | +MOZ_ASSERT(!label->bound()); | +6 | +||||
165 | +if (label->used()) { | +6 | +||||
166 | +int pos = label->offset(); | +6 | +||||
167 | +while (pos != jit::Label::INVALID_OFFSET) { | +6 | +||||
168 | +int fixup = pos; | +6 | +||||
169 | + pos = *reinterpret_cast |
+ 6 | +||||
170 | + *reinterpret_cast |
+ 6 | +||||
173 | +label->bind(pc_); | +6 | +||||
174 | +} | +6 | +||||
184 | +InterpretedRegExpMacroAssembler::CheckCharacter(unsigned c, jit::Label* on_equal) | +6 | +||||
186 | +if (c > MAX_FIRST_ARG) { | +6 | +||||
192 | +EmitOrLink(on_equal); | +6 | +||||
193 | +} | +6 | +||||
196 | +InterpretedRegExpMacroAssembler::CheckCharacterAfterAnd(unsigned c, unsigned and_with, jit::Label* on_equal) | +1 | +||||
198 | +if (c > MAX_FIRST_ARG) { | +1 | +||||
204 | +Emit32(and_with); | +1 | +||||
205 | +EmitOrLink(on_equal); | +1 | +||||
206 | +} | +1 | +||||
209 | +InterpretedRegExpMacroAssembler::CheckCharacterGT(char16_t limit, jit::Label* on_greater) | +2 | +||||
211 | +Emit(BC_CHECK_GT, limit); | +2 | +||||
212 | +EmitOrLink(on_greater); | +2 | +||||
213 | +} | +2 | +||||
216 | +InterpretedRegExpMacroAssembler::CheckCharacterLT(char16_t limit, jit::Label* on_less) | +2 | +||||
218 | +Emit(BC_CHECK_LT, limit); | +2 | +||||
219 | +EmitOrLink(on_less); | +2 | +||||
220 | +} | +2 | +||||
223 | +InterpretedRegExpMacroAssembler::CheckGreedyLoop(jit::Label* on_tos_equals_current_position) | +2 | +||||
226 | +EmitOrLink(on_tos_equals_current_position); | +2 | +||||
227 | +} | +2 | +||||
230 | +InterpretedRegExpMacroAssembler::CheckNotAtStart(jit::Label* on_not_at_start) | +6 | +||||
233 | +EmitOrLink(on_not_at_start); | +6 | +||||
234 | +} | +6 | +||||
260 | +InterpretedRegExpMacroAssembler::CheckNotCharacter(unsigned c, jit::Label* on_not_equal) | +6 | +||||
262 | +if (c > MAX_FIRST_ARG) { | +6 | +||||
268 | +EmitOrLink(on_not_equal); | +6 | +||||
269 | +} | +6 | +||||
316 | +InterpretedRegExpMacroAssembler::CheckBitInTable(uint8_t* table, jit::Label* on_bit_set) | +5 | +||||
321 | +EmitOrLink(on_bit_set); | +5 | +||||
322 | +for (int i = 0; i < kTableSize; i += kBitsPerByte) { | +5 | +||||
324 | +for (int j = 0; j < kBitsPerByte; j++) { | +5 | +||||
325 | +if (table[i + j] != 0) | +5 | +||||
326 | +byte |= 1 << j; | +5 | +||||
328 | +Emit8(byte); | +5 | +||||
330 | +} | +5 | +||||
333 | +InterpretedRegExpMacroAssembler::JumpOrBacktrack(jit::Label* to) | +6 | +||||
335 | +if (advance_current_end_ == pc_) { | +6 | +||||
337 | +pc_ = advance_current_start_; | +5 | +||||
338 | +Emit(BC_ADVANCE_CP_AND_GOTO, advance_current_offset_); | +5 | +||||
339 | +EmitOrLink(to); | +5 | +||||
340 | +advance_current_end_ = kInvalidPC; | +5 | +||||
344 | +EmitOrLink(to); | +6 | +||||
346 | +} | +6 | +||||
349 | +InterpretedRegExpMacroAssembler::Fail() | +6 | +||||
352 | +} | +6 | +||||
381 | +InterpretedRegExpMacroAssembler::LoadCurrentCharacter(int cp_offset, jit::Label* on_end_of_input, | +6 | +||||
384 | +MOZ_ASSERT(cp_offset >= kMinCPOffset); | +6 | +||||
385 | +MOZ_ASSERT(cp_offset <= kMaxCPOffset); | +6 | +||||
387 | +if (check_bounds) { | +6 | +||||
388 | +if (characters == 4) { | +6 | +||||
390 | +} else if (characters == 2) { | +6 | +||||
393 | +MOZ_ASSERT(characters == 1); | +6 | +||||
397 | +if (characters == 4) { | +6 | +||||
399 | +} else if (characters == 2) { | +6 | +||||
402 | +MOZ_ASSERT(characters == 1); | +6 | +||||
406 | +Emit(bytecode, cp_offset); | +6 | +||||
407 | +if (check_bounds) | +6 | +||||
408 | +EmitOrLink(on_end_of_input); | +6 | +||||
409 | +} | +6 | +||||
412 | +InterpretedRegExpMacroAssembler::PopCurrentPosition() | +6 | +||||
415 | +} | +6 | +||||
425 | +InterpretedRegExpMacroAssembler::PushCurrentPosition() | +6 | +||||
428 | +} | +6 | +||||
459 | +InterpretedRegExpMacroAssembler::SetRegister(int reg, int to) | +6 | +||||
461 | +checkRegister(reg); | +6 | +||||
462 | +Emit(BC_SET_REGISTER, reg); | +6 | +||||
463 | +Emit32(to); | +6 | +||||
464 | +} | +6 | +||||
467 | +InterpretedRegExpMacroAssembler::Succeed() | +6 | +||||
472 | +return false; | +6 | +||||
476 | +InterpretedRegExpMacroAssembler::WriteCurrentPositionToRegister(int reg, int cp_offset) | +6 | +||||
478 | +checkRegister(reg); | +6 | +||||
479 | +Emit(BC_SET_REGISTER_TO_CP, reg); | +6 | +||||
480 | +Emit32(cp_offset); // Current position offset. | +6 | +||||
481 | +} | +6 | +||||
484 | +InterpretedRegExpMacroAssembler::ClearRegisters(int reg_from, int reg_to) | +6 | +||||
486 | +MOZ_ASSERT(reg_from <= reg_to); | +6 | +||||
487 | +for (int reg = reg_from; reg <= reg_to; reg++) | +6 | +||||
488 | +SetRegister(reg, -1); | +6 | +||||
489 | +} | +6 | +||||
499 | +InterpretedRegExpMacroAssembler::PushBacktrack(jit::Label* label) | +6 | +||||
502 | +EmitOrLink(label); | +6 | +||||
503 | +} | +6 | +||||
506 | +InterpretedRegExpMacroAssembler::BindBacktrack(jit::Label* label) | +6 | +||||
508 | +Bind(label); | +6 | +||||
509 | +} | +6 | +||||
512 | +InterpretedRegExpMacroAssembler::EmitOrLink(jit::Label* label) | +6 | +||||
514 | +if (label == nullptr) | +6 | +||||
515 | +label = &backtrack_; | +6 | +||||
516 | +if (label->bound()) { | +6 | +||||
517 | +Emit32(label->offset()); | +6 | +||||
519 | +int pos = label->use(pc_); | +6 | +||||
520 | +Emit32(pos); | +6 | +||||
522 | +} | +6 | +||||
527 | +uint32_t word = ((twenty_four_bits << BYTECODE_SHIFT) | byte); | +6 | +||||
528 | +Emit32(word); | +6 | +||||
532 | +InterpretedRegExpMacroAssembler::Emit32(uint32_t word) | +6 | +||||
534 | +MOZ_ASSERT(pc_ <= length_); | +6 | +||||
535 | +if (pc_ + 3 >= length_) | +6 | +||||
536 | +Expand(); | +6 | +||||
537 | + *reinterpret_cast |
+ 6 | +||||
538 | +pc_ += 4; | +6 | +||||
539 | +} | +6 | +||||
552 | +InterpretedRegExpMacroAssembler::Emit8(uint32_t word) | +5 | +||||
554 | +MOZ_ASSERT(pc_ <= length_); | +5 | +||||
555 | +if (pc_ == length_) | +5 | +||||
557 | + *reinterpret_cast |
+ 5 | +||||
558 | +pc_ += 1; | +5 | +||||
559 | +} | +5 | +||||
562 | +InterpretedRegExpMacroAssembler::Expand() | +6 | +||||
564 | +AutoEnterOOMUnsafeRegion oomUnsafe; | +6 | +||||
566 | +int newLength = Max(100, length_ * 2); | +6 | +||||
567 | +if (newLength < length_ + 4) | +6 | +||||
570 | +buffer_ = (uint8_t*) js_realloc(buffer_, newLength); | +6 | +||||
571 | +if (!buffer_) | +6 | +||||
573 | +length_ = newLength; | +6 | +||||
574 | +} | +6 | +
+
+
+
|
+ Times Different | +|||||
91 | +virtual bool CanReadUnaligned() { return false; } | +6 | +||||
145 | +virtual void CheckPosition(int cp_offset, jit::Label* on_outside_input) { | +6 | +||||
146 | +LoadCurrentCharacter(cp_offset, on_outside_input, true); | +6 | +||||
147 | +} | +6 | +||||
285 | +int stack_limit_slack() { return 1; } | +6 | +
+
+
+
|
+ Times Different | +|||||
483 | +if (ins->getTemp(i)->policy() == LDefinition::MUST_REUSE_INPUT && | +2 | +||||
484 | +ins->getOperand(ins->getTemp(i)->getReusedInput())->toUse() == use) | +2 | +||||
948 | +ins->getOperand(def->getReusedInput()) == alloc) | +2 | +||||
949 | +return def; | +2 | +||||
975 | +MOZ_ASSERT(def.isTemp()); | +2 | +||||
976 | +def.setMustCopyInput(); | +2 | +||||
977 | +return true; | +2 | +
+
+
+
|
+ Times Different | +|||||
675 | +BaselineCacheIRCompiler::emitCallProxyHasOwnResult() | +4 | +||||
677 | +Register obj = allocator.useRegister(masm, reader.objOperandId()); | +4 | +||||
678 | +ValueOperand idVal = allocator.useValueRegister(masm, reader.valOperandId()); | +4 | +||||
680 | +AutoScratchRegister scratch(allocator, masm); | +4 | +||||
682 | +allocator.discardStack(masm); | +4 | +||||
684 | +AutoStubFrame stubFrame(*this); | +4 | +||||
685 | +stubFrame.enter(masm, scratch); | +4 | +||||
687 | +masm.Push(idVal); | +4 | +||||
688 | +masm.Push(obj); | +4 | +||||
690 | +if (!callVM(masm, ProxyHasOwnInfo)) | +4 | +||||
693 | +stubFrame.leave(masm); | +4 | +||||
694 | +return true; | +4 | +
+
+
+
|
+ Times Different | +|||||
2481 | +frame.push(cx->runtime()->positiveInfinityValue); | +6 | +||||
2482 | +return true; | +6 | +||||
4878 | +MOZ_ASSERT(resumeKind == GeneratorObject::THROW || resumeKind == GeneratorObject::CLOSE); | +10 | +||||
4882 | +scratch2); | +10 | +||||
4883 | +masm.movePtr(scratch2, scratch1); | +10 | +||||
4884 | +masm.subStackPtrFrom(scratch2); | +10 | +||||
4885 | +masm.store32(scratch2, Address(BaselineFrameReg, BaselineFrame::reverseOffsetOfFrameSize())); | +10 | +||||
4886 | +masm.loadBaselineFramePtr(BaselineFrameReg, scratch2); | +10 | +||||
4888 | +prepareVMCall(); | +10 | +||||
4889 | +pushArg(Imm32(resumeKind)); | +10 | +||||
4890 | +pushArg(retVal); | +10 | +||||
4891 | +pushArg(genObj); | +10 | +||||
4892 | +pushArg(scratch2); | +10 | +||||
4894 | +JitCode* code = cx->runtime()->jitRuntime()->getVMWrapper(GeneratorThrowInfo); | +10 | +||||
4895 | +if (!code) | +10 | +||||
4899 | +masm.subStackPtrFrom(scratch1); | +10 | +||||
4900 | +masm.makeFrameDescriptor(scratch1, JitFrame_BaselineJS, ExitFrameLayout::Size()); | +10 | +||||
4905 | +masm.push(scratch1); | +10 | +||||
4909 | +masm.push(ImmWord(0)); | +10 | +||||
4911 | +masm.jump(code); | +10 | +||||
4920 | +} else if (resumeKind == GeneratorObject::THROW) { | +10 | +||||
4921 | +pushArg(ImmGCPtr(cx->names().throw_)); | +10 | +
+
+
+
|
+ Times Different | +|||||
187 | +CollectJitStackScripts(JSContext* cx, const Debugger::ExecutionObservableSet& obs, | +6 | +||||
190 | +ICStub* prevFrameStubPtr = nullptr; | +6 | +||||
191 | +bool needsRecompileHandler = false; | +6 | +||||
192 | +for (JitFrameIterator iter(activation); !iter.done(); ++iter) { | +6 | +||||
193 | +switch (iter.type()) { | +6 | +||||
195 | +JSScript* script = iter.script(); | +6 | +||||
197 | +if (!obs.shouldRecompileOrInvalidate(script)) { | +6 | +||||
241 | + reinterpret_cast |
+ 6 | +||||
242 | +break; | +6 | +||||
264 | +if (needsRecompileHandler) { | +6 | +||||
850 | +if (!CollectJitStackScripts(cx, obs, iter, entries)) | +6 | +
+
+
+
|
+ Times Different | +|||||
49 | +TraceRoot(trc, returnValue().address(), "baseline-rval"); | +2 | +||||
55 | +TraceRoot(trc, &argsObj_, "baseline-args-obj"); | +6 | +
+
+
+
|
+ Times Different | +|||||
353 | +jsbytecode* overridePc() const { | +10 | +||||
354 | +MOZ_ASSERT(hasOverridePc()); | +10 | +||||
355 | +return script()->offsetToPC(overrideOffset_); | +10 | +||||
360 | +return overridePc(); | +10 | +
+
+
+
|
+ Times Different | +|||||
553 | +return extra_ & (1u << UNOPTIMIZABLE_ACCESS_BIT); | +4 | +
+
+
+
|
+ Times Different | +|||||
926 | +size_t offset = reader.stubOffset(); | +4 | +||||
928 | + &stub->stubInfo()->getStubField |
+ 4 | +||||
930 | +Shape* thisGlobalShape = nullptr; | +4 | +||||
931 | +if (getter->isNative() && receiver.shape && | +4 | +||||
937 | +if (*commonGetter && | +4 | +||||
938 | +(*isOwnProperty || *globalShape != thisGlobalShape || *holderShape != objShape)) | +4 | +||||
943 | +MOZ_ASSERT_IF(*commonGetter, *commonGetter == getter); | +4 | +||||
945 | + if (obj->as |
+ 4 | +||||
950 | +if (!AddReceiver(receiver, receivers, convertUnboxedGroups)) | +4 | +||||
953 | +*holder = obj; | +4 | +||||
954 | +*holderShape = objShape; | +4 | +||||
955 | +*commonGetter = getter; | +4 | +||||
956 | +*isOwnProperty = false; | +4 | +||||
957 | +return true; | +4 | +||||
991 | +} else if (stub->isGetName_Fallback()) { | +4 | +||||
992 | +if (stub->toGetName_Fallback()->hadUnoptimizableAccess()) | +4 | +
+
+
+
|
+ Times Different | +|||||
1340 | +JSRope* rope = &str->asRope(); | +4 | +||||
1343 | +if (size_t(index) >= rope->leftChild()->length()) | +4 | +||||
1346 | +str = rope->leftChild(); | +4 | +
+
+
+
|
+ Times Different | +|||||
2584 | +MOZ_ASSERT(info.fun->allowSuperProperty() || info.fun->isSelfHostedBuiltin() || | +2 | +||||
2587 | +masm.storeValue(UndefinedValue(), Address(output, FunctionExtended::offsetOfExtendedSlot(0))); | +2 | +||||
2588 | +masm.storeValue(UndefinedValue(), Address(output, FunctionExtended::offsetOfExtendedSlot(1))); | +2 | +||||
2818 | +CodeGenerator::visitTableSwitch(LTableSwitch* ins) | +2 | +||||
2820 | +MTableSwitch* mir = ins->mir(); | +2 | +||||
2821 | +Label* defaultcase = skipTrivialBlocks(mir->getDefault())->lir()->label(); | +2 | +||||
2824 | +if (mir->getOperand(0)->type() != MIRType::Int32) { | +2 | +||||
2831 | +temp = ins->index(); | +2 | +||||
2834 | +emitTableSwitchDispatch(mir, ToRegister(temp), ToRegisterOrInvalid(ins->tempPointer())); | +2 | +||||
2835 | +} | +2 | +||||
2892 | +CodeGenerator::visitIsConstructing(LIsConstructing* lir) | +2 | +||||
2894 | +Register output = ToRegister(lir->output()); | +2 | +||||
2895 | +Address calleeToken(masm.getStackPointer(), frameSize() + JitFrameLayout::offsetOfCalleeToken()); | +2 | +||||
2896 | +masm.loadPtr(calleeToken, output); | +2 | +||||
2899 | +MOZ_ASSERT(current->mir()->info().script()->functionNonDelazifying()); | +2 | +||||
2905 | +masm.andPtr(Imm32(0x1), output); | +2 | +||||
2906 | +} | +2 | +||||
3294 | +CodeGenerator::emitSetPropertyPolymorphic(LInstruction* ins, Register obj, Register scratch, | +2 | +||||
3297 | +MSetPropertyPolymorphic* mir = ins->mirRaw()->toSetPropertyPolymorphic(); | +2 | +||||
3300 | +for (size_t i = 0; i < mir->numReceivers(); i++) { | +2 | +||||
3301 | +ReceiverGuard receiver = mir->receiver(i); | +2 | +||||
3304 | +GuardReceiver(masm, receiver, obj, scratch, &next, /* checkNullExpando = */ false); | +2 | +||||
3306 | +if (receiver.shape) { | +2 | +||||
3309 | +Register target = receiver.group ? scratch : obj; | +2 | +||||
3311 | +Shape* shape = mir->shape(i); | +2 | +||||
3312 | +if (shape->slot() < shape->numFixedSlots()) { | +2 | +||||
3314 | +Address addr(target, NativeObject::getFixedSlotOffset(shape->slot())); | +2 | +||||
3315 | +if (mir->needsBarrier()) | +2 | +||||
3316 | +emitPreBarrier(addr); | +2 | +||||
3317 | +masm.storeConstantOrRegister(value, addr); | +2 | +||||
3335 | +if (i == mir->numReceivers() - 1) { | +2 | +||||
3336 | +bailoutFrom(&next, ins->snapshot()); | +2 | +||||
3338 | +masm.jump(&done); | +2 | +||||
3339 | +masm.bind(&next); | +2 | +||||
3341 | +} | +2 | +||||
3343 | +masm.bind(&done); | +2 | +||||
3344 | +} | +2 | +||||
3356 | +CodeGenerator::visitSetPropertyPolymorphicT(LSetPropertyPolymorphicT* ins) | +2 | +||||
3358 | +Register obj = ToRegister(ins->obj()); | +2 | +||||
3359 | +Register temp = ToRegister(ins->temp()); | +2 | +||||
3362 | +if (ins->mir()->value()->isConstant()) | +2 | +||||
3365 | +value = TypedOrValueRegister(ins->mir()->value()->type(), ToAnyRegister(ins->value())); | +2 | +||||
3367 | +emitSetPropertyPolymorphic(ins, obj, temp, value); | +2 | +||||
3368 | +} | +2 | +||||
4469 | +CodeGenerator::emitPushArguments(LApplyArrayGeneric* apply, Register extraStackSpace) | +2 | +||||
4471 | +Label noCopy, epilogue; | +2 | +||||
4472 | +Register tmpArgc = ToRegister(apply->getTempObject()); | +2 | +||||
4473 | +Register elementsAndArgc = ToRegister(apply->getElements()); | +2 | +||||
4480 | +Address length(ToRegister(apply->getElements()), ObjectElements::offsetOfLength()); | +2 | +||||
4481 | +masm.load32(length, tmpArgc); | +2 | +||||
4484 | +emitAllocateSpaceForApply(tmpArgc, extraStackSpace, &noCopy); | +2 | +||||
4488 | +size_t argvDstOffset = 0; | +2 | +||||
4490 | +Register argvSrcBase = elementsAndArgc; // Elements value | +2 | +||||
4492 | +masm.push(extraStackSpace); | +2 | +||||
4493 | +Register copyreg = extraStackSpace; | +2 | +||||
4494 | +argvDstOffset += sizeof(void*); | +2 | +||||
4496 | +masm.push(tmpArgc); | +2 | +||||
4497 | +Register argvIndex = tmpArgc; | +2 | +||||
4498 | +argvDstOffset += sizeof(void*); | +2 | +||||
4501 | +emitCopyValuesForApply(argvSrcBase, argvIndex, copyreg, 0, argvDstOffset); | +2 | +||||
4504 | +masm.pop(elementsAndArgc); | +2 | +||||
4505 | +masm.pop(extraStackSpace); | +2 | +||||
4506 | +masm.jump(&epilogue); | +2 | +||||
4509 | +masm.bind(&noCopy); | +2 | +||||
4510 | +masm.movePtr(ImmPtr(0), elementsAndArgc); | +2 | +||||
4514 | +masm.bind(&epilogue); | +2 | +||||
4517 | +masm.addPtr(Imm32(sizeof(Value)), extraStackSpace); | +2 | +||||
4518 | +masm.pushValue(ToValue(apply, LApplyArgsGeneric::ThisIndex)); | +2 | +||||
4519 | +} | +2 | +||||
4538 | +masm.loadObjClass(calleereg, objreg); | +2 | +||||
4540 | +ImmPtr ptr = ImmPtr(&JSFunction::class_); | +2 | +||||
4541 | +bailoutCmpPtr(Assembler::NotEqual, objreg, ptr, apply->snapshot()); | +2 | +||||
4596 | +Register nformals = extraStackSpace; | +2 | +||||
4597 | +masm.load16ZeroExtend(Address(calleereg, JSFunction::offsetOfNargs()), nformals); | +2 | +||||
4598 | +masm.branch32(Assembler::Below, argcreg, nformals, &underflow); | +2 | +||||
4668 | +CodeGenerator::visitApplyArrayGeneric(LApplyArrayGeneric* apply) | +2 | +||||
4670 | +LSnapshot* snapshot = apply->snapshot(); | +2 | +||||
4671 | +Register tmp = ToRegister(apply->getTempObject()); | +2 | +||||
4673 | +Address length(ToRegister(apply->getElements()), ObjectElements::offsetOfLength()); | +2 | +||||
4674 | +masm.load32(length, tmp); | +2 | +||||
4678 | +uint32_t limit = 3000 / sizeof(Value); | +2 | +||||
4679 | +bailoutCmp32(Assembler::Above, tmp, Imm32(limit), snapshot); | +2 | +||||
4684 | +ObjectElements::offsetOfInitializedLength()); | +2 | +||||
4685 | +masm.sub32(initializedLength, tmp); | +2 | +||||
4686 | +bailoutCmp32(Assembler::NotEqual, tmp, Imm32(0), snapshot); | +2 | +||||
4688 | +emitApplyGeneric(apply); | +2 | +||||
4689 | +} | +2 | +||||
7241 | +label1.emplace(); | +2 | +||||
7242 | +label2.emplace(); | +2 | +||||
7243 | +nullOrLikeUndefined = label1.ptr(); | +2 | +||||
7244 | +notNullOrLikeUndefined = label2.ptr(); | +2 | +||||
7304 | +ifTrue = lir->ifTrue(); | +2 | +||||
7305 | +ifFalse = lir->ifFalse(); | +2 | +||||
7332 | +masm.branchTestUndefined(Assembler::Equal, tag, ifTrueLabel); | +2 | +||||
7351 | +testNullEmitBranch(cond, value, lir->ifTrue(), lir->ifFalse()); | +2 | +||||
8356 | +bailoutCmp32(Assembler::BelowOrEqual, ToAddress(length), Imm32(idx), snapshot); | +2 | +||||
8386 | +bailoutCmp32(Assembler::BelowOrEqual, ToAddress(length), Imm32(nmax), snapshot); | +2 | +||||
11152 | +masm.storeToTypedIntArray(writeType, Imm32(ToInt32(value)), dest); | +2 | +||||
11399 | +CodeGenerator::visitInstanceOfV(LInstanceOfV* ins) | +2 | +||||
11401 | +emitInstanceOf(ins, ins->mir()->prototypeObject()); | +2 | +||||
11402 | +} | +2 | +||||
11416 | +CodeGenerator::emitInstanceOf(LInstruction* ins, JSObject* prototypeObject) | +2 | +||||
11422 | +Register output = ToRegister(ins->getDef(0)); | +2 | +||||
11426 | +if (ins->isInstanceOfV()) { | +2 | +||||
11428 | +ValueOperand lhsValue = ToValue(ins, LInstanceOfV::LHS); | +2 | +||||
11429 | +masm.branchTestObject(Assembler::Equal, lhsValue, &isObject); | +2 | +||||
11430 | +masm.mov(ImmWord(0), output); | +2 | +||||
11431 | +masm.jump(&done); | +2 | +||||
11432 | +masm.bind(&isObject); | +2 | +||||
11433 | +objReg = masm.extractObject(lhsValue, output); | +2 | +||||
11443 | +masm.loadObjProto(objReg, output); | +2 | +||||
11445 | +Label testLazy; | +2 | +||||
11448 | +masm.bind(&loopPrototypeChain); | +2 | +||||
11451 | +Label notPrototypeObject; | +2 | +||||
11452 | +masm.branchPtr(Assembler::NotEqual, output, ImmGCPtr(prototypeObject), ¬PrototypeObject); | +2 | +||||
11453 | +masm.mov(ImmWord(1), output); | +2 | +||||
11454 | +masm.jump(&done); | +2 | +||||
11455 | +masm.bind(¬PrototypeObject); | +2 | +||||
11457 | +MOZ_ASSERT(uintptr_t(TaggedProto::LazyProto) == 1); | +2 | +||||
11460 | +masm.branchPtr(Assembler::BelowOrEqual, output, ImmWord(1), &testLazy); | +2 | +||||
11463 | +masm.loadObjProto(output, output); | +2 | +||||
11465 | +masm.jump(&loopPrototypeChain); | +2 | +||||
11475 | +ArgList(ImmGCPtr(prototypeObject), objReg), | +2 | +||||
11476 | +StoreRegisterTo(output)); | +2 | +||||
11479 | +Label regenerate, *lazyEntry; | +2 | +||||
11480 | +if (objReg != output) { | +2 | +||||
11483 | +masm.bind(®enerate); | +2 | +||||
11484 | +lazyEntry = ®enerate; | +2 | +||||
11485 | +if (ins->isInstanceOfV()) { | +2 | +||||
11486 | +ValueOperand lhsValue = ToValue(ins, LInstanceOfV::LHS); | +2 | +||||
11487 | +objReg = masm.extractObject(lhsValue, output); | +2 | +||||
11491 | +MOZ_ASSERT(objReg == output); | +2 | +||||
11492 | +masm.jump(ool->entry()); | +2 | +||||
11495 | +masm.bind(&testLazy); | +2 | +||||
11496 | +masm.branchPtr(Assembler::Equal, output, ImmWord(1), lazyEntry); | +2 | +||||
11498 | +masm.bind(&done); | +2 | +||||
11499 | +masm.bind(ool->rejoin()); | +2 | +||||
11500 | +} | +2 | +
+
+
+
|
+ Times Different | +|||||
76 | +void setInvalid() { invalid_ = true; } | +6 | +
+
+
+
|
+ Times Different | +|||||
1044 | +ionScript->trace(zone->barrierTracer()); | +2 | +||||
1257 | +IonICEntry& entry = sharedStubList()[i]; | +6 | +||||
1258 | +if (!entry.hasStub()) | +6 | +||||
1261 | +ICStub* lastStub = entry.firstStub(); | +6 | +||||
1262 | +while (lastStub->next()) | +6 | +||||
1265 | +if (lastStub->isFallback()) { | +6 | +||||
1267 | +ICStub* stub = entry.firstStub(); | +6 | +||||
1268 | +ICStub* prev = nullptr; | +6 | +||||
1270 | +while (stub->next()) { | +6 | +||||
1281 | +lastStub->toFallbackStub()->setInvalid(); | +6 | +||||
1283 | +if (lastStub->isMonitoredFallback()) { | +6 | +||||
1302 | +IonICEntry& entry = sharedStubList()[i]; | +6 | +||||
1303 | +if (!entry.hasStub()) | +6 | +||||
1306 | +ICStub* stub = entry.firstStub(); | +6 | +||||
1307 | +while (stub->next()) { | +6 | +||||
1471 | +return false; | +8 | +||||
1482 | +return false; | +8 | +||||
1493 | +return false; | +10 | +||||
1542 | +return false; | +2 | +||||
3109 | +ionCode->traceChildren(zone->barrierTracer()); | +6 | +
+
+
+
|
+ Times Different | +|||||
445 | +shouldBailout = false; | +2 | +||||
1710 | +v = MagicValue(JS_UNINITIALIZED_LEXICAL); | +9 | +||||
1711 | +break; | +9 | +||||
4232 | +AbortReason reason = buildResult.unwrapErr(); | +2 | +||||
4233 | +if (cx->isThrowingOverRecursed() || cx->isThrowingOutOfMemory()) | +2 | +||||
4235 | +if (reason == AbortReason::Alloc) { | +2 | +||||
4239 | +MOZ_ASSERT(!cx->isExceptionPending()); | +2 | +
+
+
+
|
+ Times Different | +|||||
381 | +IonBuilder* path = it->callerBuilder_; | +4 | +||||
382 | +if (!path || this->script() == path->script()) | +4 | +||||
487 | +trackOptimizationOutcome(TrackedOutcome::HasCommonInliningPath); | +4 | +||||
488 | +return DontInline(inlineScript, "Common inlining path"); | +4 | +||||
2684 | +filter.addType(TypeSet::SymbolType(), alloc_->lifoAlloc()); | +2 | +||||
3367 | +trackOptimizationOutcome(TrackedOutcome::OperandNotEasilyCoercibleToString); | +2 | +||||
3368 | +return Ok(); | +2 | +||||
4066 | +outerBaseline->setMaxInliningDepth(0); | +2 | +||||
4068 | +trackOptimizationOutcome(TrackedOutcome::CantInlineExceededDepth); | +2 | +||||
4069 | +return DontInline(targetScript, "Vetoed: exceeding allowed inline depth"); | +2 | +||||
4123 | +return Ok(); | +2 | +||||
4636 | +MOZ_ASSERT(current == inlineBlock); | +2 | +||||
4637 | +graph().removeBlock(inlineBlock); | +2 | +||||
4638 | +choiceSet[i] = false; | +2 | +||||
4909 | + if (!templateObject->is |
+ 4 | +||||
4911 | +if (templateObject->staticPrototype() != proto) | +4 | +||||
4914 | +TypeSet::ObjectKey* templateObjectKey = TypeSet::ObjectKey::get(templateObject->group()); | +4 | +||||
4915 | +if (templateObjectKey->hasFlags(constraints(), OBJECT_FLAG_NEW_SCRIPT_CLEARED)) | +4 | +||||
4918 | +StackTypeSet* thisTypes = TypeScript::ThisTypes(target->nonLazyScript()); | +4 | +||||
4919 | +if (!thisTypes || !thisTypes->hasType(TypeSet::ObjectType(templateObject))) | +4 | +||||
4924 | +MConstant* templateConst = MConstant::NewConstraintlessObject(alloc(), templateObject); | +4 | +||||
4926 | +MCreateThisWithTemplate::New(alloc(), constraints(), templateConst, | +4 | +||||
4927 | +templateObject->group()->initialHeap(constraints())); | +4 | +||||
4928 | +current->add(templateConst); | +4 | +||||
4929 | +current->add(createThis); | +4 | +||||
4931 | +return createThis; | +4 | +||||
5139 | +TemporaryTypeSet* objTypes = argument->resultTypeSet(); | +2 | +||||
5140 | +if (native && native->isNative() && native->native() == fun_apply && | +2 | +||||
5141 | +objTypes && | +2 | +||||
5142 | +objTypes->getKnownClass(constraints()) == &ArrayObject::class_ && | +2 | +||||
5143 | +!objTypes->hasObjectFlags(constraints(), OBJECT_FLAG_LENGTH_OVERFLOW) && | +2 | +||||
5144 | +ElementAccessIsPacked(constraints(), argument)) | +2 | +||||
5146 | +return jsop_funapplyarray(argc); | +2 | +||||
5207 | +IonBuilder::jsop_funapplyarray(uint32_t argc) | +2 | +||||
5209 | +MOZ_ASSERT(argc == 2); | +2 | +||||
5211 | +int funcDepth = -((int)argc + 1); | +2 | +||||
5214 | +TemporaryTypeSet* funTypes = current->peek(funcDepth)->resultTypeSet(); | +2 | +||||
5215 | +JSFunction* target = getSingleCallTarget(funTypes); | +2 | +||||
5218 | +MDefinition* argObj = current->pop(); | +2 | +||||
5220 | +MElements* elements = MElements::New(alloc(), argObj); | +2 | +||||
5221 | +current->add(elements); | +2 | +||||
5224 | +MDefinition* argThis = current->pop(); | +2 | +||||
5227 | +MDefinition* argFunc = current->pop(); | +2 | +||||
5230 | +MDefinition* nativeFunc = current->pop(); | +2 | +||||
5233 | +WrappedFunction* wrappedTarget = target ? new(alloc()) WrappedFunction(target) : nullptr; | +2 | +||||
5234 | +MApplyArray* apply = MApplyArray::New(alloc(), wrappedTarget, argFunc, elements, argThis); | +2 | +||||
5235 | +current->add(apply); | +2 | +||||
5236 | +current->push(apply); | +2 | +||||
5237 | +MOZ_TRY(resumeAfter(apply)); | +2 | +||||
5239 | +TemporaryTypeSet* types = bytecodeTypes(pc); | +2 | +||||
5240 | +return pushTypeBarrier(apply, types, BarrierKind::TypeSet); | +2 | +||||
5446 | +return calleeTypes->unknownObject(); | +4 | +||||
7061 | +if (thisSingleton != singleton) | +2 | +||||
9749 | +trackOptimizationOutcome(TrackedOutcome::StructNoField); | +2 | +||||
9750 | +return UINT32_MAX; | +2 | +||||
9795 | +IonBuilder::commonPrototypeWithGetterSetter(TemporaryTypeSet* types, PropertyName* name, | +4 | +||||
9804 | +if (!types || types->unknownObject()) | +4 | +||||
9934 | +IonBuilder::testCommonGetterSetter(TemporaryTypeSet* types, PropertyName* name, | +4 | +||||
9940 | +MOZ_ASSERT(getterOrSetter); | +4 | +||||
9941 | +MOZ_ASSERT_IF(globalShape, globalGuard); | +4 | +||||
9946 | +commonPrototypeWithGetterSetter(types, name, isGetter, getterOrSetter, &guardGlobal); | +4 | +||||
9947 | +if (!foundProto || (guardGlobal && !globalShape)) { | +4 | +||||
9948 | +trackOptimizationOutcome(TrackedOutcome::MultiProtoPaths); | +4 | +||||
9949 | +return false; | +4 | +||||
10217 | +uint32_t idx = current->stackDepth() - 1; | +2 | +||||
10218 | +MOZ_ASSERT(current->getSlot(idx) == def); | +2 | +||||
10219 | +current->setSlot(idx, unbox); | +2 | +||||
10746 | +MInstruction* slots = MSlots::New(alloc(), obj); | +2 | +||||
10747 | +current->add(slots); | +2 | +||||
10749 | +load = MLoadSlot::New(alloc(), slots, slot - nfixed); | +2 | +||||
10916 | +MDefinition* holderDef = constant(ObjectValue(*holder)); | +4 | +||||
10917 | +addShapeGuard(holderDef, holderShape, Bailout_ShapeGuard); | +4 | +||||
10919 | +return addGuardReceiverPolymorphic(obj, receivers); | +4 | +||||
10951 | +globalShape, &globalGuard); | +4 | +||||
11063 | +InliningDecision decision = makeInliningDecision(commonGetter, callInfo); | +4 | +||||
11064 | +switch (decision) { | +4 | +||||
11072 | +MOZ_TRY_VAR(status, inlineScriptedCall(callInfo, commonGetter)); | +4 | +||||
11073 | +if (status == InliningStatus_Inlined) { | +4 | +||||
11074 | +*emitted = true; | +4 | +||||
11075 | +return Ok(); | +4 | +||||
11276 | +MOZ_ASSERT(barrier <= protoBarrier); | +2 | +||||
11816 | +store = MStoreUnboxedScalar::New(alloc(), elements, scaledOffset, value, Scalar::Uint8, | +2 | +||||
11818 | +DoesNotRequireMemoryBarrier, elementsOffset); | +2 | +||||
11819 | +break; | +2 | +||||
11999 | +if (NeedsPostBarrier(value)) | +2 | +||||
12000 | +current->add(MPostWriteBarrier::New(alloc(), obj, value)); | +2 | +||||
12002 | +MSetPropertyPolymorphic* ins = MSetPropertyPolymorphic::New(alloc(), obj, value, name); | +2 | +||||
12003 | +current->add(ins); | +2 | +||||
12004 | +current->push(value); | +2 | +||||
12006 | +for (size_t i = 0; i < receivers.length(); i++) { | +2 | +||||
12007 | +Shape* propShape = nullptr; | +2 | +||||
12008 | +if (receivers[i].shape) { | +2 | +||||
12009 | +propShape = receivers[i].shape->searchLinear(NameToId(name)); | +2 | +||||
12010 | +MOZ_ASSERT(propShape); | +2 | +||||
12012 | +if (!ins->addReceiver(receivers[i], propShape)) | +2 | +||||
12016 | +if (objTypes->propertyNeedsBarrier(constraints(), NameToId(name))) | +2 | +||||
12017 | +ins->setNeedsBarrier(); | +2 | +||||
12019 | +MOZ_TRY(resumeAfter(ins)); | +2 | +||||
12021 | +trackOptimizationOutcome(TrackedOutcome::Polymorphic); | +2 | +||||
12022 | +*emitted = true; | +2 | +||||
12880 | +return Ok(); | +2 | +||||
12982 | +MInstanceOf* ins = MInstanceOf::New(alloc(), obj, protoObject); | +2 | +||||
12984 | +current->add(ins); | +2 | +||||
12985 | +current->push(ins); | +2 | +
+
+
+
|
+ Times Different | +|||||
1245 | +if (!propTypes || !propTypes->hasType(TypeSet::GetValueType(val.value()))) | +6 | +||||
1345 | +IonCacheIRCompiler::emitStoreDynamicSlot() | +2 | +||||
1347 | +Register obj = allocator.useRegister(masm, reader.objOperandId()); | +2 | +||||
1348 | +int32_t offset = int32StubField(reader.stubOffset()); | +2 | +||||
1349 | +ConstantOrRegister val = allocator.useConstantOrRegister(masm, reader.valOperandId()); | +2 | +||||
1350 | +AutoScratchRegister scratch(allocator, masm); | +2 | +||||
1352 | +if (typeCheckInfo_->isSet()) { | +2 | +||||
1354 | +if (!addFailurePath(&failure)) | +2 | +||||
1357 | +EmitCheckPropertyTypes(masm, typeCheckInfo_, obj, val, *liveRegs_, failure->label()); | +2 | +||||
1360 | +masm.loadPtr(Address(obj, NativeObject::offsetOfSlots()), scratch); | +2 | +||||
1361 | +Address slot(scratch, offset); | +2 | +||||
1362 | +EmitPreBarrier(masm, slot, MIRType::Value); | +2 | +||||
1363 | +masm.storeConstantOrRegister(val, slot); | +2 | +||||
1364 | +if (needsPostBarrier()) | +2 | +||||
1365 | +emitPostBarrierSlot(obj, val, scratch); | +2 | +||||
2124 | +if (updated || (typeCheckInfo && typeCheckInfo->needsTypeBarrier())) { | +4 | +||||
2128 | +*attached = true; | +4 | +||||
2130 | +return; | +4 | +
+
+
+
|
+ Times Different | +|||||
71 | +trace(zone->barrierTracer()); | +2 | +||||
306 | + if (!FetchName |
+ 2 | +
+
+
+
|
+ Times Different | +|||||
211 | +return "Bailout_NonObjectInput"; | +4 | +
+
+
+
|
+ Times Different | +|||||
232 | +*pcRes = overridePc; | +10 | +||||
638 | +if (inForOfIterClose) | +10 | +||||
641 | +SettleOnTryNote(cx, tn, frame, ei, rfe, pc); | +10 | +||||
642 | +rfe->kind = ResumeFromException::RESUME_FINALLY; | +10 | +||||
643 | +rfe->target = script->baselineScript()->nativeCodeForPC(script, *pc); | +10 | +||||
645 | +if (!cx->getPendingException(MutableHandleValue::fromMarkedLocation(&rfe->exception))) | +10 | +||||
647 | +cx->clearPendingException(); | +10 | +||||
648 | +return true; | +10 | +||||
1023 | +if (where.stack) | +12 | +||||
1024 | +return (uintptr_t*)((uint8_t*)this - where.slot); | +12 | +||||
1041 | +TraceThisAndArguments(JSTracer* trc, const JitFrameIterator& frame) | +12 | +||||
1051 | +: frame.jsFrame(); | +12 | +||||
1053 | +if (!CalleeTokenIsFunction(layout->calleeToken())) | +12 | +||||
1054 | +return; | +12 | +||||
1056 | +size_t nargs = layout->numActualArgs(); | +12 | +||||
1057 | +size_t nformals = 0; | +12 | +||||
1059 | +JSFunction* fun = CalleeTokenToFunction(layout->calleeToken()); | +12 | +||||
1060 | + if (!frame.isExitFrameLayout |
+ 12 | +||||
1061 | +!fun->nonLazyScript()->mayReadFrameArgsDirectly()) | +12 | +||||
1063 | +nformals = fun->nargs(); | +12 | +||||
1066 | +size_t newTargetOffset = Max(nargs, fun->nargs()); | +12 | +||||
1068 | +Value* argv = layout->argv(); | +12 | +||||
1071 | +TraceRoot(trc, argv, "ion-thisv"); | +12 | +||||
1074 | +for (size_t i = nformals + 1; i < nargs + 1; i++) | +12 | +||||
1079 | +if (CalleeTokenIsConstructing(layout->calleeToken())) | +12 | +||||
1097 | +TraceIonJSFrame(JSTracer* trc, const JitFrameIterator& frame) | +12 | +||||
1099 | +JitFrameLayout* layout = (JitFrameLayout*)frame.fp(); | +12 | +||||
1101 | +layout->replaceCalleeToken(TraceCalleeToken(trc, layout->calleeToken())); | +12 | +||||
1103 | +IonScript* ionScript = nullptr; | +12 | +||||
1104 | +if (frame.checkInvalidation(&ionScript)) { | +12 | +||||
1110 | +ionScript = frame.ionScriptFromCalleeToken(); | +12 | +||||
1113 | +TraceThisAndArguments(trc, frame); | +12 | +||||
1115 | +const SafepointIndex* si = ionScript->getSafepointIndex(frame.returnAddressToFp()); | +12 | +||||
1117 | +SafepointReader safepoint(ionScript, si); | +12 | +||||
1123 | +while (safepoint.getGcSlot(&entry)) { | +12 | +||||
1124 | +uintptr_t* ref = layout->slotRef(entry); | +12 | +||||
1125 | + TraceGenericPointerRoot(trc, reinterpret_cast |
+ 12 | +||||
1128 | +while (safepoint.getValueSlot(&entry)) { | +12 | +||||
1133 | +uintptr_t* spill = frame.spillBase(); | +12 | +||||
1136 | +for (GeneralRegisterBackwardIterator iter(safepoint.allGprSpills()); iter.more(); ++iter) { | +12 | +||||
1137 | +--spill; | +12 | +||||
1138 | +if (gcRegs.has(*iter)) | +12 | +||||
1139 | + TraceGenericPointerRoot(trc, reinterpret_cast |
+ 12 | +||||
1140 | +else if (valueRegs.has(*iter)) | +12 | +||||
1160 | +} | +12 | +||||
1199 | +UpdateIonJSFrameForMinorGC(JSTracer* trc, const JitFrameIterator& frame) | +12 | +||||
1204 | +JitFrameLayout* layout = (JitFrameLayout*)frame.fp(); | +12 | +||||
1206 | +IonScript* ionScript = nullptr; | +12 | +||||
1207 | +if (frame.checkInvalidation(&ionScript)) { | +12 | +||||
1212 | +ionScript = frame.ionScriptFromCalleeToken(); | +12 | +||||
1215 | +Nursery& nursery = ionScript->method()->zone()->group()->nursery(); | +12 | +||||
1217 | +const SafepointIndex* si = ionScript->getSafepointIndex(frame.returnAddressToFp()); | +12 | +||||
1218 | +SafepointReader safepoint(ionScript, si); | +12 | +||||
1221 | +uintptr_t* spill = frame.spillBase(); | +12 | +||||
1222 | +for (GeneralRegisterBackwardIterator iter(safepoint.allGprSpills()); iter.more(); ++iter) { | +12 | +||||
1223 | +--spill; | +12 | +||||
1224 | +if (slotsRegs.has(*iter)) | +12 | +||||
1230 | +while (safepoint.getGcSlot(&entry)); | +12 | +||||
1231 | +while (safepoint.getValueSlot(&entry)); | +12 | +||||
1237 | +while (safepoint.getSlotsOrElementsSlot(&entry)) { | +12 | +||||
1241 | +} | +12 | +||||
1419 | + TraceRoot(trc, reinterpret_cast |
+ 2 | +||||
1420 | +break; | +2 | +||||
1509 | +TraceIonJSFrame(trc, frames); | +12 | +||||
1510 | +break; | +12 | +||||
1545 | +UpdateIonJSFrameForMinorGC(trc, frames); | +12 | +
+
+
+
|
+ Times Different | +|||||
395 | +calleeToken_ = calleeToken; | +12 | +
+
+
+
|
+ Times Different | +|||||
598 | +for (size_t i = 0; i < moves_.length(); i++) { | +2 | +||||
599 | +if (to == moves_[i].to()) { | +2 | +
+
+
+
|
+ Times Different | +|||||
57 | +cx->zone()->group()->storeBuffer().putWholeCell(code); | +9 | +
+
+
+
|
+ Times Different | +|||||
88 | +LIRGenerator::visitIsConstructing(MIsConstructing* ins) | +2 | +||||
90 | +define(new(alloc()) LIsConstructing(), ins); | +2 | +||||
91 | +} | +2 | +||||
143 | +LIRGenerator::visitTableSwitch(MTableSwitch* tableswitch) | +2 | +||||
145 | +MDefinition* opd = tableswitch->getOperand(0); | +2 | +||||
148 | +MOZ_ASSERT(tableswitch->numSuccessors() > 0); | +2 | +||||
151 | +if (tableswitch->numSuccessors() == 1) { | +2 | +||||
157 | +if (opd->type() == MIRType::Value) { | +2 | +||||
164 | +if (opd->type() != MIRType::Int32 && opd->type() != MIRType::Double) { | +2 | +||||
171 | +LAllocation index; | +2 | +||||
172 | +LDefinition tempInt; | +2 | +||||
173 | +if (opd->type() == MIRType::Int32) { | +2 | +||||
174 | +index = useRegisterAtStart(opd); | +2 | +||||
175 | +tempInt = tempCopy(opd, 0); | +2 | +||||
180 | +add(newLTableSwitch(index, tempInt, tableswitch)); | +2 | +||||
597 | +LIRGenerator::visitApplyArray(MApplyArray* apply) | +2 | +||||
599 | +MOZ_ASSERT(apply->getFunction()->type() == MIRType::Object); | +2 | +||||
602 | +MOZ_ASSERT(CallTempReg0 != ArgumentsRectifierReg); | +2 | +||||
603 | +MOZ_ASSERT(CallTempReg1 != ArgumentsRectifierReg); | +2 | +||||
606 | +MOZ_ASSERT(CallTempReg2 != JSReturnReg_Type); | +2 | +||||
607 | +MOZ_ASSERT(CallTempReg2 != JSReturnReg_Data); | +2 | +||||
609 | +LApplyArrayGeneric* lir = new(alloc()) LApplyArrayGeneric( | +2 | +||||
610 | +useFixedAtStart(apply->getFunction(), CallTempReg3), | +2 | +||||
612 | +useBoxFixedAtStart(apply->getThis(), CallTempReg4, CallTempReg5), | +2 | +||||
614 | +tempFixed(CallTempReg2)); // stack counter register | +2 | +||||
620 | +assignSnapshot(lir, Bailout_NonJSFunctionCallee); | +2 | +||||
622 | +defineReturn(lir, apply); | +2 | +||||
623 | +assignSafepoint(lir, apply); | +2 | +||||
624 | +} | +2 | +||||
1106 | +tmp = LDefinition::BogusTemp(); | +2 | +||||
1107 | +tmpToUnbox = LDefinition::BogusTemp(); | +2 | +||||
2263 | +redefine(truncate, opd); | +2 | +||||
2264 | +break; | +2 | +||||
3611 | +value = useByteOpRegisterOrNonDoubleConstant(ins->value()); | +2 | +||||
3790 | +LIRGenerator::visitSetPropertyPolymorphic(MSetPropertyPolymorphic* ins) | +2 | +||||
3792 | +MOZ_ASSERT(ins->object()->type() == MIRType::Object); | +2 | +||||
3794 | +if (ins->value()->type() == MIRType::Value) { | +2 | +||||
3802 | +LAllocation value = useRegisterOrConstant(ins->value()); | +2 | +||||
3804 | +new(alloc()) LSetPropertyPolymorphicT(useRegister(ins->object()), value, | +2 | +||||
3805 | +ins->value()->type(), temp()); | +2 | +||||
3806 | +assignSnapshot(lir, Bailout_ShapeGuard); | +2 | +||||
3807 | +add(lir, ins); | +2 | +||||
3809 | +} | +2 | +||||
4222 | +LIRGenerator::visitInstanceOf(MInstanceOf* ins) | +2 | +||||
4224 | +MDefinition* lhs = ins->getOperand(0); | +2 | +||||
4226 | +MOZ_ASSERT(lhs->type() == MIRType::Value || lhs->type() == MIRType::Object); | +2 | +||||
4228 | +if (lhs->type() == MIRType::Object) { | +2 | +||||
4233 | +LInstanceOfV* lir = new(alloc()) LInstanceOfV(useBox(lhs)); | +2 | +||||
4234 | +define(lir, ins); | +2 | +||||
4235 | +assignSafepoint(lir, ins); | +2 | +||||
4237 | +} | +2 | +
+
+
+
|
+ Times Different | +|||||
3347 | +MInstruction* ins = MIsConstructing::New(alloc()); | +2 | +||||
3348 | +current->add(ins); | +2 | +||||
3349 | +current->push(ins); | +2 | +||||
3350 | +return InliningStatus_Inlined; | +2 | +
+
+
+
|
+ Times Different | +|||||
3886 | +MOZ_ASSERT(!(lhs == MIRType::Boolean && rhs == MIRType::Boolean)); | +2 | +||||
3958 | +type = JSTYPE_OBJECT; | +2 | +||||
3959 | +break; | +2 | +||||
4507 | +if (!typeOf->input()->mightBeType(MIRType::Undefined) && | +2 | +||||
4508 | +!typeOf->inputMaybeCallableOrEmulatesUndefined()) | +2 | +||||
4510 | +*result = (jsop() == JSOP_STRICTNE || jsop() == JSOP_NE); | +2 | +||||
4511 | +return true; | +2 | +||||
4519 | +if (!typeOf->input()->mightBeType(MIRType::Int32) && | +2 | +||||
4520 | +!typeOf->input()->mightBeType(MIRType::Float32) && | +2 | +||||
4521 | +!typeOf->input()->mightBeType(MIRType::Double)) | +2 | +||||
4523 | +*result = (jsop() == JSOP_STRICTNE || jsop() == JSOP_NE); | +2 | +||||
4524 | +return true; | +2 | +||||
4528 | +*result = (jsop() == JSOP_STRICTNE || jsop() == JSOP_NE); | +2 | +||||
4529 | +return true; | +2 | +||||
4532 | +if (!typeOf->input()->mightBeType(MIRType::Symbol)) { | +2 | +||||
4533 | +*result = (jsop() == JSOP_STRICTNE || jsop() == JSOP_NE); | +2 | +||||
4534 | +return true; | +2 | +||||
4593 | +MOZ_ASSERT(op == JSOP_STRICTEQ || op == JSOP_STRICTNE); | +2 | +||||
4594 | +MOZ_ASSERT(rhs()->type() == MIRType::Boolean); | +2 | +||||
4595 | +MOZ_ASSERT(lhs()->type() != MIRType::Boolean, "Should use Int32 comparison"); | +2 | +||||
4597 | +if (!lhs()->mightBeType(MIRType::Boolean)) { | +2 | +||||
4598 | +*result = (op == JSOP_STRICTNE); | +2 | +||||
4599 | +return true; | +2 | +||||
4610 | +*result = (op == JSOP_STRICTNE); | +2 | +||||
4611 | +return true; | +2 | +||||
5641 | +MSetPropertyPolymorphic::appendRoots(MRootList& roots) const | +2 | +||||
5643 | +if (!roots.append(name_)) | +2 | +||||
5646 | +for (const PolymorphicEntry& entry : receivers_) { | +2 | +||||
5647 | +if (!entry.appendRoots(roots)) | +2 | +||||
5883 | +return this; | +2 | +||||
6314 | +return BarrierKind::TypeSet; | +2 | +
+
+
+
|
+ Times Different | +|||||
2839 | +MIsConstructing() { | +2 | +||||
2840 | +setResultType(MIRType::Boolean); | +2 | +||||
2841 | +setMovable(); | +2 | +||||
2842 | +} | +2 | +||||
2845 | +INSTRUCTION_HEADER(IsConstructing) | +2 | +||||
2846 | +TRIVIAL_NEW_WRAPPERS | +2 | +||||
2848 | +bool congruentTo(const MDefinition* ins) const override { | +2 | +||||
2849 | +return congruentIfOperandsEqual(ins); | +2 | +||||
2851 | +AliasSet getAliasSet() const override { | +2 | +||||
2852 | +return AliasSet::None(); | +2 | +||||
2934 | +void replaceSuccessor(size_t i, MBasicBlock* successor) override { | +2 | +||||
2935 | +MOZ_ASSERT(i < numSuccessors()); | +2 | +||||
2936 | +successors_[i] = successor; | +2 | +||||
2937 | +} | +2 | +||||
2948 | +return getSuccessor(0); | +2 | +||||
4321 | +MApplyArray(WrappedFunction* target, MDefinition* fun, MDefinition* elements, MDefinition* self) | +2 | +||||
4322 | +: target_(target) | +2 | +||||
4324 | +initOperand(0, fun); | +2 | +||||
4325 | +initOperand(1, elements); | +2 | +||||
4326 | +initOperand(2, self); | +2 | +||||
4327 | +setResultType(MIRType::Value); | +2 | +||||
4328 | +} | +2 | +||||
4331 | +INSTRUCTION_HEADER(ApplyArray) | +2 | +||||
4332 | +TRIVIAL_NEW_WRAPPERS | +2 | +||||
4333 | +NAMED_OPERANDS((0, getFunction), (1, getElements), (2, getThis)) | +2 | +||||
4340 | +bool possiblyCalls() const override { | +2 | +||||
4341 | +return true; | +2 | +||||
4344 | +bool appendRoots(MRootList& roots) const override { | +2 | +||||
4345 | +if (target_) | +2 | +||||
11001 | +MSetPropertyPolymorphic(TempAllocator& alloc, MDefinition* obj, MDefinition* value, | +2 | +||||
11006 | +needsBarrier_(false) | +2 | +||||
11008 | +} | +2 | +||||
11011 | +INSTRUCTION_HEADER(SetPropertyPolymorphic) | +2 | +||||
11012 | +NAMED_OPERANDS((0, object), (1, value)) | +2 | +||||
11014 | +static MSetPropertyPolymorphic* New(TempAllocator& alloc, MDefinition* obj, MDefinition* value, | +2 | +||||
11016 | +return new(alloc) MSetPropertyPolymorphic(alloc, obj, value, name); | +2 | +||||
11019 | +MOZ_MUST_USE bool addReceiver(const ReceiverGuard& receiver, Shape* shape) { | +2 | +||||
11021 | +entry.receiver = receiver; | +2 | +||||
11022 | +entry.shape = shape; | +2 | +||||
11023 | +return receivers_.append(entry); | +2 | +||||
11026 | +return receivers_.length(); | +2 | +||||
11029 | +return receivers_[i].receiver; | +2 | +||||
11032 | +return receivers_[i].shape; | +2 | +||||
11041 | +needsBarrier_ = true; | +2 | +||||
11043 | +AliasSet getAliasSet() const override { | +2 | +||||
11044 | +bool hasUnboxedStore = false; | +2 | +||||
11045 | +for (size_t i = 0; i < numReceivers(); i++) { | +2 | +||||
11046 | +if (!shape(i)) { | +2 | +||||
11054 | +(hasUnboxedStore ? AliasSet::UnboxedElement : 0)); | +2 | +||||
12643 | +protoObj_(proto) | +2 | +||||
12645 | +setResultType(MIRType::Boolean); | +2 | +||||
12649 | +INSTRUCTION_HEADER(InstanceOf) | +2 | +||||
12650 | +TRIVIAL_NEW_WRAPPERS | +2 | +||||
12653 | +return protoObj_; | +2 | +||||
12656 | +bool appendRoots(MRootList& roots) const override { | +2 | +||||
12657 | +return roots.append(protoObj_); | +2 | +||||
14713 | +op = op->toBox()->input(); | +2 | +
+
+
+
|
+ Times Different | +|||||
256 | +if ((*returnAccumulator_)[i] == block) | +2 | +||||
257 | +returnAccumulator_->erase(returnAccumulator_->begin() + i); | +2 | +||||
259 | +i++; | +2 | +
+
+
+
|
+ Times Different | +|||||
184 | +comment("emit GC pointer checks"); | +2 | +||||
185 | +lastBranch.emit(*this); | +2 | +||||
478 | +if (output.type() == MIRType::Double) { | +2 | +||||
500 | +load32(address, outReg); | +2 | +
+
+
+
|
+ Times Different | +|||||
1688 | +store8(value, dest); | +2 | +||||
1689 | +break; | +2 | +
+
+
+
|
+ Times Different | +|||||
608 | +wrapAroundToBoolean(); | +2 | +||||
609 | +break; | +2 | +||||
2478 | +Range::wrapAroundToBoolean() | +2 | +||||
2480 | +wrapAroundToInt32(); | +2 | +||||
2481 | +if (!isBoolean()) | +2 | +||||
2483 | +MOZ_ASSERT(isBoolean()); | +2 | +||||
2484 | +} | +2 | +||||
2738 | +MTruncateToInt32::operandTruncateKind(size_t index) const | +2 | +||||
2741 | +return Truncate; | +2 | +
+
+
+
|
+ Times Different | +|||||
520 | +bool isBoolean() const { | +2 | +||||
521 | +return lower() >= 0 && upper() <= 1 && | +2 | +||||
522 | +!canHaveFractionalPart_ && | +2 | +||||
523 | +!canBeNegativeZero_; | +2 | +
+
+
+
|
+ Times Different | +|||||
554 | +RNot::RNot(CompactBufferReader& reader) | +2 | +||||
1174 | +MTypeOf::writeRecoverData(CompactBufferWriter& writer) const | +2 | +||||
1176 | +MOZ_ASSERT(canRecoverOnBailout()); | +2 | +||||
1177 | +writer.writeUnsigned(uint32_t(RInstruction::Recover_TypeOf)); | +2 | +||||
1178 | +return true; | +2 | +
+
+
+
|
+ Times Different | +|||||
328 | +RINSTRUCTION_HEADER_NUM_OP_(Not, 1) | +2 | +
+
+
+
|
+ Times Different | +|||||
444 | +SafepointReader::getSlotFromBitmap(SafepointSlotEntry* entry) | +12 | +||||
446 | +while (currentSlotChunk_ == 0) { | +12 | +||||
448 | +if (currentSlotsAreStack_) { | +12 | +||||
449 | +if (nextSlotChunkNumber_ == BitSet::RawLengthForBits(frameSlots_)) { | +12 | +||||
450 | +nextSlotChunkNumber_ = 0; | +12 | +||||
451 | +currentSlotsAreStack_ = false; | +12 | +||||
452 | +continue; | +12 | +||||
454 | +} else if (nextSlotChunkNumber_ == BitSet::RawLengthForBits(argumentSlots_)) { | +12 | +||||
459 | +currentSlotChunk_ = stream_.readUnsigned(); | +12 | +||||
460 | +nextSlotChunkNumber_++; | +12 | +||||
465 | +uint32_t bit = FloorLog2(currentSlotChunk_); | +12 | +||||
466 | +currentSlotChunk_ &= ~(1 << bit); | +12 | +||||
470 | +entry->stack = currentSlotsAreStack_; | +12 | +||||
471 | +entry->slot = (((nextSlotChunkNumber_ - 1) * BitSet::BitsPerWord) + bit) * sizeof(intptr_t); | +12 | +||||
472 | +return true; | +12 | +||||
476 | +SafepointReader::getGcSlot(SafepointSlotEntry* entry) | +12 | +||||
478 | +if (getSlotFromBitmap(entry)) | +12 | +||||
481 | +return false; | +12 | +||||
488 | +currentSlotChunk_ = 0; | +12 | +||||
489 | +nextSlotChunkNumber_ = 0; | +12 | +||||
490 | +currentSlotsAreStack_ = true; | +12 | +||||
494 | +SafepointReader::getValueSlot(SafepointSlotEntry* entry) | +12 | +||||
496 | +if (getSlotFromBitmap(entry)) | +12 | +||||
499 | +return false; | +12 | +||||
508 | +nunboxSlotsRemaining_ = 0; | +12 | +||||
551 | +slotsOrElementsSlotsRemaining_ = stream_.readUnsigned(); | +12 | +||||
555 | +SafepointReader::getSlotsOrElementsSlot(SafepointSlotEntry* entry) | +12 | +||||
557 | +if (!slotsOrElementsSlotsRemaining_--) | +12 | +
+
+
+
|
+ Times Different | +|||||
98 | +return LiveGeneralRegisterSet(gcSpills_); | +12 | +||||
101 | +return LiveGeneralRegisterSet(slotsOrElementsSpills_); | +12 | +||||
104 | +return LiveGeneralRegisterSet(valueSpills_); | +12 | +
+
+
+
|
+ Times Different | +|||||
104 | +IsLambdaEscaped(MInstruction* lambda, JSObject* obj) | +2 | +||||
106 | +MOZ_ASSERT(lambda->isLambda() || lambda->isLambdaArrow()); | +2 | +||||
107 | +JitSpewDef(JitSpew_Escape, "Check lambda\n", lambda); | +2 | +||||
108 | +JitSpewIndent spewIndent(JitSpew_Escape); | +2 | +||||
112 | +for (MUseIterator i(lambda->usesBegin()); i != lambda->usesEnd(); i++) { | +2 | +||||
113 | +MNode* consumer = (*i)->consumer(); | +2 | +||||
114 | +if (!consumer->isDefinition()) { | +2 | +||||
123 | +MDefinition* def = consumer->toDefinition(); | +2 | +||||
124 | +if (!def->isFunctionEnvironment()) { | +2 | +||||
125 | +JitSpewDef(JitSpew_Escape, "is escaped by\n", def); | +2 | +||||
126 | +return true; | +2 | +||||
248 | +if (IsLambdaEscaped(def->toInstruction(), obj)) { | +2 | +||||
249 | +JitSpewDef(JitSpew_Escape, "is indirectly escaped by\n", def); | +2 | +||||
250 | +return true; | +2 | +
+
+
+
|
+ Times Different | +|||||
280 | +ICTypeUpdate_SingleObject* updateStub = toTypeUpdate_SingleObject(); | +2 | +||||
281 | +TraceEdge(trc, &updateStub->object(), "baseline-update-singleton"); | +2 | +||||
282 | +break; | +2 | +||||
754 | +if (!BitLsh(cx, lhs, rhs, &result)) | +2 | +||||
756 | +ret.setInt32(result); | +2 | +||||
757 | +break; | +2 | +
+
+
+
|
+ Times Different | +|||||
774 | +state_.setInvalid(); | +6 | +
+
+
+
|
+ Times Different | +|||||
151 | +def->getOperand(0)->type() == MIRType::Boolean) | +2 | +||||
160 | +MDefinition* rhs = def->getOperand(1); | +2 | +||||
161 | +if (rhs->type() != MIRType::Boolean) { | +2 | +||||
169 | +MOZ_ASSERT(def->getOperand(0)->type() != MIRType::Boolean); | +2 | +||||
170 | +MOZ_ASSERT(def->getOperand(1)->type() == MIRType::Boolean); | +2 | +||||
286 | +MOZ_ASSERT(inputType != MIRType::Value); | +2 | +||||
287 | +ins->replaceOperand(0, BoxAt(alloc, ins, ins->getOperand(0))); | +2 | +||||
288 | +return true; | +2 | +||||
924 | +InstanceOfPolicy::adjustInputs(TempAllocator& alloc, MInstruction* def) | +2 | +||||
927 | +if (def->getOperand(0)->type() != MIRType::Object) | +2 | +||||
928 | +if (!BoxPolicy<0>::staticAdjustInputs(alloc, def)) | +2 | +||||
994 | +value = MTruncateToInt32::New(alloc, value); | +2 | +||||
995 | +ins->block()->insertBefore(ins, value->toInstruction()); | +2 | +||||
1019 | +ins->replaceOperand(valueOperand, value); | +2 | +
+
+
+
|
+ Times Different | +|||||
948 | +DebugAfterYield(JSContext* cx, BaselineFrame* frame) | +10 | +||||
952 | +if (frame->script()->isDebuggee()) | +10 | +||||
954 | +return true; | +10 | +||||
958 | + GeneratorThrowOrClose(JSContext* cx, BaselineFrame* frame, Handle |
+ 10 | +||||
964 | +JSScript* script = frame->script(); | +10 | +||||
965 | +uint32_t offset = script->yieldAndAwaitOffsets()[genObj->yieldAndAwaitIndex()]; | +10 | +||||
966 | +frame->setOverridePc(script->offsetToPC(offset)); | +10 | +||||
968 | +MOZ_ALWAYS_TRUE(DebugAfterYield(cx, frame)); | +10 | +||||
969 | +MOZ_ALWAYS_FALSE(js::GeneratorThrowOrClose(cx, frame, genObj, arg, resumeKind)); | +10 | +||||
970 | +return false; | +10 | +||||
1416 | +ObjectIsCallable(JSObject* obj) | +4 | +||||
1418 | +return obj->isCallable(); | +4 | +||||
1441 | +MarkObjectFromIon(JSRuntime* rt, JSObject** objp) | +6 | +||||
1443 | +MOZ_ASSERT(*objp); | +6 | +||||
1444 | +TraceManuallyBarrieredEdge(&rt->gc.marker, objp, "write barrier"); | +6 | +||||
1445 | +} | +6 | +
+
+
+
|
+ Times Different | +|||||
485 | +return &patchAt_; | +2 | +||||
488 | +return &target_; | +2 | +
+
+
+
|
+ Times Different | +|||||
136 | +return a ? ToRegister(a) : InvalidReg; | +2 | +||||
286 | +CodeGeneratorShared::ToAddress(const LAllocation& a) | +2 | +||||
288 | +MOZ_ASSERT(a.isMemory()); | +2 | +||||
289 | +return Address(masm.getStackPointer(), ToStackOffset(&a)); | +2 | +||||
295 | +return ToAddress(*a); | +2 | +
+
+
+
|
+ Times Different | +|||||
963 | +class LIsConstructing : public LInstructionHelper<1, 0, 0> | +2 | +||||
966 | +LIR_HEADER(IsConstructing) | +2 | +||||
2235 | +LIR_HEADER(ApplyArrayGeneric) | +2 | +||||
2237 | +LApplyArrayGeneric(const LAllocation& func, const LAllocation& elements, | +2 | +||||
2240 | +{ | +2 | +||||
2241 | +setOperand(0, func); | +2 | +||||
2242 | +setOperand(1, elements); | +2 | +||||
2243 | +setBoxOperand(ThisIndex, thisv); | +2 | +||||
2244 | +setTemp(0, tmpobjreg); | +2 | +||||
2245 | +setTemp(1, tmpcopy); | +2 | +||||
2246 | +} | +2 | +||||
2249 | +return mir_->toApplyArray(); | +2 | +||||
2256 | +return mir()->getSingleTarget(); | +2 | +||||
2260 | +return getOperand(0); | +2 | +||||
2263 | +return getOperand(1); | +2 | +||||
2268 | +return getOperand(1); | +2 | +||||
2273 | +return getTemp(0); | +2 | +||||
2276 | +return getTemp(1); | +2 | +||||
6834 | +LIR_HEADER(SetPropertyPolymorphicT) | +2 | +||||
6836 | +LSetPropertyPolymorphicT(const LAllocation& obj, const LAllocation& value, MIRType valueType, | +2 | +||||
6838 | +: valueType_(valueType) | +2 | +||||
6840 | +setOperand(0, obj); | +2 | +||||
6841 | +setOperand(1, value); | +2 | +||||
6842 | +setTemp(0, temp); | +2 | +||||
6843 | +} | +2 | +||||
6846 | +return getOperand(0); | +2 | +||||
6849 | +return getOperand(1); | +2 | +||||
6852 | +return getTemp(0); | +2 | +||||
6858 | +return mir_->toSetPropertyPolymorphic(); | +2 | +||||
6860 | +const char* extraName() const { | +2 | +||||
6861 | +return StringFromMIRType(valueType_); | +2 | +||||
7933 | +LIR_HEADER(InstanceOfV) | +2 | +||||
7934 | +explicit LInstanceOfV(const LBoxAllocation& lhs) { | +2 | +||||
7935 | +setBoxOperand(LHS, lhs); | +2 | +||||
7936 | +} | +2 | +||||
7939 | +return mir_->toInstanceOf(); | +2 | +
+
+
+
|
+ Times Different | +|||||
379 | +(as->isConstant() && | +2 | +||||
380 | +(def->type() == MIRType::Int32 || def->type() == MIRType::Boolean) && | +2 | +||||
381 | +(as->type() == MIRType::Int32 || as->type() == MIRType::Boolean)))) | +2 | +||||
385 | +if (as->type() == MIRType::Int32) | +2 | +||||
388 | +replacement = MConstant::New(alloc(), Int32Value(as->toConstant()->toBoolean())); | +2 | +||||
389 | +def->block()->insertBefore(def->toInstruction(), replacement); | +2 | +||||
390 | +emitAtUses(replacement->toInstruction()); | +2 | +||||
645 | +LIRGeneratorShared::tempCopy(MDefinition* input, uint32_t reusedInput) | +2 | +||||
647 | +MOZ_ASSERT(input->virtualRegister()); | +2 | +||||
648 | +LDefinition t = temp(LDefinition::TypeFrom(input->type()), LDefinition::MUST_REUSE_INPUT); | +2 | +||||
650 | +return t; | +2 | +
+
+
+
|
+ Times Different | +|||||
39 | +LIRGeneratorX64::useByteOpRegisterOrNonDoubleConstant(MDefinition* mir) | +2 | +||||
41 | +return useRegisterOrNonDoubleConstant(mir); | +2 | +
+
+
+
|
+ Times Different | +|||||
442 | +void cmpPtr(Register lhs, const ImmWord rhs) { | +2 | +||||
443 | +ScratchRegisterScope scratch(asMasm()); | +2 | +||||
444 | +MOZ_ASSERT(lhs != scratch); | +2 | +||||
445 | +if (intptr_t(rhs.value) <= INT32_MAX && intptr_t(rhs.value) >= INT32_MIN) { | +2 | +||||
451 | +} | +2 | +||||
453 | +cmpPtr(lhs, ImmWord(uintptr_t(rhs.value))); | +2 | +
+
+
+
|
+ Times Different | +|||||
128 | +masm.unboxInt32(R0, ExtractTemp0); | +2 | +||||
129 | +masm.unboxInt32(R1, ecx); // Unboxing R1 to ecx, clobbers R0. | +2 | +||||
130 | +masm.shll_cl(ExtractTemp0); | +2 | +||||
131 | +masm.boxValue(JSVAL_TYPE_INT32, ExtractTemp0, R0.valueReg()); | +2 | +||||
132 | +break; | +2 | +
+
+
+
|
+ Times Different | +|||||
760 | +MOZ_CRASH("NYI: x64 callVM should not be used with 128bits values."); | +2 | +
+
+
+
|
+ Times Different | +|||||
59 | +X86Encoding::SetPointer(buffer + offset, v.bitsAsPunboxPointer()); | +9 | +||||
125 | +blackbox = dump; | +2 | +||||
126 | +blackbox[0] = uintptr_t(0xABCD4321); | +2 | +||||
127 | +blackbox[1] = uintptr_t(len); | +2 | +||||
128 | +blackbox[2] = uintptr_t(startOffset); | +2 | +||||
129 | +blackbox[3] = uintptr_t(endOffset); | +2 | +||||
130 | +blackbox[4] = uintptr_t(0xFFFF8888); | +2 | +||||
131 | +MOZ_CRASH("Corrupt code buffer"); | +2 | +
+
+
+
|
+ Times Different | +|||||
274 | +embedsNurseryPointers_ = true; | +9 | +||||
458 | +masm.haltingAlign(alignment); | +2 | +||||
463 | +void writeCodePointer(CodeOffset* label) { | +2 | +||||
465 | +masm.jumpTablePointer(LabelBase::INVALID_OFFSET); | +2 | +||||
466 | +label->bind(masm.size()); | +2 | +||||
467 | +} | +2 | +||||
945 | +masm.jmp_m(op.disp(), op.base(), op.index(), op.scale()); | +2 | +||||
946 | +break; | +2 | +||||
1702 | +masm.shll_CLr(dest.encoding()); | +2 | +
+
+
+
|
+ Times Different | +|||||
1560 | +void shll_CLr(RegisterID dst) | +2 | +||||
1562 | +spew("shll %%cl, %s", GPReg32Name(dst)); | +2 | +||||
1563 | +m_formatter.oneByteOp(OP_GROUP2_EvCL, dst, GROUP2_OP_SHL); | +2 | +||||
1564 | +} | +2 | +||||
2625 | +void jmp_m(int32_t offset, RegisterID base, RegisterID index, int scale) { | +2 | +||||
2626 | +spew("jmp *" MEM_obs, ADDR_obs(offset, base, index, scale)); | +2 | +||||
2627 | +m_formatter.oneByteOp(OP_GROUP5_Ev, offset, base, index, scale, GROUP5_OP_JMPN); | +2 | +||||
2628 | +} | +2 | +||||
3762 | +void jumpTablePointer(uintptr_t ptr) | +2 | +||||
3765 | +spew(".quad 0x%" PRIxPTR, ptr); | +2 | +||||
3769 | +m_formatter.jumpTablePointer(ptr); | +2 | +||||
3770 | +} | +2 | +||||
5114 | +void jumpTablePointer(uintptr_t ptr) | +2 | +||||
5116 | +m_buffer.ensureSpace(sizeof(uintptr_t)); | +2 | +||||
5118 | +m_buffer.putInt64Unchecked(ptr); | +2 | +||||
5122 | +} | +2 | +
+
+
+
|
+ Times Different | +|||||
1811 | +void accept(CodeGeneratorX86Shared* codegen) { | +2 | +||||
1812 | +codegen->visitOutOfLineTableSwitch(this); | +2 | +||||
1813 | +} | +2 | +||||
1817 | +: mir_(mir) | +2 | +||||
1825 | +return &jumpLabel_; | +2 | +||||
1830 | +CodeGeneratorX86Shared::visitOutOfLineTableSwitch(OutOfLineTableSwitch* ool) | +2 | +||||
1832 | +MTableSwitch* mir = ool->mir(); | +2 | +||||
1834 | +masm.haltingAlign(sizeof(void*)); | +2 | +||||
1835 | +masm.use(ool->jumpLabel()->target()); | +2 | +||||
1836 | +masm.addCodeLabel(*ool->jumpLabel()); | +2 | +||||
1838 | +for (size_t i = 0; i < mir->numCases(); i++) { | +2 | +||||
1839 | +LBlock* caseblock = skipTrivialBlocks(mir->getCase(i))->lir(); | +2 | +||||
1840 | +Label* caseheader = caseblock->label(); | +2 | +||||
1841 | +uint32_t caseoffset = caseheader->offset(); | +2 | +||||
1846 | +masm.writeCodePointer(cl.patchAt()); | +2 | +||||
1847 | +cl.target()->bind(caseoffset); | +2 | +||||
1848 | +masm.addCodeLabel(cl); | +2 | +||||
1850 | +} | +2 | +||||
1853 | +CodeGeneratorX86Shared::emitTableSwitchDispatch(MTableSwitch* mir, Register index, Register base) | +2 | +||||
1855 | +Label* defaultcase = skipTrivialBlocks(mir->getDefault())->lir()->label(); | +2 | +||||
1858 | +if (mir->low() != 0) | +2 | +||||
1862 | +int32_t cases = mir->numCases(); | +2 | +||||
1863 | +masm.cmp32(index, Imm32(cases)); | +2 | +||||
1864 | +masm.j(AssemblerX86Shared::AboveOrEqual, defaultcase); | +2 | +||||
1869 | +OutOfLineTableSwitch* ool = new(alloc()) OutOfLineTableSwitch(mir); | +2 | +||||
1870 | +addOutOfLineCode(ool, mir); | +2 | +||||
1873 | +masm.mov(ool->jumpLabel()->patchAt(), base); | +2 | +||||
1877 | +masm.jmp(pointer); | +2 | +||||
1878 | +} | +2 | +
+
+
+
|
+ Times Different | +|||||
148 | +void testNullEmitBranch(Assembler::Condition cond, const ValueOperand& value, | +2 | +||||
151 | +cond = masm.testNull(cond, value); | +2 | +||||
152 | +emitBranch(cond, ifTrue, ifFalse); | +2 | +||||
153 | +} | +2 | +
+
+
+
|
+ Times Different | +|||||
247 | +LIR_HEADER(TableSwitch) | +2 | +||||
249 | +LTableSwitch(const LAllocation& in, const LDefinition& inputCopy, | +2 | +||||
251 | +{ | +2 | +||||
252 | +setOperand(0, in); | +2 | +||||
253 | +setTemp(0, inputCopy); | +2 | +||||
254 | +setTemp(1, jumpTablePointer); | +2 | +||||
255 | +setMir(ins); | +2 | +||||
256 | +} | +2 | +||||
259 | +return mir_->toTableSwitch(); | +2 | +||||
263 | +return getOperand(0); | +2 | +||||
269 | +return getTemp(1); | +2 | +
+
+
+
|
+ Times Different | +|||||
23 | +LIRGeneratorX86Shared::newLTableSwitch(const LAllocation& in, const LDefinition& inputCopy, | +2 | +||||
26 | +return new(alloc()) LTableSwitch(in, inputCopy, temp(), tableswitch); | +2 | +
+
+
+
|
+ Times Different | +|||||
218 | +MacroAssembler::sub32(const Address& src, Register dest) | +2 | +||||
220 | +subl(Operand(src), dest); | +2 | +||||
221 | +} | +2 | +
+
+
+
|
+ Times Different | +|||||
163 | +void cmp32(const Address& lhs, Imm32 rhs) { | +2 | +||||
164 | +cmp32(Operand(lhs), rhs); | +2 | +||||
165 | +} | +2 | +
+
+
+
|
+ Times Different | +|||||
126 | +inCycle_ = false; | +4 | +||||
127 | +continue; | +4 | +
+
+
+
|
+ Times Different | +|||||
2549 | +JS_DefineElement(JSContext* cx, HandleObject obj, uint32_t index, uint32_t valueArg, | +7 | +||||
2552 | +Value value = NumberValue(valueArg); | +7 | +||||
2554 | +attrs, getter, setter); | +7 | +||||
6085 | +JS_ReportErrorFlagsAndNumberUC(JSContext* cx, unsigned flags, | +2 | +||||
6092 | +AssertHeapIsIdle(); | +2 | +||||
6093 | +va_start(ap, errorNumber); | +2 | +||||
6095 | +errorNumber, ArgumentsAreUnicode, ap); | +2 | +||||
6096 | +va_end(ap); | +2 | +||||
6097 | +return ok; | +2 | +
+
+
+
|
+ Times Different | +|||||
3740 | +} | +12 | +
+
+
+
|
+ Times Different | +|||||
267 | +p = rt->atomsAddedWhileSweeping()->lookup(lookup); | +2 | +||||
376 | +MOZ_ASSERT(rt->atomsZone(lock)->isGCSweeping()); | +2 | +||||
377 | +p = atomsAddedWhileSweeping->lookupForAdd(lookup); | +2 | +||||
381 | +if (!p) { | +2 | +||||
382 | +if (AtomSet::AddPtr p2 = atoms.lookupForAdd(lookup)) { | +2 | +||||
383 | +JSAtom* atom = p2->asPtrUnbarriered(); | +2 | +||||
384 | +if (!IsAboutToBeFinalizedUnbarriered(&atom)) | +2 | +||||
385 | +p = p2; | +2 | +||||
605 | +if (!atom && !allowGC) { | +4 | +
+
+
+
|
+ Times Different | +|||||
304 | +CallWarningReporter(cx, reportp); | +2 | +
+
+
+
|
+ Times Different | +|||||
1459 | +cx_->compartment()->objectMetadataState = prevState_; | +12 | +
+
+
+
|
+ Times Different | +|||||
278 | +MOZ_ASSERT(!(bxe[1] & ~mask)); | +8 | +||||
279 | +if (k) | +8 | +||||
280 | +result |= bxe[1] << (32 - k); | +8 | +||||
474 | +if (j > 0) | +7 | +||||
493 | +digit++; | +12 | +||||
497 | +digit++; | +10 | +||||
498 | +done = true; | +10 | +
+
+
+
|
+ Times Different | +|||||
358 | +explicit SuppressErrorsGuard(JSContext* cx) | +2 | +||||
360 | +prevReporter(JS::SetWarningReporter(cx, nullptr)), | +2 | +||||
361 | +prevState(cx) | +2 | +||||
362 | +{} | +2 | +||||
364 | +~SuppressErrorsGuard() | +2 | +||||
365 | +{ | +2 | +||||
366 | +JS::SetWarningReporter(cx, prevReporter); | +2 | +||||
367 | +} | +2 | +||||
382 | +js::ComputeStackString(JSContext* cx) | +2 | +||||
384 | +SuppressErrorsGuard seg(cx); | +2 | +||||
386 | +RootedObject stack(cx); | +2 | +||||
387 | +if (!CaptureStack(cx, &stack)) | +2 | +||||
390 | +RootedString str(cx); | +2 | +||||
391 | +if (!BuildStackString(cx, stack, &str)) | +2 | +||||
394 | +return str.get(); | +2 | +
+
+
+
|
+ Times Different | +|||||
1757 | +gcTriggerBytes_ -= amount; | +4 | +||||
1812 | +FinishGC(cx); | +4 | +||||
4705 | +ZoneComponentFinder::mergeGroups(currentSweepGroup); | +5 | +||||
4708 | +MOZ_ASSERT(!isIncremental); | +5 | +||||
4709 | +for (GCSweepGroupIter zone(rt); !zone.done(); zone.next()) { | +5 | +||||
4710 | +MOZ_ASSERT(!zone->gcNextGraphComponent); | +5 | +||||
4711 | +MOZ_ASSERT(zone->isGCMarking()); | +5 | +||||
4712 | +zone->setNeedsIncrementalBarrier(false); | +5 | +||||
4713 | +zone->setGCState(Zone::NoGC); | +5 | +||||
4714 | +zone->gcGrayRoots().clearAndFree(); | +5 | +||||
4717 | +for (GCCompartmentGroupIter comp(rt); !comp.done(); comp.next()) | +5 | +||||
4718 | +ResetGrayList(comp); | +5 | +||||
4720 | +abortSweepAfterCurrentGroup = false; | +5 | +||||
4721 | +currentSweepGroup = nullptr; | +5 | +||||
5403 | +arenasAllocatedDuringSweep = arena->getNextAllocDuringSweep(); | +9 | +||||
5404 | +arena->unsetAllocDuringSweep(); | +9 | +||||
5455 | +incrementalSweptArenaKind = thingKind; | +9 | +||||
5456 | +incrementalSweptArenas = sweepList.toArenaList(); | +9 | +||||
5457 | +return false; | +9 | +||||
5618 | +return NotFinished; | +11 | +||||
5631 | +if (!atomsTable->putNew(AtomHasher::Lookup(r.front().asPtrUnbarriered()), r.front())) | +2 | +||||
6110 | +marker.reset(); | +7 | +||||
6112 | +for (CompartmentsIter c(rt, SkipAtoms); !c.done(); c.next()) | +7 | +||||
6113 | +c->scheduledForDestruction = false; | +7 | +||||
6116 | +abortSweepAfterCurrentGroup = true; | +7 | +||||
6119 | +bool wasCompacting = isCompacting; | +7 | +||||
6120 | +isCompacting = false; | +7 | +||||
6123 | +incrementalCollectSlice(unlimited, JS::gcreason::RESET, lock); | +7 | +||||
6125 | +isCompacting = wasCompacting; | +7 | +||||
6128 | +gcstats::AutoPhase ap(stats(), gcstats::PhaseKind::WAIT_BACKGROUND_THREAD); | +7 | +||||
6129 | +rt->gc.waitBackgroundSweepOrAllocEnd(); | +7 | +||||
6792 | +return true; | +8 | +||||
6905 | +GCRuntime::finishGC(JS::gcreason::Reason reason) | +4 | +||||
6907 | +MOZ_ASSERT(isIncrementalGCInProgress()); | +4 | +||||
6912 | +if (!IsOOMReason(initialReason)) { | +4 | +||||
6913 | +if (incrementalState == State::Compact) { | +4 | +||||
6915 | +return; | +4 | +||||
6918 | +isCompacting = false; | +4 | +||||
6921 | +collect(false, SliceBudget::unlimited(), reason); | +4 | +||||
7034 | +return; | +4 | +||||
7105 | +JS::PrepareForIncrementalGC(cx); | +4 | +||||
7106 | +JS::FinishIncrementalGC(cx, JS::gcreason::API); | +4 | +||||
7735 | +JS::FinishIncrementalGC(JSContext* cx, gcreason::Reason reason) | +4 | +||||
7737 | +cx->runtime()->gc.finishGC(reason); | +4 | +||||
7738 | +} | +4 | +
+
+
+
|
+ Times Different | +|||||
513 | +*other.cursorp_ = *cursorp_; | +9 | +||||
514 | +*cursorp_ = other.head_; | +9 | +||||
515 | +cursorp_ = other.cursorp_; | +9 | +||||
516 | +check(); | +9 | +||||
517 | +return *this; | +9 | +||||
698 | +return incrementalSweptArenas.ref().head(); | +3 | +
+
+
+
|
+ Times Different | +|||||
67 | +addPtr = table.lookupForAdd(key); | +5 | +
+
+
+
|
+ Times Different | +|||||
1743 | +a->traceChildren(zone->barrierTracer()); | +6 | +||||
1744 | +b->traceChildren(zone->barrierTracer()); | +6 | +
+
+
+
|
+ Times Different | +|||||
936 | +uint32_t defaultOffset = offset + GET_JUMP_OFFSET(pc); | +4 | +||||
937 | +jsbytecode* pc2 = pc + JUMP_OFFSET_LEN; | +4 | +||||
938 | +int32_t low = GET_JUMP_OFFSET(pc2); | +4 | +||||
939 | +pc2 += JUMP_OFFSET_LEN; | +4 | +||||
940 | +int32_t high = GET_JUMP_OFFSET(pc2); | +4 | +||||
941 | +pc2 += JUMP_OFFSET_LEN; | +4 | +||||
943 | +if (!addJump(defaultOffset, &nextOffset, stackDepth, offsetStack, | +4 | +||||
944 | +pc, JumpKind::SwitchDefault)) | +4 | +||||
949 | +for (int32_t i = low; i <= high; i++) { | +4 | +||||
950 | +uint32_t targetOffset = offset + GET_JUMP_OFFSET(pc2); | +4 | +||||
951 | +if (targetOffset != offset) { | +4 | +||||
952 | +if (!addJump(targetOffset, &nextOffset, stackDepth, offsetStack, | +4 | +||||
953 | +pc, JumpKind::SwitchCase)) | +4 | +||||
958 | +pc2 += JUMP_OFFSET_LEN; | +4 | +||||
1883 | +return decompilePCForStackOperand(pc, -int32_t(GET_ARGC(pc) + 2)) && | +4 | +||||
1884 | +write("(...)"); | +4 | +
+
+
+
|
+ Times Different | +|||||
1976 | +return; | +2 | +
+
+
+
|
+ Times Different | +|||||
4466 | +if (u != 0) { | +4 | +
+
+
+
|
+ Times Different | +|||||
319 | +bool findZoneEdges() override { | +10 | +||||
321 | +return true; | +10 | +
+
+
+
|
+ Times Different | +|||||
1273 | +dst.setSlot(DATA_SLOT, PrivateValue(dst.inlineDataPointer())); | +4 | +
+
+
+
|
+ Times Different | +|||||
59 | +MOZ_ASSERT(ret == Z_DATA_ERROR); | +2 | +||||
60 | +MOZ_ASSERT(!finished); | +2 | +
+
+
+
|
+ Times Different | +|||||
3061 | +GlobalObject* global = c->unsafeUnbarrieredMaybeGlobal(); | +4 | +||||
3062 | +if (!IsMarkedUnbarriered(rt, &global)) | +4 | +||||
3069 | +const GlobalObject::DebuggerVector* debuggers = global->getDebuggers(); | +4 | +||||
3070 | +MOZ_ASSERT(debuggers); | +4 | +||||
3071 | +for (auto p = debuggers->begin(); p != debuggers->end(); p++) { | +4 | +||||
3072 | +Debugger* dbg = *p; | +4 | +||||
3080 | +GCPtrNativeObject& dbgobj = dbg->toJSObjectRef(); | +4 | +||||
3081 | +if (!dbgobj->zone()->isGCMarking()) | +4 | +||||
3084 | +bool dbgMarked = IsMarked(rt, &dbgobj); | +4 | +||||
3085 | +if (!dbgMarked && dbg->hasAnyLiveHooks(rt)) { | +4 | +||||
3095 | +if (dbgMarked) { | +4 | +||||
3097 | +for (Breakpoint* bp = dbg->firstBreakpoint(); bp; bp = bp->nextInDebugger()) { | +4 | +||||
3173 | +dbg->trace(trc); | +6 | +||||
3235 | +GlobalObject* global = e.front().unbarrieredGet(); | +4 | +||||
3236 | +if (debuggerDying || IsAboutToBeFinalizedUnbarriered(&global)) | +4 | +||||
3268 | +Zone* w = dbg->object->zone(); | +10 | +||||
3269 | +if (w == zone || !w->isGCMarking()) | +10 | +||||
3271 | +if (dbg->debuggeeZones.has(zone) || | +10 | +||||
3272 | +dbg->scripts.hasKeyInZone(zone) || | +10 | +||||
3273 | +dbg->sources.hasKeyInZone(zone) || | +10 | +||||
3274 | +dbg->objects.hasKeyInZone(zone) || | +10 | +||||
3275 | +dbg->environments.hasKeyInZone(zone) || | +10 | +||||
3276 | +dbg->wasmInstanceScripts.hasKeyInZone(zone) || | +10 | +||||
3277 | +dbg->wasmInstanceSources.hasKeyInZone(zone)) | +10 | +||||
3279 | +finder.addEdgeTo(w); | +10 | +||||
5463 | +if (cell->getTraceKind() == JS::TraceKind::Script) { | +6 | +||||
5464 | + JSScript* script = static_cast |
+ 6 | +||||
5466 | +"Debugger.Script script referent"); | +6 | +||||
5467 | + obj->as |
+ 6 | +||||
7158 | +"Debugger.Source referent"); | +6 | +||||
7159 | + obj->as |
+ 6 | +||||
9023 | +"Debugger.Object referent"); | +6 | +||||
9024 | + obj->as |
+ 6 | +||||
11976 | +if (dbg->enabled && | +6 | +||||
11977 | +dbg->observedGC(data->majorGCNumber()) && | +6 | +||||
11978 | +dbg->getHook(Debugger::OnGarbageCollection)) | +4 | +
+
+
+
|
+ Times Different | +|||||
156 | +bool hasKeyInZone(JS::Zone* zone) { | +10 | +||||
157 | +CountMap::Ptr p = zoneCounts.lookup(zone); | +10 | +||||
158 | +MOZ_ASSERT_IF(p.found(), p->value() > 0); | +10 | +||||
159 | +return p.found(); | +10 | +||||
164 | +void sweep() { | +6 | +||||
165 | +MOZ_ASSERT(CurrentThreadIsPerformingGC()); | +6 | +||||
166 | + for (Enum e(*static_cast |
+ 6 | +||||
167 | +if (gc::IsAboutToBeFinalized(&e.front().mutableKey())) { | +6 | +||||
172 | +Base::assertEntriesNotAboutToBeFinalized(); | +6 | +||||
173 | +} | +6 | +||||
331 | +return observedGCs.has(majorGCNumber); | +4 | +||||
337 | +return observedGCs.put(majorGCNumber); | +4 | +||||
1763 | +Debugger::toJSObjectRef() | +4 | +||||
1765 | +MOZ_ASSERT(object); | +4 | +||||
1766 | +return object; | +4 | +
+
+
+
|
+ Times Different | +|||||
26 | +js::CallWarningReporter(JSContext* cx, JSErrorReport* reportp) | +2 | +||||
28 | +MOZ_ASSERT(reportp); | +2 | +||||
29 | +MOZ_ASSERT(JSREPORT_IS_WARNING(reportp->flags)); | +2 | +||||
31 | +if (JS::WarningReporter warningReporter = cx->runtime()->warningReporter) | +2 | +||||
32 | +warningReporter(cx, reportp); | +2 | +||||
33 | +} | +2 | +
+
+
+
|
+ Times Different | +|||||
272 | +jit::IonBuilder* builder = worklist[i]; | +1 | +||||
273 | +if (builder->script()->compartment() == comp) | +1 | +||||
969 | +count++; | +5 | +||||
1173 | +IonBuilderHasHigherPriority(thisThread.ionBuilder(), thread->ionBuilder())) | +8 | +||||
2083 | +builder->trace(trc); | +7 | +||||
2085 | +builder->trace(trc); | +7 | +||||
2090 | +builder->trace(trc); | +6 | +
+
+
+
|
+ Times Different | +|||||
782 | +BitLsh(JSContext* cx, HandleValue lhs, HandleValue rhs, int* out) | +2 | +||||
785 | +if (!ToInt32(cx, lhs, &left) || !ToInt32(cx, rhs, &right)) | +2 | +||||
787 | +*out = uint32_t(left) << (right & 31); | +2 | +||||
788 | +return true; | +2 | +
+
+
+
|
+ Times Different | +|||||
1193 | +UnwindIteratorsForUncatchableException(JSContext* cx, const InterpreterRegs& regs) | +2 | +||||
1197 | +for (TryNoteIterInterpreter tni(cx, regs); !tni.done(); ++tni) { | +2 | +||||
1204 | +} | +2 | +||||
1390 | +if (MOZ_UNLIKELY(cx->isPropagatingForcedReturn())) { | +2 | +||||
1397 | +UnwindIteratorsForUncatchableException(cx, regs); | +2 | +||||
5002 | +RootedObjectGroup group(cx, templateObject->group()); | +9 | +||||
5003 | +return UnboxedPlainObject::create(cx, group, newKind); | +9 | +
+
+
+
|
+ Times Different | +|||||
234 | +dst->set(this, HeapSlot::Element, dst - elements_ + numShifted, *src); | +4 | +
+
+
+
|
+ Times Different | +|||||
1328 | +void** pprivate = &privateRef(numFixedSlots()); | +6 | +||||
1329 | +*pprivate = data; | +6 | +
+
+
+
|
+ Times Different | +|||||
775 | +if (group != type.groupNoBarrier()) | +6 | +||||
1179 | +return true; | +4 | +
+
+
+
|
+ Times Different | +|||||
1032 | +else if (code.byteCode) | +6 | +||||
1033 | +compilation.byteCode = code.byteCode; | +6 | +||||
1136 | +if (!jit::CheckOverRecursed(cx)) | +6 | +||||
1152 | +if (!compileIfNecessary(cx, re, input, mode, ForceByteCode)) | +6 | +||||
1155 | +uint8_t* byteCode = re->compilation(mode, input->hasLatin1Chars()).byteCode; | +6 | +||||
1156 | +AutoTraceLog logInterpreter(logger, TraceLogger_IrregexpExecute); | +6 | +||||
1158 | +AutoStableStringChars inputChars(cx); | +6 | +||||
1159 | +if (!inputChars.init(cx, input)) | +6 | +||||
1163 | +if (inputChars.isLatin1()) { | +6 | +||||
1164 | +const Latin1Char* chars = inputChars.latin1Range().begin().get(); | +6 | +||||
1165 | +result = irregexp::InterpretCode(cx, byteCode, chars, start, length, matches, endIndex); | +6 | +||||
1171 | +if (result == RegExpRunStatus_Success && matches) | +6 | +
+
+
+
|
+ Times Different | +|||||
521 | +stop = true; | +2 | +||||
556 | +JSString* stack = ComputeStackString(cx); | +2 | +||||
557 | +JSFlatString* flat = stack ? stack->ensureFlat(cx) : nullptr; | +2 | +||||
560 | +AutoStableStringChars stableChars(cx); | +2 | +||||
561 | +if (flat && stableChars.initTwoByte(cx, flat)) | +2 | +||||
562 | +chars = stableChars.twoByteRange().begin().get(); | +2 | +||||
566 | +JSMSG_TERMINATED, chars); | +2 | +||||
568 | +return false; | +2 | +
+
+
+
|
+ Times Different | +|||||
868 | +return gc.atomsZone; | +2 | +||||
1063 | +MOZ_ASSERT(rt->stackFormat_ == js::StackFormat::Default); | +2 | +||||
1064 | +rt = rt->parentRuntime; | +2 | +
+
+
+
|
+ Times Different | +|||||
1507 | +!IsAboutToBeFinalizedUnbarriered(&existingShape)) | +6 | +||||
1517 | +MOZ_ASSERT(parent->isMarked()); | +6 | +||||
1518 | +parent->removeChild(existingShape); | +6 | +||||
2037 | +TraceRoot(trc, (JSObject**) psetter, "AutoRooterGetterSetter setter"); | +6 | +
+
+
+
|
+ Times Different | +|||||
664 | +CopyAndInflateChars(twoByteBuf + leftLen, rightLinear->latin1Chars(nogc), rightLen); | +10 | +||||
989 | +base = base->asDependent().base(); | +2 | +
+
+
+
|
+ Times Different | +|||||
56 | +TraceManuallyBarrieredEdge(trc, &proto, "TaggedProto"); | +10 | +
+
+
+
|
+ Times Different | +|||||
970 | +constraint->newPropertyState(cx, this); | +6 | +||||
971 | +constraint = constraint->next(); | +6 | +
+
+
+
|
+ Times Different | +|||||
1197 | +void newPropertyState(JSContext* cx, TypeSet* source) { | +6 | +||||
1198 | +if (data.invalidateOnNewPropertyState(source)) | +6 | +||||
1200 | +} | +6 | +||||
4295 | +if (AutoEnterAnalysis* analysis = zone->types.activeAnalysis) { | +9 | +||||
4296 | +if (analysis->oom.isNothing()) | +6 | +||||
4297 | +analysis->oom.emplace(zone); | +6 | +||||
4298 | +oom = analysis->oom.ptr(); | +6 | +||||
4300 | +fallback.emplace(zone); | +9 | +||||
4301 | +oom = &fallback.ref(); | +9 | +||||
4390 | +oom->setOOM(); | +4 | +||||
4391 | +addFlags(OBJECT_FLAG_DYNAMIC_MASK | OBJECT_FLAG_UNKNOWN_PROPERTIES); | +4 | +||||
4454 | +!hasIonScript()) | +2 | +||||
4456 | +types_->destroy(); | +2 | +||||
4457 | +types_ = nullptr; | +2 | +||||
4461 | +hasFreezeConstraints_ = false; | +2 | +
+
+
+
|
+ Times Different | +|||||
642 | +oom = true; | +4 | +
+
+
+
|
+ Times Different | +|||||
194 | +if (oldObj->hasInlineElements()) | +2 | +
+
+
+
|
+ Times Different | +|||||
1601 | +case nsXPTType::T_CHAR_STR : POPULATE(fr, char*); break; | +9 | +
+
+
+
|
+ Times Different | +|||||
111 | +void WakeUp() | +13 | +||||
113 | +MOZ_ASSERT(Initialized()); | +13 | +||||
114 | +MOZ_ASSERT(Hibernating()); | +13 | +||||
115 | +mHibernating = false; | +13 | +||||
116 | +PR_NotifyCondVar(mWakeup); | +13 | +||||
117 | +} | +13 | +||||
297 | +mWatchdog->WakeUp(); | +13 | +
+
+
+
|
+ Times Different | +|||||
2599 | +Telemetry::Accumulate(Telemetry::GC_SLOW_PHASE, sample); | +4 | +||||
2600 | +break; | +4 | +||||
2602 | +Telemetry::Accumulate(Telemetry::GC_SLOW_TASK, sample); | +4 | +||||
2603 | +break; | +4 | +
+
+
+
|
+ Times Different | +|||||
882 | +cache->UpdateWrapper(obj, old); | +6 | +
+
+
+
|
+ Times Different | +|||||
1277 | +mDelayedPaintTimer->Cancel(); | +8 | +||||
1278 | +mDelayedPaintTimer = nullptr; | +8 | +||||
3711 | +if (!mDelayedPaintTimer) { | +8 | +||||
3713 | +PaintTimerCallBack = [](nsITimer* aTimer, void* aClosure) { | +8 | +||||
3717 | + auto self = static_cast |
+ 8 | +||||
3719 | +self->ScheduleViewManagerFlush(); | +8 | +||||
3720 | +}; | +8 | +||||
3722 | +mDelayedPaintTimer = do_CreateInstance(NS_TIMER_CONTRACTID); | +8 | +||||
3723 | +mDelayedPaintTimer->SetTarget( | +8 | +||||
3724 | +mDocument->EventTargetFor(TaskCategory::Other)); | +8 | +||||
3725 | +mDelayedPaintTimer->InitWithNamedFuncCallback(PaintTimerCallBack, | +8 | +||||
3729 | +"PaintTimerCallBack"); | +8 | +||||
6454 | +mNextPaintCompressed = false; | +8 | +||||
6704 | +currentEventFrame->GetContentForEvent(aEvent, getter_AddRefs(content)); | +6 | +||||
6705 | +NS_ASSERTION(!content || content->GetComposedDoc() == mDocument, | +6 | +||||
8259 | +Telemetry::Accumulate(Telemetry::LOAD_INPUT_EVENT_RESPONSE_MS, millis); | +6 | +
+
+
+
|
+ Times Different | +|||||
112 | +cur = cur->GetPreviousSibling()) { | +2 | +
+
+
+
|
+ Times Different | +|||||
248 | +LOG_RESTYLE("skipping, already restyled"); | +7 | +||||
249 | +continue; | +7 | +
+
+
+
|
+ Times Different | +|||||
8966 | +aContent->TextIsOnlyWhitespace())) { | +4 | +||||
8968 | +nsIFrame* frame = aContent->GetPrimaryFrame(); | +4 | +||||
8969 | +NS_ASSERTION(!frame || !frame->IsGeneratedContentFrame(), | +4 | +||||
8972 | +LAYOUT_PHASE_TEMP_EXIT(); | +4 | +||||
8974 | +REMOVE_FOR_RECONSTRUCTION, nullptr); | +4 | +||||
8975 | +LAYOUT_PHASE_TEMP_REENTER(); | +4 | +||||
10615 | +return; | +4 | +||||
10653 | +spaceEndIter.item().IsWhitespace(aState)) { | +4 | +||||
10654 | +bool trailingSpaces = spaceEndIter.SkipWhitespace(aState); | +4 | +||||
10664 | +if ((!trailingSpaces && | +4 | +||||
10665 | +IsTableParentType(spaceEndIter.item().DesiredParentType())) || | +4 | +||||
10666 | +(trailingSpaces && ourParentType != eTypeBlock)) { | +4 | +||||
10699 | +(endIter == spaceEndIter || | +4 | +||||
10700 | +spaceEndIter.IsDone() || | +4 | +||||
12905 | +if (aItems.AreAllItemsInline()) { | +2 | +||||
13229 | +nsCSSFrameConstructor::FrameConstructionItemList:: | +4 | +||||
13232 | +NS_PRECONDITION(!IsDone(), "Shouldn't be done yet"); | +4 | +||||
13233 | +NS_PRECONDITION(item().IsWhitespace(aState), "Not pointing to whitespace?"); | +4 | +||||
13234 | +do { | +4 | +||||
13235 | +Next(); | +4 | +||||
13236 | +if (IsDone()) { | +4 | +||||
13239 | +} while (item().IsWhitespace(aState)); | +4 | +||||
13309 | +mCurrent->setPrevious(aItem); | +4 | +
+
+
+
|
+ Times Different | +|||||
140 | +nsLayoutHistoryState::HasStates() | +7 | +
+
+
+
|
+ Times Different | +|||||
3711 | +flags |= nsDisplayList::PAINT_COMPRESSED; | +8 | +||||
4459 | +nsLayoutUtils::FindNearestBlockAncestor(nsIFrame* aFrame) | +2 | +||||
4462 | +for (nextAncestor = aFrame->GetParent(); nextAncestor; | +2 | +||||
4464 | +nsBlockFrame* block = GetAsBlock(nextAncestor); | +2 | +||||
4465 | +if (block) | +2 | +||||
4466 | +return block; | +2 | +||||
7837 | +nsLayoutUtils::RegisterImageRequest(nsPresContext* aPresContext, | +3 | +||||
7841 | +if (!aPresContext) { | +3 | +||||
7845 | +if (aRequestRegistered && *aRequestRegistered) { | +3 | +||||
7851 | +if (aRequest) { | +3 | +||||
7852 | +if (!aPresContext->RefreshDriver()->AddImageRequest(aRequest)) { | +3 | +||||
7857 | +if (aRequestRegistered) { | +3 | +||||
7858 | +*aRequestRegistered = true; | +3 | +||||
7922 | +*aRequestRegistered = false; | +3 | +||||
9264 | +[](const IPC::Message& aMsg) -> bool { | +7 | +||||
9265 | +if (aMsg.type() == mozilla::layers::PAPZ::Msg_RequestContentRepaint__ID) { | +7 | +
+
+
+
|
+ Times Different | +|||||
76 | +void* ptr = iter.Key(); | +2 | +||||
77 | +ArenaObjectID id = iter.UserData(); | +2 | +||||
78 | +ClearArenaRefPtrWithoutDeregistering(ptr, id); | +2 | +
+
+
+
|
+ Times Different | +|||||
2434 | +aTimeStamp = mozilla::TimeStamp::Now(); | +7 | +||||
3384 | +nsAutoScriptBlocker blockScripts; | +7 | +||||
3385 | +self->NotifyDidPaintForSubtree(aTransactionId); | +7 | +
+
+
+
|
+ Times Different | +|||||
190 | +if (mRootRefreshDrivers.Contains(aDriver)) { | +2 | +||||
193 | +NS_ASSERTION(mContentRefreshDrivers.Contains(aDriver), | +2 | +||||
195 | +mContentRefreshDrivers.RemoveElement(aDriver); | +2 | +||||
1080 | + return static_cast |
+ 3 | +||||
1095 | +nsRefreshDriver::DefaultInterval() | +6 | +||||
1097 | +return NSToIntRound(1000.0 / gfxPlatform::GetDefaultFrameRate()); | +6 | +||||
1318 | +nsRefreshDriver::AddImageRequest(imgIRequest* aRequest) | +3 | +||||
1320 | +uint32_t delay = GetFirstFrameDelay(aRequest); | +3 | +||||
1321 | +if (delay == 0) { | +3 | +||||
1325 | +[] () { return new ImageStartData(); }); | +3 | +||||
1326 | +start->mEntries.PutEntry(aRequest); | +3 | +||||
1329 | +EnsureTimerStarted(); | +3 | +||||
1331 | +return true; | +3 | +||||
1342 | +ImageStartData* start = mStartTable.Get(delay); | +3 | +||||
1343 | +if (start) { | +3 | +||||
1344 | +start->mEntries.RemoveEntry(aRequest); | +3 | +||||
1459 | +count += iter.UserData()->mEntries.Count(); | +3 | +||||
1975 | +const uint32_t& delay = iter.Key(); | +3 | +||||
1976 | +ImageStartData* data = iter.UserData(); | +3 | +||||
1978 | +if (data->mStartTime) { | +3 | +||||
1979 | +TimeStamp& start = *data->mStartTime; | +3 | +||||
1980 | +TimeDuration prev = previousRefresh - start; | +3 | +||||
1981 | +TimeDuration curr = aNowTime - start; | +3 | +||||
1982 | +uint32_t prevMultiple = uint32_t(prev.ToMilliseconds()) / delay; | +3 | +||||
1988 | +if (prevMultiple != uint32_t(curr.ToMilliseconds()) / delay) { | +3 | +||||
1990 | +start + TimeDuration::FromMilliseconds(prevMultiple * delay); | +3 | +||||
1991 | +BeginRefreshingImages(data->mEntries, desired); | +3 | +||||
1997 | +mozilla::TimeStamp desired = aNowTime; | +3 | +||||
1998 | +BeginRefreshingImages(data->mEntries, desired); | +3 | +||||
1999 | +data->mStartTime.emplace(aNowTime); | +3 | +||||
2008 | + nsCOMArray |
+ 6 | +||||
2010 | +for (auto iter = mRequests.Iter(); !iter.Done(); iter.Next()) { | +6 | +||||
2011 | +nsISupportsHashKey* entry = iter.Get(); | +6 | +||||
2012 | + auto req = static_cast |
+ 6 | +||||
2013 | +MOZ_ASSERT(req, "Unable to retrieve the image request"); | +6 | +||||
2015 | +if (NS_SUCCEEDED(req->GetImage(getter_AddRefs(image)))) { | +6 | +||||
2016 | +imagesToRefresh.AppendElement(image.forget()); | +6 | +||||
2018 | +} | +6 | +||||
2020 | +for (uint32_t i = 0; i < imagesToRefresh.Length(); i++) { | +6 | +||||
2021 | +imagesToRefresh[i]->RequestRefresh(aNowTime); | +6 | +||||
2095 | +nsRefreshDriver::BeginRefreshingImages(RequestTable& aEntries, | +3 | +||||
2098 | +for (auto iter = aEntries.Iter(); !iter.Done(); iter.Next()) { | +6 | +||||
2099 | + auto req = static_cast |
+ 6 | +||||
2100 | +MOZ_ASSERT(req, "Unable to retrieve the image request"); | +6 | +||||
2102 | +mRequests.PutEntry(req); | +6 | +||||
2105 | +if (NS_SUCCEEDED(req->GetImage(getter_AddRefs(image)))) { | +6 | +||||
2106 | +image->SetAnimationStartTime(aDesired); | +6 | +||||
2108 | +} | +6 | +||||
2110 | +} | +3 | +
+
+
+
|
+ Times Different | +|||||
360 | +struct ImageStartData { | +3 | +||||
361 | +ImageStartData() | +3 | +||||
362 | +{ | +3 | +||||
363 | +} | +3 | +
+
+
+
|
+ Times Different | +|||||
86 | +nsGfxButtonControlFrame::GetDefaultLabel(nsXPIDLString& aString) const | +7 | +||||
88 | + nsCOMPtr |
+ 7 | +||||
89 | +NS_ENSURE_TRUE(form, NS_ERROR_UNEXPECTED); | +7 | +||||
91 | +int32_t type = form->ControlType(); | +7 | +||||
93 | +if (type == NS_FORM_INPUT_RESET) { | +7 | +||||
96 | +else if (type == NS_FORM_INPUT_SUBMIT) { | +7 | +||||
100 | +aString.Truncate(); | +7 | +||||
101 | +return NS_OK; | +7 | +||||
122 | +rv = GetDefaultLabel(aLabel); | +7 | +||||
123 | +NS_ENSURE_SUCCESS(rv, rv); | +7 | +||||
154 | +nsGfxButtonControlFrame::AttributeChanged(int32_t aNameSpaceID, | +7 | +||||
158 | +nsresult rv = NS_OK; | +7 | +||||
161 | +if (nsGkAtoms::value == aAttribute) { | +7 | +||||
162 | +if (mTextContent && mContent) { | +7 | +||||
163 | +nsXPIDLString label; | +7 | +||||
164 | +rv = GetLabel(label); | +7 | +||||
165 | +NS_ENSURE_SUCCESS(rv, rv); | +7 | +||||
167 | +mTextContent->SetText(label, true); | +7 | +||||
176 | +return rv; | +7 | +
+
+
+
|
+ Times Different | +|||||
1235 | +AreAllEarlierInFlowFramesEmpty(nsIFrame* aFrame, | +7 | +||||
1239 | +if (aFrame == aDescendant) { | +7 | +||||
1240 | +*aFound = true; | +7 | +||||
1241 | +return true; | +7 | +||||
1243 | +if (aFrame->IsPlaceholderFrame()) { | +7 | +||||
1248 | +if (!aFrame->IsSelfEmpty()) { | +7 | +||||
1252 | +for (nsIFrame* f : aFrame->PrincipalChildList()) { | +7 | +||||
1259 | +*aFound = false; | +7 | +||||
1260 | +return true; | +7 | +||||
1411 | +aPlaceholderFrame->SetLineIsEmptySoFar(true); | +7 | +||||
1412 | +allEmpty = true; | +7 | +||||
1414 | +auto prev = aPlaceholderFrame->GetPrevSibling(); | +7 | +||||
1415 | +if (prev && prev->IsPlaceholderFrame()) { | +7 | +||||
1423 | +bool found = false; | +7 | +||||
1424 | +while (firstFrame) { // See bug 223064 | +7 | +||||
1426 | +aPlaceholderFrame, &found); | +7 | +||||
1427 | +if (found || !allEmpty) { | +7 | +||||
1430 | +firstFrame = firstFrame->GetNextSibling(); | +7 | +||||
1432 | +aPlaceholderFrame->SetLineIsEmptySoFar(allEmpty); | +7 | +
+
+
+
|
+ Times Different | +|||||
4160 | +FrameLines* overflowLines = GetOverflowLines(); | +7 | +||||
4163 | +bool pushedToOverflowLines = overflowLines && | +7 | +||||
4164 | +overflowLines->mLines.front() == aLine.get(); | +7 | +||||
4165 | +if (pushedToOverflowLines) { | +7 | +||||
4170 | +nsBlockInFlowLineIterator iter(this, aLine, pushedToOverflowLines); | +7 | +||||
4171 | +if (iter.Next() && iter.GetLine()->IsInline()) { | +7 | +||||
4296 | +breakType = StyleClear::None; | +7 | +||||
5612 | +nsBlockInFlowLineIterator::nsBlockInFlowLineIterator(nsBlockFrame* aFrame, | +7 | +||||
5616 | +: &aFrame->mLines) | +7 | +||||
5618 | +} | +7 | +||||
6943 | +aChild->IsAbsolutelyPositioned()) { | +2 | +
+
+
+
|
+ Times Different | +|||||
2608 | +set.BlockBorderBackgrounds()->DeleteAll(); | +4 | +||||
2609 | +set.Floats()->DeleteAll(); | +4 | +||||
2610 | +set.Content()->DeleteAll(); | +4 | +||||
2611 | +set.PositionedDescendants()->DeleteAll(); | +4 | +||||
2612 | +set.Outlines()->DeleteAll(); | +4 | +
+
+
+
|
+ Times Different | +|||||
525 | +nsInlineFrame::DrainSelfOverflowList() | +2 | +||||
527 | +nsIFrame* lineContainer = nsLayoutUtils::FindNearestBlockAncestor(this); | +2 | +||||
530 | +DrainFlags flags = DrainFlags(0); | +2 | +||||
531 | +for (nsIFrame* p = GetParent(); p != lineContainer; p = p->GetParent()) { | +2 | +||||
537 | +return DrainSelfOverflowListInternal(flags, lineContainer); | +2 | +
+
+
+
|
+ Times Different | +|||||
319 | +frame = frame->GetNextSibling(); | +7 | +
+
+
+
|
+ Times Different | +|||||
226 | +mDirtyNextLine = true; | +7 | +
+
+
+
|
+ Times Different | +|||||
229 | +!(aFlags & IGNORE_PAINT_SUPPRESSION))) { | +4 | +
+
+
+
|
+ Times Different | +|||||
1637 | +return mMappedFlows.Length() == 1 && | +7 | +||||
1638 | +mMappedFlows[0].mStartFrame == GetFrameForSimpleFlow(aTextRun) && | +7 | +||||
1639 | +mMappedFlows[0].mEndFrame == nullptr; | +7 | +||||
1642 | + auto userData = static_cast |
+ 7 | +||||
1643 | +TextRunMappedFlow* userMappedFlows = GetMappedFlows(aTextRun); | +7 | +||||
1644 | +if (userData->mMappedFlowCount != mMappedFlows.Length()) | +7 | +||||
1646 | +for (uint32_t i = 0; i < mMappedFlows.Length(); ++i) { | +7 | +||||
1647 | +if (userMappedFlows[i].mStartFrame != mMappedFlows[i].mStartFrame || | +7 | +||||
1648 | +int32_t(userMappedFlows[i].mContentLength) != | +7 | +||||
1649 | +mMappedFlows[i].GetContentEnd() - mMappedFlows[i].mStartFrame->GetContentOffset()) | +7 | +||||
2465 | +mMappedFlows[0].mStartFrame->GetContentOffset() == 0) { | +7 | +||||
2472 | +userData = CreateUserData(mMappedFlows.Length()); | +7 | +||||
2473 | + userMappedFlows = reinterpret_cast |
+ 7 | +||||
2474 | +userDataToDestroy = userData; | +7 | +||||
9730 | +aStatus.SetInlineLineBreakAfter(); | +7 | +
+
+
+
|
+ Times Different | +|||||
237 | +bool IsSelfEmpty() override { return IsEmpty(); } | +7 | +
+
+
+
|
+ Times Different | +|||||
231 | +rect.YMost() > rr.mRect.YMost() - rr.mRadii[eCornerBottomLeftY]) { | +9 | +||||
232 | +if (!IsInsideEllipse(rr.mRadii[eCornerBottomLeftX], | +9 | +||||
236 | +rr.mRect.YMost() - rr.mRadii[eCornerBottomLeftY], | +9 | +||||
237 | +rect.YMost())) { | +9 | +||||
243 | +rect.YMost() > rr.mRect.YMost() - rr.mRadii[eCornerBottomRightY]) { | +3 | +||||
244 | +if (!IsInsideEllipse(rr.mRadii[eCornerBottomRightX], | +3 | +||||
245 | +rr.mRect.XMost() - rr.mRadii[eCornerBottomRightX], | +3 | +||||
248 | +rr.mRect.YMost() - rr.mRadii[eCornerBottomRightY], | +3 | +||||
249 | +rect.YMost())) { | +3 | +
+
+
+
|
+ Times Different | +|||||
2188 | +ContainerState::CreateOrRecycleImageLayer(PaintedLayer *aPainted) | +12 | +||||
2191 | + static_cast |
+ 12 | +||||
2192 | + RefPtr |
+ 12 | +||||
2193 | +if (layer) { | +12 | +||||
2194 | +ResetLayerStateForRecycling(layer); | +8 | +||||
2195 | +layer->ClearExtraDumpInfo(); | +8 | +||||
2198 | +layer = mManager->CreateImageLayer(); | +12 | +||||
2199 | +if (!layer) | +12 | +||||
2202 | +data->mImageLayer = layer; | +12 | +||||
2203 | +layer->SetUserData(&gImageLayerUserData, nullptr); | +12 | +||||
2206 | +data->mColorLayer = nullptr; | +12 | +||||
2208 | +return layer.forget(); | +12 | +||||
2724 | +PaintedLayerData::GetContainerForImageLayer(nsDisplayListBuilder* aBuilder) | +12 | +||||
2726 | +if (!mImage) { | +12 | +||||
2730 | +return mImage->GetContainer(mLayer->Manager(), aBuilder); | +12 | +||||
3068 | +return aLayerBuilder->CheckInLayerTreeCompressionMode(); | +8 | +||||
3085 | +ContainerState::PrepareImageLayer(PaintedLayerData* aData) | +12 | +||||
3088 | +aData->GetContainerForImageLayer(mBuilder); | +12 | +||||
3089 | +if (!imageContainer) { | +12 | +||||
3093 | + RefPtr |
+ 12 | +||||
3094 | +imageLayer->SetContainer(imageContainer); | +12 | +||||
3095 | +aData->mImage->ConfigureLayer(imageLayer, mParameters); | +12 | +||||
3096 | +imageLayer->SetPostScale(mParameters.mXScale, | +12 | +||||
3097 | +mParameters.mYScale); | +12 | +||||
3099 | +if (aData->mItemClip.HasClip()) { | +12 | +||||
3101 | + ViewAs |
+ 12 | +||||
3102 | + clip.MoveBy(ViewAs |
+ 12 | +||||
3103 | +imageLayer->SetClipRect(Some(clip)); | +12 | +||||
3108 | +FLB_LOG_PAINTED_LAYER_DECISION(aData, | +12 | +||||
3111 | +return imageLayer.forget(); | +12 | +||||
4915 | +FrameLayerBuilder::CheckInLayerTreeCompressionMode() | +8 | +||||
4917 | +if (mInLayerTreeCompressionMode) { | +8 | +||||
4923 | +mRootPresContext->PresShell()->GetRootFrame()->SchedulePaint(nsIFrame::PAINT_DELAYED_COMPRESS); | +8 | +||||
4925 | +return false; | +8 | +||||
5837 | +return element->mOptLayer; | +8 | +
+
+
+
|
+ Times Different | +|||||
264 | +return LayerIntPoint::FromUnknownPoint(mOffset); | +12 | +||||
744 | +void SetLayerTreeCompressionMode() { mInLayerTreeCompressionMode = true; } | +8 | +
+
+
+
|
+ Times Different | +|||||
1184 | +state->mIsBackgroundOnly = true; | +3 | +||||
1185 | +buildCaret = false; | +3 | +||||
2132 | +layerBuilder->SetLayerTreeCompressionMode(); | +8 | +||||
2869 | +nsDisplaySolidColor::Paint(nsDisplayListBuilder* aBuilder, | +13 | +||||
2872 | +int32_t appUnitsPerDevPixel = mFrame->PresContext()->AppUnitsPerDevPixel(); | +13 | +||||
2873 | +DrawTarget* drawTarget = aCtx->GetDrawTarget(); | +13 | +||||
2875 | +NSRectToSnappedRect(mVisibleRect, appUnitsPerDevPixel, *drawTarget); | +13 | +||||
2876 | +drawTarget->FillRect(rect, ColorPattern(ToDeviceColor(mColor))); | +13 | +||||
2877 | +} | +13 | +||||
3665 | +nsDisplayBackgroundImage::RenderingMightDependOnPositioningAreaSizeChange() | +11 | +||||
3667 | +if (!mBackgroundStyle) | +11 | +||||
3671 | +if (mFrame->GetBorderRadii(radii)) { | +11 | +||||
3677 | +const nsStyleImageLayers::Layer &layer = mBackgroundStyle->mImage.mLayers[mLayer]; | +11 | +||||
3678 | +if (layer.RenderingMightDependOnPositioningAreaSizeChange()) { | +11 | +||||
3733 | +RenderingMightDependOnPositioningAreaSizeChange())) { | +11 | +||||
3739 | +NotifyRenderingChanged(); | +11 | +||||
3977 | +nsDisplayImageContainer::ConfigureLayer(ImageLayer* aLayer, | +12 | +||||
3980 | +aLayer->SetSamplingFilter(nsLayoutUtils::GetSamplingFilterForFrame(mFrame)); | +12 | +||||
3982 | + nsCOMPtr |
+ 12 | +||||
3983 | +MOZ_ASSERT(image); | +12 | +||||
3986 | +image->GetWidth(&imageWidth); | +12 | +||||
3987 | +image->GetHeight(&imageHeight); | +12 | +||||
3988 | +NS_ASSERTION(imageWidth != 0 && imageHeight != 0, "Invalid image size!"); | +12 | +||||
3990 | +if (imageWidth > 0 && imageHeight > 0) { | +12 | +||||
3993 | +nsDisplayBackgroundGeometry::UpdateDrawResult(this, DrawResult::SUCCESS); | +12 | +||||
4000 | +MOZ_ASSERT(aParameters.Offset() == LayerIntPoint(0,0)); | +12 | +||||
4012 | +: IntSize(imageWidth, imageHeight); | +12 | +||||
4014 | +const int32_t factor = mFrame->PresContext()->AppUnitsPerDevPixel(); | +12 | +||||
4016 | +LayoutDeviceIntRect::FromAppUnitsToNearest(GetDestRect(), factor)); | +12 | +||||
4018 | +const LayoutDevicePoint p = destRect.TopLeft(); | +12 | +||||
4019 | +Matrix transform = Matrix::Translation(p.x, p.y); | +12 | +||||
4021 | +destRect.height / containerSize.height); | +12 | +||||
4022 | +aLayer->SetBaseTransform(gfx::Matrix4x4::From2D(transform)); | +12 | +||||
4023 | +} | +12 | +||||
4026 | +nsDisplayImageContainer::GetContainer(LayerManager* aManager, | +12 | +||||
4029 | + nsCOMPtr |
+ 12 | +||||
4030 | +if (!image) { | +12 | +||||
4036 | +uint32_t flags = imgIContainer::FLAG_ASYNC_NOTIFY; | +12 | +||||
4037 | +if (aBuilder->ShouldSyncDecodeImages()) { | +12 | +||||
4041 | +return image->GetImageContainer(aManager, flags); | +12 | +||||
4063 | +image->GetWidth(&imageWidth); | +6 | +||||
4064 | +image->GetHeight(&imageHeight); | +6 | +||||
4066 | +if (imageWidth == 0 || imageHeight == 0) { | +6 | +||||
4071 | +const int32_t factor = mFrame->PresContext()->AppUnitsPerDevPixel(); | +6 | +||||
4073 | +LayoutDeviceIntRect::FromAppUnitsToNearest(GetDestRect(), factor)); | +6 | +||||
4076 | +const gfxSize scale = gfxSize(destRect.width / imageWidth, | +6 | +||||
4077 | +destRect.height / imageHeight); | +6 | +||||
4079 | +if (scale.width < 0.34 || scale.height < 0.34) { | +6 | +||||
4085 | +if (mFrame->IsImageFrame()) { | +6 | +
+
+
+
|
+ Times Different | +|||||
629 | +void SetInTransform(bool aInTransform) { mInTransform = aInTransform; } | +11 | +
+
+
+
|
+ Times Different | +|||||
242 | +return a.mTimeStamp.IsNull(); | +2 | +
+
+
+
|
+ Times Different | +|||||
328 | +AppendCSSShadowValue(const nsCSSShadowItem *aShadow, | +7 | +||||
332 | +MOZ_ASSERT(aShadow, "shadow expected"); | +7 | +||||
335 | + RefPtr |
+ 7 | +||||
336 | +arr->Item(0).SetIntegerCoordValue(aShadow->mXOffset); | +7 | +||||
337 | +arr->Item(1).SetIntegerCoordValue(aShadow->mYOffset); | +7 | +||||
338 | +arr->Item(2).SetIntegerCoordValue(aShadow->mRadius); | +7 | +||||
339 | +if (aProperty == eCSSProperty_box_shadow) { | +7 | +||||
340 | +arr->Item(3).SetIntegerCoordValue(aShadow->mSpread); | +7 | +||||
342 | +if (aShadow->mHasColor) { | +7 | +||||
343 | +arr->Item(4).SetColorValue(aShadow->mColor); | +7 | +||||
345 | +if (aShadow->mInset) { | +7 | +||||
346 | +arr->Item(5).SetEnumValue(StyleBoxShadowType::Inset); | +7 | +||||
349 | +nsCSSValueList *resultItem = new nsCSSValueList; | +7 | +||||
350 | +resultItem->mValue.SetArrayValue(arr, eCSSUnit_Array); | +7 | +||||
351 | +*aResultTail = resultItem; | +7 | +||||
352 | +aResultTail = &resultItem->mNext; | +7 | +||||
353 | +} | +7 | +||||
4836 | +nsCSSValueList **resultTail = getter_Transfers(result); | +7 | +||||
4837 | +for (uint32_t i = 0, i_end = shadowArray->Length(); i < i_end; ++i) { | +7 | +||||
4838 | +AppendCSSShadowValue(shadowArray->ShadowAt(i), resultTail, aProperty); | +7 | +||||
4841 | +eUnit_Shadow); | +7 | +||||
4842 | +return true; | +7 | +
+
+
+
|
+ Times Different | +|||||
290 | +NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(nsComputedDOMStyle) | +6 | +||||
291 | +return tmp->HasKnownLiveWrapper(); | +6 | +
+
+
+
|
+ Times Different | +|||||
45 | +NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(nsDOMCSSAttributeDeclaration) | +10 | +||||
46 | +if (tmp->mElement && Element::CanSkip(tmp->mElement, true)) { | +10 | +||||
47 | +if (tmp->PreservingWrapper()) { | +12 | +||||
52 | +return tmp->HasKnownLiveWrapper(); | +4 | +
+
+
+
|
+ Times Different | +|||||
1689 | +ruleWalker.CurrentNode()->SetIsAnimationRule(); | +2 | +
+
+
+
|
+ Times Different | +|||||
2876 | +nsStyleImageLayers::Size::DependsOnPositioningAreaSize(const nsStyleImage& aImage) const | +12 | +||||
2878 | +MOZ_ASSERT(aImage.GetType() != eStyleImageType_Null, | +12 | +||||
2883 | +if ((mWidthType == eLengthPercentage && mWidth.mPercent != 0.0f) || | +12 | +||||
2884 | +(mHeightType == eLengthPercentage && mHeight.mPercent != 0.0f)) { | +12 | +||||
3011 | +nsStyleImageLayers::Layer::RenderingMightDependOnPositioningAreaSizeChange() const | +12 | +||||
3014 | +if (mImage.IsEmpty()) { | +12 | +||||
3018 | +return mPosition.DependsOnPositioningAreaSize() || | +12 | +||||
3019 | +mSize.DependsOnPositioningAreaSize(mImage) || | +12 | +||||
3020 | +mRepeat.DependsOnPositioningAreaSize(); | +12 | +
+
+
+
|
+ Times Different | +|||||
142 | +bool DependsOnPositioningAreaSize() const { | +11 | +||||
143 | +return mXPosition.mPercent != 0.0f || mYPosition.mPercent != 0.0f; | +11 | +||||
1081 | +const nsCSSShadowItem* ShadowAt(uint32_t i) const { | +7 | +||||
1082 | +MOZ_ASSERT(i < mLength, "Accessing too high an index in the text shadow array!"); | +7 | +||||
1083 | +return &mArray[i]; | +7 | +
+
+
+
|
+ Times Different | +|||||
258 | +TimeStamp activeTimeStamp = ElapsedTimeToTimeStamp(aActiveTime); | +2 | +||||
261 | +activeTimeStamp }); | +2 | +||||
279 | +} else if (currentPhase == TransitionPhase::After) { | +12 | +||||
282 | +zeroTimeStamp }); | +12 | +||||
285 | +startTimeStamp }); | +12 | +||||
288 | +endTimeStamp }); | +12 | +||||
301 | +startTimeStamp }); | +14 | +||||
304 | +endTimeStamp }); | +14 | +||||
980 | +oldPT->mStartForReversingTest == endValue) { | +2 | +||||
1076 | +oldPT->IsRunningOnCompositor() && | +2 | +
+
+
+
|
+ Times Different | +|||||
510 | +BasicTableLayoutStrategy::MarkIntrinsicISizesDirty() | +4 | +||||
516 | +} | +4 | +
+
+
+
|
+ Times Different | +|||||
1745 | +nsTableFrame::MarkIntrinsicISizesDirty() | +4 | +||||
1747 | +nsITableLayoutStrategy* tls = LayoutStrategy(); | +4 | +||||
1748 | +if (MOZ_UNLIKELY(!tls)) { | +4 | +||||
1755 | +return; | +4 | +||||
1757 | +tls->MarkIntrinsicISizesDirty(); | +4 | +||||
1761 | +nsContainerFrame::MarkIntrinsicISizesDirty(); | +4 | +
+
+
+
|
+ Times Different | +|||||
509 | +nsDisplayXULImage::GetDestRect() | +6 | +||||
512 | + return static_cast |
+ 6 | +||||
706 | +return OnImageIsAnimated(aRequest); | +3 | +||||
767 | +nsImageBoxFrame::OnImageIsAnimated(imgIRequest* aRequest) | +3 | +||||
771 | +&mRequestRegistered); | +3 | +||||
773 | +return NS_OK; | +3 | +
+
+
+
|
+ Times Different | +|||||
143 | +unsafe_interval - rest >= ten_kappa && // Negated condition 2 | +2 | +||||
144 | +(rest + ten_kappa < small_distance || // buffer{-1} > w_high | +8 | +||||
145 | +small_distance - rest >= rest + ten_kappa - small_distance)) { | +8 | +||||
146 | +buffer[length - 1]--; | +8 | +||||
147 | +rest += ten_kappa; | +8 | +||||
155 | +(rest + ten_kappa < big_distance || | +8 | +||||
156 | +big_distance - rest > rest + ten_kappa - big_distance)) { | +8 | +||||
366 | + static_cast |
+ 11 | +
+
+
+
|
+ Times Different | +|||||
147 | +if (width > cvtwidth) { | +6 | +||||
336 | +if (i > 0) | +2 | +||||
337 | +MOZ_CRASH("Bad format string"); | +2 | +||||
860 | +MOZ_ASSERT(0); | +2 | +
+
+
+
|
+ Times Different | +|||||
77 | +if (aIsInconsistent) { | +2 | +||||
80 | +ts = sInitOnce.mFirstTimeStamp; | +2 | +
+
+
+
|
+ Times Different | +|||||
677 | +return; | +2 | +||||
693 | +return; | +2 | +||||
703 | +do_QueryInterface(cacheToken); | +2 | +||||
704 | +if (!cacheEntry) { | +2 | +||||
708 | +cacheEntry->SetMetaDataElement("necko:classified", | +2 | +||||
709 | +NS_SUCCEEDED(status) ? "1" : nullptr); | +2 | +
+
+
+
|
+ Times Different | +|||||
458 | +NS_ASSERTION(NS_SUCCEEDED(mStatus), | +2 | +
+
+
+
|
+ Times Different | +|||||
272 | +firstError = rv; | +2 | +||||
787 | + auto e = static_cast |
+ 2 | +||||
788 | +RescheduleRequest(e->mKey, aDelta); | +2 | +
+
+
+
|
+ Times Different | +|||||
1133 | +dnsFlags |= nsIDNSService::RESOLVE_DISABLE_IPV6; | +9 | +
+
+
+
|
+ Times Different | +|||||
338 | +mActiveList[index] = mActiveList[mActiveCount-1]; | +2 | +||||
339 | +mPollList[index+1] = mPollList[mActiveCount]; | +2 | +
+
+
+
|
+ Times Different | +|||||
413 | +} else if (!strcmp("suspend_process_notification", topic)) { | +8 | +||||
417 | +} else if (!strcmp("profile-do-change", topic)) { | +8 | +||||
427 | +} else if (!strcmp(NS_PREFBRANCH_PREFCHANGE_TOPIC_ID, topic)) { | +8 | +||||
430 | +if (!mHaveProfile) | +8 | +||||
431 | +return NS_OK; | +4 | +||||
433 | + nsCOMPtr |
+ 6 | +||||
434 | +if (NS_FAILED(rv)) | +6 | +||||
438 | +if (!strcmp(DISK_CACHE_ENABLE_PREF, data.get())) { | +6 | +||||
446 | +} else if (!strcmp(DISK_CACHE_CAPACITY_PREF, data.get())) { | +6 | +||||
448 | +int32_t capacity = 0; | +6 | +||||
449 | +rv = branch->GetIntPref(DISK_CACHE_CAPACITY_PREF, &capacity); | +6 | +||||
450 | +if (NS_FAILED(rv)) | +6 | +||||
452 | +mDiskCacheCapacity = std::max(0, capacity); | +6 | +||||
453 | +nsCacheService::SetDiskCacheCapacity(mDiskCacheCapacity); | +6 | +||||
562 | +} | +6 | +||||
2486 | +nsCacheService::SetDiskCacheCapacity(int32_t capacity) | +6 | +||||
2488 | +if (!gService) return; | +6 | +||||
2491 | +if (gService->mDiskDevice) { | +6 | +||||
2495 | +gService->mEnableDiskDevice = gService->mObserver->DiskCacheEnabled(); | +6 | +
+
+
+
|
+ Times Different | +|||||
67 | + nsCOMPtr |
+ 3 | +||||
68 | +if (!ioTarget) { | +3 | +||||
72 | +nsresult rv = ioTarget->Dispatch( | +3 | +||||
75 | +nsIEventTarget::DISPATCH_NORMAL); | +3 | +||||
76 | +if (NS_FAILED(rv)) { | +3 | +||||
80 | +return true; | +3 | +||||
90 | +return count; | +3 | +||||
3752 | +CacheFileIOManager::StrToHash(const nsACString &aHash, SHA1Sum::Hash *_retval) | +8 | +||||
3754 | +if (aHash.Length() != 2*sizeof(SHA1Sum::Hash)) { | +8 | +||||
3758 | + for (uint32_t i=0 ; i 8 |
+ | ||||
3761 | +if (aHash[i] >= '0' && aHash[i] <= '9') { | +8 | +||||
3762 | +value = aHash[i] - '0'; | +8 | +||||
3763 | +} else if (aHash[i] >= 'A' && aHash[i] <= 'F') { | +8 | +||||
3764 | +value = aHash[i] - 'A' + 10; | +8 | +||||
3771 | +if (i%2 == 0) { | +8 | +||||
3772 | + (reinterpret_cast |
+ 8 | +||||
3774 | + (reinterpret_cast |
+ 8 | +||||
4204 | +SmartCacheSize(const uint32_t availKB) | +8 | +||||
4206 | +uint32_t maxSize = kMaxCacheSizeKB; | +8 | +||||
4208 | +if (availKB > 100 * 1024 * 1024) { | +8 | +||||
4215 | +uint32_t sz10MBs = 0; | +8 | +||||
4216 | +uint32_t avail10MBs = availKB / (1024*10); | +8 | +||||
4219 | +if (avail10MBs > 2500) { | +8 | +||||
4220 | + sz10MBs += static_cast |
+ 8 | +||||
4221 | +avail10MBs = 2500; | +8 | +||||
4224 | +if (avail10MBs > 700) { | +8 | +||||
4225 | + sz10MBs += static_cast |
+ 8 | +||||
4226 | +avail10MBs = 700; | +8 | +||||
4229 | +if (avail10MBs > 50) { | +8 | +||||
4230 | + sz10MBs += static_cast |
+ 8 | +||||
4231 | +avail10MBs = 50; | +8 | +||||
4243 | + sz10MBs += std::max |
+ 8 | +||||
4246 | + return std::min |
+ 8 | +||||
4280 | +rv = CacheIndex::GetCacheSize(&cacheUsage); | +8 | +||||
4281 | +if (NS_WARN_IF(NS_FAILED(rv))) { | +8 | +||||
4287 | +mLastSmartSizeTime = TimeStamp::NowLoRes(); | +8 | +||||
4289 | + uint32_t smartSize = SmartCacheSize(static_cast |
+ 8 | +||||
4290 | +cacheUsage); | +8 | +||||
4292 | +if (smartSize == (CacheObserver::DiskCacheCapacity() >> 10)) { | +8 | +||||
4297 | +CacheObserver::SetDiskCacheCapacity(smartSize << 10); | +8 | +||||
4299 | +return NS_OK; | +8 | +
+
+
+
|
+ Times Different | +|||||
61 | +case 9 : c += (uint32_t(k[8])<<8); MOZ_FALLTHROUGH; | +2 | +||||
63 | +case 8 : b += (uint32_t(k[7])<<24); MOZ_FALLTHROUGH; | +2 | +||||
64 | +case 7 : b += (uint32_t(k[6])<<16); MOZ_FALLTHROUGH; | +2 | +||||
65 | +case 6 : b += (uint32_t(k[5])<<8); MOZ_FALLTHROUGH; | +4 | +
+
+
+
|
+ Times Different | +|||||
430 | +MonitorAutoLock lock(mMonitor); | +2 | +||||
431 | +while (!mXPCOMThread) { | +2 | +||||
432 | +lock.Wait(); | +5 | +||||
435 | +target = mXPCOMThread; | +2 | +||||
590 | +mEventQueue[aLevel].InsertElementsAt(0, events.Elements() + index, length - index); | +7 | +
+
+
+
|
+ Times Different | +|||||
255 | +NS_INTERFACE_MAP_BEGIN(CacheIndex) | +8 | +||||
256 | +NS_INTERFACE_MAP_ENTRY(mozilla::net::CacheFileIOListener) | +8 | +||||
257 | +NS_INTERFACE_MAP_ENTRY(nsIRunnable) | +8 | +||||
258 | +NS_INTERFACE_MAP_END_THREADSAFE | +8 | +||||
369 | + nsCOMPtr |
+ 8 | +||||
370 | +event = NewRunnableMethod("net::CacheIndex::PreShutdownInternal", | +8 | +||||
372 | +&CacheIndex::PreShutdownInternal); | +8 | +||||
374 | + nsCOMPtr |
+ 8 | +||||
375 | +MOZ_ASSERT(ioTarget); | +8 | +||||
379 | +rv = ioTarget->Dispatch(event, nsIEventTarget::DISPATCH_NORMAL); | +8 | +||||
380 | +if (NS_FAILED(rv)) { | +8 | +||||
390 | +CacheIndex::PreShutdownInternal() | +8 | +||||
392 | +StaticMutexAutoLock lock(sLock); | +8 | +||||
394 | +LOG(("CacheIndex::PreShutdownInternal() - [state=%d, indexOnDiskIsValid=%d, " | +8 | +||||
398 | +MOZ_ASSERT(mShuttingDown); | +8 | +||||
400 | +if (mUpdateTimer) { | +8 | +||||
401 | +mUpdateTimer = nullptr; | +8 | +||||
404 | +switch (mState) { | +8 | +||||
416 | +FinishUpdate(false); | +8 | +||||
417 | +break; | +8 | +||||
423 | +MOZ_ASSERT(mState == READY); | +8 | +||||
424 | +} | +8 | +||||
2590 | +CacheIndex::DelayedUpdate(nsITimer *aTimer, void *aClosure) | +8 | +||||
2592 | +LOG(("CacheIndex::DelayedUpdate()")); | +8 | +||||
2594 | +StaticMutexAutoLock lock(sLock); | +8 | +||||
2595 | + RefPtr |
+ 8 | +||||
2597 | +if (!index) { | +8 | +||||
2601 | +index->DelayedUpdateLocked(); | +8 | +||||
2606 | +CacheIndex::DelayedUpdateLocked() | +8 | +||||
2608 | +LOG(("CacheIndex::DelayedUpdateLocked()")); | +8 | +||||
2610 | +sLock.AssertCurrentThreadOwns(); | +8 | +||||
2614 | +mUpdateTimer = nullptr; | +8 | +||||
2616 | +if (!IsIndexUsable()) { | +8 | +||||
2620 | +if (mState == READY && mShuttingDown) { | +8 | +||||
2626 | +MOZ_ASSERT(!mUpdateEventPending); | +8 | +||||
2627 | +if (mState != BUILDING && mState != UPDATING) { | +8 | +||||
2633 | + RefPtr |
+ 8 | +||||
2634 | +MOZ_ASSERT(ioThread); | +8 | +||||
2636 | +mUpdateEventPending = true; | +8 | +||||
2637 | +rv = ioThread->Dispatch(this, CacheIOThread::INDEX); | +8 | +||||
2638 | +if (NS_FAILED(rv)) { | +8 | +||||
2643 | +} | +8 | +||||
2676 | +CacheIndex::SetupDirectoryEnumerator() | +8 | +||||
2678 | +MOZ_ASSERT(!NS_IsMainThread()); | +8 | +||||
2679 | +MOZ_ASSERT(!mDirEnumerator); | +8 | +||||
2684 | +rv = mCacheDirectory->Clone(getter_AddRefs(file)); | +8 | +||||
2685 | +NS_ENSURE_SUCCESS(rv, rv); | +8 | +||||
2687 | +rv = file->AppendNative(NS_LITERAL_CSTRING(ENTRIES_DIR)); | +8 | +||||
2688 | +NS_ENSURE_SUCCESS(rv, rv); | +8 | +||||
2691 | +rv = file->Exists(&exists); | +8 | +||||
2692 | +NS_ENSURE_SUCCESS(rv, rv); | +8 | +||||
2694 | +if (!exists) { | +8 | +||||
2702 | + nsCOMPtr |
+ 8 | +||||
2703 | +rv = file->GetDirectoryEntries(getter_AddRefs(enumerator)); | +8 | +||||
2704 | +NS_ENSURE_SUCCESS(rv, rv); | +8 | +||||
2706 | +mDirEnumerator = do_QueryInterface(enumerator, &rv); | +8 | +||||
2707 | +NS_ENSURE_SUCCESS(rv, rv); | +8 | +||||
2709 | +return NS_OK; | +8 | +||||
2774 | +CacheIndex::BuildIndex() | +8 | +||||
2776 | +LOG(("CacheIndex::BuildIndex()")); | +8 | +||||
2778 | +sLock.AssertCurrentThreadOwns(); | +8 | +||||
2780 | +MOZ_ASSERT(mPendingUpdates.Count() == 0); | +8 | +||||
2784 | +if (!mDirEnumerator) { | +8 | +||||
2787 | +StaticMutexAutoUnlock unlock(sLock); | +8 | +||||
2788 | +rv = SetupDirectoryEnumerator(); | +8 | +||||
2790 | +if (mState == SHUTDOWN) { | +8 | +||||
2796 | +if (NS_FAILED(rv)) { | +8 | +||||
2803 | +if (CacheIOThread::YieldAndRerun()) { | +8 | +||||
2806 | +return; | +8 | +||||
2812 | +StaticMutexAutoUnlock unlock(sLock); | +8 | +||||
2813 | +rv = mDirEnumerator->GetNextFile(getter_AddRefs(file)); | +8 | +||||
2815 | +if (mState == SHUTDOWN) { | +8 | +||||
2816 | +return; | +8 | +||||
2818 | +if (!file) { | +8 | +||||
2819 | +FinishUpdate(NS_SUCCEEDED(rv)); | +8 | +||||
2820 | +return; | +8 | +||||
2823 | +nsAutoCString leaf; | +8 | +||||
2824 | +rv = file->GetNativeLeafName(leaf); | +8 | +||||
2825 | +if (NS_FAILED(rv)) { | +8 | +||||
2833 | +rv = CacheFileIOManager::StrToHash(leaf, &hash); | +8 | +||||
2834 | +if (NS_FAILED(rv)) { | +8 | +||||
2841 | +CacheIndexEntry *entry = mIndex.GetEntry(hash); | +8 | +||||
2842 | +if (entry && entry->IsRemoved()) { | +8 | +||||
2852 | +CacheFileIOManager::gInstance->mHandles.GetHandle(&hash, | +8 | +||||
2853 | +getter_AddRefs(handle)); | +8 | +||||
2856 | +if (entry) { | +8 | +||||
2858 | +LOG(("CacheIndex::BuildIndex() - Skipping file because the entry is up to" | +8 | +||||
2860 | +entry->Log(); | +8 | +||||
2861 | +MOZ_ASSERT(entry->IsFresh()); // The entry must be from this session | +8 | +||||
2863 | +MOZ_ASSERT(entry->IsInitialized() || handle); | +8 | +||||
2864 | +continue; | +8 | +||||
3181 | +if (NS_IsMainThread()) { | +8 | +||||
3189 | +mDirEnumerator->Close(); | +8 | +||||
3190 | +mDirEnumerator = nullptr; | +8 | +||||
3195 | +mDontMarkIndexClean = true; | +8 | +||||
3469 | +CacheIndex::Run() | +8 | +||||
3471 | +LOG(("CacheIndex::Run()")); | +8 | +||||
3473 | +StaticMutexAutoLock lock(sLock); | +8 | +||||
3475 | +if (!IsIndexUsable()) { | +8 | +||||
3479 | +if (mState == READY && mShuttingDown) { | +8 | +||||
3483 | +mUpdateEventPending = false; | +8 | +||||
3485 | +switch (mState) { | +8 | +||||
3487 | +BuildIndex(); | +8 | +||||
3488 | +break; | +8 | +||||
3496 | +return NS_OK; | +8 | +
+
+
+
|
+ Times Different | +|||||
296 | +void Log() const { | +8 | +||||
297 | +LOG(("CacheIndexEntry::Log() [this=%p, hash=%08x%08x%08x%08x%08x, fresh=%u," | +8 | +||||
305 | +} | +8 | +
+
+
+
|
+ Times Different | +|||||
228 | +sHalfLifeHours = 0.083F; // ~5 mintues | +10 | +||||
229 | +break; | +10 | +||||
231 | +sHalfLifeHours = 0.25F; // 15 mintues | +2 | +||||
232 | +break; | +2 | +||||
234 | +sHalfLifeHours = 1.0F; | +1 | +||||
235 | +break; | +1 | +||||
237 | +sHalfLifeHours = 6.0F; | +9 | +||||
238 | +break; | +9 | +||||
316 | +CacheObserver::SetDiskCacheCapacity(uint32_t aCapacity) | +8 | +||||
318 | +sDiskCacheCapacity = aCapacity >> 10; | +8 | +||||
320 | +if (!sSelf) { | +8 | +||||
321 | +return; | +8 | +||||
324 | +if (NS_IsMainThread()) { | +8 | +||||
330 | +&CacheObserver::StoreDiskCacheCapacity); | +8 | +||||
331 | +NS_DispatchToMainThread(event); | +8 | +||||
336 | +CacheObserver::StoreDiskCacheCapacity() | +8 | +||||
339 | +sDiskCacheCapacity); | +8 | +||||
340 | +} | +8 | +
+
+
+
|
+ Times Different | +|||||
119 | +LOG(("NulHttpTransaction::NullHttpTransaction() " | +4 | +
+
+
+
|
+ Times Different | +|||||
47 | +NewHeapAtom(const char *value) { | +9 | +||||
48 | +int len = strlen(value); | +9 | +||||
51 | + reinterpret_cast |
+ 9 | +||||
52 | +if (!a) | +9 | +||||
54 | +memcpy(a->value, value, len + 1); | +9 | +||||
57 | +a->next = sHeapAtoms; | +9 | +||||
58 | +sHeapAtoms = a; | +9 | +||||
60 | +return a; | +9 | +||||
135 | +HttpHeapAtom *next = sHeapAtoms->next; | +9 | +||||
136 | +free(sHeapAtoms); | +9 | +||||
137 | +sHeapAtoms = next; | +9 | +||||
172 | +HttpHeapAtom *heapAtom = NewHeapAtom(str); | +9 | +||||
173 | +if (!heapAtom) | +9 | +||||
176 | +stub->key = atom._val = heapAtom->value; | +9 | +||||
177 | +return atom; | +9 | +
+
+
+
|
+ Times Different | +|||||
23 | +nsHttpActivityEvent(nsISupports* aHttpChannel, | +4 | +||||
37 | +, mObservers(*aObservers) | +4 | +||||
39 | +} | +4 | +||||
41 | +NS_IMETHOD Run() override | +4 | +||||
43 | +for (size_t i = 0 ; i < mObservers.Length() ; i++) { | +4 | +||||
45 | +mObservers[i]->ObserveActivity(mHttpChannel, mActivityType, | +4 | +||||
48 | +mExtraStringData); | +4 | +||||
50 | +return NS_OK; | +4 | +||||
54 | +virtual ~nsHttpActivityEvent() | +4 | +||||
55 | +{ | +4 | +||||
56 | +} | +4 | +||||
82 | +nsHttpActivityDistributor::ObserveActivity(nsISupports *aHttpChannel, | +4 | +||||
91 | +MutexAutoLock lock(mLock); | +4 | +||||
93 | +if (!mObservers.Length()) | +4 | +||||
99 | +&mObservers); | +4 | +||||
101 | +NS_ENSURE_TRUE(event, NS_ERROR_OUT_OF_MEMORY); | +4 | +||||
102 | +return NS_DispatchToMainThread(event); | +4 | +
+
+
+
|
+ Times Different | +|||||
749 | +mTransactionPump->Suspend(); | +2 | +||||
7916 | +return CallQueryInterface(mCacheEntry, token); | +2 | +||||
8884 | +rvTransaction = mTransactionPump->Resume(); | +2 | +
+
+
+
|
+ Times Different | +|||||
3713 | +tmpFlags |= nsISocketTransport::DISABLE_IPV6; | +9 | +
+
+
+
|
+ Times Different | +|||||
256 | +LOG(("nsHttpTransaction::Init() " \ | +4 | +||||
335 | +rv = mActivityDistributor->ObserveActivity( | +4 | +||||
340 | +mReqHeaderBuf); | +4 | +||||
341 | +if (NS_FAILED(rv)) { | +4 | +||||
596 | +if ((mHasRequestBody) && | +4 | +||||
609 | +nsresult rv = mActivityDistributor->ObserveActivity( | +4 | +||||
615 | +EmptyCString()); | +4 | +||||
616 | +if (NS_FAILED(rv)) { | +4 | +||||
955 | +if (!mResponseIsComplete) { | +4 | +||||
969 | +nsresult rv = mActivityDistributor->ObserveActivity( | +4 | +||||
973 | +PR_Now(), 0, EmptyCString()); | +4 | +||||
974 | +if (NS_FAILED(rv)) { | +4 | +||||
1389 | +mReportedStart = true; | +4 | +||||
1390 | +rv = mActivityDistributor->ObserveActivity( | +4 | +||||
1394 | +PR_Now(), 0, EmptyCString()); | +4 | +||||
1395 | +if (NS_FAILED(rv)) { | +4 | +||||
1696 | +rv = mActivityDistributor->ObserveActivity( | +4 | +||||
1702 | +EmptyCString()); | +4 | +||||
1703 | +if (NS_FAILED(rv)) { | +4 | +||||
1752 | +!mReportedResponseHeader) { | +4 | +||||
1753 | +mReportedResponseHeader = true; | +4 | +||||
1754 | +nsAutoCString completeResponseHeaders; | +4 | +||||
1755 | +mResponseHead->Flatten(completeResponseHeaders, false); | +4 | +||||
1756 | +completeResponseHeaders.AppendLiteral("\r\n"); | +4 | +||||
1757 | +rv = mActivityDistributor->ObserveActivity( | +4 | +||||
1762 | +completeResponseHeaders); | +4 | +||||
1763 | +if (NS_FAILED(rv)) { | +4 | +
+
+
+
|
+ Times Different | +|||||
189 | +thred->id = id; | +8 | +||||
190 | +thred->idSet = PR_TRUE; | +8 | +||||
521 | +PR_ASSERT(pthread_equal(thred->id, id)); | +8 | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
Error: Couldn't find the file in hg. | +
+
+
+
|
+ Times Different | +|||||
1788 | +if (resumable) { | +6 | +||||
1789 | +errorCode = XML_ERROR_SUSPENDED; | +6 | +||||
1790 | +return XML_STATUS_ERROR; | +6 | +||||
4782 | +*nextPtr = next; | +7 | +||||
4783 | +return XML_ERROR_NONE; | +7 | +
+
+
+
|
+ Times Different | +|||||
107 | +class nsParserContinueEvent : public Runnable | +7 | +||||
112 | +explicit nsParserContinueEvent(nsParser* aParser) | +7 | +||||
114 | +, mParser(aParser) | +7 | +||||
115 | +{} | +7 | +||||
117 | +NS_IMETHOD Run() override | +7 | +||||
119 | +mParser->HandleParserContinueEvent(this); | +7 | +||||
120 | +return NS_OK; | +7 | +||||
202 | +cb.NoteXPCOMChild(pc->mTokenizer); | +2 | +||||
203 | +pc = pc->mPrevContext; | +2 | +||||
223 | +nsParser::PostContinueEvent() | +7 | +||||
225 | +if (!(mFlags & NS_PARSER_FLAG_PENDING_CONTINUE_EVENT)) { | +7 | +||||
227 | +NS_ASSERTION(!mContinueEvent, "bad"); | +7 | +||||
231 | + nsCOMPtr |
+ 7 | +||||
232 | +if (NS_FAILED(NS_DispatchToCurrentThread(event))) { | +7 | +||||
235 | +mFlags |= NS_PARSER_FLAG_PENDING_CONTINUE_EVENT; | +7 | +||||
236 | +mContinueEvent = event; | +7 | +||||
237 | +} | +7 | +||||
239 | +return NS_OK; | +7 | +||||
711 | +void nsParser::HandleParserContinueEvent(nsParserContinueEvent *ev) | +7 | +||||
714 | +if (mContinueEvent != ev) | +7 | +||||
715 | +return; | +7 | +||||
717 | +mFlags &= ~NS_PARSER_FLAG_PENDING_CONTINUE_EVENT; | +7 | +||||
718 | +mContinueEvent = nullptr; | +7 | +||||
720 | +NS_ASSERTION(IsOkToProcessNetworkData(), | +7 | +||||
722 | +ContinueInterruptedParsing(); | +7 | +||||
1061 | +PostContinueEvent(); | +7 | +
+
+
+
|
+ Times Different | +|||||
288 | +nss_hash_enumerator(PLHashEntry *he, PRIntn index, void *arg) | +10 | +||||
290 | +struct arg_str *as = (struct arg_str *)arg; | +10 | +||||
291 | +as->fcn(he->key, he->value, as->closure); | +10 | +||||
292 | +return HT_ENUMERATE_NEXT; | +10 | +
+
+
+
|
+ Times Different | +|||||
264 | +PORT_SetError(SEC_ERROR_ADDING_CERT); | +10 | +||||
265 | +return SECFailure; /* wasn't a temp cert */ | +10 | +||||
267 | +stanNick = nssCertificate_GetNickname(c, NULL); | +10 | +||||
268 | +if (stanNick && nickname && strcmp(nickname, stanNick) != 0) { | +10 | +||||
274 | +if (!stanNick && nickname) { | +10 | +||||
276 | +stanNick = nssUTF8_Duplicate((NSSUTF8 *)nickname, NULL); | +10 | +||||
279 | +nssCertificateStore_Lock(context->certStore, &lockTrace); | +10 | +||||
280 | +nssCertificateStore_RemoveCertLOCKED(context->certStore, c); | +10 | +||||
281 | +nssCertificateStore_Unlock(context->certStore, &lockTrace, &unlockTrace); | +10 | +||||
282 | +c->object.cryptoContext = NULL; | +10 | +||||
284 | +slot = PK11_GetInternalKeySlot(); | +10 | +||||
285 | +internal = PK11Slot_GetNSSToken(slot); | +10 | +||||
286 | +permInstance = nssToken_ImportCertificate( | +10 | +||||
287 | +internal, NULL, NSSCertificateType_PKIX, &c->id, stanNick, &c->encoding, | +10 | +||||
288 | +&c->issuer, &c->subject, &c->serial, cert->emailAddr, PR_TRUE); | +10 | +||||
289 | +nss_ZFreeIf(stanNick); | +10 | +||||
290 | +stanNick = NULL; | +10 | +||||
291 | +PK11_FreeSlot(slot); | +10 | +||||
292 | +if (!permInstance) { | +10 | +||||
298 | +nssPKIObject_AddInstance(&c->object, permInstance); | +10 | +||||
299 | +nssTrustDomain_AddCertsToCache(STAN_GetDefaultTrustDomain(), &c, 1); | +10 | +||||
301 | +cert->nssCertificate = NULL; | +10 | +||||
302 | +cert = STAN_GetCERTCertificateOrRelease(c); /* should return same pointer */ | +10 | +||||
303 | +if (!cert) { | +10 | +||||
307 | +CERT_LockCertTempPerm(cert); | +10 | +||||
308 | +cert->istemp = PR_FALSE; | +10 | +||||
309 | +cert->isperm = PR_TRUE; | +10 | +||||
310 | +CERT_UnlockCertTempPerm(cert); | +10 | +||||
311 | +if (!trust) { | +10 | +
+
+
+
|
+ Times Different | +|||||
221 | +newoff = hashp->BSIZE; | +12 | +
+
+
+
|
+ Times Different | +|||||
209 | +nssCKObject_SetAttributes( | +10 | +||||
217 | +void *epv = nssSlot_GetCryptokiEPV(slot); | +10 | +||||
218 | +nssSession_EnterMonitor(session); | +10 | +||||
219 | +ckrv = CKAPI(epv)->C_SetAttributeValue(session->handle, object, | +10 | +||||
221 | +nssSession_ExitMonitor(session); | +10 | +||||
222 | +if (ckrv == CKR_OK) { | +10 | +
+
+
+
|
+ Times Different | +|||||
493 | +NSSSlot *slot = nssToken_GetSlot(tok); | +10 | +||||
494 | +nssSession *session = nssSlot_CreateSession(slot, NULL, PR_TRUE); | +10 | +||||
495 | +if (!session) { | +10 | +||||
504 | +NSS_CK_TEMPLATE_START(cert_tmpl, attr, ctsize); | +10 | +||||
505 | +NSS_CK_SET_ATTRIBUTE_NULL(attr, CKA_VALUE); | +10 | +||||
506 | +NSS_CK_TEMPLATE_FINISH(cert_tmpl, attr, ctsize); | +10 | +||||
507 | +status = nssCKObject_GetAttributes(rvObject->handle, | +10 | +||||
510 | +NSS_CK_ATTRIBUTE_TO_ITEM(cert_tmpl, &existingDER); | +10 | +||||
511 | +if (status == PR_SUCCESS) { | +10 | +||||
512 | +if (!nssItem_Equal(encoding, &existingDER, NULL)) { | +10 | +||||
516 | +nss_ZFreeIf(existingDER.data); | +10 | +||||
518 | +if (status == PR_FAILURE) { | +10 | +||||
529 | +NSS_CK_TEMPLATE_START(cert_tmpl, attr, ctsize); | +10 | +||||
530 | +NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_ID, id); | +10 | +||||
531 | +NSS_CK_SET_ATTRIBUTE_UTF8(attr, CKA_LABEL, nickname); | +10 | +||||
532 | +NSS_CK_TEMPLATE_FINISH(cert_tmpl, attr, ctsize); | +10 | +||||
534 | +nssCKObject_SetAttributes(rvObject->handle, | +10 | +||||
537 | +if (!rvObject->label && nickname) { | +10 | +||||
540 | +nssSession_Destroy(session); | +10 | +||||
541 | +nssSlot_Destroy(slot); | +10 | +
+
+
+
|
+ Times Different | +|||||
77 | +nssCryptokiObject_Equal( | +10 | +||||
81 | +return (o1->token == o2->token && o1->handle == o2->handle); | +10 | +
+
+
+
|
+ Times Different | +|||||
596 | +client &= ~(CERTDB_TRUSTED_CA | CERTDB_NS_TRUSTED_CA); | +10 | +||||
597 | +rvTrust->sslFlags |= CERTDB_TRUSTED_CLIENT_CA; | +10 | +
+
+
+
|
+ Times Different | +|||||
171 | +if (nssCryptokiObject_Equal(object->instances[i], instance)) { | +10 | +||||
176 | +if (found) { | +10 | +||||
182 | +nss_ZFreeIf(object->instances[i]->label); | +10 | +||||
183 | +object->instances[i]->label = instance->label; | +10 | +||||
184 | +nssPKIObject_Unlock(object); | +10 | +||||
185 | +instance->label = NULL; | +10 | +||||
186 | +nssCryptokiObject_Destroy(instance); | +10 | +||||
187 | +return PR_SUCCESS; | +10 | +
+
+
+
|
+ Times Different | +|||||
391 | +match_nickname(const void *k, void *v, void *a) | +10 | +||||
396 | +nssList *subjectList = (nssList *)v; | +10 | +||||
397 | +struct nickname_template_str *nt = (struct nickname_template_str *)a; | +10 | +||||
398 | +nssrv = nssList_GetArray(subjectList, (void **)&c, 1); | +10 | +||||
399 | +nickname = nssCertificate_GetNickname(c, NULL); | +10 | +||||
400 | +if (nssrv == PR_SUCCESS && nickname && | +10 | +||||
404 | +nss_ZFreeIf(nickname); | +10 | +||||
405 | +} | +10 | +
+
+
+
|
+ Times Different | +|||||
675 | +merge_object_instances( | +10 | +||||
681 | +SECStatus rv = SECSuccess; | +10 | +||||
683 | +instances = nssPKIObject_GetInstances(from); | +10 | +||||
684 | +if (instances == NULL) { | +10 | +||||
687 | +for (ci = instances, i = 0; *ci; ci++, i++) { | +10 | +||||
688 | +nssCryptokiObject *instance = nssCryptokiObject_Clone(*ci); | +10 | +||||
689 | +if (instance) { | +10 | +||||
690 | +if (nssPKIObject_AddInstance(to, instance) == PR_SUCCESS) { | +10 | +||||
691 | +continue; | +10 | +||||
699 | +nssCryptokiObjectArray_Destroy(instances); | +10 | +||||
700 | +return rv; | +10 | +||||
720 | +ce->hits++; | +10 | +||||
721 | +ce->lastHit = PR_Now(); | +10 | +||||
722 | +rvCert = nssCertificate_AddRef(ce->entry.cert); | +10 | +||||
726 | +PZ_Unlock(td->cache->lock); | +10 | +||||
727 | +nss_ZFreeIf(certNickname); | +10 | +||||
732 | +if (merge_object_instances(&rvCert->object, &cert->object) != SECSuccess) { | +10 | +||||
736 | +STAN_ForceCERTCertificateUpdate(rvCert); | +10 | +||||
737 | +nssCertificate_Destroy(cert); | +10 | +
+
+
+
|
+ Times Different | +|||||
1133 | +return lg_ULongAttribute(attribute, type, | +10 | +||||
1140 | +return lg_ULongAttribute(attribute, type, | +10 | +||||
1246 | +return LG_CLONE_ATTR(attribute, type, lg_StaticTrueAttr); | +10 | +||||
1456 | +lg_SetCertAttribute(LGObjectCache *obj, CK_ATTRIBUTE_TYPE type, | +10 | +||||
1461 | +char *nickname = NULL; | +10 | +||||
1467 | +if (type == CKA_NSS_EMAIL) { | +10 | +||||
1471 | +certHandle = lg_getCertDB(obj->sdb); | +10 | +||||
1472 | +if (certHandle == NULL) { | +10 | +||||
1477 | +if ((type != CKA_LABEL) && (type != CKA_ID)) { | +10 | +||||
1482 | +cert = lg_getCert(obj, certHandle); | +10 | +||||
1483 | +if (cert == NULL) { | +10 | +||||
1491 | +if (type == CKA_ID) { | +10 | +||||
1492 | +if (((cert->trust->sslFlags & CERTDB_USER) == 0) && | +10 | +||||
1493 | +((cert->trust->emailFlags & CERTDB_USER) == 0) && | +10 | +||||
1494 | +((cert->trust->objectSigningFlags & CERTDB_USER) == 0)) { | +10 | +||||
1497 | +keyHandle = lg_getKeyDB(obj->sdb); | +10 | +||||
1498 | +if (keyHandle) { | +10 | +||||
1499 | +if (nsslowkey_KeyForCertExists(keyHandle, cert)) { | +10 | +||||
1513 | +if (value != NULL) { | +10 | +||||
1514 | +nickname = PORT_ZAlloc(len + 1); | +10 | +||||
1515 | +if (nickname == NULL) { | +10 | +||||
1519 | +PORT_Memcpy(nickname, value, len); | +10 | +||||
1520 | +nickname[len] = 0; | +10 | +||||
1522 | +rv = nsslowcert_AddPermNickname(certHandle, cert, nickname); | +10 | +||||
1523 | +crv = (rv == SECSuccess) ? CKR_OK : CKR_DEVICE_ERROR; | +10 | +||||
1526 | +if (nickname) { | +10 | +||||
1527 | +PORT_Free(nickname); | +10 | +||||
1529 | +return crv; | +10 | +||||
1729 | +crv = lg_SetCertAttribute(obj, attr->type, | +10 | +||||
1730 | +attr->pValue, attr->ulValueLen); | +10 | +||||
1731 | +break; | +10 | +
+
+
+
|
+ Times Different | +|||||
1468 | +DecodeDBNicknameEntry(certDBEntryNickname *entry, SECItem *dbentry, | +10 | +||||
1474 | +if (dbentry->len < DB_NICKNAME_ENTRY_HEADER_LEN) { | +10 | +||||
1480 | +entry->subjectName.len = ((dbentry->data[0] << 8) | dbentry->data[1]); | +10 | +||||
1481 | +lenDiff = dbentry->len - | +10 | +||||
1483 | +if (lenDiff) { | +10 | +||||
1493 | +entry->subjectName.data = | +10 | +||||
1494 | +(unsigned char *)PORT_ArenaAlloc(entry->common.arena, | +10 | +||||
1495 | +entry->subjectName.len); | +10 | +||||
1496 | +if (entry->subjectName.data == NULL) { | +10 | +||||
1500 | +PORT_Memcpy(entry->subjectName.data, | +10 | +||||
1501 | +&dbentry->data[DB_NICKNAME_ENTRY_HEADER_LEN], | +10 | +||||
1502 | +entry->subjectName.len); | +10 | +||||
1503 | +entry->subjectName.type = siBuffer; | +10 | +||||
1505 | +entry->nickname = (char *)PORT_ArenaAlloc(entry->common.arena, | +10 | +||||
1506 | +PORT_Strlen(nickname) + 1); | +10 | +||||
1507 | +if (entry->nickname) { | +10 | +||||
1508 | +PORT_Strcpy(entry->nickname, nickname); | +10 | +||||
1656 | +if (dbentry.len < DB_NICKNAME_ENTRY_HEADER_LEN) { | +10 | +||||
1661 | +rv = DecodeDBNicknameEntry(entry, &dbentry, nickname); | +10 | +||||
1662 | +if (rv != SECSuccess) { | +10 | +||||
1666 | +PORT_FreeArena(tmparena, PR_FALSE); | +10 | +||||
1667 | +return (entry); | +10 | +||||
3191 | +AddNicknameToPermCert(NSSLOWCERTCertDBHandle *dbhandle, | +10 | +||||
3197 | +entry = cert->dbEntry; | +10 | +||||
3198 | +PORT_Assert(entry != NULL); | +10 | +||||
3199 | +if (entry == NULL) { | +10 | +||||
3203 | +pkcs11_freeNickname(entry->nickname, entry->nicknameSpace); | +10 | +||||
3204 | +entry->nickname = NULL; | +10 | +||||
3205 | +entry->nickname = pkcs11_copyNickname(nickname, entry->nicknameSpace, | +10 | +||||
3208 | +rv = WriteDBCertEntry(dbhandle, entry); | +10 | +||||
3209 | +if (rv) { | +10 | +||||
3213 | +pkcs11_freeNickname(cert->nickname, cert->nicknameSpace); | +10 | +||||
3214 | +cert->nickname = NULL; | +10 | +||||
3215 | +cert->nickname = pkcs11_copyNickname(nickname, cert->nicknameSpace, | +10 | +||||
3218 | +return (SECSuccess); | +10 | +||||
3229 | +nsslowcert_AddPermNickname(NSSLOWCERTCertDBHandle *dbhandle, | +10 | +||||
3232 | +SECStatus rv = SECFailure; | +10 | +||||
3233 | +certDBEntrySubject *entry = NULL; | +10 | +||||
3234 | +certDBEntryNickname *nicknameEntry = NULL; | +10 | +||||
3236 | +nsslowcert_LockDB(dbhandle); | +10 | +||||
3238 | +entry = ReadDBSubjectEntry(dbhandle, &cert->derSubject); | +10 | +||||
3239 | +if (entry == NULL) | +10 | +||||
3242 | +if (entry->nickname == NULL) { | +10 | +||||
3264 | +rv = AddNicknameToPermCert(dbhandle, cert, entry->nickname); | +10 | +||||
3265 | +if (rv != SECSuccess) { | +10 | +||||
3270 | +nicknameEntry = ReadDBNicknameEntry(dbhandle, entry->nickname); | +10 | +||||
3271 | +if (nicknameEntry == NULL) { | +10 | +||||
3287 | +if (entry) { | +10 | +||||
3288 | +DestroyDBEntry((certDBEntry *)entry); | +10 | +||||
3290 | +if (nicknameEntry) { | +10 | +||||
3291 | +DestroyDBEntry((certDBEntry *)nicknameEntry); | +10 | +||||
3293 | +nsslowcert_UnlockDB(dbhandle); | +10 | +||||
3294 | +return (rv); | +10 | +
+
+
+
|
+ Times Different | +|||||
1941 | +object->refLock = PZ_NewLock(nssILockRefLock); | +10 | +
+
+
+
|
+ Times Different | +|||||
894 | +} else if ((attr2 == NULL) || ((CK_LONG)attr2->ulValueLen <= 0)) { | +10 | +||||
898 | +subject.type = CKA_SUBJECT; | +10 | +||||
899 | +subject.pValue = NULL; | +10 | +||||
900 | +subject.ulValueLen = 0; | +10 | +||||
901 | +crv = (*db->sdb_GetAttributeValue)(db, sourceID, &subject, 1); | +10 | +||||
902 | +if (crv != CKR_OK) { | +10 | +||||
905 | +if ((CK_LONG)subject.ulValueLen < 0) { | +10 | +||||
909 | +temp1 = subject.pValue = PORT_Alloc(++subject.ulValueLen); | +10 | +||||
910 | +if (temp1 == NULL) { | +10 | +||||
914 | +crv = (*db->sdb_GetAttributeValue)(db, sourceID, &subject, 1); | +10 | +||||
915 | +if (crv != CKR_OK) { | +10 | +
+
+
+
|
+ Times Different | +|||||
150 | +nsIEventTarget *target = mDBConnection->getAsyncExecutionTarget(); | +4 | +||||
151 | +if (target) { | +4 | +||||
153 | +new LastDitchSqliteStatementFinalizer(mDBConnection, mAsyncStatement); | +4 | +||||
154 | +(void)target->Dispatch(event, NS_DISPATCH_NORMAL); | +4 | +
+
+
+
|
+ Times Different | +|||||
305 | +rv = notifyResults(); | +2 | +||||
306 | +if (NS_FAILED(rv)) | +2 | +||||
310 | +mIntervalStart = now; | +2 | +
+
+
+
|
+ Times Different | +|||||
1152 | +nsDependentCString statementString(::sqlite3_sql(aStatement)); | +4 | +||||
1154 | +duration.ToMilliseconds()); | +4 | +||||
1238 | +nsDependentCString statementString(aSqlString); | +5 | +||||
1240 | +duration.ToMilliseconds()); | +5 | +
+
+
+
|
+ Times Different | +|||||
585 | +CodedOutputStream::CodedOutputStream(ZeroCopyOutputStream* output) | +9 | +||||
591 | +aliasing_enabled_(false) { | +9 | +||||
593 | +Refresh(); | +9 | +||||
597 | +had_error_ = false; | +9 | +||||
598 | +} | +9 | +||||
600 | +CodedOutputStream::~CodedOutputStream() { | +9 | +||||
601 | +if (buffer_size_ > 0) { | +9 | +||||
604 | +} | +9 | +||||
626 | +void CodedOutputStream::WriteRaw(const void* data, int size) { | +9 | +||||
627 | +while (buffer_size_ < size) { | +9 | +||||
631 | +if (!Refresh()) return; | +9 | +||||
634 | +memcpy(buffer_, data, size); | +9 | +||||
635 | +Advance(size); | +9 | +||||
694 | + target[0] = static_cast |
+ 9 | +||||
695 | +if (value >= (1 << 7)) { | +9 | +||||
717 | +target[0] &= 0x7F; | +9 | +||||
718 | +return target + 1; | +9 | +||||
722 | +void CodedOutputStream::WriteVarint32(uint32 value) { | +9 | +||||
723 | +if (buffer_size_ >= kMaxVarint32Bytes) { | +9 | +||||
726 | +uint8* target = buffer_; | +9 | +||||
727 | +uint8* end = WriteVarint32FallbackToArrayInline(value, target); | +9 | +||||
728 | +int size = end - target; | +9 | +||||
729 | +Advance(size); | +9 | +||||
735 | +while (value > 0x7F) { | +9 | +||||
739 | + bytes[size++] = static_cast |
+ 9 | +||||
740 | +WriteRaw(bytes, size); | +9 | +||||
742 | +} | +9 | +||||
849 | +bool CodedOutputStream::Refresh() { | +9 | +||||
851 | +if (output_->Next(&void_buffer, &buffer_size_)) { | +9 | +||||
852 | + buffer_ = reinterpret_cast |
+ 9 | +||||
853 | +total_bytes_ += buffer_size_; | +9 | +||||
854 | +return true; | +9 | +
+
+
+
|
+ Times Different | +|||||
44 | +ZeroCopyOutputStream::~ZeroCopyOutputStream() {} | +9 | +
+
+
+
|
+ Times Different | +|||||
110 | +ArrayOutputStream::ArrayOutputStream(void* data, int size, int block_size) | +9 | +||||
115 | +last_returned_size_(0) { | +9 | +||||
116 | +} | +9 | +||||
118 | +ArrayOutputStream::~ArrayOutputStream() { | +9 | +||||
119 | +} | +9 | +||||
121 | +bool ArrayOutputStream::Next(void** data, int* size) { | +9 | +||||
122 | +if (position_ < size_) { | +9 | +||||
123 | +last_returned_size_ = min(block_size_, size_ - position_); | +9 | +||||
124 | +*data = data_ + position_; | +9 | +||||
125 | +*size = last_returned_size_; | +9 | +||||
126 | +position_ += last_returned_size_; | +9 | +||||
127 | +return true; | +9 | +
+
+
+
|
+ Times Different | +|||||
217 | +uint8* MessageLite::SerializeWithCachedSizesToArray(uint8* target) const { | +9 | +||||
220 | +int size = GetCachedSize(); | +9 | +||||
221 | +io::ArrayOutputStream out(target, size); | +9 | +||||
222 | +io::CodedOutputStream coded_out(&out); | +9 | +||||
223 | +SerializeWithCachedSizes(&coded_out); | +9 | +||||
224 | +GOOGLE_CHECK(!coded_out.HadError()); | +9 | +||||
225 | +return target + size; | +9 | +||||
272 | +bool MessageLite::AppendToString(string* output) const { | +9 | +||||
273 | +GOOGLE_DCHECK(IsInitialized()) << InitializationErrorMessage("serialize", *this); | +9 | +||||
274 | +return AppendPartialToString(output); | +9 | +||||
277 | +bool MessageLite::AppendPartialToString(string* output) const { | +9 | +||||
278 | +int old_size = output->size(); | +9 | +||||
279 | +int byte_size = ByteSize(); | +9 | +||||
280 | +STLStringResizeUninitialized(output, old_size + byte_size); | +9 | +||||
282 | + reinterpret_cast |
+ 9 | +||||
283 | +uint8* end = SerializeWithCachedSizesToArray(start); | +9 | +||||
284 | +if (end - start != byte_size) { | +9 | +||||
287 | +return true; | +9 | +||||
290 | +bool MessageLite::SerializeToString(string* output) const { | +9 | +||||
291 | +output->clear(); | +9 | +||||
292 | +return AppendToString(output); | +9 | +
+
+
+
|
+ Times Different | +|||||
367 | +void WireFormatLite::WriteEnum(int field_number, int value, | +9 | +||||
371 | +} | +9 | +||||
381 | +void WireFormatLite::WriteStringMaybeAliased( | +9 | +||||
386 | +GOOGLE_CHECK(value.size() <= kint32max); | +9 | +||||
387 | +output->WriteVarint32(value.size()); | +9 | +||||
388 | +output->WriteRawMaybeAliased(value.data(), value.size()); | +9 | +||||
389 | +} | +9 | +||||
415 | +void WireFormatLite::WriteMessage(int field_number, | +9 | +||||
419 | +const int size = value.GetCachedSize(); | +9 | +||||
420 | +output->WriteVarint32(size); | +9 | +||||
421 | +value.SerializeWithCachedSizes(output); | +9 | +||||
422 | +} | +9 | +
+
+
+
|
+ Times Different | +|||||
268 | +const char16_t* filename = aOb.Filename(); | +5 | +||||
271 | +if (!filename) { | +5 | +||||
779 | +TelemetryImpl::ReflectSQL(const SlowSQLEntryType *entry, | +7 | +||||
784 | +if (stat->hitCount == 0) | +7 | +||||
787 | +const nsACString &sql = entry->GetKey(); | +7 | +||||
789 | + JS::Rooted |
+ 7 | +||||
790 | +if (!arrayObj) { | +7 | +||||
793 | +return (JS_DefineElement(cx, arrayObj, 0, stat->hitCount, JSPROP_ENUMERATE) | +7 | +||||
794 | +&& JS_DefineElement(cx, arrayObj, 1, stat->totalTime, JSPROP_ENUMERATE) | +7 | +||||
795 | +&& JS_DefineProperty(cx, obj, sql.BeginReading(), arrayObj, | +7 | +||||
796 | +JSPROP_ENUMERATE)); | +7 | +||||
800 | +TelemetryImpl::ReflectMainThreadSQL(SlowSQLEntryType *entry, JSContext *cx, | +7 | +||||
803 | +return ReflectSQL(entry, &entry->mData.mainThread, cx, obj); | +7 | +||||
807 | +TelemetryImpl::ReflectOtherThreadsSQL(SlowSQLEntryType *entry, JSContext *cx, | +7 | +||||
810 | +return ReflectSQL(entry, &entry->mData.otherThreads, cx, obj); | +7 | +||||
1571 | +TelemetryImpl::StoreSlowSQL(const nsACString &sql, uint32_t delay, | +7 | +||||
1574 | + AutoHashtable |
+ 7 | +||||
1575 | +if (state == Sanitized) | +7 | +||||
1576 | +slowSQLMap = &(sTelemetry->mSanitizedSQL); | +7 | +||||
1578 | +slowSQLMap = &(sTelemetry->mPrivateSQL); | +7 | +||||
1580 | +MutexAutoLock hashMutex(sTelemetry->mHashMutex); | +7 | +||||
1582 | +SlowSQLEntryType *entry = slowSQLMap->GetEntry(sql); | +7 | +||||
1583 | +if (!entry) { | +7 | +||||
1584 | +entry = slowSQLMap->PutEntry(sql); | +7 | +||||
1585 | +if (MOZ_UNLIKELY(!entry)) | +7 | +||||
1587 | +entry->mData.mainThread.hitCount = 0; | +7 | +||||
1588 | +entry->mData.mainThread.totalTime = 0; | +7 | +||||
1589 | +entry->mData.otherThreads.hitCount = 0; | +7 | +||||
1590 | +entry->mData.otherThreads.totalTime = 0; | +7 | +||||
1593 | +if (NS_IsMainThread()) { | +7 | +||||
1594 | +entry->mData.mainThread.hitCount++; | +5 | +||||
1595 | +entry->mData.mainThread.totalTime += delay; | +5 | +||||
1597 | +entry->mData.otherThreads.hitCount++; | +4 | +||||
1598 | +entry->mData.otherThreads.totalTime += delay; | +4 | +||||
1599 | +} | +7 | +||||
1646 | +TelemetryImpl::SanitizeSQL(const nsACString &sql) { | +7 | +||||
1648 | +int length = sql.Length(); | +7 | +||||
1658 | +State state = NORMAL; | +7 | +||||
1659 | +int fragmentStart = 0; | +7 | +||||
1660 | +for (int i = 0; i < length; i++) { | +7 | +||||
1661 | +char character = sql[i]; | +7 | +||||
1662 | +char nextCharacter = (i + 1 < length) ? sql[i + 1] : '\0'; | +7 | +||||
1664 | +switch (character) { | +7 | +||||
1667 | +if (state == NORMAL) { | +2 | +||||
1668 | +state = (character == '\'') ? SINGLE_QUOTE : DOUBLE_QUOTE; | +2 | +||||
1669 | +output += nsDependentCSubstring(sql, fragmentStart, i - fragmentStart); | +2 | +||||
1670 | +output += ":private"; | +2 | +||||
1671 | +fragmentStart = -1; | +2 | +||||
1672 | +} else if ((state == SINGLE_QUOTE && character == '\'') || | +2 | +||||
1674 | +if (nextCharacter == character) { | +2 | +||||
1678 | +state = NORMAL; | +2 | +||||
1679 | +fragmentStart = i + 1; | +2 | +||||
1692 | +if (state == DASH_COMMENT) { | +4 | +||||
1716 | +if ((fragmentStart >= 0) && fragmentStart < length) | +7 | +||||
1717 | +output += nsDependentCSubstring(sql, fragmentStart, length - fragmentStart); | +7 | +||||
1719 | +return output; | +7 | +||||
1779 | +TelemetryImpl::RecordSlowStatement(const nsACString &sql, | +7 | +||||
1783 | +MOZ_ASSERT(!sql.IsEmpty()); | +7 | +||||
1784 | +MOZ_ASSERT(!dbName.IsEmpty()); | +7 | +||||
1786 | +if (!sTelemetry || !TelemetryHistogram::CanRecordExtended()) | +7 | +||||
1791 | +for (const TrackedDBEntry& nameEntry : kTrackedDBs) { | +7 | +||||
1792 | +MOZ_ASSERT(nameEntry.mNameLength); | +7 | +||||
1793 | +const nsDependentCString name(nameEntry.mName, nameEntry.mNameLength); | +7 | +||||
1794 | +if (dbName == name) { | +7 | +||||
1795 | +recordStatement = true; | +7 | +||||
1800 | +if (!recordStatement) { | +7 | +||||
1801 | +for (const TrackedDBEntry& prefixEntry : kTrackedDBPrefixes) { | +2 | +||||
1802 | +MOZ_ASSERT(prefixEntry.mNameLength); | +2 | +||||
1804 | +prefixEntry.mNameLength); | +2 | +||||
1805 | +if (StringBeginsWith(dbName, prefix)) { | +2 | +||||
1806 | +recordStatement = true; | +2 | +||||
1812 | +if (recordStatement) { | +7 | +||||
1813 | +nsAutoCString sanitizedSQL(SanitizeSQL(sql)); | +7 | +||||
1814 | +if (sanitizedSQL.Length() > kMaxSlowStatementLength) { | +7 | +||||
1818 | +sanitizedSQL.AppendPrintf(" /* %s */", nsPromiseFlatCString(dbName).get()); | +7 | +||||
1819 | +StoreSlowSQL(sanitizedSQL, delay, Sanitized); | +7 | +||||
1822 | +nsAutoCString aggregate; | +2 | +||||
1824 | +nsPromiseFlatCString(dbName).get()); | +2 | +||||
1825 | +StoreSlowSQL(aggregate, delay, Sanitized); | +2 | +||||
1828 | +nsAutoCString fullSQL; | +7 | +||||
1831 | +nsPromiseFlatCString(dbName).get()); | +7 | +||||
1832 | +StoreSlowSQL(fullSQL, delay, Unsanitized); | +7 | +||||
2294 | +RecordSlowSQLStatement(const nsACString &statement, | +7 | +||||
2298 | +TelemetryImpl::RecordSlowStatement(statement, dbName, delay); | +7 | +||||
2299 | +} | +7 | +
+
+
+
|
+ Times Different | +|||||
1941 | +TelemetryHistogram::CanRecordExtended() { | +7 | +||||
1942 | +StaticMutexAutoLock locker(gTelemetryHistogramMutex); | +7 | +||||
1943 | +return internal_CanRecordExtended(); | +7 | +
+
+
+
|
+ Times Different | +|||||
384 | +aResult = mTableRequestResult; | +9 | +||||
1577 | +LoadMetadata(file, aResult); | +2 | +||||
1578 | +continue; | +2 | +
+
+
+
|
+ Times Different | +|||||
2080 | +LOG(("The previous update observer hasn't been notified.")); | +2 | +
+
+
+
|
+ Times Different | +|||||
167 | + nsCOMPtr |
+ 9 | +||||
168 | +NS_ENSURE_SUCCESS(rv, rv); | +9 | +||||
170 | +rv = httpChannel->SetRequestHeader(NS_LITERAL_CSTRING("X-HTTP-Method-Override"), | +9 | +||||
172 | +false); | +9 | +||||
173 | +NS_ENSURE_SUCCESS(rv, rv); | +9 | +||||
252 | +updateUrl.AppendPrintf("&$req=%s", nsCString(aRequestPayload).get()); | +9 | +||||
323 | +LOG(("Service busy, already updating, queuing update %s from %s", | +2 | +||||
324 | +aRequestPayload.Data(), aUpdateUrl.Data())); | +2 | +||||
325 | +*_retval = false; | +2 | +||||
326 | +PendingRequest *request = mPendingRequests.AppendElement(); | +2 | +||||
327 | +request->mTables = aRequestTables; | +2 | +||||
328 | +request->mRequestPayload = aRequestPayload; | +2 | +||||
329 | +request->mIsPostRequest = aIsPostRequest; | +2 | +||||
330 | +request->mUrl = aUpdateUrl; | +2 | +||||
331 | +request->mSuccessCallback = aSuccessCallback; | +2 | +||||
332 | +request->mUpdateErrorCallback = aUpdateErrorCallback; | +2 | +||||
333 | +request->mDownloadErrorCallback = aDownloadErrorCallback; | +2 | +||||
338 | +mFetchNextRequestTimer = do_CreateInstance("@mozilla.org/timer;1", &rv); | +2 | +||||
339 | +if (NS_SUCCEEDED(rv)) { | +2 | +||||
340 | +rv = mFetchNextRequestTimer->InitWithCallback(this, | +2 | +||||
342 | +nsITimer::TYPE_ONE_SHOT); | +2 | +||||
439 | +PendingRequest request = mPendingRequests[0]; | +2 | +||||
440 | +mPendingRequests.RemoveElementAt(0); | +2 | +||||
441 | +LOG(("Stream updater: fetching next request: %s, %s", | +2 | +||||
442 | +request.mTables.get(), request.mUrl.get())); | +2 | +||||
452 | +&dummy); | +2 | +||||
453 | +return NS_OK; | +2 | +||||
934 | +nsUrlClassifierStreamUpdater::Notify(nsITimer *timer) | +2 | +||||
936 | +LOG(("nsUrlClassifierStreamUpdater::Notify [%p]", this)); | +2 | +||||
938 | +if (timer == mFetchNextRequestTimer) { | +2 | +||||
939 | +mFetchNextRequestTimer = nullptr; | +2 | +||||
940 | +FetchNextRequest(); | +2 | +||||
941 | +return NS_OK; | +2 | +
+
+
+
|
+ Times Different | +|||||
105 | +struct PendingRequest { | +2 | +
+
+
+
|
+ Times Different | +|||||
104 | +InitListUpdateRequest(ThreatType aThreatType, | +9 | +||||
108 | +aListUpdateRequest->set_threat_type(aThreatType); | +9 | +||||
109 | +aListUpdateRequest->set_platform_type(GetPlatformType()); | +9 | +||||
110 | +aListUpdateRequest->set_threat_entry_type(URL); | +9 | +||||
112 | +Constraints* contraints = new Constraints(); | +9 | +||||
113 | +contraints->add_supported_compressions(RICE); | +9 | +||||
114 | +aListUpdateRequest->set_allocated_constraints(contraints); | +9 | +||||
117 | +if (aStateBase64[0] != '\0') { | +9 | +||||
124 | +} | +9 | +||||
127 | +CreateClientInfo() | +9 | +||||
129 | +ClientInfo* c = new ClientInfo(); | +9 | +||||
132 | +do_GetService(NS_PREFSERVICE_CONTRACTID); | +9 | +||||
134 | +nsXPIDLCString clientId; | +9 | +||||
135 | +nsresult rv = prefBranch->GetCharPref("browser.safebrowsing.id", | +9 | +||||
136 | +getter_Copies(clientId)); | +9 | +||||
138 | +if (NS_FAILED(rv)) { | +9 | +||||
142 | +c->set_client_id(clientId.get()); | +9 | +||||
144 | +return c; | +9 | +||||
261 | +nsUrlClassifierUtils::ConvertListNameToThreatType(const nsACString& aListName, | +9 | +||||
264 | +for (uint32_t i = 0; i < ArrayLength(THREAT_TYPE_CONV_TABLE); i++) { | +9 | +||||
265 | +if (aListName.EqualsASCII(THREAT_TYPE_CONV_TABLE[i].mListName)) { | +9 | +||||
266 | +*aThreatType = THREAT_TYPE_CONV_TABLE[i].mThreatType; | +9 | +||||
267 | +return NS_OK; | +9 | +||||
330 | +nsUrlClassifierUtils::MakeUpdateRequestV4(const char** aListNames, | +9 | +||||
337 | +FetchThreatListUpdatesRequest r; | +9 | +||||
338 | +r.set_allocated_client(CreateClientInfo()); | +9 | +||||
340 | +for (uint32_t i = 0; i < aCount; i++) { | +9 | +||||
341 | +nsCString listName(aListNames[i]); | +9 | +||||
343 | +nsresult rv = ConvertListNameToThreatType(listName, &threatType); | +9 | +||||
344 | +if (NS_FAILED(rv)) { | +9 | +||||
347 | +auto lur = r.mutable_list_update_requests()->Add(); | +9 | +||||
348 | + InitListUpdateRequest(static_cast |
+ 9 | +||||
352 | +std::string s; | +9 | +||||
353 | +r.SerializeToString(&s); | +9 | +||||
357 | +(const uint8_t*)s.c_str(), | +9 | +||||
359 | +out); | +9 | +||||
360 | +NS_ENSURE_SUCCESS(rv, rv); | +9 | +||||
364 | +return NS_OK; | +9 | +
+
+
+
|
+ Times Different | +|||||
129 | +bool ThreatType_IsValid(int value) { | +9 | +||||
149 | +bool PlatformType_IsValid(int value) { | +9 | +||||
150 | +switch(value) { | +9 | +||||
166 | +bool CompressionType_IsValid(int value) { | +9 | +||||
167 | +switch(value) { | +9 | +||||
177 | +bool ThreatEntryType_IsValid(int value) { | +9 | +||||
178 | +switch(value) { | +9 | +||||
1401 | +FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::~FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints() { | +9 | +||||
1403 | +SharedDtor(); | +9 | +||||
1404 | +} | +9 | +||||
1406 | +void FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::SharedDtor() { | +9 | +||||
1407 | +if (region_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { | +9 | +||||
1416 | +} | +9 | +||||
1571 | +void FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::SerializeWithCachedSizes( | +9 | +||||
1575 | +if (has_max_update_entries()) { | +9 | +||||
1580 | +if (has_max_database_entries()) { | +9 | +||||
1585 | +if (has_region()) { | +9 | +||||
1591 | +for (int i = 0; i < this->supported_compressions_size(); i++) { | +9 | +||||
1593 | +4, this->supported_compressions(i), output); | +9 | +||||
1596 | +output->WriteRaw(unknown_fields().data(), | +9 | +||||
1597 | +unknown_fields().size()); | +9 | +||||
1599 | +} | +9 | +||||
1601 | +int FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::ByteSize() const { | +9 | +||||
1602 | +int total_size = 0; | +9 | +||||
1604 | +if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { | +9 | +||||
1629 | +int data_size = 0; | +9 | +||||
1630 | +for (int i = 0; i < this->supported_compressions_size(); i++) { | +9 | +||||
1632 | +this->supported_compressions(i)); | +9 | +||||
1634 | +total_size += 1 * this->supported_compressions_size() + data_size; | +9 | +||||
1637 | +total_size += unknown_fields().size(); | +9 | +||||
1640 | +_cached_size_ = total_size; | +9 | +||||
1642 | +return total_size; | +9 | +||||
1738 | +FetchThreatListUpdatesRequest_ListUpdateRequest::~FetchThreatListUpdatesRequest_ListUpdateRequest() { | +9 | +||||
1740 | +SharedDtor(); | +9 | +||||
1741 | +} | +9 | +||||
1743 | +void FetchThreatListUpdatesRequest_ListUpdateRequest::SharedDtor() { | +9 | +||||
1744 | +if (state_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { | +9 | +||||
1750 | +if (this != default_instance_) { | +9 | +||||
1752 | +delete constraints_; | +9 | +||||
1754 | +} | +9 | +||||
1931 | +void FetchThreatListUpdatesRequest_ListUpdateRequest::SerializeWithCachedSizes( | +9 | +||||
1935 | +if (has_threat_type()) { | +9 | +||||
1937 | +1, this->threat_type(), output); | +9 | +||||
1941 | +if (has_platform_type()) { | +9 | +||||
1943 | +2, this->platform_type(), output); | +9 | +||||
1947 | +if (has_state()) { | +9 | +||||
1953 | +if (has_constraints()) { | +9 | +||||
1955 | +4, this->constraints(), output); | +9 | +||||
1959 | +if (has_threat_entry_type()) { | +9 | +||||
1961 | +5, this->threat_entry_type(), output); | +9 | +||||
1964 | +output->WriteRaw(unknown_fields().data(), | +9 | +||||
1965 | +unknown_fields().size()); | +9 | +||||
1967 | +} | +9 | +||||
1969 | +int FetchThreatListUpdatesRequest_ListUpdateRequest::ByteSize() const { | +9 | +||||
1970 | +int total_size = 0; | +9 | +||||
1972 | +if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { | +9 | +||||
1974 | +if (has_threat_type()) { | +9 | +||||
1976 | +::google::protobuf::internal::WireFormatLite::EnumSize(this->threat_type()); | +9 | +||||
1980 | +if (has_platform_type()) { | +9 | +||||
1982 | +::google::protobuf::internal::WireFormatLite::EnumSize(this->platform_type()); | +9 | +||||
1986 | +if (has_threat_entry_type()) { | +9 | +||||
1988 | +::google::protobuf::internal::WireFormatLite::EnumSize(this->threat_entry_type()); | +9 | +||||
1992 | +if (has_state()) { | +9 | +||||
1999 | +if (has_constraints()) { | +9 | +||||
2002 | +this->constraints()); | +9 | +||||
2006 | +total_size += unknown_fields().size(); | +9 | +||||
2009 | +_cached_size_ = total_size; | +9 | +||||
2011 | +return total_size; | +9 | +||||
2113 | +FetchThreatListUpdatesRequest::~FetchThreatListUpdatesRequest() { | +9 | +||||
2115 | +SharedDtor(); | +9 | +||||
2116 | +} | +9 | +||||
2118 | +void FetchThreatListUpdatesRequest::SharedDtor() { | +9 | +||||
2122 | +if (this != default_instance_) { | +9 | +||||
2124 | +delete client_; | +9 | +||||
2125 | +delete chrome_client_info_; | +9 | +||||
2127 | +} | +9 | +||||
2238 | +void FetchThreatListUpdatesRequest::SerializeWithCachedSizes( | +9 | +||||
2242 | +if (has_client()) { | +9 | +||||
2244 | +1, this->client(), output); | +9 | +||||
2248 | +for (int i = 0; i < this->list_update_requests_size(); i++) { | +9 | +||||
2250 | +3, this->list_update_requests(i), output); | +9 | +||||
2254 | +if (has_chrome_client_info()) { | +9 | +||||
2259 | +output->WriteRaw(unknown_fields().data(), | +9 | +||||
2260 | +unknown_fields().size()); | +9 | +||||
2262 | +} | +9 | +||||
2264 | +int FetchThreatListUpdatesRequest::ByteSize() const { | +9 | +||||
2265 | +int total_size = 0; | +9 | +||||
2267 | +if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { | +9 | +||||
2269 | +if (has_client()) { | +9 | +||||
2272 | +this->client()); | +9 | +||||
2276 | +if (has_chrome_client_info()) { | +9 | +||||
2284 | +total_size += 1 * this->list_update_requests_size(); | +9 | +||||
2285 | +for (int i = 0; i < this->list_update_requests_size(); i++) { | +9 | +||||
2288 | +this->list_update_requests(i)); | +9 | +||||
2291 | +total_size += unknown_fields().size(); | +9 | +||||
2294 | +_cached_size_ = total_size; | +9 | +||||
2296 | +return total_size; | +9 | +||||
2324 | +bool FetchThreatListUpdatesRequest::IsInitialized() const { | +9 | +||||
2326 | +return true; | +9 | +||||
4322 | +ClientInfo::~ClientInfo() { | +9 | +||||
4324 | +SharedDtor(); | +9 | +||||
4325 | +} | +9 | +||||
4327 | +void ClientInfo::SharedDtor() { | +9 | +||||
4328 | +if (client_id_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { | +9 | +||||
4329 | +delete client_id_; | +9 | +||||
4331 | +if (client_version_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { | +9 | +||||
4340 | +} | +9 | +||||
4440 | +void ClientInfo::SerializeWithCachedSizes( | +9 | +||||
4444 | +if (has_client_id()) { | +9 | +||||
4446 | +1, this->client_id(), output); | +9 | +||||
4450 | +if (has_client_version()) { | +9 | +||||
4455 | +output->WriteRaw(unknown_fields().data(), | +9 | +||||
4456 | +unknown_fields().size()); | +9 | +||||
4458 | +} | +9 | +||||
4460 | +int ClientInfo::ByteSize() const { | +9 | +||||
4461 | +int total_size = 0; | +9 | +||||
4463 | +if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { | +9 | +||||
4465 | +if (has_client_id()) { | +9 | +||||
4468 | +this->client_id()); | +9 | +||||
4472 | +if (has_client_version()) { | +9 | +||||
4479 | +total_size += unknown_fields().size(); | +9 | +||||
4482 | +_cached_size_ = total_size; | +9 | +||||
4484 | +return total_size; | +9 | +
+
+
+
|
+ Times Different | +|||||
158 | +return; | +11 | +||||
209 | +*aDelta = 0; | +2 | +||||
213 | +isNewer = true; | +11 | +||||
214 | +*aDelta = timeDelta - timeStampDelta; | +11 | +
+
+
+
|
+ Times Different | +|||||
985 | +do { | +1 | +||||
1003 | +TimeStamp now = TimeStamp::Now(); | +1 | +||||
1005 | +tv.tv_sec = 0; | +1 | +||||
1007 | +kClipboardTimeout - (now - start).ToMicroseconds()); | +1 | +||||
1008 | +select_result = select(cnumber, &select_set, nullptr, nullptr, &tv); | +1 | +
+
+
+
|
+ Times Different | +|||||
2105 | +GetLayerManager()->ScheduleComposite(); | +2 | +||||
2106 | +GetLayerManager()->SetNeedsComposite(false); | +2 | +||||
2356 | +CheckForRollup(0, 0, false, true); | +2 | +
+
+
+
|
+ Times Different | +|||||
299 | +DispatchDummyEvent(thr); | +4 | +||||
306 | +nsBaseAppShell::DispatchDummyEvent(nsIThread* aTarget) | +4 | +||||
308 | +NS_ASSERTION(NS_IsMainThread(), "Wrong thread!"); | +4 | +||||
310 | +if (!mDummyEvent) | +4 | +||||
311 | +mDummyEvent = new mozilla::Runnable("DummyEvent"); | +4 | +||||
313 | +return NS_SUCCEEDED(aTarget->Dispatch(mDummyEvent, NS_DISPATCH_NORMAL)); | +4 | +
+
+
+
|
+ Times Different | +|||||
1206 | +DispatchEvent(aEvent, status); | +10 | +||||
1207 | +return status; | +10 | +
+
+
+
|
+ Times Different | +|||||
1362 | +nsresult rv = NS_DispatchToCurrentThread(this); | +8 | +||||
1363 | +if (NS_FAILED(rv)) { | +8 | +
+
+
+
|
+ Times Different | +|||||
913 | +CCGraph::FindNode(void* aPtr) | +8 | +||||
915 | +PtrToNodeEntry* e = FindNodeEntry(aPtr); | +8 | +||||
916 | +return e ? e->mNode : nullptr; | +8 | +||||
2773 | +nsCycleCollector_dispatchDeferredDeletion(true); | +10 | +||||
2790 | +SnowWhiteKiller::Visit(aBuffer, aEntry); | +10 | +||||
2892 | +timeLog.Checkpoint("MarkRoots()"); | +9 | +||||
2970 | +FloodBlackNode(mWhiteNodeCount, failed, wm->mKey); | +6 | +||||
2971 | +anyChanged = true; | +6 | +||||
2975 | +FloodBlackNode(mWhiteNodeCount, failed, wm->mVal); | +6 | +||||
2976 | +anyChanged = true; | +6 | +||||
2998 | +Visit(nsPurpleBuffer& aBuffer, nsPurpleBufferEntry* aEntry) | +8 | +||||
3000 | +MOZ_ASSERT(aEntry->mObject, | +8 | +||||
3002 | +MOZ_ASSERT(aEntry->mRefCnt->get() != 0, | +8 | +||||
3005 | +void* obj = aEntry->mObject; | +8 | +||||
3006 | +if (!aEntry->mParticipant) { | +8 | +||||
3007 | + obj = CanonicalizeXPCOMParticipant(static_cast |
+ 8 | +||||
3008 | +MOZ_ASSERT(obj, "Don't add objects that don't participate in collection!"); | +8 | +||||
3011 | +PtrInfo* pi = mGraph.FindNode(obj); | +8 | +||||
3012 | +if (!pi) { | +8 | +||||
3015 | +MOZ_ASSERT(pi->mParticipant, "No dead objects should be in the purple buffer."); | +8 | +||||
3016 | +if (MOZ_UNLIKELY(mLogger)) { | +8 | +||||
3019 | +if (pi->mColor == black) { | +8 | +||||
3022 | +FloodBlackNode(mCount, mFailed, pi); | +8 | +||||
3023 | +return true; | +8 | +||||
3144 | +MOZ_ASSERT(!aFullySynchGraphBuild, | +8 | +||||
3153 | +MOZ_ASSERT(!pi->mParticipant, "Live nodes should all have been traversed"); | +8 | +||||
3528 | +mResults.mForcedGC = true; | +2 | +||||
3745 | +FinishAnyCurrentCollection(); | +6 | +||||
3749 | +nsCycleCollector::FinishAnyCurrentCollection() | +6 | +||||
3751 | +if (IsIdle()) { | +6 | +||||
3756 | +PrintPhase("FinishAnyCurrentCollection"); | +6 | +||||
3758 | +Collect(SliceCC, unlimitedBudget, nullptr); | +6 | +||||
3764 | +MOZ_ASSERT(IsIdle() || | +6 | +
+
+
+
|
+ Times Different | +|||||
98 | +virtual const char16_t* Filename() { return nullptr; } | +5 | +
+
+
+
|
+ Times Different | +|||||
1419 | +if (pendingPRThread == currentPRThread) { | +5 | +||||
1424 | +SafeMutexAutoUnlock unlockPending(mLock); | +5 | +||||
1426 | +if (!currentThread) { | +5 | +||||
1427 | +currentThread = NS_GetCurrentThread(); | +5 | +||||
1428 | +MOZ_ASSERT(currentThread, "This should never be null!"); | +5 | +||||
1433 | +if (!NS_ProcessNextEvent(currentThread, false)) { | +5 | +||||
1434 | +PR_Sleep(PR_INTERVAL_NO_WAIT); | +9 | +||||
1436 | +} | +5 | +||||
1441 | +lock.Unlock(); | +5 | +||||
1442 | +return entry->mServiceObject->QueryInterface(aIID, aResult); | +5 | +
+
+
+
|
+ Times Different | +|||||
640 | +*base64++ = kBase64URLAlphabet[aBinary[index] >> 2]; | +9 | +||||
641 | +*base64++ = kBase64URLAlphabet[((aBinary[index] & 0x3) << 4) | | +9 | +||||
642 | +(aBinary[index + 1] >> 4)]; | +9 | +||||
643 | +*base64++ = kBase64URLAlphabet[((aBinary[index + 1] & 0xf) << 2)]; | +9 | +||||
648 | +if (length % 4 == 2) { | +9 | +||||
652 | +} else if (length % 4 == 3) { | +9 | +||||
653 | +*base64++ = '='; | +9 | +||||
654 | +length += 1; | +9 | +
+
+
+
|
+ Times Different | +|||||
108 | +case nsXPTType::T_U64: dp->val.u64 = (uint64_t) value; break; | +4 | +
+
+
+
|
+ Times Different | +|||||
94 | +size_type minNewCapacity = curCapacity + (curCapacity >> 3); // multiply by 1.125 | +3 | +||||
95 | +temp = XPCOM_MAX(aCapacity, minNewCapacity) + neededExtraSpace; | +3 | +||||
100 | +const size_t MiB = 1 << 20; | +3 | +||||
101 | +temp = (MiB * ((temp + MiB - 1) / MiB)) - neededExtraSpace; | +3 | +
+
+
+
|
+ Times Different | +|||||
197 | +return; | +2 | +