Commit Graph
18 Commits
Author SHA1 Message Date
Sylvestre Ledru 6149f49299 Bug 2023419 - Remove Emacs/Vim modelines from xpcom/ r=emilio
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287878
2026-03-16 17:22:07 +00:00
Nika Layzell 605a423c5c Bug 840706 - Part 2: Make ToDouble and ToFloat more spec-compliant, r=smaug,xpcom-reviewers,barret
The main use of this method appears to be when parsing attributes with floating
point values in HTML. By changing from PR_strtod, this change does have some
semantic differences around edge-cases, though I've tried to keep it compliant
with the wording in the standard.

Here are some of the edge-cases I investigated:

1. We appear to build nspr with INFNAN_CHECK undefined, meaning that we did not
   parse strings like "inf", "infinity" and "nan" both before and after this
   change.
2. PR_strtod already ignored locale (built with USE_LOCALE undefined), so
   locale behaviour shouldn't have changed.
3. Neither PR_strtod nor the spec support hex floats, so I didn't enable them
   in double-conversion.
4. Leading whitespace is skipped by both PR_strtod and in the spec, so is
   skipped after this change.
5. Numbers too large to fit in a double (e.g. 2E308) were previously returned
   as inf or -inf by PR_strtod. The spec specifies that these values should return
   an error instead, so they have been changed to produce an error with this
   change.
   This is a web-visible change (<progress value=2E308 max=10> is indeterminate
   in Chromium and complete in Firefox before this change, it will be
   indeterminate for both after the change).
6. Parsing for floats & doubles are now handled seperately due to
   differences in the maximum and minimum representable values.

Differential Revision: https://phabricator.services.mozilla.com/D148305
2022-12-06 20:27:49 +00:00
Nika Layzell 51c14166ec Bug 1772006 - Part 8: Allow building xpcom/string without unified builds, r=xpcom-reviewers,barret
The last remaining things requiring unified builds in this directory are the
explicit specializations. As each class' methods are now confined to a single
file, these can now be moved to the appropriate .cpp files.

Differential Revision: https://phabricator.services.mozilla.com/D148303
2022-07-30 00:12:49 +00:00
Nika Layzell 86f2e82c25 Bug 1772006 - Part 3: Move basic string APIs to more appropriate .cpp files, r=xpcom-reviewers,barret
Due to the history of how nsString was implemented, many APIs ended up being
implemented in inappropriate files. This change moves simple definitions which
won't require any changes for each type to happen within that type's .cpp file.

This is necessary to eventually enable the directory to be built without
unified builds.

Differential Revision: https://phabricator.services.mozilla.com/D148298
2022-07-30 00:12:47 +00:00
criss c1b045ddda Backed out 9 changesets (bug 1772006) causing build bustages on nsTString.cpp. CLOSED TREE
Backed out changeset f17c7565707b (bug 1772006)
Backed out changeset c725fe1f5882 (bug 1772006)
Backed out changeset d19663161261 (bug 1772006)
Backed out changeset b6611ab002d9 (bug 1772006)
Backed out changeset 790f42b64af9 (bug 1772006)
Backed out changeset 79a734b4e4d9 (bug 1772006)
Backed out changeset 42730aae16ea (bug 1772006)
Backed out changeset b2542aef3054 (bug 1772006)
Backed out changeset 962bfea4a309 (bug 1772006)
2022-06-11 01:13:42 +03:00
Nika Layzell 25f92a45e7 Bug 1772006 - Part 9: Allow building xpcom/string without unified builds, r=xpcom-reviewers,barret
The last remaining things requiring unified builds in this directory are the
explicit specializations. As each class' methods are now confined to a single
file, these can now be moved to the appropriate .cpp files.

Differential Revision: https://phabricator.services.mozilla.com/D148303
2022-06-10 21:12:09 +00:00
Nika Layzell f753a5d8e9 Bug 1772006 - Part 4: Move basic string APIs to more appropriate .cpp files, r=xpcom-reviewers,barret
Due to the history of how nsString was implemented, many APIs ended up being
implemented in inappropriate files. This change moves simple definitions which
won't require any changes for each type to happen within that type's .cpp file.

This is necessary to eventually enable the directory to be built without
unified builds.

Differential Revision: https://phabricator.services.mozilla.com/D148298
2022-06-10 21:12:07 +00:00
Sylvestre Ledru e5a134f73a Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset
2018-11-30 11:46:48 +01:00
Eric Rahm eca59d1f0e Bug 1393230 - Part 3: Convert the xpcom string classes to be templated on char type. r=njn, r=fitzgen, r=sfink
This removes the double-include macro hackery that we use to define two
separate string types (nsAString and nsACString) in favor of a templated
solution.

Annotations for Valgrind and the JS hazard analysis are updated as well as
the rust binding generations for string code.
2017-08-14 14:22:50 -07:00
Nicholas Nethercote e9cee0b264 Bug 1384834 (part 3) - Remove nsAdopting[C]String. r=erahm. 2017-07-28 11:21:49 +10:00
L. David Baron 3858080440 Bug 1381080 patch 3 - Encapsulate setting mData/mLength/mDataFlags in a new method. r=erahm
This is needed for patch 4.

MozReview-Commit-ID: 4BFlTtQdtoN
2017-07-20 15:46:59 -07:00
L. David Baron 067580b9cf Bug 1343715 - Remove nsA[C]String::SetDataFlags. r=dmajor
MozReview-Commit-ID: EDQbH9pZKtZ
2017-07-10 12:23:11 -07:00
L. David Baron 202e05578a Bug 1343715 - Split nsTSubstring::mFlags into separate variables for class and data flags. r=dmajor
MozReview-Commit-ID: JW1p5BxpHKA
2017-07-10 12:23:10 -07:00
Tom Tromey dce08473a3 Bug 1135081 - Fix typo in nsTString::AssertValidDepedentString. r=froydnj 2015-02-20 08:02:00 -05:00
Birunthan Mohanathas 6e9ec233ed Bug 1046841 - Fix more style violations in previously touched .cpp files in xpcom/. r=froydnj 2014-08-25 12:17:15 -07:00
Birunthan Mohanathas 2a49da1efa Bug 1028559 - Flatten xpcom/string/{public,src}/ directories. r=dbaron 2014-06-25 15:08:54 -07:00
Wes Kocher 777add5c77 Backed out 6 changesets (bug 1028559, bug 1028565) for android mochitest bustage on a CLOSED TREE
Backed out changeset fdd74c065e5d (bug 1028565)
Backed out changeset 5e9777d38052 (bug 1028565)
Backed out changeset 3510bcdba3fc (bug 1028565)
Backed out changeset 62ad3254903e (bug 1028565)
Backed out changeset e7557f70acfe (bug 1028565)
Backed out changeset 5b1b527abe47 (bug 1028559)
2014-06-24 18:32:55 -07:00
Birunthan Mohanathas 91694f185a Bug 1028559 - Flatten xpcom/string/{public,src}/ directories. r=dbaron 2014-06-21 08:56:57 -07:00