Henri Sivonen
7067da0717
Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj.
...
Correctness improvements:
* UTF errors are handled safely per spec instead of dangerously truncating
strings.
* There are fewer converter implementations.
Performance improvements:
* The old code did exact buffer length math, which meant doing UTF math twice
on each input string (once for length calculation and another time for
conversion). Exact length math is more complicated when handling errors
properly, which the old code didn't do. The new code does UTF math on the
string content only once (when converting) but risks allocating more than
once. There are heuristics in place to lower the probability of
reallocation in cases where the double math avoidance isn't enough of a
saving to absorb an allocation and memcpy.
* Previously, in UTF-16 <-> UTF-8 conversions, an ASCII prefix was optimized
but a single non-ASCII code point pessimized the rest of the string. The
new code tries to get back on the fast ASCII path.
* UTF-16 to Latin1 conversion guarantees less about handling of out-of-range
input to eliminate an operation from the inner loop on x86/x86_64.
* When assigning to a pre-existing string, the new code tries to reuse the
old buffer instead of first releasing the old buffer and then allocating a
new one.
* When reallocating from the new code, the memcpy covers only the data that
is part of the logical length of the old string instead of memcpying the
whole capacity. (For old callers old excess memcpy behavior is preserved
due to bogus callers. See bug 1472113.)
* UTF-8 strings in XPConnect that are in the Latin1 range are passed to
SpiderMonkey as Latin1.
New features:
* Conversion between UTF-8 and Latin1 is added in order to enable faster
future interop between Rust code (or otherwise UTF-8-using code) and text
node and SpiderMonkey code that uses Latin1.
MozReview-Commit-ID: JaJuExfILM9
2018-08-14 14:43:42 +03:00
Jeff Gilbert
70a22b2878
Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
...
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Sebastian Hengst
d91e9954eb
Backed out 4 changesets (bug 525063) on request from Andi. a=backout
...
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon
6095241db8
Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan
2018-04-10 21:11:02 +02:00
Boris Zbarsky
e7b3aff703
Bug 1452010 part 3. Remove nsIDOMDOMException. r=qdot
...
MozReview-Commit-ID: AFKzyxCyriJ
2018-04-06 23:29:13 -04:00
Boris Zbarsky
0b2173fbf1
Bug 1452010 part 2. Remove nsIDOMDOMException members. r=qdot
...
MozReview-Commit-ID: Bp5ablEtcHA
2018-04-06 23:27:56 -04:00
Jason Orendorff
d640df5146
Bug 1439063 - Part 1: Move several public headers from js/src to js/public. r=jandem.
...
js/src/jsalloc.h -> js/public/AllocPolicy.h
jsalloc.cpp -> js/src/util/AllocPolicy.cpp
jsbytecode.h -> merge into js/public/TypeDecls.h
jsprf.h -> js/public/Printf.h
jsprf.cpp -> js/src/util/Printf.cpp
jsprototypes.h -> public/ProtoKey.h
jswrapper.h -> js/Wrapper.h
2018-02-21 10:30:19 -06:00
Boris Zbarsky
0484c9f8d8
Bug 1435483 part 21. Remove nsIException::ToString. r=qdot
...
MozReview-Commit-ID: 17yuhlqzbr2
2018-02-05 16:34:06 -05:00
Boris Zbarsky
6d959f0894
Bug 1435483 part 20. Remove nsIException::GetData. r=qdot
...
MozReview-Commit-ID: 9cDzCeddOmh
2018-02-05 16:34:06 -05:00
Boris Zbarsky
89788f7e59
Bug 1435483 part 19. Remove nsIException::GetLocation. r=qdot
...
MozReview-Commit-ID: AbVQ7IA4xqp
2018-02-05 16:34:06 -05:00
Boris Zbarsky
e3723e3999
Bug 1435483 part 18. Remove nsIException::GetResult. r=qdot
...
MozReview-Commit-ID: JArus2ddEsL
2018-02-05 16:34:06 -05:00
Boris Zbarsky
5f72207de1
Bug 1435483 part 17. Remove nsIException::GetMessageMoz. r=qdot
...
MozReview-Commit-ID: GKzE812BfIF
2018-02-05 16:34:06 -05:00
Boris Zbarsky
9846bd2805
Bug 1435483 part 14. Remove nsIException::GetFilename/GetLineNumber/GetColumnNumber. r=qdot
...
MozReview-Commit-ID: 6JN7UvkhPgl
2018-02-05 16:34:05 -05:00
Boris Zbarsky
1fcbdd4ee4
Bug 1435483 part 13. Remove nsIException::GetName. r=qdot
...
MozReview-Commit-ID: CXnwjeHoGRm
2018-02-05 16:34:05 -05:00
Boris Zbarsky
3d3eafa0e5
Bug 1435483 part 12. Add an infallible "toString" method on nsIStackFrame. r=qdot
...
MozReview-Commit-ID: CTCawPvw6VZ
2018-02-05 16:34:05 -05:00
Boris Zbarsky
fecfd59513
Bug 1435483 part 11. Add an infallible "formattedStack" getter on nsIStackFrame. r=qdot
...
MozReview-Commit-ID: KLSzUuWt45x
2018-02-05 16:34:05 -05:00
Boris Zbarsky
c36959b53d
Bug 1435483 part 6. Add an infallible "lineNumber" getter on nsIStackFrame. r=qdot
...
MozReview-Commit-ID: 7aYg9kJhiab
2018-02-05 16:34:04 -05:00
Boris Zbarsky
162fb0041b
Bug 1435483 part 5. Add an infallible "filename" getter on nsIStackFrame. r=qdot
...
MozReview-Commit-ID: D3uuehuDqOB
2018-02-05 16:34:04 -05:00
Boris Zbarsky
f9e185203b
Bug 1435483 part 4. Remove always-true mInitialized member from Exception. r=qdot
...
MozReview-Commit-ID: H1ZPg76xNyI
2018-02-05 16:34:04 -05:00
Boris Zbarsky
fc76addc96
Bug 1435483 part 3. Remove nsIXPCException. r=qdot
...
This interface is not usable from JS, because we don't expose initialize() in
the WebIDL bindings for Exception. And C++ doesn't use it.
MozReview-Commit-ID: LsIm4YA0YZE
2018-02-05 16:34:04 -05:00
Boris Zbarsky
050e7666bc
Bug 1435483 part 2. Stop allowing creation of Exception objects via contract/CID. r=bholley
...
MozReview-Commit-ID: H6RmL4BZfgh
2018-02-05 16:34:04 -05:00
Boris Zbarsky
b4b0541192
Bug 1389582. Drop classinfo stuff from Exception, since that's exposed via webidl bindings. r=peterv
...
MozReview-Commit-ID: 4BaYjfOdrUc
2017-08-31 09:12:14 -04:00
Sylvestre Ledru
576cac5ec7
Bug 1381253 - Remove redundant control flow declarations rs=ehsan
...
MozReview-Commit-ID: FFxP4aMCbOL
2017-07-15 19:03:04 +02:00
Andrew McCreight
87e9ff3014
Bug 1379786, part 1 - Remove dead code related to the security manager. r=mrbkap
...
Also, one unused include of nsIProgrammingLanguage, which is unrelated.
MozReview-Commit-ID: LJf2NSwmaYG
2017-07-07 15:59:29 -07:00
Tom Tromey
e90d95a3f9
Bug 1060419 - make AppendPrintf and nsPrintfCString use Printf.h, r=froydnj
...
MozReview-Commit-ID: 2E8FoiNxU8L
2016-12-14 09:32:21 -07:00
Tom Tromey
48da5b7de4
Bug 1060419 - remove unneeded includes of prprf.h, r=froydnj
...
MozReview-Commit-ID: JifhpA3oOeH
2016-12-09 10:00:01 -10:00
David Major
708b9668bf
Bug 1335207: Add constexpr to data tables under dom/ for better codegen on Windows. r=ehsan
...
MozReview-Commit-ID: 6tEIqjq4Guo
2017-02-01 15:42:33 +13:00
Olli Pettay
3898f7d882
Bug 1326507, remove NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS, r=mccr8
2017-01-03 21:47:55 +02:00
Michelangelo De Simone
78f700fcaa
Bug 1310020 - Remove DOM/bluetooth and related code. r=jst
...
MozReview-Commit-ID: IEhwzzBgb3x
2016-10-28 14:25:23 -07:00
Ms2ger
843e5775cb
Bug 1299812 - Remove mLineNumber member of mozilla::dom::Exception. r=bkelly
2016-09-05 10:35:10 +02:00
Ms2ger
3496a104ab
Bug 1299812 - Remove unused mFilename member of mozilla::dom::Exception. r=bkelly
2016-09-01 16:26:15 +02:00
Kit Cambridge
fae244086f
Bug 1272054 - Replace "PermissionDeniedError" with "NotAllowedError" in the Push API. r=mt
...
MozReview-Commit-ID: Bn0bE3eALj4
2016-05-11 10:48:31 -07:00
Boris Zbarsky
90298f136b
Bug 1257919 part 10. Make the caller and formattedStack getters on JSStackFrame take an explicit JSContext. r=khuey
2016-03-22 13:50:35 -04:00
Boris Zbarsky
03b1012b2f
Bug 1257919 part 8. Make the line/column number getters on JSStackFrame take an explicit JSContext. r=khuey
2016-03-22 13:50:31 -04:00
Boris Zbarsky
c77ea32842
Bug 1257919 part 6. Make the filename getter on JSStackFrame take an explicit JSContext. r=khuey
2016-03-22 13:50:31 -04:00
Boris Zbarsky
56a021511c
Bug 1257919 part 4. Stop returning StackFrame instances from exceptions::CreateStack. C++ callers of GetCurrentJSStack or exceptions::CreateStack always check for null anyway, and none of them seem to want this non-JS thing. r=khuey
2016-03-22 13:50:31 -04:00
Boris Zbarsky
5e1fa9e66c
Bug 1257919 part 3. Make the various toString methods on exceptions take an explicit JSContext. r=khuey
2016-03-22 13:50:31 -04:00
Sebastian Hengst
a68ab77d38
Backed out changeset 6403c45366e0 (bug 1257919)
2016-03-22 21:10:55 +01:00
Sebastian Hengst
8cdf264c0e
Backed out changeset 1b5db6edd791 (bug 1257919)
2016-03-22 21:10:45 +01:00
Sebastian Hengst
de4b5ff3eb
Backed out changeset 6e95ee3cd4c6 (bug 1257919)
2016-03-22 21:10:21 +01:00
Sebastian Hengst
15448ddd9f
Backed out changeset 08f1c7239cdf (bug 1257919)
2016-03-22 21:10:01 +01:00
Sebastian Hengst
77eb406761
Backed out changeset ff81c52375ba (bug 1257919)
2016-03-22 21:09:32 +01:00
Boris Zbarsky
b162a17fbc
Bug 1257919 part 10. Make the caller and formattedStack getters on JSStackFrame take an explicit JSContext. r=khuey
2016-03-22 13:50:35 -04:00
Boris Zbarsky
66f3a012c0
Bug 1257919 part 8. Make the line/column number getters on JSStackFrame take an explicit JSContext. r=khuey
2016-03-22 13:50:31 -04:00
Boris Zbarsky
3a69e5bfdd
Bug 1257919 part 6. Make the filename getter on JSStackFrame take an explicit JSContext. r=khuey
2016-03-22 13:50:31 -04:00
Boris Zbarsky
02a9f19be9
Bug 1257919 part 4. Stop returning StackFrame instances from exceptions::CreateStack. C++ callers of GetCurrentJSStack or exceptions::CreateStack always check for null anyway, and none of them seem to want this non-JS thing. r=khuey
2016-03-22 13:50:31 -04:00
Boris Zbarsky
946b993596
Bug 1257919 part 3. Make the various toString methods on exceptions take an explicit JSContext. r=khuey
2016-03-22 13:50:31 -04:00
Peter Van der Beken
0df87a6747
Bug 1253641 - DOMException's CC participant should traverse mData. r=khuey.
2016-03-04 17:54:10 +01:00
Andrew McCreight
9f6b653800
Bug 1247679, part 3 - Replace NS_IMPL_CYCLE_COLLECTION_TRACE_JSVAL_MEMBER_CALLBACK with JS_MEMBER. r=smaug
2016-02-22 10:11:02 -08:00
Boris Zbarsky
ba28410f25
Bug 1229664. Drop the concept of inner exceptions from Exception/DOMException. r=bholley
2015-12-02 13:52:59 -05:00