Skip to content

buffer: Fixing deopt when constructed with strings

Rodrigo Muino Tomonari requested to merge github/fork/tomgco/buffer-deopt into master

When a buffer was created using new Buffer('A String'), internally within the buffer class we would read arguments[1], however in this case we would be reading outside of the array causing a deopt to occur.

This fixes this issue by casting the type to a string before use, and removing the usage of the arguments object.

Merge request reports

Loading