Handle INVALID_FUNCTION
mismatches at plugin boundaries, redux
#2136
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.
References #2071
This PR picks back from the closure of the original one. The commits have been cherry picked on top of the current HEAD and the special handling of pre-1.12-zero-function-IDs has been dropped completely, as zero function IDs were invalid before 1.12.
The
INVALID_FUNCTION
is stored as a zero in the data packs, and it is converted to the appropriate (-1
/0
) function ID on load.There are some explicit checks for non-null-but-negative-or-zero function IDs which are extra compared to the original code and the original PR. These are added under the assumption that it's better to have an explicit error than propagating 'wrong' function IDs around. Do let me know if these should be removed or not.