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

Side by Side Diff: sdk/lib/io/http_parser.dart

Issue 61753003: Avoid throwing internal null-pointer exceptions in http parser. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.io; 5 part of dart.io;
6 6
7 // Global constants. 7 // Global constants.
8 class _Const { 8 class _Const {
9 // Bytes for "HTTP". 9 // Bytes for "HTTP".
10 static const HTTP = const [72, 84, 84, 80]; 10 static const HTTP = const [72, 84, 84, 80];
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 }, 203 },
204 onPause: () { 204 onPause: () {
205 _paused = true; 205 _paused = true;
206 _pauseStateChanged(); 206 _pauseStateChanged();
207 }, 207 },
208 onResume: () { 208 onResume: () {
209 _paused = false; 209 _paused = false;
210 _pauseStateChanged(); 210 _pauseStateChanged();
211 }, 211 },
212 onCancel: () { 212 onCancel: () {
213 try { 213 if (_socketSubscription != null) {
214 _socketSubscription.cancel(); 214 _socketSubscription.cancel();
215 } catch (e) {
216 } 215 }
217 }); 216 });
218 _reset(); 217 _reset();
219 } 218 }
220 219
221 220
222 StreamSubscription<_HttpIncoming> listen(void onData(_HttpIncoming event), 221 StreamSubscription<_HttpIncoming> listen(void onData(_HttpIncoming event),
223 {Function onError, 222 {Function onError,
224 void onDone(), 223 void onDone(),
225 bool cancelOnError}) { 224 bool cancelOnError}) {
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 _HttpHeaders _headers; 981 _HttpHeaders _headers;
983 982
984 // The current incoming connection. 983 // The current incoming connection.
985 _HttpIncoming _incoming; 984 _HttpIncoming _incoming;
986 StreamSubscription _socketSubscription; 985 StreamSubscription _socketSubscription;
987 bool _paused = true; 986 bool _paused = true;
988 bool _bodyPaused = false; 987 bool _bodyPaused = false;
989 StreamController<_HttpIncoming> _controller; 988 StreamController<_HttpIncoming> _controller;
990 StreamController<List<int>> _bodyController; 989 StreamController<List<int>> _bodyController;
991 } 990 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698