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

Issue 8401010: Add DART_CHECKVALID (Closed)

Created:
9 years, 1 month ago by turnidge
Modified:
9 years, 1 month ago
Reviewers:
siva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

DART_CHECK_VALID -- abort on an invalid handle. EXPECT_VALID -- check handle validity in unit tests. Committed: https://code.google.com/p/dart/source/detail?r=970

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 15

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 2

Patch Set 5 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+132 lines, -98 lines) Patch
M runtime/include/dart_api.h View 1 2 3 1 chunk +19 lines, -4 lines 0 comments Download
M runtime/vm/dart_api_impl.cc View 1 2 3 2 chunks +13 lines, -2 lines 0 comments Download
M runtime/vm/dart_api_impl_test.cc View 1 2 3 44 chunks +89 lines, -87 lines 0 comments Download
M runtime/vm/isolate_test.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/snapshot_test.cc View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M runtime/vm/unit_test.h View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
turnidge
9 years, 1 month ago (2011-10-26 22:16:49 UTC) #1
siva
LGTM once the issue of ASSERT Vs EXPECT that DynamicAssertionHelper::Fail uses to decide whether to ...
9 years, 1 month ago (2011-10-27 21:15:54 UTC) #2
turnidge
I decided to make a macro called EXPECT_VALID which behaves correctly for our unit testing ...
9 years, 1 month ago (2011-10-27 21:55:20 UTC) #3
siva
lgtm http://codereview.chromium.org/8401010/diff/11001/runtime/vm/dart_api_impl.cc File runtime/vm/dart_api_impl.cc (right): http://codereview.chromium.org/8401010/diff/11001/runtime/vm/dart_api_impl.cc#newcode47 runtime/vm/dart_api_impl.cc:47: OS::Abort(); If we expect embedding code to use ...
9 years, 1 month ago (2011-10-31 19:49:22 UTC) #4
turnidge
9 years, 1 month ago (2011-10-31 21:30:22 UTC) #5
http://codereview.chromium.org/8401010/diff/11001/runtime/vm/dart_api_impl.cc
File runtime/vm/dart_api_impl.cc (right):

http://codereview.chromium.org/8401010/diff/11001/runtime/vm/dart_api_impl.cc...
runtime/vm/dart_api_impl.cc:47: OS::Abort();
On 2011/10/31 19:49:22, asiva wrote:
> If we expect embedding code to use this then OS::Abort might be a bit harsh. I
> am thinking of the scenario where some server is embedding the VM and abort
> might not be the right thing.
> I think this is ok for now but we could consider making this as something only
> the VM use

My intention is that this is a convenience function for those who know that they
want to abort.  Those that do not want to abort will use Dart_IsValid and try to
recover gracefully.

Powered by Google App Engine
This is Rietveld 408576698