Skip to content

Commit

Permalink
Merge r166810 - Improve error checking in WebPageProxy::didReceiveEvent
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=131243
<rdar://problem/16529207>

Reviewed by Anders Carlsson.

* UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didReceiveEvent):
  • Loading branch information
aproskuryakov authored and carlosgcampos committed Jan 5, 2015
1 parent 7f95f75 commit 3b0b4fc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
10 changes: 10 additions & 0 deletions Source/WebKit2/ChangeLog
@@ -1,3 +1,13 @@
2014-04-04 Alexey Proskuryakov <ap@apple.com>

Improve error checking in WebPageProxy::didReceiveEvent
https://bugs.webkit.org/show_bug.cgi?id=131243
<rdar://problem/16529207>

Reviewed by Anders Carlsson.

* UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didReceiveEvent):

2014-10-21 Michael Catanzaro <mcatanzaro@igalia.com>

[SOUP] Disable SSLv3
Expand Down
13 changes: 7 additions & 6 deletions Source/WebKit2/UIProcess/WebPageProxy.cpp
Expand Up @@ -3515,7 +3515,7 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
break;

case WebEvent::Wheel: {
ASSERT(!m_currentlyProcessedWheelEvents.isEmpty());
MESSAGE_CHECK(!m_currentlyProcessedWheelEvents.isEmpty());

OwnPtr<Vector<NativeWebWheelEvent>> oldestCoalescedEvent = m_currentlyProcessedWheelEvents.takeFirst();

Expand All @@ -3539,10 +3539,10 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
case WebEvent::Char: {
LOG(KeyHandling, "WebPageProxy::didReceiveEvent: %s", webKeyboardEventTypeString(type));

NativeWebKeyboardEvent event = m_keyEventQueue.first();
MESSAGE_CHECK(type == event.type());
MESSAGE_CHECK(!m_keyEventQueue.isEmpty());
NativeWebKeyboardEvent event = m_keyEventQueue.takeFirst();

m_keyEventQueue.removeFirst();
MESSAGE_CHECK(type == event.type());

if (!m_keyEventQueue.isEmpty())
m_process->send(Messages::WebPage::KeyEvent(m_keyEventQueue.first()), m_pageID);
Expand All @@ -3560,9 +3560,10 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
case WebEvent::TouchMove:
case WebEvent::TouchEnd:
case WebEvent::TouchCancel: {
QueuedTouchEvents queuedEvents = m_touchEventQueue.first();
MESSAGE_CHECK(!m_touchEventQueue.isEmpty());
QueuedTouchEvents queuedEvents = m_touchEventQueue.takeFirst();

MESSAGE_CHECK(type == queuedEvents.forwardedEvent.type());
m_touchEventQueue.removeFirst();

m_pageClient.doneWithTouchEvent(queuedEvents.forwardedEvent, handled);
for (size_t i = 0; i < queuedEvents.deferredTouchEvents.size(); ++i) {
Expand Down

0 comments on commit 3b0b4fc

Please sign in to comment.