This implementation leaks a lot of internal implementation details and depends on no one changing any of the globals bindings. It should be refactored to not
touch any global builtin and only use internal functions.


https://codereview.chromium.org/18487004/diff/1/src/extensions/i18n/break-iterator.js
File src/extensions/i18n/break-iterator.js (right):

https://codereview.chromium.org/18487004/diff/1/src/extensions/i18n/break-iterator.js#newcode40
src/extensions/i18n/break-iterator.js:40: if
(iterator.hasOwnProperty('__initializedIntlObject')) {
Now that this is in V8 we should not use hacks like these.

You should be able to use a private symbol or a WeakMap so we do not
leak this.

https://codereview.chromium.org/18487004/diff/1/src/extensions/i18n/date-format.js
File src/extensions/i18n/date-format.js (right):

https://codereview.chromium.org/18487004/diff/1/src/extensions/i18n/date-format.js#newcode101
src/extensions/i18n/date-format.js:101: ldmlString =
ldmlString.replace(QUOTED_STRING_RE, '');
What if replace has been overridden? Same goes for match and other
methods. We should really call the internal methods.

https://codereview.chromium.org/18487004/diff/1/src/extensions/i18n/date-format.js#newcode184
src/extensions/i18n/date-format.js:184: options = Object.apply(this,
[options]);
Needs to be the original Object and original apply.

https://codereview.chromium.org/18487004/

--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to