Commit Graph

6888 Commits

Author SHA1 Message Date
Rob Wu
7d113fddff Bug 1504660 - Implement Xrays for instanceof r=bholley
Ensure that "a instanceof b" has Xray semantics, i.e. that when b is a
XrayWrapper, that the wrapped object's getters, `Symbol.hasInstance`
hook and proxy traps are not triggered.

The toolkit/components/mozintl/test/test_mozintlhelper.js test was
updated to explicitly waive Xrays, instead of relying on the previous
behavior where Xrays were automatically waived.

Depends on D11591

Depends on D11591

Differential Revision: https://phabricator.services.mozilla.com/D11592

--HG--
extra : moz-landing-system : lando
2018-12-02 22:21:51 +00:00
Tooru Fujisawa
7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09: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
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Coroiu Cristina
b8bc09a5b5 Merge mozilla-central to inbound a=merge on a CLOSED TREE
--HG--
rename : python/mozrelease/test/data/Firefox-62.0b11.update.json => python/mozrelease/test/data/Firefox-64.0b13.update.json
extra : rebase_source : 6eb078869182f40343e201993c0d0442ed96ad46
2018-11-29 00:34:07 +02:00
Ehsan Akhgari
ca162bee20 Bug 1508472 - Part 4: Fourth 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/D13193

--HG--
extra : moz-landing-system : lando
2018-11-28 09:16:55 +00:00
Ehsan Akhgari
0ad55ab74f Bug 1510513 - Retain the formatting of MOZ_DEFINE_ENUM_* macros r=sylvestre
These macros tend to be handled quite poorly since the clang-format
tokenizer cannot figure out how to handle them.

Differential Revision: https://phabricator.services.mozilla.com/D13179

--HG--
extra : moz-landing-system : lando
2018-11-28 09:14:19 +00:00
Jeff Walden
3093d025b8 Bug 1510012 - Move Symbol-related APIs out of jsapi.h into js/public/Symbol.h. r=sfink, r=mccr8 for the bindings change
--HG--
extra : rebase_source : 3a8d2d694052435fbc47b9131a521e31e9b0ea6f
2018-11-24 12:21:40 -08:00
Jeff Walden
af9a670e28 Bug 1510007 - Move JSFreeOp's definition to js/public/MemoryFunctions.h, and make jsapi.h not #include that header. r=sfink
--HG--
extra : rebase_source : 4d6debefd66b89647df53c104b8560ba2de68abd
2018-11-21 18:11:15 -08:00
Jon Coppeard
80b612aeb7 Bug 1508102 - Take account of XPCWrappedJS::mJSObjGlobal in cycle collector methods r=mccr8 a=abillings 2018-11-28 17:29:19 +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
Tooru Fujisawa
3393c83db7 Bug 1505511 - Part 3: Support WeakMap and WeakSet in Xray. r=bholley 2018-11-20 20:21:32 +09:00
Boris Zbarsky
64ae41821b Bug 1507540 part 6. Make nsIVariant's "type" a notxpcom attribute. r=froydnj 2018-11-19 20:20:05 -05:00
Timothy Guan-tin Chien
a56c6e8e81 Bug 1508147 - Re-remove unused CompartmentPrivate::isAddonCompartment, r=bholley
It was removed in bug 1478275, but re-introduced because of a false rebase in bug 1431255.

Differential Revision: https://phabricator.services.mozilla.com/D12331

--HG--
extra : moz-landing-system : lando
2018-11-19 18:46:57 +00:00
Nika Layzell
589d2a7b6f Bug 1477432 - Part 10: Stop using nsIJSID in nsIArray for optional IID parameters, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D9732
2018-11-16 17:27:46 -05:00
Nika Layzell
11b083d72c Bug 1477432 - Part 9: Switch to using plain JS objects for nsIJS[IC]ID, r=mccr8
This is a complete rewrite of the interface while maintaining the same APIs.
Each ID is fully-contained within a single object, does not require a finalizer,
and is cheap to create.

Beyond using reserved slots, this code avoids using custom ClassOps, instead
preferring Symbol.hasInstance and eager constants.

One major change which occurred in this patch was the move from storing a nsCID
to storing the ContractID for JSCID objects. This eliminates the need for the
'refreshCID' method, and hopefully shouldn't have performance implications.

If we discover that there are performance problems there, we can look into
stashing the CID, and re-introduce 'refreshCID', despite its surprising
behaviour.

Differential Revision: https://phabricator.services.mozilla.com/D2286
2018-11-16 17:27:44 -05:00
Nika Layzell
d2f648498e Bug 1477432 - Part 8: Remove test-only Components.classesById and Components.interfacesById, r=mccr8
These two interfaces are effectively never used, so to avoid needing to support
ClassID2JSValue with the new implementation, I remove them entirely.

