Skip to content

Commit 4a03ae4

Browse files
Playground: wire TextEncoder polyfill from JsRuntimeHost
JsRuntimeHost #171 added a TextEncoder polyfill alongside the existing TextDecoder one (per @bghgary's review feedback on this PR, where the polyfill originally lived in BN itself). Bump the JsRuntimeHost pin and link / initialize TextEncoder the same way TextDecoder is linked / initialized. Pin bump: 1e9b17e4 (Bump UrlLib pin) -> 81b01d2e (Add TextEncoder polyfill) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent e42099c commit 4a03ae4

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

Apps/Playground/Android/BabylonNative/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,6 @@ target_link_libraries(BabylonNativeJNI
4646
PRIVATE ShaderCache
4747
PRIVATE TestUtils
4848
PRIVATE TextDecoder
49+
PRIVATE TextEncoder
4950
PRIVATE Window
5051
PRIVATE XMLHttpRequest)

Apps/Playground/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ target_link_libraries(Playground
155155
PRIVATE ShaderCache
156156
PRIVATE TestUtils
157157
PRIVATE TextDecoder
158+
PRIVATE TextEncoder
158159
PRIVATE Window
159160
PRIVATE XMLHttpRequest
160161
${ADDITIONAL_LIBRARIES}

Apps/Playground/Shared/AppContext.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <Babylon/Polyfills/File.h>
2525
#include <Babylon/Polyfills/Performance.h>
2626
#include <Babylon/Polyfills/TextDecoder.h>
27+
#include <Babylon/Polyfills/TextEncoder.h>
2728
#include <Babylon/Polyfills/Window.h>
2829
#include <Babylon/Polyfills/XMLHttpRequest.h>
2930

@@ -190,6 +191,8 @@ AppContext::AppContext(
190191

191192
Babylon::Polyfills::TextDecoder::Initialize(env);
192193

194+
Babylon::Polyfills::TextEncoder::Initialize(env);
195+
193196
Babylon::Polyfills::XMLHttpRequest::Initialize(env);
194197
m_canvas.emplace(Babylon::Polyfills::Canvas::Initialize(env));
195198

0 commit comments

Comments
 (0)