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

Issue 11821018: Fix a bug in pkg/http where exceptions were getting top-leveled. (Closed)

Created:
7 years, 11 months ago by nweiz
Modified:
7 years, 2 months ago
Reviewers:
Bob Nystrom, floitsch
CC:
reviews_dartlang.org, floitsch
Visibility:
Public.

Description

Fix a bug in pkg/http where exceptions were getting top-leveled. It's very important that the Future chain be set up synchronously. This error crept in because I tried to use a pre-existing Future as the return value of a .then callback, and that future fired an error before it was chained in.

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -1 line) Patch
M pkg/http/lib/src/io_client.dart View 1 chunk +4 lines, -1 line 2 comments Download
M pkg/http/test/client_test.dart View 2 chunks +14 lines, -0 lines 2 comments Download
M pkg/http/test/utils.dart View 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
nweiz
7 years, 11 months ago (2013-01-09 04:34:21 UTC) #1
Bob Nystrom
LGTM. Though it scares me how subtle this bug is. I worry that other users ...
7 years, 11 months ago (2013-01-09 16:09:21 UTC) #2
floitsch
LGTM. Thanks for bringing this to our attention. https://codereview.chromium.org/11821018/diff/1/pkg/http/lib/src/io_client.dart File pkg/http/lib/src/io_client.dart (right): https://codereview.chromium.org/11821018/diff/1/pkg/http/lib/src/io_client.dart#newcode76 pkg/http/lib/src/io_client.dart:76: return ...
7 years, 11 months ago (2013-01-09 17:48:31 UTC) #3
nweiz
7 years, 11 months ago (2013-01-09 21:03:40 UTC) #4
https://codereview.chromium.org/11821018/diff/1/pkg/http/lib/src/io_client.dart
File pkg/http/lib/src/io_client.dart (right):

https://codereview.chromium.org/11821018/diff/1/pkg/http/lib/src/io_client.da...
pkg/http/lib/src/io_client.dart:76: return Futures.wait([
On 2013/01/09 17:48:31, floitsch wrote:
> We are going to remove the Futures class.
> We have created new Future.wait(...) to replace this static method.

Done.

https://codereview.chromium.org/11821018/diff/1/pkg/http/test/client_test.dart
File pkg/http/test/client_test.dart (right):

https://codereview.chromium.org/11821018/diff/1/pkg/http/test/client_test.dar...
pkg/http/test/client_test.dart:48: 'application/json; charset=utf-8';
On 2013/01/09 16:09:21, Bob Nystrom wrote:
> Nit: indent +2 more.

Done.

Powered by Google App Engine
This is Rietveld 408576698