Commit Graph

109 Commits

Author SHA1 Message Date
Dorel Luca
8cc61e1d4b Backed out changeset bbb39655cf71 (bug 1605934) for build bustage in widget/gtk/mozwayland/mozwayland.c 2020-01-18 15:39:55 +02:00
Sylvestre Ledru
8cc3e9bf3f Bug 1605934 - Use nested namespaces r=sg
Done with:
./mach static-analysis check --checks="-*, modernize-concat-nested-namespaces" --fix .
and then clang-format on the files

Differential Revision: https://phabricator.services.mozilla.com/D58217
2020-01-18 13:16:39 +00:00
Jeff Walden
5c07885dcf Bug 1602882 - Move array operations to a new js/Array.h header. r=sfink,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D56595
2019-12-11 06:17:44 +00:00
Simon Giesecke
27faf9c05c Bug 1596129 - Use const where easily possible. r=dom-workers-and-storage-reviewers,ytausky
Depends on D52875

Differential Revision: https://phabricator.services.mozilla.com/D52876
2019-11-29 08:50:37 +00:00
Simon Giesecke
2c1cc1c111 Bug 1168606 - Apply renamings suggested for Cursor::*Key members and related identifiers. r=ytausky,asuth
Differential Revision: https://phabricator.services.mozilla.com/D43249
2019-09-18 06:41:35 +00:00
Simon Giesecke
316e2bc649 Bug 1168606 - Inline Key::Assert function to make effective use of MOZ_ASSERT diagnostics. r=ttung,asuth
Differential Revision: https://phabricator.services.mozilla.com/D43039
2019-09-18 06:41:23 +00:00
Simon Giesecke
f55eb600fd Bug 1565515 - Removed duplication between LengthOfEncodedBinary and CalcDecodedStringySize r=ttung,asuth
Differential Revision: https://phabricator.services.mozilla.com/D38173
2019-07-30 14:52:18 +00:00
Simon Giesecke
35097708cc Bug 1565515 - Define and use type aliases EncodedDataType r=ttung,asuth
Differential Revision: https://phabricator.services.mozilla.com/D38172
2019-07-30 14:52:04 +00:00
Simon Giesecke
489912781c Bug 1565515 - Reduced code duplication in DecodeString/DecodeBinary r=ttung,asuth
EncodeString and EncodeBinary already use a common backend EncodeAsString,
the same should be done in decoding, as the encoding of a binary is
a special case of the encoding of a string.

Differential Revision: https://phabricator.services.mozilla.com/D38076
2019-07-30 14:51:40 +00:00
Simon Giesecke
10ae90f3d4 Bug 1565515 - Fixed spelling mistake in comment r=ttung,asuth
Differential Revision: https://phabricator.services.mozilla.com/D37851
2019-07-30 14:49:31 +00:00
Simon Giesecke
46d12c5337 Bug 1565515 - Updated comment r=asuth,ttung
The comment referenced the former 3 prefix used for strings, but this is
no longer correct for strings (which now use a 0x30) prefix, and the
function has been generalized to also work for binaries, and got
a parameter aType specifying the prefix. Updated the comment accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D37850
2019-07-30 14:49:12 +00:00
Simon Giesecke
f035961bd5 Bug 1565515 - DecodeBinary violates contract for 0-sized binary r=asuth,ttung
Differential Revision: https://phabricator.services.mozilla.com/D37849
2019-07-30 14:48:53 +00:00
Andreea Pavel
6c4d3dc30e Backed out 12 changesets (bug 1565515) hazard failures on a CLOSED TREE
Backed out changeset 4d8c2c1bce2d (bug 1565515)
Backed out changeset 8619e09b03bb (bug 1565515)
Backed out changeset d70293010941 (bug 1565515)
Backed out changeset 90fb12799ecd (bug 1565515)
Backed out changeset 93be9fcab443 (bug 1565515)
Backed out changeset 91f546c40f98 (bug 1565515)
Backed out changeset 2c0fb0c0e228 (bug 1565515)
Backed out changeset 57ed49a17c9d (bug 1565515)
Backed out changeset 75cb7938f704 (bug 1565515)
Backed out changeset 2359da4989a7 (bug 1565515)
Backed out changeset 8f3493b2cae1 (bug 1565515)
Backed out changeset e0aa82bed5fa (bug 1565515)
2019-07-30 17:16:15 +03:00
Simon Giesecke
5e5b9c94d2 Bug 1565515 - Removed duplication between LengthOfEncodedBinary and CalcDecodedStringySize r=ttung,asuth
Differential Revision: https://phabricator.services.mozilla.com/D38173
2019-07-29 09:27:18 +00:00
Simon Giesecke
2c3c1103fb Bug 1565515 - Define and use type aliases EncodedDataType r=ttung,asuth
Differential Revision: https://phabricator.services.mozilla.com/D38172
2019-07-29 09:27:02 +00:00
Simon Giesecke
cc877403a8 Bug 1565515 - Reduced code duplication in DecodeString/DecodeBinary r=ttung,asuth
EncodeString and EncodeBinary already use a common backend EncodeAsString,
the same should be done in decoding, as the encoding of a binary is
a special case of the encoding of a string.

