Title: [229903] trunk/Source/WebCore
- Revision
- 229903
- Author
- you...@apple.com
- Date
- 2018-03-23 10:48:46 -0700 (Fri, 23 Mar 2018)
Log Message
ActiveDOMObject should assert that they are destroyed in the thread they are created
https://bugs.webkit.org/show_bug.cgi?id=183671
Reviewed by Chris Dumez.
No change of behavior.
Moved MessagePort assertion to ActiveDOMObject.
* dom/ActiveDOMObject.cpp:
(WebCore::ActiveDOMObject::~ActiveDOMObject):
* dom/ActiveDOMObject.h:
* dom/MessagePort.cpp:
(WebCore::MessagePort::~MessagePort):
* dom/MessagePort.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (229902 => 229903)
--- trunk/Source/WebCore/ChangeLog 2018-03-23 17:29:26 UTC (rev 229902)
+++ trunk/Source/WebCore/ChangeLog 2018-03-23 17:48:46 UTC (rev 229903)
@@ -1,5 +1,22 @@
2018-03-23 Youenn Fablet <you...@apple.com>
+ ActiveDOMObject should assert that they are destroyed in the thread they are created
+ https://bugs.webkit.org/show_bug.cgi?id=183671
+
+ Reviewed by Chris Dumez.
+
+ No change of behavior.
+ Moved MessagePort assertion to ActiveDOMObject.
+
+ * dom/ActiveDOMObject.cpp:
+ (WebCore::ActiveDOMObject::~ActiveDOMObject):
+ * dom/ActiveDOMObject.h:
+ * dom/MessagePort.cpp:
+ (WebCore::MessagePort::~MessagePort):
+ * dom/MessagePort.h:
+
+2018-03-23 Youenn Fablet <you...@apple.com>
+
Safari WebKitWebRTCAudioModule crash during <video> tag update when audio track present in MediaStream
https://bugs.webkit.org/show_bug.cgi?id=181180
<rdar://problem/36302375>
Modified: trunk/Source/WebCore/dom/ActiveDOMObject.cpp (229902 => 229903)
--- trunk/Source/WebCore/dom/ActiveDOMObject.cpp 2018-03-23 17:29:26 UTC (rev 229902)
+++ trunk/Source/WebCore/dom/ActiveDOMObject.cpp 2018-03-23 17:48:46 UTC (rev 229903)
@@ -47,6 +47,8 @@
ActiveDOMObject::~ActiveDOMObject()
{
+ ASSERT(canAccessThreadLocalDataForThread(m_creationThread));
+
// ActiveDOMObject may be inherited by a sub-class whose life-cycle
// exceeds that of the associated ScriptExecutionContext. In those cases,
// m_scriptExecutionContext would/should have been nullified by
Modified: trunk/Source/WebCore/dom/ActiveDOMObject.h (229902 => 229903)
--- trunk/Source/WebCore/dom/ActiveDOMObject.h 2018-03-23 17:29:26 UTC (rev 229902)
+++ trunk/Source/WebCore/dom/ActiveDOMObject.h 2018-03-23 17:48:46 UTC (rev 229903)
@@ -30,6 +30,7 @@
#include <wtf/Assertions.h>
#include <wtf/Forward.h>
#include <wtf/RefCounted.h>
+#include <wtf/Threading.h>
namespace WebCore {
@@ -117,6 +118,7 @@
unsigned m_pendingActivityCount;
#if !ASSERT_DISABLED
bool m_suspendIfNeededWasCalled;
+ Ref<Thread> m_creationThread { Thread::current() };
#endif
};
Modified: trunk/Source/WebCore/dom/MessagePort.cpp (229902 => 229903)
--- trunk/Source/WebCore/dom/MessagePort.cpp 2018-03-23 17:29:26 UTC (rev 229902)
+++ trunk/Source/WebCore/dom/MessagePort.cpp 2018-03-23 17:48:46 UTC (rev 229903)
@@ -109,8 +109,6 @@
MessagePort::~MessagePort()
{
- ASSERT(m_creationThread.ptr() == &Thread::current());
-
LOG(MessagePorts, "Destroyed MessagePort %s (%p) in process %" PRIu64, m_identifier.logString().utf8().data(), this, Process::identifier().toUInt64());
ASSERT(allMessagePortsLock().isLocked());
Modified: trunk/Source/WebCore/dom/MessagePort.h (229902 => 229903)
--- trunk/Source/WebCore/dom/MessagePort.h 2018-03-23 17:29:26 UTC (rev 229902)
+++ trunk/Source/WebCore/dom/MessagePort.h 2018-03-23 17:48:46 UTC (rev 229903)
@@ -32,7 +32,6 @@
#include "MessagePortChannel.h"
#include "MessagePortIdentifier.h"
#include "MessageWithMessagePorts.h"
-#include <wtf/Threading.h>
#include <wtf/WeakPtr.h>
namespace JSC {
@@ -129,10 +128,6 @@
MessagePortIdentifier m_remoteIdentifier;
mutable std::atomic<unsigned> m_refCount { 1 };
-
-#if !ASSERT_DISABLED
- Ref<Thread> m_creationThread { Thread::current() };
-#endif
};
} // namespace WebCore
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes