Commit Graph

7144 Commits

Author SHA1 Message Date
Boris Zbarsky
20b1b5359b Bug 1521907 part 2. Add dynamic CheckedUnwrap support to CrossOriginObjectWrapper. r=peterv,sfink
This will allow us to correctly handle CheckedUnwrapDynamic on wrappers around
WindowProxy and Location.

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

--HG--
extra : moz-landing-system : lando
2019-02-01 22:00:58 +00:00
Ciure Andrei
63b0f3f854 Backed out 7 changesets (bug 1521907) for JSObject Wrapper.cpp bustages and failures CLOSED TREE
Backed out changeset ce3108090e77 (bug 1521907)
Backed out changeset efd05f4979f1 (bug 1521907)
Backed out changeset 2d0895148907 (bug 1521907)
Backed out changeset 192152fe986a (bug 1521907)
Backed out changeset ca65b46b0d37 (bug 1521907)
Backed out changeset b3daf5ca3d11 (bug 1521907)
Backed out changeset 1b0a09a46c70 (bug 1521907)
2019-02-01 19:38:25 +02:00
Boris Zbarsky
bed98f8c98 Bug 1521907 part 5. Start using CheckedUnwrapStatic/Dynamic in XPConnect. r=peterv
I am not a huge fan of the UnwrapReflectorToISupports setup here.  Maybe we
should introduce two differently-named methods that make it somewhat clear what
the limitations of not taking a JSContext are?  I couldn't think of sane
naming...

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

--HG--
extra : moz-landing-system : lando
2019-02-01 16:17:44 +00:00
Boris Zbarsky
a3784f4489 Bug 1521907 part 3. Start using CheckedUnwrapStatic/Dynamic in bindings. r=peterv
The basic idea for the changes around UnwrapObjectInternal and its callers
(UnwrapObject, UNWRAP_OBJECT, etc) is to add a parameter to the guts of the
object-unwrapping code in bindings which can be either a JSContext* or nullptr
(statically typed).  Then we test which type it is and do either a
CheckedUnwrapDynamic or CheckedUnwrapStatic.  Since the type is known at
compile time, there is no actual runtime check; the compiler just emits a call
to the right thing directly (verified by examining the assembly output on
Linux).

The rest of the changes are mostly propagating through that template parameter,
adding static asserts to make sure people don't accidentally pass nullptr while
trying to unwrap to a type that might be a WindowProxy or Location, etc.

There are also some changes to places that were calling CheckedUnwrap directly
to use either the static or dynamic version, as needed.

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

--HG--
extra : moz-landing-system : lando
2019-01-31 15:50:06 +00:00
Boris Zbarsky
9abee38822 Bug 1521907 part 2. Add dynamic CheckedUnwrap support to CrossOriginObjectWrapper. r=peterv
This will allow us to correctly handle CheckedUnwrapDynamic on wrappers around
WindowProxy and Location.

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

--HG--
extra : moz-landing-system : lando
2019-01-31 11:22:53 +00:00
Andrea Marchesini
506304e224 Bug 1522210 - Fingerprinting and cryptomining classifiers must have separate nsIWebProgressListener blocking state codes - part 7 - cryptomining, r=ehsan,johannh
Differential Revision: https://phabricator.services.mozilla.com/D17641
2019-01-30 14:01:51 +01:00
Andrea Marchesini
5a909353eb Bug 1522210 - Fingerprinting and cryptomining classifiers must have separate nsIWebProgressListener blocking state codes - part 6 - fingerprinting, r=ehsan,johannh
Differential Revision: https://phabricator.services.mozilla.com/D17640
2019-01-30 14:01:05 +01:00
Jon Coppeard
e16c189b22 Bug 1306008 - Replace ObjectPtr with JS::Heap<JSObject*> r=sfink
Heap<JSObject*> is now equivalent to ObjectPtr so we can remove the latter.

Differential Revision: https://phabricator.services.mozilla.com/D25084
2019-03-27 16:26:22 +00:00
Kris Maglione
fbe9354130 Bug 1478124: Part 8c - Update Layout module to use a static component manifest. r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D15041

--HG--
extra : rebase_source : 479e50e210f21888c841fec5742df68f33f5f80f
extra : source : 21f4fda0315963e42bae8784c63116f00ee0fa92
2019-01-23 15:45:56 -08:00
arthur.iakab
c1fae83952 Backed out 16 changesets (bug 1478124) for failing android geckoview-junit CLOSED TREE
Backed out changeset fce62c77a56b (bug 1478124)
Backed out changeset eb2fa3b5edf7 (bug 1478124)
Backed out changeset 8dacce59fcc0 (bug 1478124)
Backed out changeset 012fd0107204 (bug 1478124)
Backed out changeset 496aaf774697 (bug 1478124)
Backed out changeset 21f4fda03159 (bug 1478124)
Backed out changeset b0444e0bc801 (bug 1478124)
Backed out changeset d94039b19943 (bug 1478124)
Backed out changeset 5d85deac61c2 (bug 1478124)
Backed out changeset 929fd654c9df (bug 1478124)
Backed out changeset 1ddd80d9e91a (bug 1478124)
Backed out changeset b8d2dfdfc324 (bug 1478124)
Backed out changeset f500020a273a (bug 1478124)
Backed out changeset dd00365ebb55 (bug 1478124)
Backed out changeset 538e40c5ee13 (bug 1478124)
Backed out changeset bedaa9c437ad (bug 1478124)
2019-01-29 10:03:06 +02:00
Kris Maglione
8bf963d6c9 Bug 1478124: Part 8c - Update Layout module to use a static component manifest. r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D15041

--HG--
extra : rebase_source : c47e59edd348b0ff940b4f7adb930c149b4dd396
extra : absorb_source : 85dae58fbfef8db874fb1de6fcb5ba52c9998a30
extra : histedit_source : 7de01c654e4cbbc31026b12fd9b34578e9c31bc9
2019-01-23 15:45:56 -08:00
Sebastian Hengst
b78e4e8667 Merge mozilla-central to mozilla-inbound
--HG--
rename : browser/components/urlbar/tests/legacy/browser_urlbar_search_no_speculative_connect_with_client_cert.js => browser/components/urlbar/tests/browser/browser_urlbar_speculative_connect_not_with_client_cert.js
2019-01-29 02:55:55 +02:00
Tom Schuster
35523d50cc Bug 1156077 - Remove the non-standard Proxy getPropertyDescriptor trap. r=bzbarsky,jorendorff
I am bit surprised myself, but just removing the getPropertyDescriptor trap seems to mostly work.
The only real special case here is the XPC Sandbox, which I changed to keep using its getPropertyDescriptorImpl.

testSetPropertyIgnoringNamedGetter.cpp didn't even really need its getPropertyDescriptor implementation.

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

