WebKit Bugzilla
Attachment 342799 Details for
Bug 180913
: [GTK] Fix compilation failures for a Release build with assertions turned on
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
tentative patch - against 2.21.4
ndebug.diff (text/plain), 35.60 KB, created by
enometh
on 2018-06-15 03:07:04 PDT
(
hide
)
Description:
tentative patch - against 2.21.4
Filename:
MIME Type:
Creator:
enometh
Created:
2018-06-15 03:07:04 PDT
Size:
35.60 KB
patch
obsolete
> >--- a/Source/JavaScriptCore/assembler/AssemblerBuffer.h >+++ b/Source/JavaScriptCore/assembler/AssemblerBuffer.h >@@ -224,9 +224,11 @@ namespace JSC { > > ~LocalWriter() > { >+#if !defined(NDEBUG) > ASSERT(m_index - m_initialIndex <= m_requiredSpace); > ASSERT(m_buffer.m_index == m_initialIndex); > ASSERT(m_storageBuffer == m_buffer.m_storage.buffer()); >+#endif > m_buffer.m_index = m_index; > } > >--- a/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h >+++ b/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h >@@ -4254,7 +4254,7 @@ private: > } > > #endif // OS(MAC_OS_X) >-#elif !defined(NDEBUG) // CPU(X86) >+#else //failed assumption elif !defined(NDEBUG) // CPU(X86) > > // On x86-64 we should never be checking for SSE2 in a non-debug build, > // but non debug add this method to keep the asserts above happy. >--- a/Source/JavaScriptCore/bytecompiler/RegisterID.h >+++ b/Source/JavaScriptCore/bytecompiler/RegisterID.h >@@ -82,7 +82,9 @@ namespace JSC { > > int index() const > { >+#ifndef NDEBUG > ASSERT(m_didSetIndex); >+#endif > return m_virtualRegister.offset(); > } > >--- a/Source/JavaScriptCore/runtime/JSPromiseDeferred.cpp >+++ b/Source/JavaScriptCore/runtime/JSPromiseDeferred.cpp >@@ -106,14 +106,18 @@ void JSPromiseDeferred::resolve(ExecState* exec, JSValue value) > { > callFunction(exec, m_resolve.get(), value); > bool wasPending = exec->vm().promiseDeferredTimer->cancelPendingPromise(this); >+#ifndef NDEBUG > ASSERT_UNUSED(wasPending, wasPending == m_promiseIsAsyncPending); >+#endif > } > > void JSPromiseDeferred::reject(ExecState* exec, JSValue reason) > { > callFunction(exec, m_reject.get(), reason); > bool wasPending = exec->vm().promiseDeferredTimer->cancelPendingPromise(this); >+#ifndef NDEBUG > ASSERT_UNUSED(wasPending, wasPending == m_promiseIsAsyncPending); >+#endif > } > > void JSPromiseDeferred::reject(ExecState* exec, Exception* reason) >--- a/Source/JavaScriptCore/wasm/WasmMemory.h >+++ b/Source/JavaScriptCore/wasm/WasmMemory.h >@@ -86,7 +86,11 @@ public: > Expected<PageCount, GrowFailReason> grow(PageCount); > void registerInstance(Instance*); > >- void check() { ASSERT(!deletionHasBegun()); } >+ void check() { >+#ifndef NDEBUG >+ ASSERT(!deletionHasBegun()); >+#endif >+ } > > static ptrdiff_t offsetOfMemory() { return OBJECT_OFFSETOF(Memory, m_memory); } > static ptrdiff_t offsetOfSize() { return OBJECT_OFFSETOF(Memory, m_size); } >--- a/Source/WTF/wtf/dtoa/bignum.cc >+++ b/Source/WTF/wtf/dtoa/bignum.cc >@@ -761,7 +761,9 @@ namespace double_conversion { > borrow = difference >> (kChunkSize - 1); > } > Clamp(); >+#ifndef NDEBUG > ASSERT(Bignum::Equal(a, *this)); >+#endif > } > > >--- a/Source/WebCore/Modules/webdatabase/DatabaseManager.cpp >+++ b/Source/WebCore/Modules/webdatabase/DatabaseManager.cpp >@@ -257,7 +257,9 @@ DatabaseDetails DatabaseManager::detailsForNameAndOrigin(const String& name, Sec > std::lock_guard<Lock> lock { m_proposedDatabasesMutex }; > for (auto* proposedDatabase : m_proposedDatabases) { > if (proposedDatabase->details().name() == name && proposedDatabase->origin().equal(&origin)) { >+#ifndef NDEBUG > ASSERT(&proposedDatabase->details().thread() == &Thread::current() || isMainThread()); >+#endif > return proposedDatabase->details(); > } > } >--- a/Source/WebCore/Modules/webdatabase/DatabaseTask.h >+++ b/Source/WebCore/Modules/webdatabase/DatabaseTask.h >@@ -74,7 +74,7 @@ public: > > Database& database() const { return m_database; } > >-#if !ASSERT_DISABLED >+#ifndef NDEBUG > bool hasSynchronizer() const { return m_synchronizer; } > bool hasCheckedForTermination() const { return m_synchronizer->hasCheckedForTermination(); } > #endif >--- a/Source/WebCore/Modules/webdatabase/DatabaseThread.cpp >+++ b/Source/WebCore/Modules/webdatabase/DatabaseThread.cpp >@@ -152,13 +152,17 @@ void DatabaseThread::recordDatabaseClosed(Database& database) > > void DatabaseThread::scheduleTask(std::unique_ptr<DatabaseTask>&& task) > { >+#ifndef NDEBUG > ASSERT(!task->hasSynchronizer() || task->hasCheckedForTermination()); >+#endif > m_queue.append(WTFMove(task)); > } > > void DatabaseThread::scheduleImmediateTask(std::unique_ptr<DatabaseTask>&& task) > { >+#ifndef NDEBUG > ASSERT(!task->hasSynchronizer() || task->hasCheckedForTermination()); >+#endif > m_queue.prepend(WTFMove(task)); > } > >--- a/Source/WebCore/bindings/js/JSCallbackData.h >+++ b/Source/WebCore/bindings/js/JSCallbackData.h >@@ -56,8 +56,10 @@ protected: > > ~JSCallbackData() > { >+#ifndef NDEBUG > #if !PLATFORM(IOS) > ASSERT(m_thread.ptr() == &Thread::current()); >+#endif > #endif > } > >--- a/Source/WebCore/dom/ContainerNodeAlgorithms.cpp >+++ b/Source/WebCore/dom/ContainerNodeAlgorithms.cpp >@@ -168,7 +168,9 @@ void addChildNodesToDeletionQueue(Node*& head, Node*& tail, ContainerNode& conta > // We have to tell all children that their parent has died. > RefPtr<Node> next = nullptr; > for (RefPtr<Node> node = container.firstChild(); node; node = next) { >+#ifndef NDEBUG > ASSERT(!node->m_deletionHasBegun); >+#endif > > next = node->nextSibling(); > node->setNextSibling(nullptr); >@@ -211,7 +213,9 @@ void removeDetachedChildrenInContainer(ContainerNode& container) > Node* node; > Node* next; > while ((node = head)) { >+#ifndef NDEBUG > ASSERT(node->m_deletionHasBegun); >+#endif > > next = node->nextSibling(); > node->setNextSibling(nullptr); >--- a/Source/WebCore/dom/Document.cpp >+++ b/Source/WebCore/dom/Document.cpp >@@ -654,7 +654,9 @@ Document::~Document() > > void Document::removedLastRef() > { >+#ifndef NDEBUG > ASSERT(!m_deletionHasBegun); >+#endif > if (m_referencingNodeCount) { > // If removing a child removes the last node reference, we don't want the scope to be destroyed > // until after removeDetachedChildren returns, so we protect ourselves. >--- a/Source/WebCore/dom/Document.h >+++ b/Source/WebCore/dom/Document.h >@@ -347,16 +347,20 @@ public: > // pointer without introducing reference cycles. > void incrementReferencingNodeCount() > { >+#ifndef NDEBUG > ASSERT(!m_deletionHasBegun); >+#endif > ++m_referencingNodeCount; > } > > void decrementReferencingNodeCount() > { >+#ifndef NDEBUG > ASSERT(!m_deletionHasBegun || !m_referencingNodeCount); >+#endif > --m_referencingNodeCount; > if (!m_referencingNodeCount && !refCount()) { >-#if !ASSERT_DISABLED >+#ifndef NDEBUG > m_deletionHasBegun = true; > #endif > delete this; >--- a/Source/WebCore/dom/Element.h >+++ b/Source/WebCore/dom/Element.h >@@ -712,7 +712,9 @@ inline const Element* Element::rootElement() const > > inline bool Element::hasAttributeWithoutSynchronization(const QualifiedName& name) const > { >+#ifndef NDEBUG > ASSERT(fastAttributeLookupAllowed(name)); >+#endif > return elementData() && findAttributeByName(name); > } > >--- a/Source/WebCore/dom/Node.cpp >+++ b/Source/WebCore/dom/Node.cpp >@@ -277,10 +277,10 @@ Node::~Node() > { > ASSERT(isMainThread()); > ASSERT(!m_refCount); >+#ifndef NDEBUG > ASSERT(m_deletionHasBegun); > ASSERT(!m_adoptionIsRequired); > >-#ifndef NDEBUG > if (!ignoreSet().remove(this)) > nodeCounter.decrement(); > #endif >--- a/Source/WebCore/dom/Node.h >+++ b/Source/WebCore/dom/Node.h >@@ -694,9 +694,11 @@ inline void adopted(Node* node) > ALWAYS_INLINE void Node::ref() > { > ASSERT(isMainThread()); >+#ifndef NDEBUG > ASSERT(!m_deletionHasBegun); > ASSERT(!m_inRemovedLastRefFunction); > ASSERT(!m_adoptionIsRequired); >+#endif > ++m_refCount; > } > >@@ -704,9 +706,11 @@ ALWAYS_INLINE void Node::deref() > { > ASSERT(isMainThread()); > ASSERT(m_refCount >= 0); >+#ifndef NDEBUG > ASSERT(!m_deletionHasBegun); > ASSERT(!m_inRemovedLastRefFunction); > ASSERT(!m_adoptionIsRequired); >+#endif > if (--m_refCount <= 0 && !parentNode()) { > #ifndef NDEBUG > m_inRemovedLastRefFunction = true; >@@ -717,8 +721,10 @@ ALWAYS_INLINE void Node::deref() > > ALWAYS_INLINE bool Node::hasOneRef() const > { >+#ifndef NDEBUG > ASSERT(!m_deletionHasBegun); > ASSERT(!m_inRemovedLastRefFunction); >+#endif > return m_refCount == 1; > } > >@@ -780,7 +786,9 @@ inline void Node::setHasValidStyle() > inline void Node::setTreeScopeRecursively(TreeScope& newTreeScope) > { > ASSERT(!isDocumentNode()); >+#ifndef NDEBUG > ASSERT(!m_deletionHasBegun); >+#endif > if (m_treeScope != &newTreeScope) > moveTreeToNewScope(*this, *m_treeScope, newTreeScope); > } >--- a/Source/WebCore/dom/SlotAssignment.cpp >+++ b/Source/WebCore/dom/SlotAssignment.cpp >@@ -120,7 +120,9 @@ void SlotAssignment::removeSlotElementByName(const AtomicString& name, HTMLSlotE > m_needsToResolveSlotElements = true; > #endif > } >+#ifndef NDEBUG > ASSERT(slotInfo.element || m_needsToResolveSlotElements); >+#endif > } > > void SlotAssignment::didChangeSlot(const AtomicString& slotAttrValue, ShadowRoot& shadowRoot) >--- a/Source/WebCore/html/canvas/WebGLBuffer.h >+++ b/Source/WebCore/html/canvas/WebGLBuffer.h >@@ -24,7 +24,7 @@ > */ > > #pragma once >- >+#if ENABLE(WEBGL) > #include "WebGLSharedObject.h" > #include <wtf/Forward.h> > >@@ -99,3 +99,4 @@ private: > }; > > } // namespace WebCore >+#endif >--- a/Source/WebCore/loader/ImageLoader.cpp >+++ b/Source/WebCore/loader/ImageLoader.cpp >@@ -107,15 +107,21 @@ ImageLoader::~ImageLoader() > if (m_image) > m_image->removeClient(*this); > >+#ifndef NDEBUG > ASSERT(m_hasPendingBeforeLoadEvent || !beforeLoadEventSender().hasPendingEvents(*this)); >+#endif > if (m_hasPendingBeforeLoadEvent) > beforeLoadEventSender().cancelEvent(*this); > >+#ifndef NDEBUG > ASSERT(m_hasPendingLoadEvent || !loadEventSender().hasPendingEvents(*this)); >+#endif > if (m_hasPendingLoadEvent) > loadEventSender().cancelEvent(*this); > >+#ifndef NDEBUG > ASSERT(m_hasPendingErrorEvent || !errorEventSender().hasPendingEvents(*this)); >+#endif > if (m_hasPendingErrorEvent) > errorEventSender().cancelEvent(*this); > } >--- a/Source/WebCore/loader/ResourceLoader.cpp >+++ b/Source/WebCore/loader/ResourceLoader.cpp >@@ -116,7 +116,9 @@ void ResourceLoader::init(ResourceRequest&& clientRequest, CompletionHandler<voi > ASSERT(!m_handle); > ASSERT(m_request.isNull()); > ASSERT(m_deferredRequest.isNull()); >+#ifndef NDEBUG > ASSERT(!m_documentLoader->isSubstituteLoadPending(this)); >+#endif > > m_loadTiming.markStartTimeAndFetchStart(); > >@@ -297,7 +299,10 @@ void ResourceLoader::setDataBufferingPolicy(DataBufferingPolicy dataBufferingPol > > void ResourceLoader::willSwitchToSubstituteResource() > { >+ >+#ifndef NDEBUG > ASSERT(!m_documentLoader->isSubstituteLoadPending(this)); >+#endif > platformStrategies()->loaderStrategy()->remove(this); > if (m_handle) > m_handle->cancel(); >--- a/Source/WebCore/loader/cache/CachedResource.cpp >+++ b/Source/WebCore/loader/cache/CachedResource.cpp >@@ -166,7 +166,9 @@ CachedResource::~CachedResource() > ASSERT(!m_resourceToRevalidate); // Should be true because canDelete() checks this. > ASSERT(canDelete()); > ASSERT(!inCache()); >+#ifndef NDEBUG > ASSERT(!m_deleted); >+#endif > ASSERT(url().isNull() || !allowsCaching() || MemoryCache::singleton().resourceForRequest(resourceRequest(), sessionID()) != this); > > #ifndef NDEBUG >--- a/Source/WebCore/loader/cache/MemoryCache.cpp >+++ b/Source/WebCore/loader/cache/MemoryCache.cpp >@@ -157,7 +157,9 @@ void MemoryCache::revalidationSucceeded(CachedResource& revalidatingResource, co > adjustSize(resource.hasClients(), delta); > > revalidatingResource.switchClientsToRevalidatedResource(); >+#ifndef NDEBUG > ASSERT(!revalidatingResource.m_deleted); >+#endif > // this deletes the revalidating resource > revalidatingResource.clearResourceToRevalidate(); > } >@@ -464,14 +466,17 @@ void MemoryCache::removeFromLRUList(CachedResource& resource) > if (!resource.accessCount()) > return; > >-#if !ASSERT_DISABLED >+#ifndef NDEBUG > unsigned oldListIndex = resource.m_lruIndex; > #endif > > LRUList& list = lruListFor(resource); > > // Verify that the list we got is the list we want. >+ >+#ifndef NDEBUG > ASSERT(resource.m_lruIndex == oldListIndex); >+#endif > > bool removed = list.remove(&resource); > ASSERT_UNUSED(removed, removed); >--- a/Source/WebCore/platform/Timer.cpp >+++ b/Source/WebCore/platform/Timer.cpp >@@ -198,7 +198,9 @@ TimerBase::~TimerBase() > > void TimerBase::start(Seconds nextFireInterval, Seconds repeatInterval) > { >+#ifndef NDEBUG > ASSERT(canAccessThreadLocalDataForThread(m_thread.get())); >+#endif > > m_repeatInterval = repeatInterval; > setNextFireTime(MonotonicTime::now() + nextFireInterval); >@@ -206,7 +208,9 @@ void TimerBase::start(Seconds nextFireInterval, Seconds repeatInterval) > > void TimerBase::stop() > { >+#ifndef NDEBUG > ASSERT(canAccessThreadLocalDataForThread(m_thread.get())); >+#endif > > m_repeatInterval = 0_s; > setNextFireTime(MonotonicTime { }); >@@ -351,14 +355,18 @@ void TimerBase::updateHeapIfNeeded(MonotonicTime oldTime) > heapDecreaseKey(); > else > heapIncreaseKey(); >+#ifndef NDEBUG > ASSERT(m_heapIndex != oldHeapIndex); >+#endif > ASSERT(!inHeap() || hasValidHeapPosition()); > } > > void TimerBase::setNextFireTime(MonotonicTime newTime) > { >+#ifndef NDEBUG > ASSERT(canAccessThreadLocalDataForThread(m_thread.get())); > RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!m_wasDeleted); >+#endif > > if (m_unalignedNextFireTime != newTime) > m_unalignedNextFireTime = newTime; >--- a/Source/WebCore/platform/Timer.h >+++ b/Source/WebCore/platform/Timer.h >@@ -137,11 +137,13 @@ private: > inline bool TimerBase::isActive() const > { > // FIXME: Write this in terms of USE(WEB_THREAD) instead of PLATFORM(IOS). >+#ifndef NDEBUG > #if !PLATFORM(IOS) > ASSERT(m_thread.ptr() == &Thread::current()); > #else > ASSERT(WebThreadIsCurrent() || pthread_main_np() || m_thread.ptr() == &Thread::current()); > #endif // PLATFORM(IOS) >+#endif > return static_cast<bool>(m_nextFireTime); > } > >--- a/Source/WebCore/platform/graphics/nicosia/cairo/NicosiaPaintingContextCairo.cpp >+++ b/Source/WebCore/platform/graphics/nicosia/cairo/NicosiaPaintingContextCairo.cpp >@@ -60,7 +60,7 @@ PaintingContextCairo::ForPainting::ForPainting(Buffer& buffer) > > // Deref the Buffer object. > userData->first->deref(); >-#if !ASSERT_DISABLED >+#ifndef NDEBUG > // Mark the deletion of the cairo_surface_t object associated with this > // PaintingContextCairo as complete. This way we check that the cairo_surface_t > // object doesn't outlive the PaintingContextCairo through which it was used. >@@ -87,7 +87,9 @@ PaintingContextCairo::ForPainting::~ForPainting() > // as well. This is checked by asserting that m_deletionComplete is true, which should > // be the case if the s_bufferKey user data destroy callback has been invoked upon the > // cairo_surface_t destruction. >+#ifndef NDEBUG > ASSERT(m_deletionComplete); >+#endif > } > > WebCore::GraphicsContext& PaintingContextCairo::ForPainting::graphicsContext() >--- a/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp >+++ b/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp >@@ -60,8 +60,8 @@ void TextureMapperPlatformLayerProxy::activateOnCompositingThread(Compositor* co > #ifndef NDEBUG > if (!m_compositorThread) > m_compositorThread = &Thread::current(); >-#endif > ASSERT(m_compositorThread == &Thread::current()); >+#endif > ASSERT(compositor); > ASSERT(targetLayer); > LockHolder locker(m_lock); >@@ -81,7 +81,9 @@ void TextureMapperPlatformLayerProxy::activateOnCompositingThread(Compositor* co > > void TextureMapperPlatformLayerProxy::invalidate() > { >+#ifndef NDEBUG > ASSERT(m_compositorThread == &Thread::current()); >+#endif > Function<void()> updateFunction; > { > LockHolder locker(m_lock); >@@ -121,7 +123,9 @@ void TextureMapperPlatformLayerProxy::pushNextBuffer(std::unique_ptr<TextureMapp > std::unique_ptr<TextureMapperPlatformLayerBuffer> TextureMapperPlatformLayerProxy::getAvailableBuffer(const IntSize& size, GLint internalFormat) > { > ASSERT(m_lock.isHeld()); >+#ifndef NDEBUG > ASSERT(m_compositorThread == &Thread::current()); >+#endif > std::unique_ptr<TextureMapperPlatformLayerBuffer> availableBuffer; > > auto buffers = WTFMove(m_usedBuffers); >@@ -145,7 +149,9 @@ std::unique_ptr<TextureMapperPlatformLayerBuffer> TextureMapperPlatformLayerProx > void TextureMapperPlatformLayerProxy::appendToUnusedBuffers(std::unique_ptr<TextureMapperPlatformLayerBuffer> buffer) > { > ASSERT(m_lock.isHeld()); >+#ifndef NDEBUG > ASSERT(m_compositorThread == &Thread::current()); >+#endif > m_usedBuffers.append(WTFMove(buffer)); > scheduleReleaseUnusedBuffers(); > } >@@ -173,7 +179,9 @@ void TextureMapperPlatformLayerProxy::releaseUnusedBuffersTimerFired() > > void TextureMapperPlatformLayerProxy::swapBuffer() > { >+#ifndef NDEBUG > ASSERT(m_compositorThread == &Thread::current()); >+#endif > LockHolder locker(m_lock); > if (!m_targetLayer || !m_pendingBuffer) > return; >--- a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp >+++ b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp >@@ -879,7 +879,9 @@ void CoordinatedGraphicsLayer::updateTile(uint32_t tileID, const SurfaceUpdateIn > void CoordinatedGraphicsLayer::removeTile(uint32_t tileID) > { > ASSERT(m_coordinator); >+#ifndef NDEBUG > ASSERT(m_coordinator->isFlushingLayerChanges() || m_isPurging); >+#endif > m_layerState.tilesToRemove.append(tileID); > } > >--- a/Source/WebCore/platform/sql/SQLiteDatabase.h >+++ b/Source/WebCore/platform/sql/SQLiteDatabase.h >@@ -102,8 +102,10 @@ public: > > sqlite3* sqlite3Handle() const > { >+#ifndef NDEBUG > #if !PLATFORM(IOS) > ASSERT(m_sharable || m_openingThread == &Thread::current() || !m_db); >+#endif > #endif > return m_db; > } >--- a/Source/WebCore/platform/sql/SQLiteStatement.cpp >+++ b/Source/WebCore/platform/sql/SQLiteStatement.cpp >@@ -58,7 +58,9 @@ SQLiteStatement::~SQLiteStatement() > > int SQLiteStatement::prepare() > { >+#ifndef NDEBUG > ASSERT(!m_isPrepared); >+#endif > > LockHolder databaseLock(m_database.databaseMutex()); > >@@ -121,7 +123,9 @@ int SQLiteStatement::finalize() > > int SQLiteStatement::reset() > { >+#ifndef NDEBUG > ASSERT(m_isPrepared); >+#endif > if (!m_statement) > return SQLITE_OK; > LOG(SQLDatabase, "SQL - reset - %s", m_query.ascii().data()); >@@ -132,7 +136,10 @@ bool SQLiteStatement::executeCommand() > { > if (!m_statement && prepare() != SQLITE_OK) > return false; >+ >+#ifndef NDEBUG > ASSERT(m_isPrepared); >+#endif > if (step() != SQLITE_DONE) { > finalize(); > return false; >@@ -145,7 +152,10 @@ bool SQLiteStatement::returnsAtLeastOneResult() > { > if (!m_statement && prepare() != SQLITE_OK) > return false; >+ >+#ifndef NDEBUG > ASSERT(m_isPrepared); >+#endif > if (step() != SQLITE_ROW) { > finalize(); > return false; >@@ -157,7 +167,9 @@ bool SQLiteStatement::returnsAtLeastOneResult() > > int SQLiteStatement::bindBlob(int index, const void* blob, int size) > { >+#ifndef NDEBUG > ASSERT(m_isPrepared); >+#endif > ASSERT(index > 0); > ASSERT(static_cast<unsigned>(index) <= bindParameterCount()); > ASSERT(blob); >@@ -186,7 +198,9 @@ int SQLiteStatement::bindBlob(int index, const String& text) > > int SQLiteStatement::bindText(int index, const String& text) > { >+#ifndef NDEBUG > ASSERT(m_isPrepared); >+#endif > ASSERT(index > 0); > ASSERT(static_cast<unsigned>(index) <= bindParameterCount()); > >@@ -205,7 +219,9 @@ int SQLiteStatement::bindText(int index, const String& text) > > int SQLiteStatement::bindInt(int index, int integer) > { >+#ifndef NDEBUG > ASSERT(m_isPrepared); >+#endif > ASSERT(index > 0); > ASSERT(static_cast<unsigned>(index) <= bindParameterCount()); > >@@ -214,7 +230,9 @@ int SQLiteStatement::bindInt(int index, int integer) > > int SQLiteStatement::bindInt64(int index, int64_t integer) > { >+#ifndef NDEBUG > ASSERT(m_isPrepared); >+#endif > ASSERT(index > 0); > ASSERT(static_cast<unsigned>(index) <= bindParameterCount()); > >@@ -223,7 +241,9 @@ int SQLiteStatement::bindInt64(int index, int64_t integer) > > int SQLiteStatement::bindDouble(int index, double number) > { >+#ifndef NDEBUG > ASSERT(m_isPrepared); >+#endif > ASSERT(index > 0); > ASSERT(static_cast<unsigned>(index) <= bindParameterCount()); > >@@ -232,7 +252,9 @@ int SQLiteStatement::bindDouble(int index, double number) > > int SQLiteStatement::bindNull(int index) > { >+#ifndef NDEBUG > ASSERT(m_isPrepared); >+#endif > ASSERT(index > 0); > ASSERT(static_cast<unsigned>(index) <= bindParameterCount()); > >@@ -250,7 +272,9 @@ int SQLiteStatement::bindValue(int index, const SQLValue& value) > > unsigned SQLiteStatement::bindParameterCount() const > { >+#ifndef NDEBUG > ASSERT(m_isPrepared); >+#endif > if (!m_statement) > return 0; > return sqlite3_bind_parameter_count(m_statement); >@@ -258,7 +282,9 @@ unsigned SQLiteStatement::bindParameterCount() const > > int SQLiteStatement::columnCount() > { >+#ifndef NDEBUG > ASSERT(m_isPrepared); >+#endif > if (!m_statement) > return 0; > return sqlite3_data_count(m_statement); >--- a/Source/WebCore/rendering/FloatingObjects.cpp >+++ b/Source/WebCore/rendering/FloatingObjects.cpp >@@ -312,7 +312,9 @@ FloatingObjectInterval FloatingObjects::intervalForFloatingObject(FloatingObject > > void FloatingObjects::addPlacedObject(FloatingObject* floatingObject) > { >+#ifndef NDEBUG > ASSERT(!floatingObject->isInPlacedTree()); >+#endif > > floatingObject->setIsPlaced(true); > if (m_placedFloatsTree) >@@ -325,7 +327,9 @@ void FloatingObjects::addPlacedObject(FloatingObject* floatingObject) > > void FloatingObjects::removePlacedObject(FloatingObject* floatingObject) > { >+#ifndef NDEBUG > ASSERT(floatingObject->isPlaced() && floatingObject->isInPlacedTree()); >+#endif > > if (m_placedFloatsTree) { > bool removed = m_placedFloatsTree->remove(intervalForFloatingObject(floatingObject)); >@@ -350,7 +354,9 @@ void FloatingObjects::remove(FloatingObject* floatingObject) > { > ASSERT((m_set.contains<FloatingObject&, FloatingObjectHashTranslator>(*floatingObject))); > decreaseObjectsCount(floatingObject->type()); >+#ifndef NDEBUG > ASSERT(floatingObject->isPlaced() || !floatingObject->isInPlacedTree()); >+#endif > if (floatingObject->isPlaced()) > removePlacedObject(floatingObject); > ASSERT(!floatingObject->originatingLine()); >--- a/Source/WebCore/rendering/FloatingObjects.h >+++ b/Source/WebCore/rendering/FloatingObjects.h >@@ -59,15 +59,44 @@ public: > LayoutUnit width() const { return m_frameRect.width(); } > LayoutUnit height() const { return m_frameRect.height(); } > >- void setX(LayoutUnit x) { ASSERT(!isInPlacedTree()); m_frameRect.setX(x); } >- void setY(LayoutUnit y) { ASSERT(!isInPlacedTree()); m_frameRect.setY(y); } >- void setWidth(LayoutUnit width) { ASSERT(!isInPlacedTree()); m_frameRect.setWidth(width); } >- void setHeight(LayoutUnit height) { ASSERT(!isInPlacedTree()); m_frameRect.setHeight(height); } >- >- void setMarginOffset(LayoutSize offset) { ASSERT(!isInPlacedTree()); m_marginOffset = offset; } >+ void setX(LayoutUnit x) { >+#ifndef NDEBUG >+ ASSERT(!isInPlacedTree()); >+#endif >+ m_frameRect.setX(x); >+ } >+ void setY(LayoutUnit y) { >+#ifndef NDEBUG >+ ASSERT(!isInPlacedTree()); >+#endif >+ m_frameRect.setY(y); >+ } >+ void setWidth(LayoutUnit width) { >+#ifndef NDEBUG >+ ASSERT(!isInPlacedTree()); >+#endif >+ m_frameRect.setWidth(width); >+ } >+ void setHeight(LayoutUnit height) { >+#ifndef NDEBUG >+ ASSERT(!isInPlacedTree()); >+#endif >+ m_frameRect.setHeight(height); >+ } >+ void setMarginOffset(LayoutSize offset) { >+#ifndef NDEBUG >+ ASSERT(!isInPlacedTree()); >+#endif >+ m_marginOffset = offset; >+ } > > const LayoutRect& frameRect() const { ASSERT(isPlaced()); return m_frameRect; } >- void setFrameRect(const LayoutRect& frameRect) { ASSERT(!isInPlacedTree()); m_frameRect = frameRect; } >+ void setFrameRect(const LayoutRect& frameRect) { >+#ifndef NDEBUG >+ ASSERT(!isInPlacedTree()); >+#endif >+ m_frameRect = frameRect; >+ } > > LayoutUnit paginationStrut() const { return m_paginationStrut; } > void setPaginationStrut(LayoutUnit strut) { m_paginationStrut = strut; } >--- a/Source/WebCore/rendering/RenderBlock.cpp >+++ b/Source/WebCore/rendering/RenderBlock.cpp >@@ -2892,7 +2892,9 @@ LayoutUnit RenderBlock::offsetFromLogicalTopOfFirstPage() const > return fragmentedFlow->offsetFromLogicalTopOfFirstFragment(this); > > if (layoutState) { >+#ifndef NDEBUG > ASSERT(layoutState->renderer() == this); >+#endif > > LayoutSize offsetDelta = layoutState->layoutOffset() - layoutState->pageOffset(); > return isHorizontalWritingMode() ? offsetDelta.height() : offsetDelta.width(); >--- a/Source/WebCore/rendering/RenderElement.cpp >+++ b/Source/WebCore/rendering/RenderElement.cpp >@@ -940,7 +940,9 @@ void RenderElement::willBeDestroyed() > > void RenderElement::setNeedsPositionedMovementLayout(const RenderStyle* oldStyle) > { >+#ifndef NDEBUG > ASSERT(!isSetNeedsLayoutForbidden()); >+#endif > if (needsPositionedMovementLayout()) > return; > setNeedsPositionedMovementLayoutBit(true); >@@ -964,7 +966,9 @@ void RenderElement::clearChildNeedsLayout() > > void RenderElement::setNeedsSimplifiedNormalFlowLayout() > { >+#ifndef NDEBUG > ASSERT(!isSetNeedsLayoutForbidden()); >+#endif > if (needsSimplifiedNormalFlowLayout()) > return; > setNeedsSimplifiedNormalFlowLayoutBit(true); >--- a/Source/WebCore/rendering/RenderElement.h >+++ b/Source/WebCore/rendering/RenderElement.h >@@ -358,7 +358,9 @@ inline void RenderElement::setAncestorLineBoxDirty(bool f) > > inline void RenderElement::setChildNeedsLayout(MarkingBehavior markParents) > { >+#ifndef NDEBUG > ASSERT(!isSetNeedsLayoutForbidden()); >+#endif > if (normalChildNeedsLayout()) > return; > setNormalChildNeedsLayoutBit(true); >--- a/Source/WebCore/rendering/RenderGrid.cpp >+++ b/Source/WebCore/rendering/RenderGrid.cpp >@@ -168,7 +168,9 @@ void RenderGrid::computeTrackSizesForDefiniteSize(GridTrackSizingDirection direc > m_trackSizingAlgorithm.setup(direction, numTracks(direction, m_grid), TrackSizing, availableSpace, freeSpace); > m_trackSizingAlgorithm.run(); > >+#ifndef NDEBUG > ASSERT(m_trackSizingAlgorithm.tracksAreWiderThanMinTrackBreadth()); >+#endif > } > > void RenderGrid::repeatTracksSizingIfNeeded(LayoutUnit availableSpaceForColumns, LayoutUnit availableSpaceForRows) >@@ -420,7 +422,9 @@ void RenderGrid::computeTrackSizesForIndefiniteSize(GridTrackSizingAlgorithm& al > minIntrinsicSize = algorithm.minContentSize() + totalGuttersSize; > maxIntrinsicSize = algorithm.maxContentSize() + totalGuttersSize; > >+#ifndef NDEBUG > ASSERT(algorithm.tracksAreWiderThanMinTrackBreadth()); >+#endif > } > > std::optional<LayoutUnit> RenderGrid::computeIntrinsicLogicalContentHeightUsing(Length logicalHeightLength, std::optional<LayoutUnit> intrinsicLogicalHeight, LayoutUnit borderAndPadding) const >--- a/Source/WebCore/rendering/RenderLayer.cpp >+++ b/Source/WebCore/rendering/RenderLayer.cpp >@@ -5363,9 +5363,11 @@ Ref<ClipRects> RenderLayer::updateClipRects(const ClipRectsContext& clipRectsCon > ASSERT(clipRectsType < NumCachedClipRectsTypes); > if (m_clipRectsCache) { > if (auto* clipRects = m_clipRectsCache->getClipRects(clipRectsType, clipRectsContext.respectOverflowClip)) { >+#ifndef NDEBUG > ASSERT(clipRectsContext.rootLayer == m_clipRectsCache->m_clipRectsRoot[clipRectsType]); > ASSERT(m_clipRectsCache->m_scrollbarRelevancy[clipRectsType] == clipRectsContext.overlayScrollbarSizeRelevancy); >- >+#endif >+ > #ifdef CHECK_CACHED_CLIP_RECTS > // This code is useful to check cached clip rects, but is too expensive to leave enabled in debug builds by default. > ClipRectsContext tempContext(clipRectsContext); >--- a/Source/WebCore/rendering/RenderObject.cpp >+++ b/Source/WebCore/rendering/RenderObject.cpp >@@ -496,7 +496,9 @@ static void scheduleRelayoutForSubtree(RenderElement& renderer) > void RenderObject::markContainingBlocksForLayout(ScheduleRelayout scheduleRelayout, RenderElement* newRoot) > { > ASSERT(scheduleRelayout == ScheduleRelayout::No || !newRoot); >+#ifndef NDEBUG > ASSERT(!isSetNeedsLayoutForbidden()); >+#endif > > auto ancestor = container(); > >@@ -534,7 +536,9 @@ void RenderObject::markContainingBlocksForLayout(ScheduleRelayout scheduleRelayo > return; > ancestor->setNormalChildNeedsLayoutBit(true); > } >+#ifndef NDEBUG > ASSERT(!ancestor->isSetNeedsLayoutForbidden()); >+#endif > > if (ancestor == newRoot) > return; >--- a/Source/WebCore/rendering/RenderObject.h >+++ b/Source/WebCore/rendering/RenderObject.h >@@ -1042,7 +1042,9 @@ inline bool RenderObject::isBeforeOrAfterContent() const > > inline void RenderObject::setNeedsLayout(MarkingBehavior markParents) > { >+#ifndef NDEBUG > ASSERT(!isSetNeedsLayoutForbidden()); >+#endif > if (m_bitfields.needsLayout()) > return; > m_bitfields.setNeedsLayout(true); >--- a/Source/WebCore/rendering/RenderTable.cpp >+++ b/Source/WebCore/rendering/RenderTable.cpp >@@ -1540,7 +1540,9 @@ RenderPtr<RenderTable> RenderTable::createAnonymousWithParentRenderer(const Rend > > const BorderValue& RenderTable::tableStartBorderAdjoiningCell(const RenderTableCell& cell) const > { >+#ifndef NDEBUG > ASSERT(cell.isFirstOrLastCellInRow()); >+#endif > if (isDirectionSame(this, cell.row())) > return style().borderStart(); > >@@ -1549,7 +1551,9 @@ const BorderValue& RenderTable::tableStartBorderAdjoiningCell(const RenderTableC > > const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCell& cell) const > { >+#ifndef NDEBUG > ASSERT(cell.isFirstOrLastCellInRow()); >+#endif > if (isDirectionSame(this, cell.row())) > return style().borderEnd(); > >--- a/Source/WebCore/rendering/RenderTableCell.h >+++ b/Source/WebCore/rendering/RenderTableCell.h >@@ -306,7 +306,9 @@ inline bool RenderTableCell::isBaselineAligned() const > > inline const BorderValue& RenderTableCell::borderAdjoiningTableStart() const > { >+#ifndef NDEBUG > ASSERT(isFirstOrLastCellInRow()); >+#endif > if (isDirectionSame(section(), table())) > return style().borderStart(); > >@@ -315,7 +317,9 @@ inline const BorderValue& RenderTableCell::borderAdjoiningTableStart() const > > inline const BorderValue& RenderTableCell::borderAdjoiningTableEnd() const > { >+#ifndef NDEBUG > ASSERT(isFirstOrLastCellInRow()); >+#endif > if (isDirectionSame(section(), table())) > return style().borderEnd(); > >--- a/Source/WebCore/rendering/RenderTableRow.cpp >+++ b/Source/WebCore/rendering/RenderTableRow.cpp >@@ -99,14 +99,18 @@ void RenderTableRow::styleDidChange(StyleDifference diff, const RenderStyle* old > > const BorderValue& RenderTableRow::borderAdjoiningStartCell(const RenderTableCell& cell) const > { >+#ifndef NDEBUG > ASSERT_UNUSED(cell, cell.isFirstOrLastCellInRow()); >+#endif > // FIXME: https://webkit.org/b/79272 - Add support for mixed directionality at the cell level. > return style().borderStart(); > } > > const BorderValue& RenderTableRow::borderAdjoiningEndCell(const RenderTableCell& cell) const > { >+#ifndef NDEBUG > ASSERT_UNUSED(cell, cell.isFirstOrLastCellInRow()); >+#endif > // FIXME: https://webkit.org/b/79272 - Add support for mixed directionality at the cell level. > return style().borderEnd(); > } >--- a/Source/WebCore/rendering/RenderTableSection.cpp >+++ b/Source/WebCore/rendering/RenderTableSection.cpp >@@ -674,7 +674,9 @@ void RenderTableSection::computeOverflowFromCells(unsigned totalRows, unsigned n > } > } > } >+#ifndef NDEBUG > ASSERT(hasOverflowingCell == this->hasOverflowingCell()); >+#endif > } > > LayoutUnit RenderTableSection::calcOuterBorderBefore() const >@@ -1393,13 +1395,17 @@ unsigned RenderTableSection::numColumns() const > > const BorderValue& RenderTableSection::borderAdjoiningStartCell(const RenderTableCell& cell) const > { >+#ifndef NDEBUG > ASSERT(cell.isFirstOrLastCellInRow()); >+#endif > return isDirectionSame(this, &cell) ? style().borderStart() : style().borderEnd(); > } > > const BorderValue& RenderTableSection::borderAdjoiningEndCell(const RenderTableCell& cell) const > { >+#ifndef NDEBUG > ASSERT(cell.isFirstOrLastCellInRow()); >+#endif > return isDirectionSame(this, &cell) ? style().borderEnd() : style().borderStart(); > } > >--- a/Source/WebCore/svg/SVGAnimateElementBase.cpp >+++ b/Source/WebCore/svg/SVGAnimateElementBase.cpp >@@ -205,7 +205,9 @@ void SVGAnimateElementBase::resetAnimatedType() > if (m_animatedProperties.isEmpty()) > return; > >+#ifndef NDEBUG > ASSERT(propertyTypesAreConsistent(m_animatedPropertyType, m_animatedProperties)); >+#endif > if (!m_animatedType) > m_animatedType = animator->startAnimValAnimation(m_animatedProperties); > else { >@@ -232,7 +234,9 @@ void SVGAnimateElementBase::resetAnimatedType() > > static inline void applyCSSPropertyToTarget(SVGElement& targetElement, CSSPropertyID id, const String& value) > { >+#ifndef NDEBUG > ASSERT(!targetElement.m_deletionHasBegun); >+#endif > > if (!targetElement.ensureAnimatedSMILStyleProperties().setProperty(id, value, false)) > return; >@@ -242,7 +246,9 @@ static inline void applyCSSPropertyToTarget(SVGElement& targetElement, CSSProper > > static inline void removeCSSPropertyFromTarget(SVGElement& targetElement, CSSPropertyID id) > { >+#ifndef NDEBUG > ASSERT(!targetElement.m_deletionHasBegun); >+#endif > targetElement.ensureAnimatedSMILStyleProperties().removeProperty(id); > targetElement.invalidateStyleAndLayerComposition(); > } >@@ -281,7 +287,9 @@ static inline void removeCSSPropertyFromTargetAndInstances(SVGElement& targetEle > > static inline void notifyTargetAboutAnimValChange(SVGElement& targetElement, const QualifiedName& attributeName) > { >+#ifndef NDEBUG > ASSERT(!targetElement.m_deletionHasBegun); >+#endif > targetElement.svgAttributeChanged(attributeName); > } > >--- a/Source/WebCore/svg/properties/SVGAnimatedProperty.cpp >+++ b/Source/WebCore/svg/properties/SVGAnimatedProperty.cpp >@@ -51,7 +51,9 @@ SVGAnimatedProperty::~SVGAnimatedProperty() > void SVGAnimatedProperty::commitChange() > { > ASSERT(m_contextElement); >+#ifndef NDEBUG > ASSERT(!m_contextElement->m_deletionHasBegun); >+#endif > m_contextElement->invalidateSVGAttributes(); > m_contextElement->svgAttributeChanged(m_attributeName); > // Needed to synchronize with CSSOM for presentation attributes with SVG DOM. >--- a/Source/WebKit/UIProcess/GenericCallback.h >+++ b/Source/WebKit/UIProcess/GenericCallback.h >@@ -94,13 +94,17 @@ public: > > virtual ~GenericCallback() > { >+#ifndef NDEBUG > ASSERT(m_originThread.ptr() == &Thread::current()); >+#endif > ASSERT(!m_callback); > } > > void performCallbackWithReturnValue(T... returnValue) > { >+#ifndef NDEBUG > ASSERT(m_originThread.ptr() == &Thread::current()); >+#endif > > if (!m_callback) > return; >@@ -117,7 +121,9 @@ public: > > void invalidate(Error error = Error::Unknown) final > { >+#ifndef NDEBUG > ASSERT(m_originThread.ptr() == &Thread::current()); >+#endif > > if (!m_callback) > return; >--- a/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp >+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp >@@ -656,7 +656,9 @@ void WebFrameLoaderClient::dispatchDidReachLayoutMilestone(LayoutMilestones mile > > #if USE(COORDINATED_GRAPHICS) > // Make sure viewport properties are dispatched on the main frame by the time the first layout happens. >+#ifndef NDEBUG > ASSERT(!webPage->useFixedLayout() || m_frame != m_frame->page()->mainWebFrame() || m_frame->coreFrame()->document()->didDispatchViewportPropertiesChanged()); >+#endif > #endif > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 180913
:
329602
|
342799
|
388272
|
454546