Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(757)

Unified Diff: third_party/WebKit/Source/core/dom/MessagePort.cpp

Issue 1854423002: ASSERT -> {DCHECK|DCHECK_XX}, ENABLE(ASSERT) -> DCHECK_IS_ON() in dom (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mark svg/as-image/svg-nested.html crash on win Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/MessagePort.cpp
diff --git a/third_party/WebKit/Source/core/dom/MessagePort.cpp b/third_party/WebKit/Source/core/dom/MessagePort.cpp
index 2c3a2f261839042bd5db5789d63b1f804e8e1fb7..0b13ba3e8def05f40ef7088ec46bd0362c5acc89 100644
--- a/third_party/WebKit/Source/core/dom/MessagePort.cpp
+++ b/third_party/WebKit/Source/core/dom/MessagePort.cpp
@@ -70,8 +70,8 @@ void MessagePort::postMessage(ExecutionContext* context, PassRefPtr<SerializedSc
{
if (!isEntangled())
return;
- ASSERT(getExecutionContext());
- ASSERT(m_entangledChannel);
+ DCHECK(getExecutionContext());
+ DCHECK(m_entangledChannel);
OwnPtr<MessagePortChannelArray> channels;
// Make sure we aren't connected to any of the passed-in ports.
@@ -119,7 +119,7 @@ MessagePortArray* MessagePort::toMessagePortArray(ExecutionContext* context, con
PassOwnPtr<WebMessagePortChannel> MessagePort::disentangle()
{
- ASSERT(m_entangledChannel);
+ DCHECK(m_entangledChannel);
m_entangledChannel->setClient(0);
return m_entangledChannel.release();
}
@@ -128,7 +128,7 @@ PassOwnPtr<WebMessagePortChannel> MessagePort::disentangle()
// This code may be called from another thread, and so should not call any non-threadsafe APIs (i.e. should not call into the entangled channel or access mutable variables).
void MessagePort::messageAvailable()
{
- ASSERT(getExecutionContext());
+ DCHECK(getExecutionContext());
getExecutionContext()->postTask(BLINK_FROM_HERE, createCrossThreadTask(&MessagePort::dispatchMessages, m_weakFactory.createWeakPtr()));
}
@@ -138,7 +138,7 @@ void MessagePort::start()
if (!isEntangled())
return;
- ASSERT(getExecutionContext());
+ DCHECK(getExecutionContext());
if (m_started)
return;
@@ -156,8 +156,8 @@ void MessagePort::close()
void MessagePort::entangle(PassOwnPtr<WebMessagePortChannel> remote)
{
// Only invoked to set our initial entanglement.
- ASSERT(!m_entangledChannel);
- ASSERT(getExecutionContext());
+ DCHECK(!m_entangledChannel);
+ DCHECK(getExecutionContext());
m_entangledChannel = remote;
m_entangledChannel->setClient(this);
@@ -281,13 +281,13 @@ DEFINE_TRACE(MessagePort)
v8::Isolate* MessagePort::scriptIsolate()
{
- ASSERT(getExecutionContext());
+ DCHECK(getExecutionContext());
return toIsolate(getExecutionContext());
}
v8::Local<v8::Context> MessagePort::scriptContextForMessageConversion()
{
- ASSERT(getExecutionContext());
+ DCHECK(getExecutionContext());
if (!m_scriptStateForConversion) {
v8::Isolate* isolate = scriptIsolate();
m_scriptStateForConversion = ScriptState::create(v8::Context::New(isolate), DOMWrapperWorld::create(isolate));
« no previous file with comments | « third_party/WebKit/Source/core/dom/MessageChannel.cpp ('k') | third_party/WebKit/Source/core/dom/MutationObserver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698