Skip to content

Minified exceptions relating to String.fromCodePoint and String.prototype.codePointAt shims. #21

@cawilson

Description

@cawilson

When switching to the minified version of the ByteBufferAB.js library, exceptions are being thrown that look to be related to errors in minification of the String.fromCodePoint and String.prototype.codePointAt shims:

First error is on line 55, character 116:

// TypeError: Unable to get property 'apply' of undefined or null reference
... c=String.a.apply(String,f) ...

Which looks to be from the method ByteBuffer.readVString() and should be a call to 'String.fromCodePoint.apply(...)' instead of 'String.a.apply(...)'

Second error is on line 54, character 124:

// TypeError: Object doesn't support property or method 'b'
... b+=v(a.b(f),this,b) ...

Which looks to be from the ByteBuffer.writeVString() and should be a call to 'a.codePointAt(...)' instead of 'a.b(...)'

So it looks like the 'fromCodePoint' and 'codePointAt' names are being minified when either they shouldn't or the minification isn't renaming the shims properly. I think this is because the shims refer to themselves through string names like:

String.prototype["codePointAt"] = codePointAt;

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions