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

Unified Diff: runtime/bin/string_stream.dart

Issue 8413018: More strict non-equal cleanups in library code (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 2 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
« no previous file with comments | « runtime/bin/socket_stream.dart ('k') | runtime/bin/timer_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/string_stream.dart
===================================================================
--- runtime/bin/string_stream.dart (revision 891)
+++ runtime/bin/string_stream.dart (working copy)
@@ -190,13 +190,13 @@
String read() {
// If there is buffered data return that first.
var decodedString = _decoder.decoded;
- if (_buffer != null) {
+ if (_buffer !== null) {
var result = _buffer;
_resetBuffer();
- if (decodedString != null) result += decodedString;
+ if (decodedString !== null) result += decodedString;
return result;
} else {
- if (decodedString != null) {
+ if (decodedString !== null) {
return decodedString;
} else {
_readData();
@@ -207,9 +207,9 @@
String readLine() {
// Get line from the buffer if possible.
- if (_buffer != null) {
+ if (_buffer !== null) {
var result = _readLineFromBuffer();
- if (result != null) return result;
+ if (result !== null) return result;
}
// Try to fill more data into the buffer and read a line.
if (_fillBuffer()) {
@@ -233,20 +233,20 @@
void _dataHandler() {
_readData();
- if (!_decoder.isEmpty() && _clientDataHandler != null) {
+ if (!_decoder.isEmpty() && _clientDataHandler !== null) {
_clientDataHandler();
}
}
void _closeHandler() {
_closed = true;
- if (_clientDataHandler != null) _clientDataHandler();
- if (_clientCloseHandler != null) _clientCloseHandler();
+ if (_clientDataHandler !== null) _clientDataHandler();
+ if (_clientCloseHandler !== null) _clientCloseHandler();
}
void _readData() {
List<int> data = _input.read();
- if (data != null) {
+ if (data !== null) {
_decoder.write(data);
}
}
@@ -293,7 +293,7 @@
// added or end of file was reached.
bool _fillBuffer() {
if (_eof) return false;
- if (_buffer != null && _bufferLineStart == _buffer.length) {
+ if (_buffer !== null && _bufferLineStart == _buffer.length) {
_buffer = null;
_bufferLineStart = null;
}
@@ -305,11 +305,11 @@
}
if (_buffer === null) {
_buffer = decodedString;
- if (_buffer != null) {
+ if (_buffer !== null) {
_bufferLineStart = 0;
return true;
}
- } else if (decodedString != null) {
+ } else if (decodedString !== null) {
_buffer = _buffer.substring(_bufferLineStart) + decodedString;
_bufferLineStart = 0;
return true;
« no previous file with comments | « runtime/bin/socket_stream.dart ('k') | runtime/bin/timer_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698