Differential Revision: https://phabricator.services.mozilla.com/D38076
2019-07-29 09:26:46 +00:00
Simon Giesecke
ac6ddd4142 Bug 1565515 - Fixed spelling mistake in comment r=ttung,asuth
Differential Revision: https://phabricator.services.mozilla.com/D37851
2019-07-29 09:24:36 +00:00
Simon Giesecke
4dc2dd4446 Bug 1565515 - Updated comment r=asuth,ttung
The comment referenced the former 3 prefix used for strings, but this is
no longer correct for strings (which now use a 0x30) prefix, and the
function has been generalized to also work for binaries, and got
a parameter aType specifying the prefix. Updated the comment accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D37850
2019-07-29 09:24:19 +00:00
Simon Giesecke
9310b2f9d3 Bug 1565515 - DecodeBinary violates contract for 0-sized binary r=asuth,ttung
Differential Revision: https://phabricator.services.mozilla.com/D37849
2019-07-29 09:24:01 +00:00
Yaron Tausky
887c77f71c Bug 1544750 - Part 2: Refactor Key::EncodeJSValInternal to show direct correspondence to spec r=asuth,tcampbell
This commit adds the text of the spec as inline comments and refactors
the code such that it directly corresponds to the spec's steps. This
makes it easier to understand how the spec's algorithm is implemented.

Differential Revision: https://phabricator.services.mozilla.com/D28976
2019-07-29 09:05:44 +00:00
Gurzau Raul
6a981672c9 Backed out 13 changesets (bug 1544750, bug 1565515) for bustages at /indexedDB/Key.cpp on a CLOSED TREE.
Backed out changeset 8bdfc4852ae5 (bug 1565515)
Backed out changeset 6afea4389eb2 (bug 1565515)
Backed out changeset 4f4f25ecac5c (bug 1565515)
Backed out changeset 052b34ddf704 (bug 1565515)
Backed out changeset 6d8e8f078383 (bug 1565515)
Backed out changeset 4815a910245c (bug 1565515)
Backed out changeset 5e2dcfefb4f5 (bug 1565515)
Backed out changeset aac0a4a4fc67 (bug 1565515)
Backed out changeset ba109131fcad (bug 1565515)
Backed out changeset 594f76e67769 (bug 1565515)
Backed out changeset 800e7de53622 (bug 1565515)
Backed out changeset bd2e92310857 (bug 1565515)
Backed out changeset 076029811ae9 (bug 1544750)
2019-07-26 23:00:03 +03:00
Simon Giesecke
bf8fbd5525 Bug 1565515 - Removed duplication between LengthOfEncodedBinary and CalcDecodedStringySize r=ttung,asuth
Differential Revision: https://phabricator.services.mozilla.com/D38173
2019-07-26 16:14:48 +00:00
Simon Giesecke
02554bb49c Bug 1565515 - Define and use type aliases EncodedDataType r=ttung,asuth
Differential Revision: https://phabricator.services.mozilla.com/D38172
2019-07-26 15:55:41 +00:00
Simon Giesecke
95b2e7ebb3 Bug 1565515 - Reduced code duplication in DecodeString/DecodeBinary r=ttung,asuth
EncodeString and EncodeBinary already use a common backend EncodeAsString,
the same should be done in decoding, as the encoding of a binary is
a special case of the encoding of a string.

