mirror of https://github.com/nodejs/node.git
Revert "url: delete href cache on all setter code paths"
This reverts commit dbdd81a91b
.
It was agreed that this change contained too much potential ecosystem
breakage, particularly around the inability to `delete` properties off a
`Url` object. It may be re-introduced for a later release, along with
better work on ecosystem compatibility.
PR-URL: #1602
Reviewed-By: Mikeal Rogers <mikeal.rogers@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Forrest L Norvell <forrest@npmjs.com>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Isaac Z. Schlueter <i@izs.me>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
pull/1586/head
parent
0f39ef4ca1
commit
0daed24883
11
lib/url.js
11
lib/url.js
|
@ -1041,8 +1041,8 @@ Object.defineProperty(Url.prototype, 'host', {
|
|||
this._port = -1;
|
||||
this._hostname = this._host = encodeURIComponent(host);
|
||||
}
|
||||
this._href = '';
|
||||
}
|
||||
this._href = '';
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
|
@ -1068,8 +1068,9 @@ Object.defineProperty(Url.prototype, 'hostname', {
|
|||
this._host = hostname + ':' + this._port;
|
||||
else
|
||||
this._host = hostname;
|
||||
|
||||
this._href = '';
|
||||
}
|
||||
this._href = '';
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
|
@ -1088,8 +1089,8 @@ Object.defineProperty(Url.prototype, 'hash', {
|
|||
hash = '#' + hash;
|
||||
}
|
||||
this._hash = hash;
|
||||
this._href = '';
|
||||
}
|
||||
this._href = '';
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
|
@ -1113,8 +1114,8 @@ Object.defineProperty(Url.prototype, 'search', {
|
|||
if (this._parsesQueryStrings) {
|
||||
this.query = querystring.parse(search.slice(1));
|
||||
}
|
||||
this._href = '';
|
||||
}
|
||||
this._href = '';
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
|
@ -1137,8 +1138,8 @@ Object.defineProperty(Url.prototype, 'pathname', {
|
|||
}
|
||||
|
||||
this._pathname = pathname;
|
||||
this._href = '';
|
||||
}
|
||||
this._href = '';
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
|
|
Loading…
Reference in New Issue