--HG--
extra : moz-landing-system : lando
2019-01-25 16:41:34 +00:00
Randell Jesup
76bd9e73cc Bug 1522150: Add a DeferredTimers queue ahead of the normal Idle EventQueue r=froyd
* * *
Bug 1522150: Rename NS_IdleDispatch* functions since they take queue identifiers r=froyd
2019-01-26 12:18:05 -05:00
Dorel Luca
e1e5c4c775 Backed out 4 changesets (bug 1521191) for causing leaks on multiple tests
Backed out changeset 138e162d2778 (bug 1521191)
Backed out changeset 3782d011cc9f (bug 1521191)
Backed out changeset 38d3da4804d7 (bug 1521191)
Backed out changeset d6ce4b187195 (bug 1521191)
2019-01-26 03:23:40 +02:00
Andrew McCreight
5c1bc6074f Bug 1521191, part 3 - Add a function to create a negative leak. r=froydnj
This is needed to test the test harness's handling of a negative leak
being reported by the XPCOM leak checker.

Depends on D17535

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

--HG--
extra : moz-landing-system : lando
2019-01-24 21:29:40 +00:00
Andrew McCreight
0eb5d04802 Bug 1521191, part 1 - Add method to disable dump statistics. r=froydnj
In order to test the test harness's handling of a process failing to
produce a leak log, add a special function that disables the bloat log
output.

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

--HG--
extra : moz-landing-system : lando
2019-01-24 21:30:44 +00:00
Jeff Walden
59aaefa333 Bug 1522350 - Move JS::ContextOptions{,Ref} to a new js/public/ContextOptions.h header to further slim jsapi.h. r=arai
--HG--
rename : js/src/jsapi.h => js/public/ContextOptions.h
2019-01-23 16:56:56 -08:00
Kris Maglione
e930b89c34 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

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

--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
2019-01-17 10:18:31 -08:00
Oana Pop Rus
028136ace2 Merge inbound to mozilla-central. a=merge 2019-01-24 18:50:45 +02:00
vinoth
cc6d429241 Bug 1512949 - Remove eval from tests and flip assertion flag r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D14054

--HG--
extra : moz-landing-system : lando
2019-01-24 09:06:07 +00:00
Ciure Andrei
c035ee7d3a Merge inbound to mozilla-central. a=merge 2019-01-24 05:44:33 +02:00
Benjamin Bouvier
b6e305766e Bug 1509441: Unify wasm compilation switches under the --wasm-compiler umbrella; r=lth
--HG--
extra : rebase_source : 47a370c182bacc170bf83be3e2b3dbdbc488a787
2019-01-23 12:33:01 +01:00
Tom Schuster
bbf30da9de Bug 1339777 - Collect telemetry for String generics. r=arai,janerik data-review=chutten
Differential Revision: https://phabricator.services.mozilla.com/D17257

--HG--
extra : rebase_source : 12fc69cf83bb9b92790f105367af4d03626d6295
2019-01-22 17:54:12 +01:00
Sebastian Hengst
2ecf173b14 Merge mozilla-central to autoland 2019-01-23 11:31:44 +02:00
Peter Van der Beken
fd3d6252af Bug 1521848 - Replace nsTArrayToJSArray with ToJSValue. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D17263

--HG--
extra : moz-landing-system : lando
2019-01-22 18:36:07 +00:00
Nathan Froyd
a9fb00a2f6 Bug 1485216 - remove Scheduler and related code from xpcom/threads; r=mccr8
Quantum DOM is no longer a priority, and the extra code it introduces to
several places block useful refactorings.
2019-01-22 20:16:56 -05:00
Sylvestre Ledru
0b4021fcad Bug 1521460 - Also reformat objective-c files r=mstange,ehsan,spohl
# ignore-this-changeset

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

--HG--
extra : histedit_source : 084f340503d2e1a2d9e1753c38b2c4ee9c7819f3
2019-01-21 18:18:16 +01:00
Razvan Maries
8123914263 Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2019-01-21 19:58:38 +02:00
Razvan Maries
299b5e79f7 Merge mozilla-inbound to mozilla-central a=merge 2019-01-21 19:50:56 +02:00
Jon Coppeard
a96229ddb3 Bug 1512749 - Convert JS::gcreason::Reason to enum class JS:GCReason r=jonco r=mccr8 2019-01-21 13:09:12 +00:00
Boris Zbarsky
2646f35e2b Bug 1160757. Make it clear that XrayWrapper::getPropertyDescriptor is unused. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D15669

--HG--
extra : moz-landing-system : lando
2019-01-21 03:34:29 +00:00
Boris Zbarsky
e5c8ead70a Bug 1363208 part 9. Remove now-unused cross-origin Xray infrastructure. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D15433

--HG--
extra : moz-landing-system : lando
2019-01-21 03:33:55 +00:00
Boris Zbarsky
ffd07255aa Bug 1363208 part 8. Stop using cross-origin Xrays for Location. r=peterv
The test change is because it was testing Window, not Location.

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

--HG--
extra : moz-landing-system : lando
2019-01-21 03:33:32 +00:00
Boris Zbarsky
abd3e90089 Bug 1363208 part 5. Remove now-unnecessary named subframe handling from XrayWrapper. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D15429

--HG--
extra : moz-landing-system : lando
2019-01-21 03:33:14 +00:00
Boris Zbarsky
c17e30f6b2 Bug 1363208 part 4. Stop using cross-origin Xrays for WindowProxy. r=peterv,jandem
The change to test_bug440572.html is due to a behavior change.  Specifically,
before this change, any IDL-declared property, even one not exposed
cross-origin, would prevent named frames with that name being visible
cross-origin.  The new behavior is that cross-origin-exposed IDL properties
prevent corresponding frame names from being visible, but ones not exposed
cross-origin don't.  This matches the spec and other browsers.

Same thing for the changes to test_bug860494.xul.

The wpt test changes are just adding test coverage for the thing the other
tests caught.

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

--HG--
extra : moz-landing-system : lando
2019-01-21 03:30:31 +00:00
Andrew McCreight
1b2773c6d2 Bug 1521223, part 1 - Add an API to deliberately leak an object. r=froydnj
This is needed to test various leak checking harnesses.

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

--HG--
extra : moz-landing-system : lando
2019-01-23 17:03:12 +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
Tarek Ziadé
c9ddafea1f Bug 1406872 - Remove perf monitoring code - r=jandem,Gijs
This patch removes the StopWatch code that was used in the first version of
about:performance, and not being used anymore.

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

--HG--
extra : moz-landing-system : lando
2019-01-14 14:09:09 +00:00
Lars T Hansen
d66fb136aa Bug 1508561 - Disentangle support for reftypes and gc. r=jseward
This does the following:

- It introduces a controlling ifdef ENABLE_WASM_REFTYPES that enables
  exactly those features that are in the reftypes proposal, excluding
  those in the gc proposal.  Any remaining features (namely, ref.eq,
  (ref T) types, struct types) are still under ENABLE_WASM_GC control.
  ENABLE_WASM_GC requires ENABLE_WASM_REFTYPES and this is checked.

- It introduces a new TestingFunctions predicate, wasmReftypesEnabled,
  that distinguishes reftype-proposal support from gc-proposal
  support.  We keep wasmGcEnabled to test for gc-proposal support.

- It segregates test cases so that gc-proposal relevant tests are in
  their own files, and tests relevant to the reftypes-proposal are now
  guarded by wasmReftypesEnabled.

- It renames the predicate HasGcSupport() as HasReftypesSupport(),
  since that is what the predicate tests for.

- It has a drive-by fix for the DEBUG-only function wasm::Classify()
  to properly put ref.null and ref.is_null under ifdef control.

Reftypes will soon be enabled unconditionally in Nightly (once we can
trace pointers from Ion frames) while gc-types will remain conditional
until Ion supports all the new instructions for struct types.  Therefore:

- The command line switch and about:config option are still called
  --wasm-gc and j.o.wasm_gc, respectively, which is fine since they will
  fairly soon control only gc-proposal features.

- Internal names still use "Gc" rather than "Reftypes", eg,
  HasGcTypes, wasmGc_, and so on.  This is most appropriate since it
  reduces the scope of the patch and these names will pertain mainly
  to the gc feature in the future.

--HG--
extra : rebase_source : 51cf3bfe67da594e89195472e4ce1ccfa36c146d
2018-12-18 17:26:32 +01:00
Jan de Mooij
a0640935f5 Bug 1518077 part 2 - Add MEMORY_JS_REALMS_{USER,SYSTEM} similar to the MEMORY_JS_COMPARTMENTS_{USER,SYSTEM} counts. r=njn,chutten
Differential Revision: https://phabricator.services.mozilla.com/D15809

--HG--
extra : moz-landing-system : lando
2019-01-08 15:11:36 +00:00
Jan de Mooij
5b05f372ab Bug 1518077 part 1 - Fix MEMORY_JS_COMPARTMENTS_{USER,SYSTEM} telemetry to count number of compartments instead of realms. r=njn
Differential Revision: https://phabricator.services.mozilla.com/D15808

--HG--
extra : moz-landing-system : lando
2019-01-08 15:11:08 +00:00
Jan de Mooij
65d873d3a9 Bug 1517694 - Add a test to verify sandboxes, chrome windows and JSMs are in the same compartment. r=kmag
This also changes test_bug1516237.html to now assert we're same-compartment
instead of supporting both cases.

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

--HG--
extra : moz-landing-system : lando
2019-01-08 12:51:22 +00: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
Jeff Walden
72773f1fd6 Bug 1516713 - Move buildId-related stuff out of jsapi.h into a new js/public/BuildId.h header. r=arai
--HG--
extra : rebase_source : 62ed8aa652e577c108a83351fba5d71b6c97da40
2018-12-28 21:00:58 -06:00
Ciure Andrei
7a748ae68f Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-01-04 01:03:06 +02:00
Boris Zbarsky
447c1f8722 Bug 1517434 part 3. Get rid of pointer compares to nsXPConnect::SystemPrincipal. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D15674

--HG--
extra : moz-landing-system : lando
2019-01-03 21:08:15 +00:00
Boris Zbarsky
058f83508f Bug 1517434 part 2. Convert existing callers of GetIsSystemPrincipal() to IsSystemPrincipal(). r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D15673

--HG--
extra : moz-landing-system : lando
2019-01-03 20:55:38 +00:00
Jan de Mooij
78e49f6404 Bug 1512029 part 4 - Use the privileged junk scope's compartment for sandboxes created with the system principal. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D14255

--HG--
extra : moz-landing-system : lando
2019-01-03 10:02:31 +00:00
Jan de Mooij
cdbd8647b5 Bug 1516237 - Fix FixWaiverAfterTransplant to nuke CCWs for oldWaiver in the new compartment. r=bholley
This case can come up with same-compartment realms. Keeping these CCWs
would confuse RemapWrapper because it'd be called with the CCW and target
in the same compartment.

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

--HG--
extra : moz-landing-system : lando
2019-01-03 09:04:02 +00:00
Peter Van der Beken
066d891adb Bug 1353867 - Add cross-process proxies for WindowProxy. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D12656

--HG--
extra : moz-landing-system : lando
2019-01-02 13:29:18 +00:00
Peter Van der Beken
43adb531b7 Bug 1353867 - Expose IsCrossOriginWhitelistedProp/AppendCrossOriginWhitelistedPropNames to DOM code. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D12655

--HG--
extra : moz-landing-system : lando
2019-01-02 13:28:40 +00:00
Peter Van der Beken
58c7fc4d20 Bug 1353867 - Change WindowProxyHolder's native type to BrowsingContext. r=bzbarsky
Make the WindowProxyHolder hold a strong reference to a BrowsingContext, as in the future
we might not have a nsPIDOMWindowOuter (if the document is loaded in a different process).

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

--HG--
extra : moz-landing-system : lando
2019-01-02 13:27:05 +00:00
Jan de Mooij
2aa7efc012 Bug 1515590 part 5 - Fix test_bug771429.xul to work with same-compartment realms. r=bzbarsky
Changes the test to test both freshCompartment: true and freshCompartment: false
sandbox options.

There's one sub test that fails with same-copartment realms, I commented that
and added a weaker test for the same-compartment case.

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

--HG--
extra : moz-landing-system : lando
2018-12-29 09:27:14 +00:00
Emilio Cobos Álvarez
d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Sylvestre Ledru
cccdda3c2a Bug 1516555 - Reformat everything to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2018-12-28 15:48:06 +00:00
Jeff Walden
8a135a9c5a Bug 1515801 - Make subscripts have lazy source, and change the source-hook to hint UTF-8 rather than offer no charset hint so that lazy-source for them will work correctly. r=kmag 2018-12-26 14:37:42 -06:00
Jeff Walden
605ce5d8cc Bug 1515801 - Rip out vestigial handling of non-UTF-8 character sets from the subscript loader. r=kmag
--HG--
extra : rebase_source : 97a7604c6649d73d6b7a1f8d608cfdfe7c13a6aa
2018-12-14 14:25:56 -08:00
Boris Zbarsky
d6876ebbfa Bug 1515999. Remove the unused JSContext argument from GetArrayIndexFromId. r=peterv 2018-12-26 13:45:15 -08:00
Bogdan Tara
601b0d2329 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2018-12-24 00:10:07 +02:00
Kris Maglione
39ae97e234 Bug 1515884: Remove unused XPCWrappedJS nsIPropertyBag implementation. r=bholley
This helper code is currently unused, and presents a pretty significant
footgun for any JS object which implements nsIPropertyBag itself.

When those objects are first queried to nsIWritablePropertyBag, they behave as
expected, returning the JS-implemented nsIPropertyBag methods. But when
they're first queried to nsIPropertyBag, they use the XPCWrappedNative stubs,
which don't behave as expected.

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

--HG--
extra : rebase_source : 02942592dc8c4efcc1190610448a46593faa5703
2018-12-21 15:03:13 -08:00
Jan de Mooij
ecaf5bdea0 Bug 1515590 part 4 - Don't call FixWaiverAfterTransplant if JS_TransplantObject didn't change object identity. r=bholley
Depends on D15093

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

--HG--
extra : moz-landing-system : lando
2018-12-21 18:33:08 +00:00
Jan de Mooij
9190590e09 Bug 1515590 part 3 - Fix some debugger tests by forcing separate compartments for the debugger and debuggee. r=ochameau
With same-compartment chrome globals these would end up in the same compartment.
We need to prevent that because the debugger doesn't support it.

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

--HG--
extra : moz-landing-system : lando
2018-12-22 21:39:56 +00:00
Jan de Mooij
929107cd39 Bug 1515590 part 2 - Fix test_bug1042436.xul to create the sandbox in a new compartment because Xray warning state is stored per compartment. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D15092

--HG--
extra : moz-landing-system : lando
2018-12-21 18:34:12 +00:00
Jan de Mooij
1672f1efbd Bug 1514776 - Enter the unwrapped object's realm before calling aes.ReportException() in nsXPCWrappedJSClass::CheckForException. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D14851

--HG--
extra : moz-landing-system : lando
2018-12-21 08:53:09 +00:00
Jan de Mooij
cf908f9f73 Bug 1514672 part 2 - Use the scripted caller's global instead of the context global in a few more places. r=bzbarsky
This fixes some test failures exposed by the previous patch.

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

--HG--
extra : moz-landing-system : lando
2018-12-21 20:56:19 +00:00
Gurzau Raul
fcb3be1b9f Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-12-21 18:40:39 +02:00
Nathan Froyd
feb0416cc1 Bug 1496629 - use RefPtr rather than nsCOMPtr to avoid data race. r=kmag 2018-12-21 11:03:30 -05:00
Jan de Mooij
ebf079a50a Bug 1515590 part 1 - Fix incorrect SandboxProxyHandler::getOwnPropertyDescriptor implementation. r=bzbarsky
The code was trying to implement the getOwnPropertyDescriptor trap in terms of
getPropertyDescriptor, by comparing the "holder" object we found to the object
we did the lookup on. This becomes buggy when wrappers like WindowProxy are involved.

The patch removes this check and calls JS_GetOwnPropertyDescriptor instead of
JS_GetPropertyDescriptor.

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

--HG--
extra : moz-landing-system : lando
2018-12-20 20:41:58 +00:00
Margareta Eliza Balazs
f43dfc843e Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-12-21 11:42:32 +02:00
Luke Wagner
dc93733616 Bug 1507939 - Baldr: add javascript.options.wasm_verbose (r=lth)
--HG--
extra : rebase_source : 7405ee0bcc6a12fe8bbe797919a6e76d01d3c172
2018-12-20 20:51:11 -06:00
Jan de Mooij
bd8f77645e Bug 1480121 - Remove the global stored in nsXPCWrappedJS. r=bzbarsky
Reasons for doing this:

* nsXPCWrappedJS has complicated GC behavior and we're seeing some oranges in this area.

* Due to the GC/CC complexity, the global stored in nsXPCWrappedJS *must be* the
  object's global in the root-wrapper (implies non-CCW) case. If we do that, the
  global is redundant because we can just get it from the object when we need it.

* For the CCW case, it probably doesn't matter too much which chrome global we
  use so we can use the compartment's first global - we now have an API for that.
  This may also save some memory because it avoids keeping globals alive unnecessarily
  and matches what we do for WrappedNatives and CCWs now. Furthermore, bug 1478359
  comment 12 suggests CCWs can only show up here for in-content XBL and that's in the
  process of being removed.

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

--HG--
extra : moz-landing-system : lando
2018-12-20 19:13:43 +00:00
Jan de Mooij
2104ae00bb Bug 1514672 part 1 - Move XPCWrappedNativeScope from RealmPrivate to CompartmentPrivate. r=bzbarsky
This needs to be on the compartment to prevent creating duplicate wrapped natives.
We now also allocate these objects in the compartment's first global for
consistency and to prevent leaks.

XPCWrappedNativeScope also stores the content XBL scope. I considered moving
this to RealmPrivate, but given the fate of in-content XBL I went with the
simpler option of keeping it on XPCWrappedNativeScope and release-asserting we
have a single realm in the XBL case.

Because XPCWrappedNativeScope no longer stores a global object, we no longer
need XPCWrappedNativeScope::TraceSelf, XPCWrappedNativeProto::TraceInside and
XPC_WN_Proto_Trace.

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

--HG--
extra : moz-landing-system : lando
2018-12-20 08:23:31 +00:00
Razvan Maries
f658ebcbab Merge mozilla-inbound to mozilla-central a=merge 2018-12-20 07:04:06 +02:00
Jeff Walden
ed23151bd7 Bug 1492937 - Make the JS subscript loader load scripts exclusively as UTF-8, with no way to specify any other encoding, and adjust a bunch of existing tests to use UTF-8 directly, rather than Unicode escape sequences or similar. (This also changes the encoding of .sjs scripts and all mochitest-browser tests in the tree from Latin-1 to UTF-8.) r=yzen, r=MattN, r=jimb, r=kmag 2018-12-19 13:46:20 -08:00
Andrew McCreight
0507792161 Bug 1471989 - Clear JSStackFrame's JS object pointer when the window goes away. r=bzbarsky
JSStackFrames are C++ objects that are exposed to chrome JS and keep
alive content JS. This means that if chrome JS leaks a stack frame
then a window can be leaked.

The basic idea of this patch is to think of JSStackFrames as
cross-compartment wrappers, and do a "hueyfix" on them by dropping the
content JS reference when the associated content window is closed.

To do that, this patch modifies the realm private to keep a list of
all live JSStackFrames that have been created with objects in that
realm. When we nuke that realm, we also clear out all of the JS
pointers from the registered stack frames on that realm.

This adds a hash table lookup to the JSStackFrame ctor and dtor, which
is hopefully not too much overhead.

The test works by intentionally leaking a JSStackFrame from chrome JS
and making sure that the window still goes away.

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