Differential Revision: https://phabricator.services.mozilla.com/D2285
2018-11-16 17:27:42 -05:00
Nika Layzell
738dd3f1a9 Bug 1477432 - Part 7: Stop using nsIJSID in xpconnect outside of XPCJSID.cpp, r=mccr8
This mostly consists of changes to the XPCComponents objects to avoid using the
implementation details, and instead use the API defined in part 1.

Differential Revision: https://phabricator.services.mozilla.com/D2284
2018-11-16 17:27:41 -05:00
Nika Layzell
7954235168 Bug 1477432 - Part 5: Add a refreshCID method to JSCID objects, r=mccr8
This lets us get rid of the method 'initalize', which currently needs the
internal representation of JSCID.

This particular method is removed entirely in Part 9, and only exists to keep
intermediate states building & running.

Differential Revision: https://phabricator.services.mozilla.com/D2282
2018-11-16 17:27:37 -05:00
Nika Layzell
a3dbdf2c54 Bug 1477432 - Part 4: Remove the nsJSID XPCOM constructor, r=mccr8
Nobody was using it, so it's pretty easy to remove.

Differential Revision: https://phabricator.services.mozilla.com/D2281
2018-11-16 17:27:35 -05:00
Nika Layzell
a3a4d67877 Bug 1477432 - Part 3: Avoid using nsIJSID in Components.Constructor, r=mccr8
This should be mostly compatible with the original implementation. I tried to
simplify things here to just directly wrap and use JS objects, calling methods
on them. This eliminates the nsXPCConstructor type completely, replacing it with
a JSNative constructor with predefined READONLY | PERMANENT properties.

Differential Revision: https://phabricator.services.mozilla.com/D2280
2018-11-16 17:27:33 -05:00
Nika Layzell
fe2f2478f7 Bug 1477432 - Part 2: Avoid using nsIJSID in GenerateQI, and produce better diagnostics, r=kmag
This is the first part of hiding the implementation of nsIJSID behind the
interface added in Part 1, such that we can substitute that implementation out.

I had to make a couple of changes to fix the errors caused by the new behaviour
in GenerateQI.

Differential Revision: https://phabricator.services.mozilla.com/D2279
2018-11-16 17:27:31 -05:00
Nika Layzell
e3d63382ee Bug 1477432 - Part 1: Move xpc_ nsJSID methods to a future-proof API, r=mccr8
The new API tries to be more generic, taking and producing JS::Values. It also
supports creating the more specialized IID and CID types.

Differential Revision: https://phabricator.services.mozilla.com/D2278
2018-11-16 17:27:29 -05:00
Andrea Marchesini
c0950f9d8a Bug 1480544 - Allow Console API to log messages on stdout, r=bgrins
This patch introduces 2 new prefs:
- devtools.console.stdout.chrome: if true, console API writes on stdout when
                                  used by chrome code
- devtools.console.stdout.content: console API write on stdout when used by
                                   content code.
2018-11-15 21:47:58 +01:00
Rob Wu
1e7066abb9 Bug 1506861 - Stop accessing Proxy.prototype in XrayWrapper r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D11771

--HG--
extra : moz-landing-system : lando
2018-11-15 01:35:59 +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
Boris Zbarsky
d9766a1241 Bug 1506736. Don't try to Xray statics on JS builtin constructors that we don't normally support Xrays for. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D11764

--HG--
extra : moz-landing-system : lando
2018-11-13 21:19:01 +00:00
Henrik Skupin
6f80f44f24 Bug 1495667 - Re-enable js/xpconnect/tests/marionette/test_loader_global_sharing.py on Windows. r=jgraham
Previously disabled via bug 1433905 to allow a refactoring of Marionette, this test can be re-enabled now given that bug 1433873 also got landed.

Differential Revision: https://phabricator.services.mozilla.com/D11744

--HG--
extra : moz-landing-system : lando
2018-11-13 10:23:58 +00:00
Andy Wingo
1471c70fb7 Bug 1506542 - Add run-time flag to enable bigint support r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D11613

--HG--
extra : moz-landing-system : lando
2018-11-13 09:11:06 +00:00
Dan Horák
1aa4b36f30 Bug 1503968 - set Watchdog thread stack size to at least platform minimal stack size. r=bholley 2018-11-05 00:51:00 +02:00
Yoshi Huang
2d73be3784 Bug 1485299 - Add telemethy for nursery promotion rate. r=jonco, data-review=chutten
Add telemethy for Nursery promotion rate.

