Skip to content

Commit e0bc007

Browse files
authored
Merge pull request #348 from De-Panther/fix_malloc_free_missing_error
Fixed errors of Module._malloc and Module._free are not functions
2 parents 044d4cd + c6e9917 commit e0bc007

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Packages/webxr/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
### Fixed
10+
- Errors of Module._malloc and Module._free are not functions.
11+
912
## [0.21.0] - 2024-01-17
1013
### Added
1114
- An option to auto-load WebXRManager on start in WebXRSettings.

Packages/webxr/Runtime/Plugins/WebGL/webxr.jspre

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,8 +1240,8 @@ Module['WebXR'].OnXRCapabilities = function (isARSupported, isVRSupported) {
12401240

12411241
Module['WebXR'].OnInputProfiles = function (input_profiles) {
12421242
var strBufferSize = lengthBytesUTF8(input_profiles) + 1;
1243-
var strBuffer = Module._malloc(strBufferSize);
1243+
var strBuffer = _malloc(strBufferSize);
12441244
stringToUTF8(input_profiles, strBuffer, strBufferSize);
12451245
Module.dynCall_vi(Module.WebXR.onInputProfilesPtr, strBuffer);
1246-
Module._free(strBuffer);
1246+
_free(strBuffer);
12471247
}

0 commit comments

Comments
 (0)