--HG--
extra : moz-landing-system : lando
2018-12-19 19:42:04 +00:00
Andreea Pavel
f9260c6914 Backed out changeset b1fe3750580d (bug 1471989) for build bustages on a CLOSED TREE 2018-12-19 20:48:10 +02:00
Andrew McCreight
09534362bf Bug 1471989 - Clear JSStackFrame's JS object pointer when the window goes away. r=bzbarsky
JSStackFrames are C++ objects that are exposed to chrome JS and keep
alive content JS. This means that if chrome JS leaks a stack frame
then a window can be leaked.

The basic idea of this patch is to think of JSStackFrames as
cross-compartment wrappers, and do a "hueyfix" on them by dropping the
content JS reference when the associated content window is closed.

To do that, this patch modifies the realm private to keep a list of
all live JSStackFrames that have been created with objects in that
realm. When we nuke that realm, we also clear out all of the JS
pointers from the registered stack frames on that realm.

This adds a hash table lookup to the JSStackFrame ctor and dtor, which
is hopefully not too much overhead.

The test works by intentionally leaking a JSStackFrame from chrome JS
and making sure that the window still goes away.

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

--HG--
extra : moz-landing-system : lando
2018-12-19 16:46:25 +00:00
Bogdan Tara
b13992b643 Backed out changeset 82ca028b0524 (bug 1503984) for StaticPrefList failures CLOSED TREE 2018-12-18 22:06:19 +02:00
Felipe Gomes
72585dea54 Bug 1503984 - Add a pref to block chrome code from accessing content subframes. r=nika
The pref dom.chrome_frame_access.enabled will default to true. When false, it will block various methods that chrome code can use to traverse subframes. The initial list is:
  iframe.contentWindow
  iframe.contentDocument
  window.top
  window.parent
  window.opener
  window.frames[i]
  window.frames.length
  MessageEvent.source

More blocks are likely to be added in the future.

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

--HG--
extra : moz-landing-system : lando
2018-12-18 18:53:24 +00:00
Jan de Mooij
618fd67694 Bug 1512655 part 3 - Fix assertion in Cu.permitCPOWsInScope and ensure test globals that use it are in a separate compartment. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D14780

--HG--
extra : moz-landing-system : lando
2018-12-18 18:42:56 +00:00
Jan de Mooij
7fa54ccf51 Bug 1512655 part 2 - Assert Cu.setWantXrays is never called on system-principal scopes. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D14695

--HG--
extra : moz-landing-system : lando
2018-12-18 18:42:28 +00:00
Jan de Mooij
84fe725407 Bug 1512655 part 1 - Move forcePermissiveCOWs from CompartmentPrivate to RealmPrivate. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D14694

--HG--
extra : moz-landing-system : lando
2018-12-18 18:39:04 +00:00
shindli
3841c4f8cd Backed out 3 changesets (bug 1512655) for bustages in s/xpconnect/src/XPCComponents.cpp:2001 CLOSED TREE
Backed out changeset 2593c7d67f51 (bug 1512655)
Backed out changeset da21d7e91e19 (bug 1512655)
Backed out changeset ccb15a086148 (bug 1512655)
2018-12-18 14:55:53 +02:00
Jan de Mooij
76238bc575 Bug 1512655 part 3 - Fix assertion in Cu.permitCPOWsInScope and ensure test globals that use it are in a separate compartment. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D14780

--HG--
extra : moz-landing-system : lando
2018-12-18 00:31:08 +00:00
Jan de Mooij
a2a91d4831 Bug 1512655 part 2 - Assert Cu.setWantXrays is never called on system-principal scopes. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D14695

--HG--
extra : moz-landing-system : lando
2018-12-17 20:38:59 +00:00
Jan de Mooij
111454f4a4 Bug 1512655 part 1 - Move forcePermissiveCOWs from CompartmentPrivate to RealmPrivate. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D14694

--HG--
extra : moz-landing-system : lando
2018-12-17 20:38:11 +00:00
Kris Maglione
3e8d266e8a Bug 1513366: Part 1 - Add do_ImportModule helper for importing JS modules. r=mccr8
This helper makes it considerably easier for C++ code to import a JS module
and wrap it in an appropriately-defined XPIDL interface for its exports.
Typical usage is something like:

Foo.jsm:

  var EXPORTED_SYMBOLS = ["foo"];

  function foo(bar) {
    return bar.toString();
  }

mozIFoo.idl:

  interface mozIFoo : nsISupports {
    AString foo(double meh);
  }

Thing.cpp:

  nsCOMPtr<mozIFoo> foo = do_ImportModule(
    "resource://meh/Foo.jsm");

  MOZ_TRY(foo->Foo(42));

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

--HG--
extra : rebase_source : 4d518205b173fc210908235b42ddace590e6b7e5
2018-12-11 13:28:20 -08:00
Jan de Mooij
a87026ec12 Bug 1512029 part 2 - Some CompartmentPrivate changes for same-compartment realms. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D14253

--HG--
extra : moz-landing-system : lando
2018-12-16 14:59:50 +00:00
Jan de Mooij
cccc414b7a Bug 1512029 part 1 - Stop calling JS_GetCompartmentPrincipals for system compartments. r=bzbarsky
Because it release-asserts the compartment has a single realm.

I also renamed JS_GetCompartmentPrincipals to JS_DeprecatedGetCompartmentPrincipals
to discourage people from using it.

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

--HG--
extra : moz-landing-system : lando
2018-12-16 14:59:46 +00:00
Boris Zbarsky
771d1e342c Bug 1514261. Skip messing around with compartments in FunctionForwarder if the forwarder is already same-compartment with the underlying callee. r=bholley 2018-12-16 00:13:53 -05:00
Steve Fink
10953d54c2 Bug 1513108 - Remove the separate class extension hook for getting a weakmap key delegate, r=jonco
Replace with just unwrapping the key, since there are no users that return anything else for a delegate.

--HG--
extra : rebase_source : e72b825121ca3493364c9347f65e5dddd1ef53e0
2018-12-07 14:38:01 -08:00
Yoshi Cheng-Hao Huang
ad67f7c11b Bug 1475896 - Add telemetry for GC marking rate. r=jonco, data-review=chutten 2018-12-14 17:10:10 +01:00
Jon Coppeard
6f81506124 Bug 1463462 - Make gray marking assertions call a JSAPI function r=sfink 2018-12-06 16:28:10 -05:00
Cameron Kaiser
93af8a88e6 Bug 1512162: Followup: narrow non-stack-protected window for XPConnect on ppc64le. r=bhollley 2018-12-13 09:14:53 -08:00
André Bargull
03b1b37a9f Bug 1435829 - Part 5: Update xray tests for RegExp.prototype. r=peterv 2018-12-13 08:18:45 -08:00
Cameron Kaiser
fd32b3a6fa Bug 1512162: Disable stack protection for a portion of XPConnect on ppc64le due to a compiler bug. r=bholley 2018-12-12 18:52:08 -08:00
Jan de Mooij
eee34e39b3 Bug 1513277 part 2 - Use the scripted caller's global in mozJSComponentLoader::FindTargetObject. r=kmag
We have a few places where C++ calls ChromeUtils::Import directly.
I fixed these to pass the target object directly instead of an empty Optional<>.

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

