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

Issue 12038066: Change a couple of API functions to return unhandled exception errors instead of fatal errors on im… (Closed)

Created:
7 years, 11 months ago by Mads Ager (google)
Modified:
7 years, 10 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Change a couple of API functions to return unhandled exception errors instead of fatal errors on immutable array (by calling into dart code for immutable arrays). Add regression tests. We should look at all the API errors returned from the API and figure out if they should actually be fatal errors or just exceptions. R=iposva@google.com,sgjesse@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=17750

Patch Set 1 #

Total comments: 4

Patch Set 2 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -27 lines) Patch
M runtime/vm/dart_api_impl.cc View 1 3 chunks +7 lines, -9 lines 0 comments Download
M runtime/vm/dart_api_impl_test.cc View 3 chunks +36 lines, -18 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Mads Ager (google)
7 years, 11 months ago (2013-01-24 13:30:03 UTC) #1
Ivan Posva
LGTM -ip https://codereview.chromium.org/12038066/diff/1/runtime/vm/dart_api_impl.cc File runtime/vm/dart_api_impl.cc (right): https://codereview.chromium.org/12038066/diff/1/runtime/vm/dart_api_impl.cc#newcode1992 runtime/vm/dart_api_impl.cc:1992: if (obj.IsArray() && !obj.IsImmutableArray()) { How about ...
7 years, 11 months ago (2013-01-25 00:53:48 UTC) #2
Søren Gjesse
lgtm
7 years, 11 months ago (2013-01-28 08:08:38 UTC) #3
Mads Ager (google)
7 years, 10 months ago (2013-01-29 10:15:13 UTC) #4
https://codereview.chromium.org/12038066/diff/1/runtime/vm/dart_api_impl.cc
File runtime/vm/dart_api_impl.cc (right):

https://codereview.chromium.org/12038066/diff/1/runtime/vm/dart_api_impl.cc#n...
runtime/vm/dart_api_impl.cc:1992: if (obj.IsArray() && !obj.IsImmutableArray())
{
On 2013/01/25 00:53:48, Ivan Posva wrote:
> How about adding a comment that we let the Dart invocation below throw the
> relevant exception? And what happens when the index is out of bounds?

Done. If index is out of bounds we still get an unsupported operation error for
immutable arrays.

https://codereview.chromium.org/12038066/diff/1/runtime/vm/dart_api_impl.cc#n...
runtime/vm/dart_api_impl.cc:2153: } else if (obj.IsArray() &&
!obj.IsImmutableArray()) {
On 2013/01/25 00:53:48, Ivan Posva wrote:
> ditto.

Done.

Powered by Google App Engine
This is Rietveld 408576698