Repository navigation
buffer: Don't assign .parent if none exists - #1109
Closed
trevnorris wants to merge 1 commit into
Closed
trevnorris wants to merge 1 commit into
trevnorris wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
would it be alright to explicitly assign .parent = null above here so we can keep the same object shape?
Contributor
Author
There was a problem hiding this comment.
@chrisdickinson That's already done by setting this.parent = undefined in the constructor.
Contributor
|
One tiny nit, otherwise LGTM. |
Member
|
@trevnorris any point in writing test? Why changing this? |
Contributor
Author
|
@indutny This is how it operated before a recent change by @bnoordhuis. I'm reverting back to the way it worked. The way it is now |
The .parent property of the allocated buffer should remain undefined in the case that it's not a slice. Also included test to verify this.
trevnorris
force-pushed
the
buf-fix-parent
branch
from
March 9, 2015 18:43
09ed699 to
97d7970
Compare
Contributor
Author
|
@indutny I've included a test to check that it won't change in the future. |
Member
|
Thanks! |
Member
|
LGTM, I guess :) |
trevnorris
added a commit
that referenced
this pull request
Mar 9, 2015
The .parent property of the allocated buffer should remain undefined in the case that it's not a slice. Also included test to verify this. PR-URL: #1109 Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com> Reviewed-By: Fedor Indutny <fedor@indutny.com>
Contributor
Author
|
@chrisdickinson @indutny Thanks. Landed in 8070b1f. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The .parent property of the allocated buffer should remain undefined in
the case that it's not a slice.
R=@bnoordhuis