Avoid GL symbols being added to library as "undefined". NFC#19032
Closed
sbc100 wants to merge 1 commit into
Closed
Avoid GL symbols being added to library as "undefined". NFC#19032sbc100 wants to merge 1 commit into
sbc100 wants to merge 1 commit into
Conversation
0bbf8c7 to
35cb17f
Compare
The `recordGLProcAddressGet` was processing aliases, but it was assuming the aliases existed within the same library file which in was not the case for `glGenFramebuffersOES` and others in this file that alias symbols in `library_webgl.js`. This was resulting the jsifier thinking the symbols was defined (since it existed in the library) but generating undefined symbols in the in the final output such as: ``` var glGenFramebuffersOES = undefined; ``` Removing the aliasing resolution from `recordGLProcAddressGet` lets `jsifier.js` handle the alias which results in the following output after this change: ``` var _glGenFramebuffersOES = _glGenFramebuffers; ``` Also add some assertions so these types of error don't get overlooked in the future.
35cb17f to
29582fe
Compare
Collaborator
Author
|
There is a second part of this change, which is to disallow "undefined" as a valid library element, but I could also revert that part if you don't think its useful? |
Collaborator
Author
|
Closing in favor of #19033 |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The
recordGLProcAddressGetwas processing aliases, but it was assuming the aliases existed within the same library file which in was not the case forglGenFramebuffersOESand others in this file that alias symbols inlibrary_webgl.js.This was resulting the jsifier thinking the symbols was defined (since it existed in the library) but generating undefined symbols in the in the final output such as:
Removing the aliasing resolution from
recordGLProcAddressGetletsjsifier.jshandle the alias which results in the following output after this change:Also add some assertions so these types of error don't get overlooked in the future.