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

Issue 2640573003: Resolution for issue #5092: Unit test handle checks consider dangling handles to be valid. (Closed)

Created:
3 years, 11 months ago by bkonyi
Modified:
3 years, 11 months ago
Reviewers:
zra, Cutch, siva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Resolution for issue #5092: Unit test handle checks consider dangling handles to be valid. Updated the IS_VALID(handle) macro to also check if the handle is still in scope or is a read-only handle. BUG= R=asiva@google.com Committed: https://github.com/dart-lang/sdk/commit/259c7ac2be54ee3e20f5a6c6f3df7d910f01f594

Patch Set 1 #

Total comments: 15

Patch Set 2 : Resolution for issue #5092: Unit test handle checks consider dangling handles to be valid. #

Total comments: 4

Patch Set 3 : Updated tests to check validity of Persistent/WeakPersistent handles. #

Patch Set 4 : Removed Dart API entry for IsValid. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+170 lines, -0 lines) Patch
M runtime/vm/dart_api_impl.h View 1 3 chunks +5 lines, -0 lines 0 comments Download
M runtime/vm/dart_api_impl.cc View 1 2 3 1 chunk +16 lines, -0 lines 1 comment Download
M runtime/vm/dart_api_state.h View 1 2 3 chunks +40 lines, -0 lines 0 comments Download
M runtime/vm/handles_test.cc View 1 2 2 chunks +54 lines, -0 lines 0 comments Download
M runtime/vm/thread.h View 1 chunk +3 lines, -0 lines 0 comments Download
M runtime/vm/thread.cc View 3 chunks +30 lines, -0 lines 0 comments Download
M runtime/vm/thread_registry.h View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/thread_registry.cc View 1 chunk +13 lines, -0 lines 0 comments Download
M runtime/vm/unit_test.h View 1 2 2 chunks +8 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (3 generated)
bkonyi
https://codereview.chromium.org/2640573003/diff/1/runtime/vm/dart_api_impl.h File runtime/vm/dart_api_impl.h (right): https://codereview.chromium.org/2640573003/diff/1/runtime/vm/dart_api_impl.h#newcode178 runtime/vm/dart_api_impl.h:178: return isolate->thread_registry()->IsValidHandle(handle) || I'm not sure if I should ...
3 years, 11 months ago (2017-01-18 00:44:47 UTC) #2
bkonyi
https://codereview.chromium.org/2640573003/diff/1/runtime/vm/unit_test.h File runtime/vm/unit_test.h (right): https://codereview.chromium.org/2640573003/diff/1/runtime/vm/unit_test.h#newcode550 runtime/vm/unit_test.h:550: if (!Dart_IsValid(tmp_handle)) { \ I'm not sure if we'd ...
3 years, 11 months ago (2017-01-18 00:47:01 UTC) #3
Cutch
DBC. Also, you have the wrong email address for Siva- our Siva is asiva@ https://codereview.chromium.org/2640573003/diff/1/runtime/vm/dart_api_impl.h ...
3 years, 11 months ago (2017-01-18 14:49:52 UTC) #4
siva
https://codereview.chromium.org/2640573003/diff/1/runtime/include/dart_api.h File runtime/include/dart_api.h (right): https://codereview.chromium.org/2640573003/diff/1/runtime/include/dart_api.h#newcode266 runtime/include/dart_api.h:266: DART_EXPORT bool Dart_IsValid(Dart_Handle handle); Why do we need this ...
3 years, 11 months ago (2017-01-18 23:27:07 UTC) #6
bkonyi
https://codereview.chromium.org/2640573003/diff/1/runtime/include/dart_api.h File runtime/include/dart_api.h (right): https://codereview.chromium.org/2640573003/diff/1/runtime/include/dart_api.h#newcode266 runtime/include/dart_api.h:266: DART_EXPORT bool Dart_IsValid(Dart_Handle handle); On 2017/01/18 at 23:27:06, siva ...
3 years, 11 months ago (2017-01-19 01:05:13 UTC) #7
siva
lgtm with comment about adding to the unit test case. https://codereview.chromium.org/2640573003/diff/20001/runtime/vm/dart_api_impl.cc File runtime/vm/dart_api_impl.cc (right): https://codereview.chromium.org/2640573003/diff/20001/runtime/vm/dart_api_impl.cc#newcode780 ...
3 years, 11 months ago (2017-01-20 17:40:03 UTC) #8
bkonyi
https://codereview.chromium.org/2640573003/diff/20001/runtime/vm/dart_api_impl.cc File runtime/vm/dart_api_impl.cc (right): https://codereview.chromium.org/2640573003/diff/20001/runtime/vm/dart_api_impl.cc#newcode780 runtime/vm/dart_api_impl.cc:780: } On 2017/01/20 at 17:40:03, siva wrote: > Not ...
3 years, 11 months ago (2017-01-20 23:07:11 UTC) #9
siva
lgtm
3 years, 11 months ago (2017-01-20 23:48:55 UTC) #10
bkonyi
3 years, 11 months ago (2017-01-20 23:50:23 UTC) #12
Message was sent while issue was closed.
Committed patchset #4 (id:60001) manually as
259c7ac2be54ee3e20f5a6c6f3df7d910f01f594 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698