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

Side by Side Diff: Source/core/page/EventSource.h

Issue 60493003: Assertion hit / crash in EventSource::abortConnectionAttempt() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2012 Ericsson AB. All rights reserved. 2 * Copyright (C) 2009, 2012 Ericsson AB. All rights reserved.
3 * Copyright (C) 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2010 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 private: 89 private:
90 EventSource(ExecutionContext*, const KURL&, const Dictionary&); 90 EventSource(ExecutionContext*, const KURL&, const Dictionary&);
91 91
92 virtual void didReceiveResponse(unsigned long, const ResourceResponse&); 92 virtual void didReceiveResponse(unsigned long, const ResourceResponse&);
93 virtual void didReceiveData(const char*, int); 93 virtual void didReceiveData(const char*, int);
94 virtual void didFinishLoading(unsigned long, double); 94 virtual void didFinishLoading(unsigned long, double);
95 virtual void didFail(const ResourceError&); 95 virtual void didFail(const ResourceError&);
96 virtual void didFailAccessControlCheck(const ResourceError&); 96 virtual void didFailAccessControlCheck(const ResourceError&);
97 virtual void didFailRedirectCheck(); 97 virtual void didFailRedirectCheck();
98 98
99 void scheduleInitialConnect();
99 void connect(); 100 void connect();
100 void networkRequestEnded(); 101 void networkRequestEnded();
101 void scheduleReconnect(); 102 void scheduleReconnect();
102 void reconnectTimerFired(Timer<EventSource>*); 103 void connectTimerFired(Timer<EventSource>*);
103 void abortConnectionAttempt(); 104 void abortConnectionAttempt();
104 void parseEventStream(); 105 void parseEventStream();
105 void parseEventStreamLine(unsigned pos, int fieldLength, int lineLength); 106 void parseEventStreamLine(unsigned pos, int fieldLength, int lineLength);
106 PassRefPtr<MessageEvent> createMessageEvent(); 107 PassRefPtr<MessageEvent> createMessageEvent();
107 108
108 KURL m_url; 109 KURL m_url;
109 bool m_withCredentials; 110 bool m_withCredentials;
110 State m_state; 111 State m_state;
111 112
112 RefPtr<TextResourceDecoder> m_decoder; 113 RefPtr<TextResourceDecoder> m_decoder;
113 RefPtr<ThreadableLoader> m_loader; 114 RefPtr<ThreadableLoader> m_loader;
114 Timer<EventSource> m_reconnectTimer; 115 Timer<EventSource> m_connectTimer;
115 Vector<UChar> m_receiveBuf; 116 Vector<UChar> m_receiveBuf;
116 bool m_discardTrailingNewline; 117 bool m_discardTrailingNewline;
117 bool m_requestInFlight; 118 bool m_requestInFlight;
118 119
119 String m_eventName; 120 String m_eventName;
120 Vector<UChar> m_data; 121 Vector<UChar> m_data;
121 String m_currentlyParsedEventId; 122 String m_currentlyParsedEventId;
122 String m_lastEventId; 123 String m_lastEventId;
123 unsigned long long m_reconnectDelay; 124 unsigned long long m_reconnectDelay;
124 String m_eventStreamOrigin; 125 String m_eventStreamOrigin;
125 }; 126 };
126 127
127 } // namespace WebCore 128 } // namespace WebCore
128 129
129 #endif // EventSource_h 130 #endif // EventSource_h
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/eventsource/eventsource-cors-non-http-expected.txt ('k') | Source/core/page/EventSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698