Uh oh!
There was an error while loading. Please reload this page.
fs: remove unnecessary usage of .hasOwnProperty() - #635
Conversation
vkurchatkin
commented
Jan 28, 2015
maybe add a test for this to prevent regressions? |
domenic
commented
Jan 28, 2015
ES6 style would be |
jonathanong
commented
Jan 28, 2015
okay i'll change it to @domenic's recommendations. @vkurchatkin what tests, specifically? |
vkurchatkin
commented
Jan 28, 2015
@domenic not the same thing. what if @jonathanong like, that you pass |
jonathanong
commented
Jan 28, 2015
@domenic actually, would |
domenic
commented
Jan 28, 2015
@vkurchatkin in ES2015,
|
domenic
commented
Jan 28, 2015
Concrete examples: functionf(x=1,y=2){console.log(x,y);}functiong({ x =1, y =2}){console.log(x,y);}f();// 1, 2f(undefined,undefined);// 1, 2f(null,null);// null, nullg({x: undefined,y: undefined});// 1, 2g({});// 1, 2g({x: null,x: null});// null, null |
vkurchatkin
commented
Jan 28, 2015
@domenic thanks! we should do the same, guess. But I'm afraid that in same cases swapping |
kevinmartin
commented
Jan 29, 2015
I agree with @domenic that I don't see that as a problem either way, because the only variable that it would affect is |
piscisaureus
commented
Jan 31, 2015
What is different in ES6 that makes hasOwnProperty unnecessary? |
vkurchatkin
commented
Jan 31, 2015
@piscisaureus it's not about ES6, I think. @jonathanong want's to get reed of functionfn({ option1, encoding='utf8'}){}encoding will be |
vkurchatkin
commented
Feb 16, 2015
@jonathanong ping |
jonathanong
commented
Feb 16, 2015
@vkurchatkin sup? Which direction should I take this PR? |
vkurchatkin
commented
Feb 16, 2015
|
There was a problem hiding this comment.
added this because i realized that without it, all my .hasOwnProperty() stuff is futile
There was a problem hiding this comment.
I think this is fine since ReadableStream doesn't use .hasOwnProperty
tellnes
commented
Feb 20, 2015
@jonathanong I think something has gone wrong with your rebaseing. |
vkurchatkin
commented
Feb 21, 2015
LGTM |
PR-URL: #635 Reviewed-By: Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com>
vkurchatkin
commented
Mar 5, 2015
Landed in 4d0329e |
Notable changes: * buffer: New `Buffer#indexOf()` method, modelled off `Array#indexOf()`. Accepts a String, Buffer or a Number. Strings are interpreted as UTF8. (Trevor Norris) #561 * fs: `options` object properties in `'fs'` methods no longer perform a `hasOwnProperty()` check, thereby allowing options objects to have prototype properties that apply. (Jonathan Ong) #635 * tls: A likely TLS memory leak was reported by PayPal. Some of the recent changes in stream_wrap appear to be to blame. The initial fix is in #1078, you can track the progress toward closing the leak at #1075 (Fedor Indutny). * npm: Upgrade npm to 2.7.0. See npm CHANGELOG.md: https://github.com/npm/npm/blob/master/CHANGELOG.md#v270-2015-02-26 for details including why this is a semver-minor when it could have been semver-major. * TC: Colin Ihrig (@cjihrig) resigned from the TC due to his desire to do more code and fewer meetings.
This commit does various changes to cleanup and prep the 8ff6b81 for merging, which include updating the commit to follow new codebase guidelines. The following are the changes: doc/api/http.markdown: - document options lib/http.js: - no changes lib/_http_server.js - changes regarding isObject (nodejs#647) and hasOwnProperty (nodejs#635) - take tls option rather than guessing based on options test/simple/test-https-from-http.js: - moved to parallel directory, crypto test, removed copyright banner test/parallel/test-http-server.js: - adjust for tls option
on a mission to remove all instances of
util._extend()and allow options to have prototypes.AFAIK,
.hasOwnProperty()is unnecessary here.