add CanGc as argument to Validatable.validity_state#40155
add CanGc as argument to Validatable.validity_state#40155yezhizhen merged 1 commit intoservo:mainfrom
Conversation
|
@jdm Here is one for Validatable.validity_state |
|
|
||
| self.validity_state() | ||
| self.validity_state(can_gc) | ||
| .perform_validation_and_update(ValidationFlags::VALUE_MISSING, CanGc::note()); |
There was a problem hiding this comment.
| .perform_validation_and_update(ValidationFlags::VALUE_MISSING, CanGc::note()); | |
| .perform_validation_and_update(ValidationFlags::VALUE_MISSING, can_gc); |
There was a problem hiding this comment.
Thanks for catching that. Updated.
|
|
||
| self.validity_state() | ||
| self.validity_state(can_gc) | ||
| .perform_validation_and_update(ValidationFlags::all(), CanGc::note()); |
There was a problem hiding this comment.
| .perform_validation_and_update(ValidationFlags::all(), CanGc::note()); | |
| .perform_validation_and_update(ValidationFlags::all(), can_gc); |
There was a problem hiding this comment.
Thanks for catching that. Updated.
Signed-off-by: Yerkebulan Tulibergenov <[email protected]>
e0488d2 to
9c6c2cb
Compare
|
So the idea is that, we pass |
No, a CanGc argument does not have any runtime behaviour. It's simply a warning to the caller that a GC could happen before the called function returns. |
|
@jdm CI is happy. Do you mind adding it to the merge queue? Thanks. |
add CanGc as argument to Validatable.validity_state
Testing: These changes do not require tests because they are a refactor.
Addresses part of #34573.