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

Issue 10834084: Check for an error handle passed in, in all dart_api functions that return a handle. Pass the erro… (Closed)

Created:
8 years, 4 months ago by Bill Hesse
Modified:
8 years, 4 months ago
Reviewers:
turnidge, Ivan Posva
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Check for an error handle passed in, in all dart_api functions that return a handle. Pass the error handle through unchanged. BUG= Committed: https://code.google.com/p/dart/source/detail?r=11148

Patch Set 1 #

Total comments: 19

Patch Set 2 : Address comments #

Total comments: 14

Patch Set 3 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+173 lines, -159 lines) Patch
M runtime/vm/dart_api_impl.cc View 1 2 19 chunks +173 lines, -159 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Bill Hesse
Fix the small number of API functions that did not pass through an error handle ...
8 years, 4 months ago (2012-07-31 14:09:41 UTC) #1
Ivan Posva
NMW -Ivan http://codereview.chromium.org/10834084/diff/1/runtime/vm/dart_api_impl.cc File runtime/vm/dart_api_impl.cc (right): http://codereview.chromium.org/10834084/diff/1/runtime/vm/dart_api_impl.cc#newcode1913 runtime/vm/dart_api_impl.cc:1913: return list; This file uses two different ...
8 years, 4 months ago (2012-07-31 16:22:47 UTC) #2
turnidge
http://codereview.chromium.org/10834084/diff/1/runtime/vm/dart_api_impl.cc File runtime/vm/dart_api_impl.cc (right): http://codereview.chromium.org/10834084/diff/1/runtime/vm/dart_api_impl.cc#newcode1913 runtime/vm/dart_api_impl.cc:1913: return list; On 2012/07/31 16:22:47, Ivan Posva wrote: > ...
8 years, 4 months ago (2012-07-31 18:41:28 UTC) #3
Bill Hesse
Oops - forgot to hit publish yesterday. http://codereview.chromium.org/10834084/diff/1/runtime/vm/dart_api_impl.cc File runtime/vm/dart_api_impl.cc (right): http://codereview.chromium.org/10834084/diff/1/runtime/vm/dart_api_impl.cc#newcode1978 runtime/vm/dart_api_impl.cc:1978: GrowableArray<const Object*> ...
8 years, 4 months ago (2012-08-03 08:29:26 UTC) #4
Bill Hesse
Please take a look. https://chromiumcodereview.appspot.com/10834084/diff/5001/runtime/vm/dart_api_impl.cc File runtime/vm/dart_api_impl.cc (right): https://chromiumcodereview.appspot.com/10834084/diff/5001/runtime/vm/dart_api_impl.cc#newcode2511 runtime/vm/dart_api_impl.cc:2511: const Class& cls = Api::UnwrapClassHandle(isolate, ...
8 years, 4 months ago (2012-08-16 11:54:13 UTC) #5
turnidge
lgtm https://chromiumcodereview.appspot.com/10834084/diff/5001/runtime/vm/dart_api_impl.cc File runtime/vm/dart_api_impl.cc (right): https://chromiumcodereview.appspot.com/10834084/diff/5001/runtime/vm/dart_api_impl.cc#newcode2511 runtime/vm/dart_api_impl.cc:2511: const Class& cls = Api::UnwrapClassHandle(isolate, clazz); On 2012/08/16 ...
8 years, 4 months ago (2012-08-17 18:23:40 UTC) #6
Ivan Posva
LGTM with comments addressed. -Ivan https://chromiumcodereview.appspot.com/10834084/diff/5001/runtime/vm/dart_api_impl.cc File runtime/vm/dart_api_impl.cc (right): https://chromiumcodereview.appspot.com/10834084/diff/5001/runtime/vm/dart_api_impl.cc#newcode1912 runtime/vm/dart_api_impl.cc:1912: if (obj.IsError()) { How ...
8 years, 4 months ago (2012-08-21 02:48:45 UTC) #7
Bill Hesse
8 years, 4 months ago (2012-08-23 11:17:44 UTC) #8
http://codereview.chromium.org/10834084/diff/5001/runtime/vm/dart_api_impl.cc
File runtime/vm/dart_api_impl.cc (right):

http://codereview.chromium.org/10834084/diff/5001/runtime/vm/dart_api_impl.cc...
runtime/vm/dart_api_impl.cc:1912: if (obj.IsError()) {
On 2012/08/21 02:48:45, Ivan Posva wrote:
> How about making this into an if-elsif chain?

Done.

http://codereview.chromium.org/10834084/diff/5001/runtime/vm/dart_api_impl.cc...
runtime/vm/dart_api_impl.cc:1966: if (obj.IsError()) {
On 2012/08/21 02:48:45, Ivan Posva wrote:
> ditto: if-elsif chain

Done.

http://codereview.chromium.org/10834084/diff/5001/runtime/vm/dart_api_impl.cc...
runtime/vm/dart_api_impl.cc:1985: return value;
Correct.  Removed. 
On 2012/08/21 02:48:45, Ivan Posva wrote:
> How will this "return value" ever be reached? As far as I can see you already
> returned above with a RETURN_TYPE_ERROR because value_obj is not null and it
is
> not an instance.

http://codereview.chromium.org/10834084/diff/5001/runtime/vm/dart_api_impl.cc...
runtime/vm/dart_api_impl.cc:2050: }
On 2012/08/21 02:48:45, Ivan Posva wrote:
> ditto: if-elsif chain

Done.

http://codereview.chromium.org/10834084/diff/5001/runtime/vm/dart_api_impl.cc...
runtime/vm/dart_api_impl.cc:3662: isolate, Class::NewNativeWrapper(&lib,
cls_symbol, field_count));
On 2012/08/21 02:48:45, Ivan Posva wrote:
> This should have never expected a Library*. I am changing this in an
independent
> CL to expect a const Library& and then you should be able to use
> Api::UnwrapLibraryHandle above.
> 
> https://chromiumcodereview.appspot.com/10827434

Done.

Powered by Google App Engine
This is Rietveld 408576698