On 2012/10/03 23:57:34, arv-chromium wrote:
https://codereview.appspot.com/6591072/diff/1008/src/overrides.js
File src/overrides.js (right):
https://codereview.appspot.com/6591072/diff/1008/src/overrides.js#newcode24
src/overrides.js:24: String.prototype.localeCompare = function(that,
locales,
options) {
This changes the enumerability.
Use Object.defineProperty instead
I can do that, but Object.defineProperty is slow in v8.
https://codereview.appspot.com/6591072/diff/1008/src/overrides.js#newcode24
src/overrides.js:24: String.prototype.localeCompare = function(that,
locales,
options) {
This no longer reports the function as native.
assertEquals(String(String.prototype.toLocalString), 'function
toLocaleString()
{ [native code] }')
Is that breaking the spec or just v8 test expectation? We can fix v8
test if latter.
I could make it native, but it would complicate code needlessly.
https://codereview.appspot.com/6591072/diff/1008/src/overrides.js#newcode26
src/overrides.js:26: return new Intl.Collator(locales,
options).compare(this,
that);
How do we ensure that we are using the original Intl and
Intl.Collator?
I am not. I'll save references to methods I use on startup (hijacking
that would be hard) and then use those references in the future.
https://codereview.appspot.com/6591072/
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev