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

Side by Side Diff: Source/modules/websockets/WebSocket.cpp

Issue 189833009: Trace where timers were scheduled in Blink (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 return; 100 return;
101 101
102 m_state = Suspended; 102 m_state = Suspended;
103 } 103 }
104 104
105 void WebSocket::EventQueue::resume() 105 void WebSocket::EventQueue::resume()
106 { 106 {
107 if (m_state != Suspended || m_resumeTimer.isActive()) 107 if (m_state != Suspended || m_resumeTimer.isActive())
108 return; 108 return;
109 109
110 m_resumeTimer.startOneShot(0); 110 m_resumeTimer.startOneShot(0, FROM_HERE);
111 } 111 }
112 112
113 void WebSocket::EventQueue::stop() 113 void WebSocket::EventQueue::stop()
114 { 114 {
115 if (m_state == Stopped) 115 if (m_state == Stopped)
116 return; 116 return;
117 117
118 m_state = Stopped; 118 m_state = Stopped;
119 m_resumeTimer.stop(); 119 m_resumeTimer.stop();
120 m_events.clear(); 120 m_events.clear();
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 static const size_t minimumPayloadSizeWithEightByteExtendedPayloadLength = 0 x10000; 681 static const size_t minimumPayloadSizeWithEightByteExtendedPayloadLength = 0 x10000;
682 size_t overhead = hybiBaseFramingOverhead + hybiMaskingKeyLength; 682 size_t overhead = hybiBaseFramingOverhead + hybiMaskingKeyLength;
683 if (payloadSize >= minimumPayloadSizeWithEightByteExtendedPayloadLength) 683 if (payloadSize >= minimumPayloadSizeWithEightByteExtendedPayloadLength)
684 overhead += 8; 684 overhead += 8;
685 else if (payloadSize >= minimumPayloadSizeWithTwoByteExtendedPayloadLength) 685 else if (payloadSize >= minimumPayloadSizeWithTwoByteExtendedPayloadLength)
686 overhead += 2; 686 overhead += 2;
687 return overhead; 687 return overhead;
688 } 688 }
689 689
690 } // namespace WebCore 690 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/websockets/MainThreadWebSocketChannel.cpp ('k') | Source/platform/AsyncMethodRunner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698