Differential Revision: https://phabricator.services.mozilla.com/D38076
2019-07-26 16:14:15 +00:00
Simon Giesecke
3e5d7ff50e Bug 1565515 - Fixed spelling mistake in comment r=ttung,asuth
Differential Revision: https://phabricator.services.mozilla.com/D37851
2019-07-26 13:45:15 +00:00
Simon Giesecke
df11e4dbb2 Bug 1565515 - Updated comment r=asuth,ttung
The comment referenced the former 3 prefix used for strings, but this is
no longer correct for strings (which now use a 0x30) prefix, and the
function has been generalized to also work for binaries, and got
a parameter aType specifying the prefix. Updated the comment accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D37850
2019-07-26 13:45:02 +00:00
Simon Giesecke
cca9bcaee0 Bug 1565515 - DecodeBinary violates contract for 0-sized binary r=asuth,ttung
Differential Revision: https://phabricator.services.mozilla.com/D37849
2019-07-26 14:00:07 +00:00
Yaron Tausky
84ce499688 Bug 1544750 - Part 2: Refactor Key::EncodeJSValInternal to show direct correspondence to spec r=asuth,tcampbell
This commit adds the text of the spec as inline comments and refactors
the code such that it directly corresponds to the spec's steps. This
makes it easier to understand how the spec's algorithm is implemented.

Differential Revision: https://phabricator.services.mozilla.com/D28976
2019-07-26 14:14:22 +00:00
Yaron Tausky
48cf5ccd11 Bug 1544750 - Part 1: Refactor some IndexedDB code to use ErrorResult r=asuth
This is mostly laying the groundwork for further refactoring.

Differential Revision: https://phabricator.services.mozilla.com/D27666
2019-04-26 16:53:59 +00:00
violet
c905b30b32 Bug 1499854 - Binary should not be affected by locale r=asuth
Key::ToLocaleBasedKey() overlooked the existence of |eBinary| type,
probably because |eBinary| was added later and the code wasn't updated
properly.

Differential Revision: https://phabricator.services.mozilla.com/D24882
2019-04-20 01:34:50 +00:00
violet
f5f2dca5f5 Bug 1509168 - Use JS_GetObjectAsArrayBufferView() to retrieve ArrayBufferView data r=asuth
When using JS_IsArrayBufferViewObject() to check ArrayBufferView object,
we should use JS_GetObjectAsArrayBufferView() to get its length and data.
Because in rare case there might be a wrapper on the object, JS_GetObjectAsArrayBufferView()
will handle it, js::GetArrayBufferViewLengthAndData() won't.

Differential Revision: https://phabricator.services.mozilla.com/D24009
2019-04-17 12:59:20 +00:00
Jeff Walden
49690de13d Bug 1532005 - Implement a new js/public/ArrayBuffer.h header to centralize functionality for creating and interacting with ArrayBuffers. r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D21827
2019-03-04 15:19:16 -08:00
Razvan Maries
89f21d9009 Backed out 4 changesets (bug 1532005, bug 1531638) for causing perma fails and Spidermonkey fail. CLOSED TREE
Backed out changeset 4913d941de92 (bug 1532005)
Backed out changeset 9635abe5bf24 (bug 1532005)
Backed out changeset 738cf4b1126a (bug 1532005)
Backed out changeset e5d9f2ee7ac7 (bug 1531638)
2019-03-05 01:07:28 +02:00
Jeff Walden
2160433e58 Bug 1532005 - Implement a new js/public/ArrayBuffer.h header to centralize functionality for creating and interacting with ArrayBuffers. r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D21827
2019-02-28 17:00:56 -08: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
Cosmin Sabou
eb21b4eef4 Merge mozilla-inbound to mozilla-central. a=merge 2018-11-28 06:08:19 +02:00
Ehsan Akhgari
e324edc4f4 Bug 1508472 - Part 2: Second batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal.  I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

Differential Revision: https://phabricator.services.mozilla.com/D13073
2018-11-28 00:54:56 +00:00
Cosmin Sabou
93b37ad754 Backed out 2 changesets (bug 1508472) for causing build bustages on JobScheduler_posix.cpp. CLOSED TREE
Backed out changeset af951294cf96 (bug 1508472)
Backed out changeset 2320933cb7bc (bug 1508472)
2018-11-28 00:08:11 +02:00
Ehsan Akhgari
4856e65777 Bug 1508472 - Part 2: Second batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal.  I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

Differential Revision: https://phabricator.services.mozilla.com/D13073
2018-11-27 21:36:18 +00:00
Jeff Walden
bbdfc94aae Bug 1510007 - Move JSFreeOp's definition to js/public/MemoryFunctions.h, and make jsapi.h not #include that header. r=sfink 2018-11-21 18:11:15 -08:00
Andreea Pavel
dd8570ecf0 Backed out changeset 11d6688b953f (bug 1508472) for build bustages on a CLOSED TREE 2018-11-27 18:28:30 +02:00
Ehsan Akhgari
facada215e Bug 1508472 - Part 2: Second batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal.  I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

Differential Revision: https://phabricator.services.mozilla.com/D13073
2018-11-27 15:18:32 +00:00
Henri Sivonen
1b4761950b Bug 1487398 - Remove useless use of SetCapacity(). r=froydnj,nwgh
Remove various calls to SetCapacity() that fall into various misuse categories:

 1) Mistakenly believing that the caller should advice the string about zero
    terminator.
 2) Cases where a single append does the right computation on its own.
 3) Calling SetCapacity() with a constant when the string is self-allocated
    and could be an nsAuto[C]StringN and the string doesn't get passed on
    in a way that could benefit from a heap-allocated buffer.
 4) Calling SetCapacity() before assigning a shared buffer to the string.
 5) Calling SetCapacity() before calling a function that will either calls
    SetLength() anyway or calls Adopt().

MozReview-Commit-ID: IKjfl5gLmcD

Differential Revision: https://phabricator.services.mozilla.com/D4672
2018-09-25 15:36:31 +00:00
Chris Peterson
f7ceeaf5cf Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr
2018-06-17 22:43:11 -07:00
Jonathan Kew
1c0f8b2768 Bug 1402858 - Remove ENABLE_INTL_API conditional and non-Intl legacy codepaths from IndexedDB. r=janv 2017-09-25 17:32:23 +01:00
Bevis Tseng
76669f198d Bug 1371484 - Fix Key::EncodeAsString(). r=baku
MozReview-Commit-ID: F29YzvgresY
2017-06-19 19:03:06 +08:00
Wes Kocher
185b2481ba Backed out changeset 810a05989801 (bug 1371484) for build failures in Key.cpp a=backout
MozReview-Commit-ID: 4Jwrp5PK6MA
2017-07-25 18:34:40 -07:00
Bevis Tseng
b18c251f50 Bug 1371484 - Fix Key::EncodeAsString(). r=baku
MozReview-Commit-ID: F29YzvgresY
2017-06-19 19:03:06 +08:00
Sylvestre Ledru
9d4a84d778 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG
2017-07-06 14:00:35 +02:00
Nathan Froyd
85a4b469d3 Bug 1312104 - part 2 - use FloatingPoint<>::kSignBit in lieu of hand-rolled constant; r=janv
This way is a little bit more readable.
2016-10-24 13:22:54 -04:00