This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Refactor: Use InvokeContext in all Syscalls#21545
Merged
Lichtso merged 7 commits intosolana-labs:masterfrom Dec 2, 2021
Merged
Refactor: Use InvokeContext in all Syscalls#21545Lichtso merged 7 commits intosolana-labs:masterfrom
Lichtso merged 7 commits intosolana-labs:masterfrom
Conversation
which also have "invoke_context: Rc<RefCell<&'a mut dyn InvokeContext>>".
to all remaining SyscallObjects.
bd6311b to
b1e13e2
Compare
Codecov Report
@@ Coverage Diff @@
## master #21545 +/- ##
========================================
Coverage 81.5% 81.6%
========================================
Files 506 506
Lines 142216 142338 +122
========================================
+ Hits 116024 116182 +158
+ Misses 26192 26156 -36 |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Not all
SyscallObjects haveinvoke_context: Rc<RefCell<&'a mut dyn InvokeContext>>.Some access the individual properties of
InvokeContextinbind_syscall_context_objects()which:RcandRefCelleven though the entire&mut InvokeContextis already wrappeddyn TraitofInvokeContextbecause of the lifetimes of the involved referencesSummary of Changes
InvokeContextfrombind_syscall_context_objects()into the matchingSyscallObject::call().InvokeContext.Fixes #