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

Issue 934763004: Fix bug in subscription handling in mime package (Closed)

Created:
5 years, 10 months ago by Søren Gjesse
Modified:
5 years, 10 months ago
Reviewers:
kustermann
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Fix bug in subscription handling in mime package The parser now parses each received chunk to the end no matter what the paused state of the part stream is. This will add data to the part stream controller before it is even listened on, but only the data already received from the original input stream. Not trying to stop the parsing on a received chunk when the part stream is paused makes the code simpler to reason about. The two added tests modes failed without this change. Either by hanging or by hitting an exception trying to invoke the getter 'length' on null. R=kustermann@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=43835

Patch Set 1 #

Total comments: 2

Patch Set 2 : Addressed review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+73 lines, -19 lines) Patch
M pkg/mime/lib/src/bound_multipart_stream.dart View 3 chunks +5 lines, -8 lines 0 comments Download
M pkg/mime/pubspec.yaml View 1 chunk +1 line, -1 line 0 comments Download
M pkg/mime/test/mime_multipart_transformer_test.dart View 1 3 chunks +67 lines, -10 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
Søren Gjesse
5 years, 10 months ago (2015-02-17 16:54:21 UTC) #1
kustermann
lgtm - provided that synchronous StreamControllers will buffer the data if they are paused (which ...
5 years, 10 months ago (2015-02-17 17:08:03 UTC) #2
Søren Gjesse
All (non-broadcast) StreamControllers buffer until the subscriber is registered. https://codereview.chromium.org/934763004/diff/1/pkg/mime/test/mime_multipart_transformer_test.dart File pkg/mime/test/mime_multipart_transformer_test.dart (right): https://codereview.chromium.org/934763004/diff/1/pkg/mime/test/mime_multipart_transformer_test.dart#newcode73 pkg/mime/test/mime_multipart_transformer_test.dart:73: ...
5 years, 10 months ago (2015-02-18 07:27:18 UTC) #4
Søren Gjesse
5 years, 10 months ago (2015-02-18 07:27:55 UTC) #5
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as 43835 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698