Simon Giesecke
de7bab0f06
Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
...
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Andrew McCreight
f9c07914d4
Bug 1636990 - Inline NS_NewBackstagePass. r=kmag
...
Also, make an NS_ERROR in ~mozJSComponentLoader() into an assertion.
Differential Revision: https://phabricator.services.mozilla.com/D74691
2020-05-11 22:46:24 +00:00
Jeff Walden
6a774342a0
Bug 1626105 - Convert |JS::Compile| for UTF-8 to |JS::CompileDontInflate| semantics, and remove |JS::CompileDontInflate|. r=evilpie
...
Differential Revision: https://phabricator.services.mozilla.com/D68905
--HG--
extra : moz-landing-system : lando
2020-03-31 01:30:05 +00:00
Sylvestre Ledru
734f79b541
Bug 1624237 - Run misc-unused-using-decls - Remove useless declarations r=andi
...
$ ./mach static-analysis check --checks="-*, misc-unused-using-decls" --fix <path>
Differential Revision: https://phabricator.services.mozilla.com/D67811
--HG--
extra : moz-landing-system : lando
2020-03-23 13:15:33 +00:00
Ed Lee
acb960676c
Bug 1620556 - Automatic code fixes for Prettier 1.19.1 upgrade. r=Standard8,remote-protocol-reviewers,marionette-reviewers,webcompat-reviewers,perftest-reviewers,sparky,whimboo,denschub
...
Differential Revision: https://phabricator.services.mozilla.com/D66128
--HG--
extra : moz-landing-system : lando
2020-03-13 23:38:52 +00:00
Mark Banner
15cfe23b88
Bug 1620542 - Automatically fix ESLint errors in .eslintrc.js files. r=mossop
...
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D65703
--HG--
extra : moz-landing-system : lando
2020-03-07 10:09:44 +00:00
Eric Rahm
124379887c
Bug 1617327 - Part 2: Remove nsAutoPtr usage from ipc, security, IDB. r=mccr8,janv
...
This removes `nsAutoPtr` usage from ipc/. security/ failed to build due to missing includes so I fixed that as well. IDB was using `ThreadLocal` from ipc which had a member changed to a `UniquePtr` so needed to be updated as well. localstorage was missing some includes.
Differential Revision: https://phabricator.services.mozilla.com/D63745
--HG--
extra : moz-landing-system : lando
2020-02-24 19:26:40 +00:00
Jed Davis
ee171b6406
Bug 1615155 - Don't generate default `Recv__delete__` if there are args. r=nika
...
The default method implementations cause problems when trying to
override them with different types in a direct call class.
For the `Recv__delete__` case there's a simple solution: omit it if
there are any arguments, because it doesn't make much sense to specify
arguments and then completely ignore them, and the no-arg case isn't a
problem for overriding.
Differential Revision: https://phabricator.services.mozilla.com/D62977
--HG--
extra : moz-landing-system : lando
2020-02-18 20:46:21 +00:00
Simon Giesecke
45e6ce251e
Bug 1613985 - Use default for equivalent-to-default constructors/destructors in ipc. r=jld
...
Differential Revision: https://phabricator.services.mozilla.com/D62583
--HG--
extra : moz-landing-system : lando
2020-02-14 00:57:39 +00:00
Gabriele Svelto
69790bc62e
Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ r=Ehsan
...
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.
find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
if [ -n "$interfaces" ]; then
if [[ "$interfaces" == *$'\n'* ]]; then
regexp="\("
for i in $interfaces; do regexp="$regexp$i\|"; done
regexp="${regexp%%\\\|}\)"
else
regexp="$interfaces"
fi
interface=$(basename "$path")
rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
if [ $hits -eq 0 ]; then
echo "Removing ${interface} from ${path2}"
grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
mv -f "$path2".tmp "$path2"
fi
done
fi
done
Differential Revision: https://phabricator.services.mozilla.com/D55443
--HG--
extra : moz-landing-system : lando
2019-12-06 09:16:44 +00:00
David Major
012f1bcd3f
Bug 1574573 - Disambiguate a use of `Handle` in XPCShellEnvironment.cpp r=Ehsan
...
Otherwise it could also refer to Handle from MacTypes.h.
Differential Revision: https://phabricator.services.mozilla.com/D42358
--HG--
extra : moz-landing-system : lando
2019-08-17 01:06:19 +00:00
Victor Porof
251f88082d
Bug 1561435 - Format ipc/, a=automatic-formatting
...
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D35909
--HG--
extra : source : 2fa9743b80561bb68a7b4bf76b1b636d97d82942
2019-07-05 10:48:16 +02:00
Boris Zbarsky
e0bd7114ae
Bug 1559468 part 1. Move JS_DefineProfilingFunctions into InitClassesWithNewWrappedGlobal. r=mccr8
...
All callers of InitClassesWithNewWrappedGlobal already call it.
Differential Revision: https://phabricator.services.mozilla.com/D35457
--HG--
extra : moz-landing-system : lando
2019-06-20 21:44:03 +00:00
Sylvestre Ledru
e226046cb8
Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan
...
# ignore-this-changeset
Depends on D28954
Differential Revision: https://phabricator.services.mozilla.com/D28956
--HG--
extra : moz-landing-system : lando
2019-05-01 08:47:10 +00:00
Jeff Walden
43acc4e9ce
Bug 1543458 - Compile lines of UTF-8 interactive input to xpcshell and jsshell without inflating to UTF-16. r=arai
...
Differential Revision: https://phabricator.services.mozilla.com/D26956
--HG--
extra : rebase_source : b7c8192533c8b8a6b824441c9813d5b928bb9900
2019-04-10 09:42:58 -07:00
Jeff Walden
08efb53319
Bug 1543455 - Make JS::CompileUtf8{,ForNonSyntacticScope} omit Utf8 from their names and take SourceText<Utf8Unit>&. r=arai
...
Differential Revision: https://phabricator.services.mozilla.com/D26951
--HG--
extra : rebase_source : dc8b4fd9f60eb56e4e438b143aff45f2ac691c82
2019-04-09 17:03:32 -07:00
Jeff Walden
c904278324
Bug 1542910 - Make all script compilation APIs directly return a JSScript*, rather than returning a success code and returning the JSScript* via outparam that exactly duplicates the success code value's meaning. r=arai
...
Differential Revision: https://phabricator.services.mozilla.com/D26616
--HG--
extra : moz-landing-system : lando
2019-04-09 17:58:52 +00:00
Brindusan Cristian
149c6ee879
Backed out changeset 53e379a5738f (bug 1542910) as requested by waldo on irc. CLOSED TREE
...
--HG--
extra : histedit_source : 8714b8dac07c146822952ede6a8d85b3bf4caf50
2019-04-09 20:43:52 +03:00
Jeff Walden
9f030a47c2
Bug 1542910 - Make all script compilation APIs directly return a JSScript*, rather than returning a success code and returning the JSScript* via outparam that exactly duplicates the success code value's meaning. r=arai
...
Differential Revision: https://phabricator.services.mozilla.com/D26616
--HG--
extra : moz-landing-system : lando
2019-04-09 17:24:31 +00:00
Noemi Erli
4a518ba201
Backed out changeset d470f958ea61 (bug 1542910) for bustages in testEmptyWindowIsOmitted.cpp
2019-04-09 19:24:46 +03:00
Jeff Walden
1a5a3f4e6e
Bug 1542910 - Make all script compilation APIs directly return a JSScript*, rather than returning a success code and returning the JSScript* via outparam that exactly duplicates the success code value's meaning. r=arai
...
Differential Revision: https://phabricator.services.mozilla.com/D26616
--HG--
extra : moz-landing-system : lando
2019-04-09 03:50:03 +00:00
Boris Zbarsky
6c53c36a79
Bug 1541513 part 1. Stop requiring a JSContext for JS_SetAllNonReservedSlotsToUndefined. r=jandem
...
Differential Revision: https://phabricator.services.mozilla.com/D25999
--HG--
extra : moz-landing-system : lando
2019-04-05 07:36:32 +00:00
Alex Gaynor
0f01791ffc
Bug 1512990
- Part 4 - remove declarations of Recv/Answer methods from IPDL protocol base class; r=froydnj
...
For cases where the class has direct calls (that is, we cast `this` to the
subclass before making the call) no longer declare Recv/Answer methods on the
base class at all. This should ensure that slots for them are not generated in
vtables, and also allow the derived class to choose the method signature (e.g.
whether it wants to take something by reference or by value).
Differential Revision: https://phabricator.services.mozilla.com/D18132
--HG--
extra : moz-landing-system : lando
2019-02-06 15:58:43 +00:00
Alex Gaynor
984f0333ea
Bug 1512990
- Part 3 - remove declarations of Alloc/Dealloc methods from IPDL protocol base class; r=froydnj
...
For cases where the class has direct calls (that is, we cast `this` to the
subclass before making the call) no longer declare Alloc/Dealloc methods on the
base class at all. This should ensure that slots for them are not generated in
vtables, and also allow the derived class to choose the method signature (e.g.
whether it wants to take something by reference or by value).
Differential Revision: https://phabricator.services.mozilla.com/D18131
--HG--
extra : moz-landing-system : lando
2019-02-06 15:58:07 +00:00
Alex Gaynor
75c7d1fa76
Bug 1512990
- Part 2 - implement direct calls in the IPDL compiler; r=froydnj
...
When calling a Recv/Alloc/Dealloc method on most types, cast `this` to the
derived class.
There is a heuristic to figure out what the correct derived type is. There is a
blacklist of types which we can't do direct calls on for the moment, as well as
an override for types that do work with direct calls but which don't match the
heuristic.
Differential Revision: https://phabricator.services.mozilla.com/D16492
--HG--
extra : moz-landing-system : lando
2019-02-06 15:57:37 +00:00
Ehsan Akhgari
e5e885ae31
Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
...
# ignore-this-changeset
--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Jeff Walden
a128f0c35c
Bug 1517624 - Move JSPropertySpec and JSFunctionSpec definitions into a new js/public/PropertySpec.h header. r=arai
...
--HG--
extra : rebase_source : b80911e01f984ee9f99fbbc6c4552ef3d2178587
2019-01-03 15:37:01 -06:00
Sylvestre Ledru
6f45c666bc
Bug 1513205 - Also update the tests to match the Google coding style r=Ehsan
...
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D14595
--HG--
extra : moz-landing-system : lando
2018-12-14 18:10:35 +00:00
Benjamin Bouvier
a7f1d173a0
Bug 1511383: Update vim modelines after clang-format; r=sylvestre
...
- modify line wrap up to 80 chars; (tw=80)
- modify size of tab to 2 chars everywhere; (sts=2, sw=2)
--HG--
extra : rebase_source : 7eedce0311b340c9a5a1265dc42d3121cc0f32a0
extra : amend_source : 9cb4ffdd5005f5c4c14172390dd00b04b2066cd7
2018-11-30 16:39:55 +01:00
Ted Campbell
119fd6e9b9
Bug 1506475 - Add JS::AutoSuppressWarningReporter. r=jwalden
...
Differential Revision: https://phabricator.services.mozilla.com/D11586
--HG--
extra : moz-landing-system : lando
2018-11-30 04:01:10 +00:00
Gabriele Svelto
566f669d07
Bug 1509450 - Remove unnecessary inclusions of ContentParent.h and ContentChild.h r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D12728
--HG--
extra : moz-landing-system : lando
2018-11-26 14:49:44 +00:00
Jeff Walden
7dd0d06d8c
Bug 1485800 - Rename SourceBufferHolder to SourceText, and add a <typename Unit> template parameter to it so it can hold putative UTF-8 or UTF-16 source text. r=tcampbell, r=fitzgen
...
--HG--
rename : js/public/SourceBufferHolder.h => js/public/SourceText.h
extra : rebase_source : 34df669c2481eaccd6845f53c5ecf656b636f895
2018-11-08 18:42:48 -08:00
Jeff Walden
f2196f8c8f
Bug 1503086 - Initialize all SourceBufferHolders with a fallible function that in all cases assumes ownership of given-ownership data. r=tcampbell, r=bz, r=mrbkap on some finicky worker code lightly touched here
...
--HG--
extra : rebase_source : 94b1a13dc03a7f1a5d07a2c665fdc0cde162d411
2018-10-23 12:27:16 -07:00
Jason Orendorff
aaf539046b
Bug 1491939 - Part 3: Centralize configuration of JS realm options from prefs. r=baku
...
Depends on D6554
Differential Revision: https://phabricator.services.mozilla.com/D6555
--HG--
extra : moz-landing-system : lando
2018-09-25 14:11:13 +00:00
Jeff Walden
9725076b9b
Bug 1491137 - Remove the two setUTF8(bool) CompileOptions functions now that the underlying field they alter is gone. r=jandem
...
--HG--
extra : rebase_source : c06e34549bd3b895d34cad93c5c3113ed4748390
2018-09-18 08:41:41 -07:00
Jeff Walden
9667f8bf7d
Bug 1491137 - Remove JS_Compile{,UC}Script, because except for argument ordering they're exactly identical to existing JS::Compile* functions. r=jandem
...
--HG--
extra : rebase_source : 89ae632dbc654f1f29f8186955042d4586aeeeff
2018-09-13 16:41:00 -07:00
Jeff Walden
c1d9c9d203
Bug 1491137 - Rename JS_BufferIsCompilableUnit to JS_Utf8BufferIsCompilableUnit, consistent with how it already interprets that data, and propagate that presumption of UTF-8-ness a little bit further along into callers. r=jandem
...
--HG--
extra : rebase_source : e2ab50b48d4faf12a6791b0925b080818334421d
2018-09-13 13:30:38 -07:00
Jeff Walden
a3dc828570
Bug 1491137 - Rename the JS::Compile function that accepts FILE* to JS::CompileUtf8File, because every caller passes a file with UTF-8 content. r=jandem
...
--HG--
extra : rebase_source : 7abe623b622ba5433ff85aafa691c9a3f0e16eea
2018-09-13 01:21:52 -07:00
Ehsan Akhgari
6bbaf2cf8c
Bug 1489147 - Remove the XPCOM component registration for nsXPConnect; r=mccr8
...
We move the XPConnect() singleton accessor to nsIXConnect to make it available for consumers outside of XPConnect. Most of the consumers of the singleton accessor just need the nsIXPConnect public interface, except for the IsShuttingDown() member which this patch adds to nsIXPConnect as well.
Differential Revision: https://phabricator.services.mozilla.com/D5151
2018-09-06 16:39:35 -04:00
shindli
2a86142e74
Backed out changeset d4ae1994c20c (bug 1489147) for bustages in JSDebugger.cpp on a CLOSED TREE
2018-09-06 22:12:44 +03:00
Ehsan Akhgari
bb7fcd9d69
Bug 1489147 - Remove the XPCOM component registration for nsXPConnect; r=mccr8
...
We move the XPConnect() singleton accessor to nsIXConnect to make it available for consumers outside of XPConnect. Most of the consumers of the singleton accessor just need the nsIXPConnect public interface, except for the IsShuttingDown() member which this patch adds to nsIXPConnect as well.
Differential Revision: https://phabricator.services.mozilla.com/D5151
2018-09-06 14:52:07 -04:00
André Bargull
ed962c63e5
Bug 1485066 - Part 8: Rename JS_EncodeString to JS_EncodeStringToLatin1. r=Waldo
2018-09-05 06:05:03 -07:00
André Bargull
e4d1d98f88
Bug 1485066 - Part 1: Remove JSAutoByteString. r=Waldo
2018-09-05 02:25:42 -07:00
Cosmin Sabou
1f0a42def4
Backed out 14 changesets (bug 1485066) for build bustages on MessageManagerFuzzer. CLOSED TREE
...
Backed out changeset e40f67f15bf1 (bug 1485066)
Backed out changeset f09bc4d5fdcc (bug 1485066)
Backed out changeset 939e27aa2d59 (bug 1485066)
Backed out changeset d50fcf82556c (bug 1485066)
Backed out changeset 5cbc0ae0117a (bug 1485066)
Backed out changeset 09b5382e0baf (bug 1485066)
Backed out changeset 6676e8fedcb3 (bug 1485066)
Backed out changeset 28e7e61c11ec (bug 1485066)
Backed out changeset b08b0cfc1dbe (bug 1485066)
Backed out changeset 8defc9eabfac (bug 1485066)
Backed out changeset bf167b0a3af3 (bug 1485066)
Backed out changeset 4f89260d5e30 (bug 1485066)
Backed out changeset c22fc17c9d87 (bug 1485066)
Backed out changeset d35bb63dbc1d (bug 1485066)
2018-09-05 15:54:03 +03:00
André Bargull
89416b7fd4
Bug 1485066 - Part 8: Rename JS_EncodeString to JS_EncodeStringToLatin1. r=Waldo
2018-09-05 02:26:49 -07:00
André Bargull
775b7277cc
Bug 1485066 - Part 1: Remove JSAutoByteString. r=Waldo
2018-09-05 02:25:42 -07:00
Jeff Walden
64fceacad0
Bug 1486577 - Don't #include "js/CompilationAndEvaluation.h" in jsapi.h, minimizing the scope of that header and reducing translation-unit size of anything that needs JSAPI but doesn't need to compile/evaluate JavaScript. r=jandem
...
--HG--
extra : rebase_source : cd9a8becc15477bc5e24408159d4f061ec81c8b2
2018-08-24 22:51:49 -05:00
Jeff Walden
4bdf4a3614
Bug 1486577 - Don't #include js/SourceBufferHolder.h in jsapi.h, and instead require users to do so -- a minor translation-unit size improvement for anyone who never has to use SourceBufferHolder other than by reference. r=jandem
...
--HG--
extra : rebase_source : df47aba0c7dac3fe80ab6ea1b9a34c7acc54850d
2018-08-24 21:01:58 -05:00
Jeff Walden
ffd93ba761
Bug 1033916 - Move JSAutoByteString out of jsapi.h into js/public/AutoByteString.h, incidentally breaking the jsfriendapi.h -> jsapi.h dependency. r=jandem
...
--HG--
extra : rebase_source : d85baf9b28e632db5669aa3d056cc9744686f5c8
2018-08-20 07:46:08 -07:00
Jan de Mooij
3af36d3d86
Bug 1479363 part 10 - Use JSAutoRealm instead of JSAutoRealmAllowCCW in other directories. r=mrbkap
2018-08-02 19:30:17 +02:00