Data review form: https://bugzilla.mozilla.org/attachment.cgi?id=9023677
Data review response: https://bugzilla.mozilla.org/show_bug.cgi?id=1485299#c10
2018-11-09 09:53:57 +01:00
Gurzau Raul
1da9ef02c4 Merge inbound to mozilla-central. a=merge
--HG--
rename : testing/web-platform/tests/content-security-policy/navigate-to/form-action/form-action-blocks-navigate-to-allows.html => testing/web-platform/tests/content-security-policy/navigate-to/form-action/form-action-blocks-navigate-to-allows.sub.html
rename : testing/web-platform/tests/content-security-policy/navigate-to/spv-only-sent-to-initiator.html => testing/web-platform/tests/content-security-policy/navigate-to/spv-only-sent-to-initiator.sub.html
2018-11-06 11:57:49 +02:00
Ehsan Akhgari
6f7b03e600 Bug 1504574 - Remove the XPCOM registration for nsDocumentEncoder; r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D10856
2018-11-05 23:16:04 -05:00
Kyle Machulis
8ad671c4c0 Bug 1498059 - Tests for CEnums in XPIDL; r=nika,froydnj
Depends on D8594

Differential Revision: https://phabricator.services.mozilla.com/D8595

--HG--
extra : moz-landing-system : lando
2018-11-06 00:05:44 +00:00
Ehsan Akhgari
c78ff51afb Bug 1504566 - Remove the XPCOM registration for nsHTMLCopyEncoder; r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D10958
2018-11-05 17:28:54 -05:00
Narcis Beleuzu
9b3f73e696 Merge mozilla-central to inbound. CLOSED TREE 2018-11-05 23:54:03 +02:00
vinoth
e14aa2974e Bug 1504605 - Add Prefs to xpcshell test files for allowing usage of eval. r=ckerschb
Reviewers: ckerschb

Reviewed By: ckerschb

Subscribers: ckerschb

Bug #: 1504605

Differential Revision: https://phabricator.services.mozilla.com/D10850

--HG--
extra : rebase_source : 9abb395224bdfa7795516295babfd847ea2553f4
2018-11-05 16:41:45 +02:00
Jonathan Kingston
4248b4c554 Bug 1490257 - Pass triggeringPrincipal to test code. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D10882

--HG--
extra : moz-landing-system : lando
2018-11-05 14:05:47 +00:00
vinoth
896a7bbbd2 Bug 1504207 - Add Prefs for allowing usage of eval with system principal in test files r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D10696

--HG--
extra : moz-landing-system : lando
2018-11-05 13:39:31 +00:00
Daniel Varga
77036132f7 Merge autoland to mozilla-central. a=merge 2018-11-02 00:26:12 +02:00
Julian Descottes
079a123093 Bug 1467712 - Simplify calls to ok to use only 2 arguments;r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D10416

--HG--
extra : moz-landing-system : lando
2018-11-01 13:48:48 +00:00
Csoregi Natalia
faba2c8c15 Backed out 4 changesets (bug 1467712) for multiple failures with: Too many arguments passed to ok. CLOSED TREE
Backed out changeset 9ce0ac2b9d71 (bug 1467712)
Backed out changeset 026eb1f6dc6e (bug 1467712)
Backed out changeset 0088a09d869a (bug 1467712)
Backed out changeset 1b19ea76aad6 (bug 1467712)
2018-11-01 15:22:52 +02:00
Julian Descottes
b50a5ba4dc Bug 1467712 - Simplify calls to ok to use only 2 arguments;r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D10416

--HG--
extra : moz-landing-system : lando
2018-11-01 11:09:48 +00:00
Gurzau Raul
424b125b93 Backed out changeset 523ff2753dea (bug 1490257) for causing Bug 1503757 a=backout 2018-11-01 15:27:30 +02:00
Brindusan Cristian
41900a475a Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-10-31 23:44:15 +02:00
Brindusan Cristian
3d5e6205ca Merge inbound to mozilla-central. a=merge 2018-10-31 23:41:40 +02:00
Gabriele Svelto
266ef73c96 Bug 1503207 - Remove nsWeakPtr.h and cleanup all files including weak reference-related headers r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D10251

--HG--
extra : moz-landing-system : lando
2018-10-31 20:39:03 +00:00
Jonathan Kingston
873b26107e Bug 1490257 - Add asserts into loadURI where we imply SystemPrincipal. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D10221

--HG--
extra : moz-landing-system : lando
2018-10-31 18:00:40 +00:00
Andrea Marchesini
d33f864af8 Bug 1503551 - Remove window.sidebar, r=smaug 2018-10-31 18:30:18 +01:00