New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Re-add initDataTransform config #4231
Merged
joeyparrish
merged 3 commits into
shaka-project:main
from
avelad:initDataTransform-config
May 17, 2022
Merged
fix: Re-add initDataTransform config #4231
joeyparrish
merged 3 commits into
shaka-project:main
from
avelad:initDataTransform-config
May 17, 2022
Conversation
This file contains 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
avelad
force-pushed
the
initDataTransform-config
branch
from
May 17, 2022 11:21
442a270
to
147a37b
Compare
avelad
commented
May 17, 2022
joeyparrish
added a commit
to joeyparrish/shaka-player
that referenced
this pull request
May 17, 2022
Many times in our default configuration, we need to create an empty default implementation of a callback. The compiler wants to strip out unused parameters from these functions, but this breaks our runtime-type-checking for functions in configure(). We need a way to keep the full function signature in default config callbacks in compiled mode. This adds a new utility: ConfigUtils.referenceParametersAndReturn(). It references the input parameters so the compiler doesn't remove them from the calling function, and returns whatever value is specified. The utility function is marked with `@noinline`, so the compiler won't tamper with it. Default config callbacks that use this utility will still bear the complete function signature even in compiled mode. The caller should look something like this: const callback = (a, b, c, d) => { return referenceParametersAndReturn( [a, b, c, d], a); // Can be anything, doesn't need to be one of the parameters }; See also shaka-project#4231 (comment)
joeyparrish
added a commit
that referenced
this pull request
May 17, 2022
Many times in our default configuration, we need to create an empty default implementation of a callback. The compiler wants to strip out unused parameters from these functions, but this breaks our runtime-type-checking for functions in configure(). We need a way to keep the full function signature in default config callbacks in compiled mode. This adds a new utility: ConfigUtils.referenceParametersAndReturn(). It references the input parameters so the compiler doesn't remove them from the calling function, and returns whatever value is specified. The utility function is marked with `@noinline`, so the compiler won't tamper with it. Default config callbacks that use this utility will still bear the complete function signature even in compiled mode. The caller should look something like this: ```js const callback = (a, b, c, d) => { return referenceParametersAndReturn( [a, b, c, d], a); // Can be anything, doesn't need to be one of the parameters }; ``` See also #4231 (comment)
Some FairPlay providers still need this part, so we should never have removed it. The default is to do no transformation.
joeyparrish
force-pushed
the
initDataTransform-config
branch
from
May 17, 2022 18:20
147a37b
to
f23640a
Compare
joeyparrish
previously approved these changes
May 17, 2022
I'll wait for the test pass to complete, then merge. Thanks, @avelad! |
joeyparrish
approved these changes
May 17, 2022
Thanks @joeyparrish ! |
joeyparrish
added a commit
that referenced
this pull request
May 17, 2022
Many times in our default configuration, we need to create an empty default implementation of a callback. The compiler wants to strip out unused parameters from these functions, but this breaks our runtime-type-checking for functions in configure(). We need a way to keep the full function signature in default config callbacks in compiled mode. This adds a new utility: ConfigUtils.referenceParametersAndReturn(). It references the input parameters so the compiler doesn't remove them from the calling function, and returns whatever value is specified. The utility function is marked with `@noinline`, so the compiler won't tamper with it. Default config callbacks that use this utility will still bear the complete function signature even in compiled mode. The caller should look something like this: ```js const callback = (a, b, c, d) => { return referenceParametersAndReturn( [a, b, c, d], a); // Can be anything, doesn't need to be one of the parameters }; ``` See also #4231 (comment)
joeyparrish
added a commit
that referenced
this pull request
May 17, 2022
Many times in our default configuration, we need to create an empty default implementation of a callback. The compiler wants to strip out unused parameters from these functions, but this breaks our runtime-type-checking for functions in configure(). We need a way to keep the full function signature in default config callbacks in compiled mode. This adds a new utility: ConfigUtils.referenceParametersAndReturn(). It references the input parameters so the compiler doesn't remove them from the calling function, and returns whatever value is specified. The utility function is marked with `@noinline`, so the compiler won't tamper with it. Default config callbacks that use this utility will still bear the complete function signature even in compiled mode. The caller should look something like this: ```js const callback = (a, b, c, d) => { return referenceParametersAndReturn( [a, b, c, d], a); // Can be anything, doesn't need to be one of the parameters }; ``` See also #4231 (comment)
joeyparrish
added a commit
that referenced
this pull request
May 17, 2022
Many times in our default configuration, we need to create an empty default implementation of a callback. The compiler wants to strip out unused parameters from these functions, but this breaks our runtime-type-checking for functions in configure(). We need a way to keep the full function signature in default config callbacks in compiled mode. This adds a new utility: ConfigUtils.referenceParametersAndReturn(). It references the input parameters so the compiler doesn't remove them from the calling function, and returns whatever value is specified. The utility function is marked with `@noinline`, so the compiler won't tamper with it. Default config callbacks that use this utility will still bear the complete function signature even in compiled mode. The caller should look something like this: ```js const callback = (a, b, c, d) => { return referenceParametersAndReturn( [a, b, c, d], a); // Can be anything, doesn't need to be one of the parameters }; ``` See also #4231 (comment)
joeyparrish
added a commit
that referenced
this pull request
May 17, 2022
Some FairPlay providers still need this part, so we should never have removed it. The default is to do no transformation. Co-authored-by: Joey Parrish <joeyparrish@google.com>
github-actions
bot
added
the
status: archived
Archived and locked; will not be updated
label
Jul 25, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
status: archived
Archived and locked; will not be updated
type: bug
Something isn't working correctly
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.
Some FairPlay providers still need this part, so we should never have removed it.
The default is to do no transformation.