--HG--
extra : moz-landing-system : lando
2018-12-12 21:30:04 +00:00
Jan de Mooij
0326f72625 Bug 1513277 part 1 - Use the scripted caller's global in Cu.importGlobalProperties. r=kmag
With same-compartment-realms enabled we can call a cross-realm Cu.importGlobalProperties
and we ended up defining properties on the wrong global.

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

--HG--
extra : moz-landing-system : lando
2018-12-12 21:03:18 +00:00
Jan de Mooij
ad8a2a6f1e Bug 1512396 - Stop using exclusive expandos for xrays in system-principal sandboxes. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D14250

--HG--
extra : moz-landing-system : lando
2018-12-12 20:16:56 +00:00
Jan de Mooij
b8a316aca4 Bug 1512260 - Make wrapper nuking work with a target realm instead of target compartment. r=kmag
For *incoming* wrappers this preserves behavior. We nuke *outgoing* wrappers
when all realms in the compartment have been nuked. To implement this I moved
the wasNuked flag from XPConnect to JS::Compartment as nukedOutgoingWrappers and
to JS::Realm as nukedIncomingWrappers.

The code to create a dead wrapper in the nuked compartment/realm case was also
moved into the JS engine. I added a shell test for it.

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

--HG--
extra : moz-landing-system : lando
2018-12-12 08:02:30 +00:00
Ciure Andrei
12adcc1edd Backed out changeset a8dd01db9f92 (bug 1512260) requsted by owner (missing test) CLOSED TREE 2018-12-12 09:14:53 +02:00
Jan de Mooij
89da963b10 Bug 1512260 - Make wrapper nuking work with a target realm instead of target compartment. r=kmag
For *incoming* wrappers this preserves behavior. We nuke *outgoing* wrappers
when all realms in the compartment have been nuked. To implement this I moved
the wasNuked flag from XPConnect to JS::Compartment as nukedOutgoingWrappers and
to JS::Realm as nukedIncomingWrappers.

The code to create a dead wrapper in the nuked compartment/realm case was also
moved into the JS engine. I added a shell test for it.

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

--HG--
extra : moz-landing-system : lando
2018-12-12 06:39:38 +00:00
Jeff Walden
da31bae9c2 Bug 1492937 - Make mozIJSSubScriptLoader.loadSubScriptWithOptions interpret script data only as UTF-8, without any way to use another charset. r=kmag
--HG--
extra : rebase_source : ffcc1599cf68c007f875c99f20660961a447e966
2018-12-08 18:14:27 -05:00
Jeff Walden
e5132ffa4b Bug 1492932 - Load JS components and modules as UTF-8, not as Latin-1. r=kmag
--HG--
extra : rebase_source : d09627655e9c72e674356e996f936ec65a80b6f0
2018-12-04 17:01:06 -05:00
Jan de Mooij
b9ac626c2a Bug 1512718 - Do a realm check instead of compartment check in mozJSSubScriptLoader::DoLoadSubScriptWithOptions. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D13996

--HG--
extra : moz-landing-system : lando
2018-12-08 16:35:06 +00:00
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
Kris Maglione
f5e4ac7e08 Bug 1356412: Part 1 - Remove subscript loader path mangling. r=mccr8
This was only ever useful before we had compartment-based security isolation.
Now it is just a pervasive nuisance.

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

--HG--
extra : rebase_source : 9af37bbd959b2db3d7a6c5ac723a474c47676f79
2018-11-02 14:45:12 -07:00
Jay Lim
c5caa76288 Bug 1472212 - Load http://example.org/ instead of about:home for some tests. r=Gijs
These tests were timing out because `about:home` now runs in a different process.
Since these two tests aim to test something else (e.g. window leaks when
navigating between pages), we will redirect to a URL that loads in the same
process instead of `about:home` to avoid adding extra conditions for the
process flip.

See Bug 1336811 and Bug 1242643.

MozReview-Commit-ID: G0rhfA973R9

--HG--
extra : source : a28443371b944ee00b1267dd5b9a22da6d28353b
extra : intermediate-source : 7b7fa6ab2229e358666d0b0855adcfe6bd8199c4
extra : histedit_source : 6dae3cdd2834fc39ba547520cc6016ce4496cc08
2018-07-20 18:49:59 -04:00
Ciure Andrei
60ea98ca60 Backed out 10 changesets (bug 1501044, bug 1472212) for fetch-destination.https.html perma failure CLOSED TREE
Backed out changeset aa35078cabaa (bug 1472212)
Backed out changeset bf02793f802d (bug 1472212)
Backed out changeset 95a7ef6102a6 (bug 1472212)
Backed out changeset 7b7fa6ab2229 (bug 1472212)
Backed out changeset 4fe4ec18f2f3 (bug 1472212)
Backed out changeset 18f824674b76 (bug 1472212)
Backed out changeset 1978a7837502 (bug 1472212)
Backed out changeset 21a6f1a83c73 (bug 1472212)
Backed out changeset 48242d39d532 (bug 1472212)
Backed out changeset 0b5cf2f4305a (bug 1501044)
2018-10-30 23:31:10 +02:00
Jay Lim
492c6f6d69 Bug 1472212 - Load http://example.org/ instead of about:home for some tests. r=Gijs
These tests were timing out because `about:home` now runs in a different process.
Since these two tests aim to test something else (e.g. window leaks when
navigating between pages), we will redirect to a URL that loads in the same
process instead of `about:home` to avoid adding extra conditions for the
process flip.

See Bug 1336811 and Bug 1242643.

MozReview-Commit-ID: G0rhfA973R9

--HG--
extra : rebase_source : 158eb53174faa028edeebaf5970c123ba359a3e5
extra : intermediate-source : ebdca743668ce014c1cb9adfa00c1220256d357c
extra : source : a28443371b944ee00b1267dd5b9a22da6d28353b
2018-07-20 18:49:59 -04:00
Csoregi Natalia
cc313f779c Backed out 9 changesets (bug 1472212) for browser-chrome tests run issues on Linux x64 asan and failures on browser_ext_windows_create_tabId.js. CLOSED TREE
Backed out changeset 18e46df44cd1 (bug 1472212)
Backed out changeset 2e5de66c1f60 (bug 1472212)
Backed out changeset b94f9883aef0 (bug 1472212)
Backed out changeset ebdca743668c (bug 1472212)
Backed out changeset f8a06d01437e (bug 1472212)
Backed out changeset b6996abc7d90 (bug 1472212)
Backed out changeset 24c257cd18c3 (bug 1472212)
Backed out changeset 176f3ee14e67 (bug 1472212)
Backed out changeset b4baa63e5b1b (bug 1472212)
2018-10-30 01:58:21 +02:00
Jay Lim
6c7fa4ca02 Bug 1472212 - Load http://example.org/ instead of about:home for some tests. r=Gijs
These tests were timing out because `about:home` now runs in a different process.
Since these two tests aim to test something else (e.g. window leaks when
navigating between pages), we will redirect to a URL that loads in the same
process instead of `about:home` to avoid adding extra conditions for the
process flip.

See Bug 1336811 and Bug 1242643.

MozReview-Commit-ID: G0rhfA973R9

--HG--
extra : rebase_source : 614b8f5ac2a3ae9a1027c989d37aeba1026f886a
extra : source : a28443371b944ee00b1267dd5b9a22da6d28353b
2018-07-20 18:49:59 -04:00
Sebastian Hengst
06798ac084 Bug 1501644 - Update test to check if content sees shimmed window.controllers in beta and release r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D9896

--HG--
extra : moz-landing-system : lando
2018-10-26 15:57:01 +00:00
Daniel Varga
ef1b6f6269 Merge mozilla-central to mozilla-inbound. a=merge 2018-10-25 19:20:33 +03:00
Nika Layzell
84828b5af3 Bug 1501124 - Switch BackstagePass to use WebIDLGlobalNameHash, r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D9736
2018-10-25 10:24:36 -04:00
Nika Layzell
7059a8ac77 Bug 1501910 - Pass enumerableOnly into nsIXPCScriptable::NewEnumerate, r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D9749
2018-10-25 10:24:36 -04:00
Adrian Wielgosik
e73a2f3566 Bug 1480245, part 5 - Clean up some uses of nsXPTInterfaceInfo::GetMethodInfo. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D9647

--HG--
extra : moz-landing-system : lando
2018-10-25 09:54:30 +00:00
Adrian Wielgosik
d4785563da Bug 1480245, part 4 - Remove always-true nsXPTInterfaceInfo::IsScriptable(). r=nika
Differential Revision: https://phabricator.services.mozilla.com/D9646

--HG--
extra : moz-landing-system : lando
2018-10-25 09:55:05 +00:00
Adrian Wielgosik
d0b8c2be2e Bug 1480245, part 2 - Stop storing a copy of interface name in nsXPCWrappedJSClass. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D9644

--HG--
extra : moz-landing-system : lando
2018-10-24 17:39:17 +00:00
Adrian Wielgosik
e6326985f3 Bug 1480245, part 1 - Remove compatibility methods from nsXPTInterfaceInfo. r=nika
I left GetMethodInfo, GetConstant as they are still useful as separate methods.

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

--HG--
extra : moz-landing-system : lando
2018-10-25 09:56:26 +00:00
Andrew McCreight
9978e851df Bug 1492584, part 3 - Remove JS component loader registration. r=kmag
After the previous patches, we no longer rely on the component manager
to incidentally start up XPConnect when we load the JS loader service
or to hold the JS component loader alive, so the do_GetService() call
for the JS loader in XPCOMInit.cpp can be removed. After that is done,
the JS loader is no longer used as an XPCOM component, so all of the
boilerplate for that can be removed.

Depends on D8757

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

--HG--
extra : moz-landing-system : lando
2018-10-23 23:20:38 +00:00
Andrew McCreight
a3164a8def Bug 1492584, part 2 - Make mozJSComponentLoader::sSelf a strong reference. r=kmag
The JS component loader is an XPCOM component, so it is held alive by
the component manager. In order to be able to make it no longer be an
XPCOM component, we have to keep it alive some other way. I decided to
simply keep it alive as long as XPConnect itself is alive.

Depends on D9583

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

--HG--
extra : moz-landing-system : lando
2018-10-23 23:19:34 +00:00
Andrew McCreight
c87fb5b0a9 Bug 1499865 - Make loadedModules and loadedComponents into array attributes. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D9561

--HG--
extra : moz-landing-system : lando
2018-10-23 23:28:44 +00:00
Julian Descottes
2fcd6cb020 Bug 1499096 - Update tests using ok() to is();r=Standard8
This changeset updates all the test that were wrongly using ok() and wanted to
use is() AND for which the assert is still passing without any modification
required.

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

--HG--
extra : moz-landing-system : lando
2018-10-23 07:12:23 +00:00
Andrew McCreight
0ee66a7f4f Bug 1497707, part 5 - Inline mozilla::ModuleLoader into mozJSComponentLoader. r=froydnj
Now that the XPCOM component loader infrastructure has stopped
pretending to support other file extensions, this intermediate
interface is no longer needed.

Depends on D8171

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

--HG--
extra : moz-landing-system : lando
2018-10-23 00:46:49 +00:00
Andrew McCreight
f7cab62df4 Bug 1497707, part 4 - Only support loading JS files in the component manager. r=froydnj
JS is the only file extension actually supported, and there are a few
layers of cruft that can be eliminated if we specialize it.

This eliminates one XPCOM registration of the JS component loader.

Depends on D8170

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

--HG--
extra : moz-landing-system : lando
2018-10-23 00:47:38 +00:00
Andrew McCreight
4c274219f8 Bug 1497707, part 1 - Get rid of xpcIJSModuleLoader. r=kmag
This interface is only used for a few testing functions. Just move
them to Cu.

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

--HG--
extra : moz-landing-system : lando
2018-10-23 00:47:16 +00:00
Masatoshi Kimura
f38cdcfbf1 Bug 1496179 - Make mozglue.dll a private SxS assembly. r=aklotz,froydnj
SxS assemblies do not obey the usual DLL search order. It will make it possible
to load mozglue.dll from appdir even if the PreferSystem32Images mitigation is
enabled and System32 has a random mozglue.dll.
2018-10-10 22:57:53 +09:00
Andrew McCreight
2df0136940 Bug 1498404 - Fix some errors in manifests r=froydnj
In FxAccountsComponents.manifest, the previous line registers the
component CID, but only for the main process. This means we hit an
error while parsing the manifest in the child process, because the CID
is not recognized. The fix is simply to not try to use the CID to
register the contract in the child process.

As for the rest of the changes, since bug 1438688, XPT information is
compiled into the Firefox binary, so the interfaces manifest entry is
no longer needed. This patch removes instances of this line from
manifest files. This makes some manifest files empty, so the patch
also removes the now-empty files.

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

--HG--
extra : moz-landing-system : lando
2018-10-16 13:26:23 +00:00
Dorel Luca
451e26f0c6 Backed out changeset 8d7987ea4fb1 (bug 1490257) for causing android failures. CLOSED TREE 2018-10-15 14:39:00 +03:00
vinoth
7b887cfbbc Bug 1498885 - Assertion added in ContentSecurityPolicyPermitsJSAction() to not allow eval with SystemPrincipal r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D8683

--HG--
extra : moz-landing-system : lando
2018-10-15 08:02:04 +00:00
Jonathan Kingston
8bcd10a7ab Bug 1490257 - Add asserts and remove implied system triggering principal code r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D8368

--HG--
extra : moz-landing-system : lando
2018-10-15 06:29:45 +00:00
Sylvestre Ledru
dd5741407b Bug 1498586 - Add clang-format off to avoid the reformatting of the data structures r=Ehsan
Too hard/impossible for the tool to format correctly these structs

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

--HG--
extra : moz-landing-system : lando
2018-10-12 20:48:24 +00:00
Andrew McCreight
53217795fe Bug 1493237 - Use a test-only non-nsISupports wrapper cached WebIDL class in a weak map test r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D8134

--HG--
extra : moz-landing-system : lando
2018-10-11 23:02:10 +00:00
Andrew McCreight
59038534b1 Bug 1497342, part 3 - Turn some WeakMap chrome mochitests into plain mochitests r=bzbarsky
This only requires changing the surrounding test boilerplate and using
SpecialPowers to access chrome-privileged functions.

Depends on D8132

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

--HG--
extra : moz-landing-system : lando
2018-10-10 17:35:56 +00:00
Andrew McCreight
397f9ae888 Bug 1497342, part 2 - Move some weak map tests r=bzbarsky
This patch moves some Chrome mochitests into the plain mochitest
directory, in order to try to preserve the history. It also removes
them from the list of tests. The next patch will fix the tests and
start running them again.

Depends on D8131

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

--HG--
rename : js/xpconnect/tests/chrome/test_getweakmapkeys.xul => js/xpconnect/tests/mochitest/test_getweakmapkeys.html
rename : js/xpconnect/tests/chrome/test_paris_weakmap_keys.xul => js/xpconnect/tests/mochitest/test_paris_weakmap_keys.html
rename : js/xpconnect/tests/chrome/test_weakmaps.xul => js/xpconnect/tests/mochitest/test_weakmaps.html
extra : moz-landing-system : lando
2018-10-10 17:35:54 +00:00
Gurzau Raul
fa37566219 Merge inbound to mozilla-central. a=merge 2018-10-10 07:35:14 +03:00
Kris Maglione
c0ccca38cd Bug 1455637: Use RefPtr rather than nsCOMPtr to avoid data race. r=mccr8
getter_AddRefs for nsCOMPtr does an AssertNoQueryNeeded check when its
temporary is destroyed. For the mReaderThread, this happens at a time when
control of the member variable has been handed over to the reader thread,
which causes a data race in the query needed check when the reader thread
shuts itself down and clears the member.

Switching to RefPtr solves this problem by removing the unnecessary check.

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

--HG--
extra : rebase_source : 0532d152b6be57451e5729bf6b72e2056f3ed300
2018-10-09 13:22:28 -07:00
Andrew McCreight
8739b376bd Bug 1490507, part 2 - Fix up the comment about double wrapping r=bholley
Depends on D5690

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

--HG--
extra : moz-landing-system : lando
2018-10-09 21:14:39 +00:00
Andrew McCreight
ddf48a298f Bug 1490507, part 1 - Remove nsIXPCWrappedJSObjectGetter and move the comment r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D5690

--HG--
extra : moz-landing-system : lando
2018-10-09 21:14:37 +00:00
Csoregi Natalia
9d55d83f31 Merge inbound to mozilla-central. a=merge 2018-10-05 01:29:38 +03:00
Brian Hackett
d905141ac5 Bug 1495272 Part 2 - Use DeferredFinalize in SweepTearOffs when recording/replaying, r=smaug.
--HG--
extra : rebase_source : 829a3dea58f123893c591c05795fd6b4f4bba0e9
2018-10-03 15:03:37 -10:00
Narcis Beleuzu
b9b1c8ff17 Merge inbound to mozilla-central. a=merge 2018-10-04 18:48:04 +03:00
Jon Coppeard
6c612a4a15 Backed out changeset ba122021b8b5 (bug 1481196) 2018-10-04 11:50:55 +01:00
Andrew Creskey
00474fc9c9 Bug 1495431 Expose baseline and ion JIT warm up threshold options to preferences, about:config r=nbp
JIT warmup options were exposed to preferences to facilitate experimentation/optimization.

The baseline and ion warm up thresholds had already been exposed through JSAPI, just needed to read from Preferences.

The ion JitOption, frequentBailoutThreshold, was also exposed to JSAPI and Preferences.

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

--HG--
extra : moz-landing-system : lando
2018-10-03 19:23:54 +00:00
Narcis Beleuzu
de85cdbfc7 Merge mozilla-central to autoland. CLOSED TREE 2018-10-04 18:58:42 +03:00
Henrik Skupin
2141453224 Bug 1433905 - Temporarily disable test_loader_global_sharing.py for opt/pgo builds on Windows. r=gbrown
Marionette currently doesn't handle restarts of Firefox that well,
and as such needs a fix on bug 1433873. Sadly this patch cannot be
landed until the mozprocess issues on bug 1433905 have been fixed.

This patch temporarily disables the test for opt/pgo Windows builds
only. Re-enabling is tracked via bug 1495667.

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

--HG--
extra : moz-landing-system : lando
2018-10-04 10:48:07 +00:00
Andrew McCreight
5cbe1e4d48 Bug 1495820 - Inline do_QueryWrappedNative() r=bzbarsky
This method does very little, and is called in only a few places, so
just inline it. The error variant is not called at all. Simplifying
this makes it easier for me to change do_QueryInterface.

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

--HG--
extra : moz-landing-system : lando
2018-10-03 21:40:26 +00:00
Brendan Dahl
856ed80bda Bug 1461798 - Migrate <tooltip> to a C++ implementation. r=smaug
Move the implementation of the XBL tooltip to C++ so the element can safely
be created during native anonymous content creation. The 'mouseover' and
'mouseout' event handlers were not moved as they appear to be legacy code
that is no longer needed.

A number of tests started perma-failing after this patch. Most failures
were caused by a timing change where plugins sometimes load after the
document "load" event. Many of the failures had intermittents associated
with them and the tests were not waiting for plugins to load before
starting. The test "test_weakmap_keys_preserved2.xul" had a bug where it
was possible for it to finish before all the tests were run.

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

--HG--
extra : moz-landing-system : lando
2018-10-03 20:42:19 +00:00
Lina Cambridge
a21adc384b Bug 1495723 - Add support for importing extra symbols to defineLazyGlobalGetters. r=kmag
Some global imports, like `fetch`, expose multiple symbols. This patch
ensures we can define lazy getters for those symbols, by mapping the
extra symbol name to the main import name.

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

--HG--
extra : moz-landing-system : lando
2018-10-02 20:10:04 +00:00