Skip to content

Conversation

@addaleax
Copy link
Contributor

@addaleax addaleax commented Apr 22, 2021

Also fixes NODE-3223 (ensureBuffer ignores byteLength/byteOffset).
This is the "proper" alternative to #418 and matches what e.g. Node.js APIs do.

Description

What changed?

potentialBuffer.buffer,
potentialBuffer.byteOffset,
potentialBuffer.byteLength
);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know the bug was here before anyway, but I should absolutely have caught this during #429, sorry.

@nbbeeken nbbeeken requested review from a team, dariakp and nbbeeken and removed request for a team April 23, 2021 16:41
Copy link
Member

@durran durran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this and looks good.

Also fixes NODE-3223 (ensureBuffer ignores byteLength/byteOffset).
This is the "proper" alternative to
mongodb#418 and matches what e.g.
Node.js APIs do.
@addaleax
Copy link
Contributor Author

Rebased to resolve the merge conflict (imports in ensure_buffer.ts)

Copy link
Contributor

@dariakp dariakp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this approach

@emadum emadum self-requested a review April 27, 2021 15:22
Copy link
Contributor

@emadum emadum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, should #418 be closed?

@addaleax
Copy link
Contributor Author

LGTM, should #418 be closed?

If you merge this, yes. :)

@emadum emadum merged commit 4613763 into mongodb:master Apr 27, 2021
@addaleax addaleax deleted the 3223-dev branch April 27, 2021 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants