• Philip Chimento's avatar
    byteArray: Add compatibility toString property · 8f0dff8d
    Philip Chimento authored
    This overrides, on each Uint8Array returned from an introspected function
    or from ByteArray.fromString() or ByteArray.fromGBytes(), the toString()
    property with a compatibility shim that preserves the old behaviour of
    ByteArray.prototype.toString() while logging a compatibility warning
    asking people to fix their code.
    
    This ByteArray.toString() -> Uint8Array.toString() change has had more
    fallout in application code than I expected, so it seems better to
    preserve backwards compatibility. (The old behaviour was to decode the
    byte array into a string with default encoding UTF-8, and the default
    behaviour of Uint8Array is to return a string with the decimal digits of
    each byte joined with commas. So the effect was that strings like
    "97,98,99,100" would show up in UIs where previously "abcd" would have
    been printed.
    
    This is only on specific instances, so Uint8Array.prototype.toString()
    remains untouched.
    8f0dff8d
Name
Last commit
Last update
doc Loading commit data...
examples Loading commit data...
gi Loading commit data...
gjs Loading commit data...
installed-tests Loading commit data...
libgjs-private Loading commit data...
m4 Loading commit data...
modules Loading commit data...
test Loading commit data...
tools Loading commit data...
util Loading commit data...
win32 Loading commit data...
.clang-format Loading commit data...
.eslintignore Loading commit data...
.eslintrc.json Loading commit data...
.gitlab-ci.yml Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
COPYING.LGPL Loading commit data...
CPPLINT.cfg Loading commit data...
ChangeLog Loading commit data...
Makefile-examples.am Loading commit data...
Makefile-insttest.am Loading commit data...
Makefile-modules.am Loading commit data...
Makefile-test.am Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README Loading commit data...
README.md Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
git.mk Loading commit data...
gjs-1.0.pc.in Loading commit data...
gjs-modules-srcs.mk Loading commit data...
gjs-srcs.mk Loading commit data...
gjs.doap Loading commit data...
verbump.py Loading commit data...