Implement ECMA-402 2.0 10.3.5 Intl.Collator.prototype.resolvedOptions () http://ecma-international.org/publications/standards/Ecma-402.htm This function provides access to the locale and collation options computed during initialization of the object. The function returns a new object whose properties and attributes are set as if constructed by an object literal assigning to each of the following properties the value of the corresponding internal slot of this Collator object (see 10.4): locale, usage, sensitivity, ignorePunctuation, collation, as well as those properties shown in Table 1 whose keys are included in the %Collator%[[relevantExtensionKeys]] internal slot of the standard built-in object that is the initial value of Intl.Collator.
Created attachment 262598 [details] Patch
Comment on attachment 262598 [details] Patch Attachment 262598 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/254085 New failing tests: js/intl-collator.html
Created attachment 262602 [details] Archive of layout-test-results from ews100 for mac-mavericks The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-mavericks Platform: Mac OS X 10.9.5
Comment on attachment 262598 [details] Patch Attachment 262598 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/254090 New failing tests: js/intl-collator.html
Created attachment 262603 [details] Archive of layout-test-results from ews104 for mac-mavericks-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-mavericks-wk2 Platform: Mac OS X 10.9.5
Created attachment 262678 [details] Patch Make the tests more tolerant of older versions of ICU.
Comment on attachment 262678 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=262678&action=review I did not find any error. Some minor comments: > Source/JavaScriptCore/ChangeLog:3 > + [INTL] Implement Intl.Collator.prototype.resolvedOptions () Don't forget to add your copyright on the files with significant changes. > Source/JavaScriptCore/runtime/IntlCollator.h:74 > + bool m_numeric; > + String m_sensitivity; > + bool m_ignorePunctuation; Let's move the booleans together to improve packing a bit. > Source/JavaScriptCore/runtime/IntlCollatorPrototype.cpp:123 > // The function returns a new object whose properties and attributes are set as if constructed by an object literal assigning to each of the following properties the value of the corresponding internal slot of this Collator object (see 10.4): locale, usage, sensitivity, ignorePunctuation, collation, as well as those properties shown in Table 1 whose keys are included in the %Collator%[[relevantExtensionKeys]] internal slot of the standard built-in object that is the initial value of Intl.Collator. Can you please break this comment over multiple lines? > Source/JavaScriptCore/runtime/IntlObject.cpp:631 > + String locale, noExtensionsLocale; Please move noExtensionsLocale to its own line. One statement per declaration. > Source/JavaScriptCore/runtime/IntlObject.cpp:646 > + ASSERT(extensionIndex != notFound); Let's make that a RELEASE_ASSERT(). I don't like the idea of a notFound accidentally being used for length computation.
Created attachment 263567 [details] Patch
Thanks for the review! (In reply to comment #7) > Don't forget to add your copyright on the files with significant changes. Added my copyright to IntlCollatorConstructor.cpp and IntlObject.cpp. These are the source files that I add more than 100 lines. > > Source/JavaScriptCore/runtime/IntlCollator.h:74 > > + bool m_numeric; > > + String m_sensitivity; > > + bool m_ignorePunctuation; > > Let's move the booleans together to improve packing a bit. Done. > > Source/JavaScriptCore/runtime/IntlCollatorPrototype.cpp:123 > > // The function returns a new object whose properties and attributes are set as if constructed by an object literal assigning to each of the following properties the value of the corresponding internal slot of this Collator object (see 10.4): locale, usage, sensitivity, ignorePunctuation, collation, as well as those properties shown in Table 1 whose keys are included in the %Collator%[[relevantExtensionKeys]] internal slot of the standard built-in object that is the initial value of Intl.Collator. > > Can you please break this comment over multiple lines? Done. > > Source/JavaScriptCore/runtime/IntlObject.cpp:631 > > + String locale, noExtensionsLocale; > > Please move noExtensionsLocale to its own line. One statement per > declaration. Done. > > Source/JavaScriptCore/runtime/IntlObject.cpp:646 > > + ASSERT(extensionIndex != notFound); > > Let's make that a RELEASE_ASSERT(). > > I don't like the idea of a notFound accidentally being used for length > computation. Done.
Comment on attachment 263567 [details] Patch You just updated from the comments right? No need for a second review in this case.
Comment on attachment 263567 [details] Patch Clearing flags on attachment: 263567 Committed r191406: <http://trac.webkit.org/changeset/191406>
All reviewed patches have been landed. Closing bug.