Remove reopen

This commit is contained in:
thosakwe 2017-08-03 12:42:16 -04:00
parent f6695080b8
commit 3599e83ecf
2 changed files with 2 additions and 18 deletions

View file

@ -14,6 +14,8 @@ patterns, to prevent memory leaks.
* Removed the inheritance on `Extensible` in many classes, and removed it from `angel_route`. * Removed the inheritance on `Extensible` in many classes, and removed it from `angel_route`.
Now, only `Angel` and `RequestContext` have `@proxy` annotations. Now, only `Angel` and `RequestContext` have `@proxy` annotations.
* Deprecated passing `debug` to Angel. * Deprecated passing `debug` to Angel.
* `_LockableBytesBuilder` now uses `Uint8List`.
* Removed `reopen` from `ResponseContext`.
# 1.0.7+2 # 1.0.7+2
Changed `ResponseContext.serialize`. The `contentType` is now set *before* serialization. Changed `ResponseContext.serialize`. The `contentType` is now set *before* serialization.

View file

@ -145,16 +145,6 @@ class ResponseContext implements StringSink {
_isOpen = false; _isOpen = false;
} }
/// Re-opens a closed response. **NEVER USE THIS IN A PLUGIN**.
///
/// To preserve your sanity, don't use it ever. This is solely for internal use.
///
/// You're going to need this one day, and you'll be happy it was added.
void reopen() {
_buffer._reopen();
_isOpen = true;
}
/// Sets a response header to the given value, or retrieves its value. /// Sets a response header to the given value, or retrieves its value.
@Deprecated('Please use `headers` instead.') @Deprecated('Please use `headers` instead.')
header(String key, [String value]) { header(String key, [String value]) {
@ -361,8 +351,6 @@ abstract class _LockableBytesBuilder extends BytesBuilder {
factory _LockableBytesBuilder() => new _LockableBytesBuilderImpl(); factory _LockableBytesBuilder() => new _LockableBytesBuilderImpl();
void _lock(); void _lock();
void _reopen();
} }
class _LockableBytesBuilderImpl implements _LockableBytesBuilder { class _LockableBytesBuilderImpl implements _LockableBytesBuilder {
@ -376,12 +364,6 @@ class _LockableBytesBuilderImpl implements _LockableBytesBuilder {
void _lock() { void _lock() {
_closed = true; _closed = true;
} }
@override
void _reopen() {
_closed = false;
}
@override @override
void add(List<int> bytes) { void add(List<int> bytes) {
if (_closed) if (_closed)