Commit Graph

4377 Commits

Author SHA1 Message Date
Kris Maglione
faa8815613 Bug 1356334: Part 3 - Enforce a stricter slow script timeout for extension content scripts. r=billm
MozReview-Commit-ID: LLvPQn1x1Xj

--HG--
extra : source : 805c568069301ae91ead5780cdc118af73907229
extra : histedit_source : b188836d1dc3ad8021bf2d0b1c89aebedf2db185%2C8c7b51c9f4af4eb5ad67811c29b56c72b43fa31d
2017-08-18 11:04:55 -07:00
Ryan VanderMeulen
3fe1f45009 Backed out 8 changesets (bug 1356334) for frequent test_ext_contentscript_async_loading.html failures on Android debug on a CLOSED TREE.
Backed out changeset 9c677ebfdda0 (bug 1356334)
Backed out changeset 16b49fd1c38a (bug 1356334)
Backed out changeset 4f5bcd2b2dc6 (bug 1356334)
Backed out changeset d832803270ac (bug 1356334)
Backed out changeset b83aea215a82 (bug 1356334)
Backed out changeset b2a663ffd144 (bug 1356334)
Backed out changeset 805c56806930 (bug 1356334)
Backed out changeset 7c880eca810a (bug 1356334)
2017-08-18 11:32:18 -04:00
Ryan VanderMeulen
24c9581b48 Backed out changeset fbf0e8609abb (bug 1390428) for Windows clipboard test failures on a CLOSED TREE. 2017-08-18 10:58:47 -04:00
Lars T Hansen
1783392f5e Bug 1277562 - Part 16b: Implement javascript.options.wasm_ionjit. r=billm
--HG--
extra : rebase_source : 6956d4002670590667f83cf9f5f6a2f82df6ba84
2017-06-29 15:37:01 -07:00
Lars T Hansen
16a023dd8a Bug 1277562 - Part 5a: Change the meaning of the wasm-baseline switch. r=luke
--HG--
extra : rebase_source : 793eacb33d1901565d2b7b2e84501cc8917a4149
extra : source : 392b626dc954766ac5a077f4cad7ab489fd907aa
2017-02-02 13:22:40 +01:00
Nicholas Nethercote
5241bea863 Bug 1390428 (part 2) - Remove more nsXPIDLCString local variables. r=erahm.
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is used in ways that rely on the implicit conversion
to |char*|. The patch uses get() and EqualsLiteral() calls to replace the
implicit conversions.
2017-08-16 13:58:55 +10:00
Kris Maglione
bdbbf869dd Bug 1356334: Part 6 - Allow completely terminating a slow content script sandbox. r=billm
MozReview-Commit-ID: 5CDLHrAeuDt

--HG--
extra : rebase_source : 00f75b5be53e38d912b90b8fe777c5aa7ff135bf
2017-04-16 14:01:16 -07:00
Kris Maglione
2c6fe4f014 Bug 1356334: Part 5 - Add add-on name to slow script messages. r=billm
MozReview-Commit-ID: 2nyDmoiBKp4

--HG--
extra : rebase_source : 311d9ad486210e6d5fa3a06bb837d3597b9d2800
2017-08-11 22:11:25 -07:00
Kris Maglione
b23753e90d Bug 1356334: Part 3 - Enforce a stricter slow script timeout for extension content scripts. r=billm
MozReview-Commit-ID: LLvPQn1x1Xj

--HG--
extra : rebase_source : d2b85e92c00faef8664b036be6236dd109074af4
2017-08-11 21:30:54 -07:00
Nicholas Nethercote
025461bde7 Bug 1390428 (part 1) - Remove many nsXPIDLCString local variables. r=erahm.
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is only used in ways that nsCStrings can also be used
(i.e. no null checks or implicit conversions to |char*|).

In every case the patch trivially replaces the nsXPIDLCString with an
nsCString. (Also, there are a couple of unused nsXPIDLCString variables that
the patch simply removes.)
2017-08-16 13:58:35 +10:00
Carsten "Tomcat" Book
eea1986e03 merge mozilla-inbound to mozilla-central a=merge 2017-08-16 11:23:24 +02:00
Jan de Mooij
9a7bf50e92 Bug 1390159 - Remove throw-on-set setProperty hooks on WrappedNatives. r=mrbkap 2017-08-16 09:01:56 +02:00
Jan de Mooij
503f557cde Bug 1390471 - Remove xpcshell's environment object. r=bholley 2017-08-16 09:00:44 +02:00
Masatoshi Kimura
43dd1b22af Bug 1390106 - Stop using versioned scripts in js/xpconnect. r=mccr8
MozReview-Commit-ID: LP7bXQd7ahD

--HG--
extra : rebase_source : b0d3b9052d333698dbb1e6e6a0da9556fe60a91b
2017-08-14 20:45:14 +09:00
Bill McCloskey
268004b056 Bug 1382172 - Compute names for all JS-implemented XPCOM objects (r=mrbkap)
MozReview-Commit-ID: 4kPbqOpGYnq
2017-08-14 22:42:42 -07:00
Phil Ringnalda
6bfeb0577d Backed out changeset c0c52209c8f2 (bug 1382172) for static build bustage
CLOSED TREE

MozReview-Commit-ID: 9GzjXjoIrp5
2017-08-14 22:23:57 -07:00
Kris Maglione
7da155b917 Bug 1389847: Don't add caller location to sandbox name if an explicit name is provided. r=krizsa
MozReview-Commit-ID: KOGrrMurs6X

--HG--
extra : rebase_source : ec9bae4b7a40f7916a813905346f124e62516b9a
2017-08-12 16:01:00 -07:00
Bill McCloskey
96944ff355 Bug 1382172 - Compute names for all JS-implemented XPCOM objects (r=mrbkap)
MozReview-Commit-ID: 4kPbqOpGYnq
2017-08-14 21:10:14 -07:00
Nicholas Nethercote
57c26c9834 Bug 1387956 - Overhaul ComputedValues measurement, and add style structs measurement. r=bholley.
This patch moves measurement of ComputedValues objects from Rust to C++.
Measurement now happens (a) via DOM elements and (b) remaining elements via
the frame tree. Likewise for the style structs hanging off ComputedValues
objects.

Here is an example of the output.

> ├──27,600,448 B (26.49%) -- active/window(https://en.wikipedia.org/wiki/Barack_Obama)
> │  ├──12,772,544 B (12.26%) -- layout
> │  │  ├───4,483,744 B (04.30%) -- frames
> │  │  │   ├──1,653,552 B (01.59%) ── nsInlineFrame
> │  │  │   ├──1,415,760 B (01.36%) ── nsTextFrame
> │  │  │   ├────431,376 B (00.41%) ── nsBlockFrame
> │  │  │   ├────340,560 B (00.33%) ── nsHTMLScrollFrame
> │  │  │   ├────302,544 B (00.29%) ── nsContinuingTextFrame
> │  │  │   ├────156,408 B (00.15%) ── nsBulletFrame
> │  │  │   ├─────73,024 B (00.07%) ── nsPlaceholderFrame
> │  │  │   ├─────27,656 B (00.03%) ── sundries
> │  │  │   ├─────23,520 B (00.02%) ── nsTableCellFrame
> │  │  │   ├─────16,704 B (00.02%) ── nsImageFrame
> │  │  │   ├─────15,488 B (00.01%) ── nsTableRowFrame
> │  │  │   ├─────13,776 B (00.01%) ── nsTableColFrame
> │  │  │   └─────13,376 B (00.01%) ── nsTableFrame
> │  │  ├───3,412,192 B (03.28%) -- servo-style-structs
> │  │  │   ├──1,288,224 B (01.24%) ── Display
> │  │  │   ├────742,400 B (00.71%) ── Position
> │  │  │   ├────308,736 B (00.30%) ── Font
> │  │  │   ├────226,512 B (00.22%) ── Background
> │  │  │   ├────218,304 B (00.21%) ── TextReset
> │  │  │   ├────214,896 B (00.21%) ── Text
> │  │  │   ├────130,560 B (00.13%) ── Border
> │  │  │   ├─────81,408 B (00.08%) ── UIReset
> │  │  │   ├─────61,440 B (00.06%) ── Padding
> │  │  │   ├─────38,176 B (00.04%) ── UserInterface
> │  │  │   ├─────29,232 B (00.03%) ── Margin
> │  │  │   ├─────21,824 B (00.02%) ── sundries
> │  │  │   ├─────20,080 B (00.02%) ── Color
> │  │  │   ├─────20,080 B (00.02%) ── Column
> │  │  │   └─────10,320 B (00.01%) ── Effects
> │  │  ├───2,227,680 B (02.14%) -- computed-values
> │  │  │   ├──1,182,928 B (01.14%) ── non-dom
> │  │  │   └──1,044,752 B (01.00%) ── dom
> │  │  ├───1,500,016 B (01.44%) ── text-runs
> │  │  ├─────492,640 B (00.47%) ── line-boxes
> │  │  ├─────326,688 B (00.31%) ── frame-properties
> │  │  ├─────301,760 B (00.29%) ── pres-shell
> │  │  ├──────27,648 B (00.03%) ── pres-contexts
> │  │  └─────────176 B (00.00%) ── style-sets

The 'servo-style-structs' and 'computed-values' sub-trees are new. (Prior to
this patch, ComputedValues under DOM elements were tallied under the the
'dom/element-nodes' sub-tree, and ComputedValues not under DOM element were
ignored.) 'servo-style-structs/sundries' aggregates all the style structs that
are smaller than 8 KiB.

Other notable things done by the patch are as follows.

- It significantly changes the signatures of the methods measuring nsINode and
  its subclasses, in order to handle the tallying of style structs separately
  from element-nodes. Likewise for nsIFrame.

- It renames the 'layout/style-structs' sub-tree as
  'layout/gecko-style-structs', to clearly distinguish it from the new
  'layout/servo-style-structs' sub-tree.

- It adds some FFI functions to access various Rust-side data structures from
  C++ code.

- There is a nasty hack used twice to measure Arcs, by stepping backwards from
  an interior pointer to a base pointer. It works, but I want to replace it
  with something better eventually. The "XXX WARNING" comments have details.

- It makes DMD print a line to the console if it sees a pointer it doesn't
  recognise. This is useful for detecting when we are measuring an interior
  pointer instead of a base pointer, which is bad but easy to do when Arcs are
  involved.

- It removes the Rust code for measuring CVs, because it's now all done on the
  C++ side.

MozReview-Commit-ID: BKebACLKtCi

--HG--
extra : rebase_source : 4d9a8c6b198a0ff025b811759a6bfa9f33a260ba
2017-08-11 16:37:33 +10:00
Bobby Holley
26bc5a86f4 Bug 1378207 - Stop bypassing the Xray layer when walking the prototype chain. r=krizsa 2017-07-17 12:26:34 +02:00
Nicholas Nethercote
1a6f1a62fa Bug 1387381 - Remove nsXPIDLString local variables. r=erahm.
nsXPIDLStrings are marked as VOIDED upon initialization. Most of these local
nsXPIDLString variables are immediately set via getter_Copies(), which will
either assign a string value (using Adopt()) or do SetIsVoid(). These can be
trivially converted to nsString, which will get the same treatment.

The patch suitably converts the remaining nsXPIDLString local variable as well.

--HG--
extra : rebase_source : 5fff9f2c6844559198f601853f8db08564add7d5
2017-08-08 16:07:55 +10:00
Jason Orendorff
b3552cd3fb Bug 1363200 - JSAPI for realms: Move SetAddonCallInterposition to the CompartmentPrivate. r=bholley
--HG--
extra : rebase_source : d34087913dd18aeaf8908f4391bed14d0c6790f3
2017-06-27 08:07:27 -07:00
Jason Orendorff
4e0c34d1c3 Bug 1363200 - JSAPI for realms: JS::SetDestroyRealmCallback. r=sfink
--HG--
extra : rebase_source : ad62e332bab6c31db2c98581163b1ca5fe8103f0
extra : intermediate-source : 0f72e0175f55a309ea4bc70240347e6659174af4
extra : source : ac9c7e04c174c8b2e4ca0e533a8a2838d293f700
2017-05-23 16:35:31 -05:00
Jason Orendorff
5df09661ff Bug 1363200 - JSAPI for realms: JS_SetVersionForCompartment() -> JS::SetVersionForCurrentRealm(). r=sfink
--HG--
extra : rebase_source : 8b0d53210fe827a648251395e038cb7b9eb616e9
2017-05-22 14:40:13 -05:00
Jason Orendorff
8399e3ecd5 Bug 1363200 - JSAPI for realms: JS_SetRealmNameCallback. r=sfink
--HG--
extra : rebase_source : d0a8f51761998c80a226cb6232ce920c67689234
2017-05-22 14:09:05 -05:00
Henry Chang
af3b11c151 Bug 1375277 - New safebrowsing threat type "POTENTIALLY_HARMFUL_APPLICATION" introduced by v4. r=francois
As our threattype-listname conversion design, "goog-harmful-proto" is allocated
for this new threat type. This threat type is mainly for mobile.

MozReview-Commit-ID: G9GbgmHHHfp

--HG--
extra : rebase_source : 0681fcd9322b94451a86eafe57bf1ccc4b89db30
extra : intermediate-source : 28b0502d9add81beeae58a2c33f9fd5839d4d544
extra : source : 646f02f15131aa98ad37015b0a641304a3271796
2017-07-27 15:37:57 +08:00
Masatoshi Kimura
436186d6f8 Bug 1387791 - Remove [deprecated] Components.reportError. r=bholley
MozReview-Commit-ID: CCqFQid7ZDi

--HG--
extra : rebase_source : bce691e8a83d3a2837fbf28f44f5390aae2c2716
2017-08-06 11:04:11 +09:00
Andrew McCreight
8085e87bc3 Bug 379797 - Various dump() methods should check browser.dom.window.dump.enabled. r=krizsa
Checking this pref to avoid log spam in opt builds, in sandboxes, JS
components, and whatever uses nsFrameMessageManager's dump method.

This does mean that on Windows in an opt build when a debugger is
present a debug string will no longer be printed unless the pref is
set, but I think that is consistent with the non-Windows behavior.

MozReview-Commit-ID: FWLAzBRVhlx

--HG--
extra : rebase_source : cc5669f422729788f1ebc300d4450290913a3055
2017-08-02 11:56:33 -07:00
Andrew McCreight
5eecb0df0a Bug 1385474 - Avoid QIing for NoteXPCOMRoot. r=smaug
This callback is only used in very limited ways, so just require that
the caller pass in the canonical supports pointer, plus the
participant. This probably won't affect performance much.

MozReview-Commit-ID: CsThzFsKyYx

--HG--
extra : rebase_source : 9595b1d75fc45bc5ee6d932a840e98b5d760cb78
2017-07-28 16:11:03 -07:00
Till Schneidereit
ab76cf2fd7 Bug 1272697 - Part 2: Add runtime pref to enable streams. r=jonco,baku
MozReview-Commit-ID: FJMAxbtD3Uy
2017-07-29 16:47:12 +02:00
Sebastian Hengst
6389867b7c Backed out changeset 1d87b1dc4ce2 (bug 1272697) for failing mochitest test_interfaces.html for 'ByteLengthQueuingStrategy' and wpts, e.g. general.dedicatedworker.html. r=backout on a CLOSED TREE 2017-07-28 20:20:50 +02:00
Till Schneidereit
dec687b07c Bug 1272697 - Part 2: Add runtime pref to enable streams. r=baku,jonco
MozReview-Commit-ID: 5OSxbcd3jQB
2017-07-28 17:48:12 +02:00
Carsten "Tomcat" Book
139661e8e4 Merge mozilla-central to mozilla-inbound 2017-07-28 15:25:58 +02:00
Carsten "Tomcat" Book
892bedca2e merge mozilla-inbound to mozilla-central a=merge 2017-07-28 15:24:39 +02:00
Sylvestre Ledru
d48480a951 Bug 1384848 - Remove dead code in XPCConvert.cpp r=mrbkap
MozReview-Commit-ID: EncsNyW5Qxx
2017-07-28 14:05:27 +02:00
Sebastian Hengst
9077ac8886 Backed out changeset a57d8f30d1bf (bug 1383982) for build bustage at nsGlobalWindow.cpp:13826: 'class nsWindowSizes' has no member named 'mMallocSizeOf'. r=backout 2017-07-28 09:50:48 +02:00
Nicholas Nethercote
5c3abe8aab Bug 1383982 - Introduce a general mechanism for measuring memory usage of graph-like structures. r=erahm.
All the SizeOf{In,Ex}cludingThis() functions take a MallocSizeOf function
which measures memory blocks. This patch introduces a new type, SizeOfState,
which includes a MallocSizeOf function *and* a table of already-measured
pointers, called SeenPtrs. This gives us a general mechanism to measure
graph-like data structures, by recording which nodes have already been
measured. (This approach is used in a number of existing reporters, but not in
a uniform fashion.)

The patch also converts the window memory reporting to use SizeOfState in a lot
of places, all the way through to the measurement of Elements. This is a
precursor for bug 1383977 which will measure Stylo elements, which involve
Arcs.

The patch also converts the existing mAlreadyMeasuredOrphanTrees table in the
OrphanReporter to use the new mechanism.

--HG--
extra : rebase_source : 2c23285f8b6c3b667560a9d14014efc4633aed51
2017-07-28 15:03:44 +10:00
Nicholas Nethercote
49eb219ff5 Bug 1383982 (attempt 2) - Introduce a general mechanism for measuring memory usage of graph-like structures. r=erahm.
--HG--
extra : rebase_source : 7075f9570a4262158351ce9ac3ca8360ea4d5394
2017-07-28 20:10:04 +10:00
Sylvestre Ledru
a4376d5dd4 Bug 1384848 - Remove dead code in XPCConvert.cpp r=mrbkap
MozReview-Commit-ID: D6kCUtqfIwo

--HG--
extra : rebase_source : 539ce1a925fa42b74007189708287ee74324261a
2017-07-27 09:43:06 +02:00
Julian Seward
408d24da56 Bug 1382563 - Remove ns*String::AssignWithConversion. r=erahm.
This patch replaces four functions of the name AssignWithConversion which
are essentially wrappers around CopyASCIItoUTF16 and LossyCopyUTF16toASCII
with direct calls to the latter two functions.  The replaced functions are:

  void nsCString::AssignWithConversion( const nsAString& aData )
  void nsString::AssignWithConversion( const nsACString& aData )

  void nsTString_CharT::AssignWithConversion(
                            const incompatible_char_type* aData,
                            int32_t aLength = -1);

The last of the three exists inside the double-included nsTString* world and
so describes two functions, giving four in total.

This has two advantages:

* it removes code

* at the call points, it makes clear (from the replacement name) which
  conversion is being carried out.  The generic name "AssignWithConversion"
  doesn't make that obvious -- one had to infer it from the types.

The patch also removes two commented out lines from
editor/composer/nsComposerCommands.cpp, that appear to be related.  They are
at top level, where they would never have compiled.  They look like
leftovers from some previous change.

--HG--
extra : rebase_source : fb47bf450771c3c9ee3341dd14520f5da69ec4f5
2017-07-24 19:23:52 +02:00
Kartikaya Gupta
ba4b3b9101 Bug 1384233 - Remove SizePrintfMacros.h. r=froydnj
We have a minimum requirement of VS 2015 for Windows builds, which supports
the z length modifier for format specifiers. So we don't need SizePrintfMacros.h
any more, and can just use %zu and friends directly everywhere.

MozReview-Commit-ID: 6s78RvPFMzv

--HG--
extra : rebase_source : 009ea39eb4dac1c927aa03e4f97d8ab673de8a0e
2017-07-26 16:03:57 -04:00
Nicholas Nethercote
53662318c9 Bug 1381727 (part 1) - Remove JS_smprintf_free(). r=sfink.
Because it's just a wrapper for js_free().

Furthermore, JS_smprintf() and friends return a JS::UniqueChars, which is also
wired up to free with js_free(). So having the indirection via
JS_smprintf_free() obfuscates things.

--HG--
extra : rebase_source : 1db80199dc801a2684fffe2a5fd5349a42c6941b
2017-07-25 09:09:23 +10:00
Olli Pettay
866053df7a Bug 1384215 - Try to run deferred deletion more likely during idle time, r=mccr8
--HG--
extra : rebase_source : 0dd6ec9641e323959a454d812a9d2f15b1d02982
2017-07-25 22:22:12 +03:00
Georg Fritzsche
09d533dae9 Bug 1366294 - Part 1 - Remove base::StatisticsRecorder. r=chutten
The Chromium IPC histogram code used the StatisticsRecorder object for storage.
This is keyed by histogram name, which doesn't match our storage reality anymore.
Instead we use a name to refer to a set of histogram instances that record data from different processes, as well as separating session and subsession data.
Consequently we need to rewrite this storage, which means StatisticsRecorder is not used anymore.

MozReview-Commit-ID: 1LC7YubpKaD
2017-07-24 09:52:26 -04:00
Wes Kocher
d45eb771f0 Merge m-c to inbound, a=merge
MozReview-Commit-ID: Ah48RzFU8Mt
2017-07-21 18:20:46 -07:00
Brian Hackett
a2b14f72a0 Bug 1355109 - Add IC for property reads on xrays, r=jandem,bz.
--HG--
extra : rebase_source : bc62ebf7f9c6fc006e95ede93087370ad7120303
2017-07-21 07:49:53 -07:00
Sebastian Hengst
838439065a Backed out changeset e3825e35e2e2 (bug 1366294) for crashing various tests with [@ TelemetryHistogram::DeInitializeGlobalState()], e.g. in bc's browser_permission_dismiss.js. r=backout on a CLOSED TREE 2017-07-21 15:21:49 +02:00
Georg Fritzsche
e6a136758b Bug 1366294 - Part 1 - Remove base::StatisticsRecorder. r=chutten
The Chromium IPC histogram code used the StatisticsRecorder object for storage.
This is keyed by histogram name, which doesn't match our storage reality anymore.
Instead we use a name to refer to a set of histogram instances that record data from different processes, as well as separating session and subsession data.
Consequently we need to rewrite this storage, which means StatisticsRecorder is not used anymore.

MozReview-Commit-ID: 1LC7YubpKaD
2017-07-21 08:41:44 -04:00
Ryan VanderMeulen
d229288071 Merge m-c to autoland. a=merge
CLOSED TREE

--HG--
extra : amend_source : 2ab51304cc7df444f22c3aac001a1aba61faee3a
2017-07-21 09:42:41 -04:00
Ehsan Akhgari
33114ba370 Bug 1382324 - Improve SpiderMonkey's pointer hashing function for pointers to neighboring memory locations; r=jandem
This is very similar to the fix to bug 1379282 for the XPCOM hashtables.
2017-07-20 12:23:07 -04:00
Andrew McCreight
51944f0ae4 Bug 1381919 - Remove most of the xpcIJSModuleLoader interface. r=kmag
People only use these methods via Cu, so remove them from this
interface. Also, ban anybody from implementing this interface in JS
(though I can't imagine anybody trying), and eliminate a variant of
mozJSComponentLoader::ImportInto that is never called.

MozReview-Commit-ID: Kok5ksXiK5a

--HG--
extra : rebase_source : ef7237953404fd1b75e8e1118b9fc4e2235ff187
2017-07-17 17:11:06 -07:00
Wes Kocher
f361e1638d Backed out 13 changesets (bug 1366294) for leaking base::Histogram::FactoryGet a=backout CLOSED TREE
Backed out changeset f2d79c13799a (bug 1366294)
Backed out changeset b722d638f6ed (bug 1366294)
Backed out changeset aee317b1445d (bug 1366294)
Backed out changeset 14f9f9521d4f (bug 1366294)
Backed out changeset beb5f00c4b19 (bug 1366294)
Backed out changeset 72635bc1ba25 (bug 1366294)
Backed out changeset c387459a798b (bug 1366294)
Backed out changeset 476daf9a5846 (bug 1366294)
Backed out changeset e7ce6a06c131 (bug 1366294)
Backed out changeset 1cc736607aab (bug 1366294)
Backed out changeset 175c3ccb0015 (bug 1366294)
Backed out changeset 96b594816a21 (bug 1366294)
Backed out changeset 57400dd449ad (bug 1366294)

MozReview-Commit-ID: J6PyVMGwJ74
2017-07-19 12:49:46 -07:00
Georg Fritzsche
2932617587 Bug 1366294 - Part 1 - Remove base::StatisticsRecorder. r=chutten
The Chromium IPC histogram code used the StatisticsRecorder object for storage.
This is keyed by histogram name, which doesn't match our storage reality anymore.
Instead we use a name to refer to a set of histogram instances that record data from different processes, as well as separating session and subsession data.
Consequently we need to rewrite this storage, which means StatisticsRecorder is not used anymore.

MozReview-Commit-ID: 1LC7YubpKaD
2017-07-19 14:26:56 -04:00
Jon Coppeard
4056892ff5 Bug 1381777 - Record how long we went over the time budget r=sfink data-r=bsmedberg 2017-07-19 09:37:18 +01:00
Ehsan Akhgari
16939c371d Bug 1379351 - Improve some of the XPConnect hash routines; r=mccr8 2017-07-19 00:08:50 -04:00
Andrew McCreight
c77f1723be Bug 1381921, part 2 - Remove nsAXPCNativeCallContext. r=mrbkap
This class is no longer used.

MozReview-Commit-ID: Lv9AAd3OjIl

--HG--
extra : rebase_source : b37abc2c70a2a08b176d0504163c246b6ff3b8cf
2017-07-18 10:42:47 -07:00
Andrew McCreight
c00d64f6c6 Bug 1381921, part 1 - Remove nsIXPConnect::CurrentNativeCallContext. r=mrbkap
It is only called in a single place, and can't be called from JS, so
inline it and eliminate it.

MozReview-Commit-ID: DWfyfoO5Zht

--HG--
extra : rebase_source : 8a44719af22a4d8724449d6225f4bdd119d648c8
2017-07-18 10:36:05 -07:00
Sebastian Hengst
f96cc8c3fe Backed out changeset 5d9a6384bf51 (bug 1378207) for frequently timing out in devtools' browser_addons_debug_webextension_popup.js and browser_addons_remove.js on Windows. r=backout 2017-07-17 17:59:14 +02:00
Bobby Holley
3d704b608a Bug 1378207 - Stop bypassing the Xray layer when walking the prototype chain. v2 r=krizsa
MozReview-Commit-ID: AR2Sta2gWRk
2017-07-17 14:31:50 +02:00
Andrew McCreight
5de8ffcbf5 Bug 1379786, part 1 - Remove dead code related to the security manager. r=mrbkap
Also, one unused include of nsIProgrammingLanguage, which is unrelated.

MozReview-Commit-ID: LJf2NSwmaYG

--HG--
extra : rebase_source : 63dfca9185535dbfa695cf2f383d81a14ce423c0
2017-07-07 15:59:29 -07:00
Marco Castelluccio
0f9d4e1985 Bug 1380665 - Define MOZ_CODE_COVERAGE for the entire tree. r=jmaher 2017-07-13 19:12:23 +02:00
Jon Coppeard
350ab58390 Bug 1380397 - Use PersistentRooted to implement XPCJSObjectHolder r=mccr8 2017-07-13 09:51:58 +01:00
Jon Coppeard
3b4db1432d Bug 1377466 - Rename PokeGC and add a reason code for GCs triggered by this r=sfink 2017-07-11 17:17:17 +01:00
Boris Zbarsky
66481a7a29 Bug 1371259 part 9. Make UnwrapReflectorToISupports return already_AddRefed<nsISupports>. r=peterv
The main reason to not do this would be performance (avoiding the
addref/release), but there are two main mitigating factors:

1)  All calls to UnwrapReflectorToISupports that pass in a Web IDL object
    already do the addref (and in fact QI).  So this only affects the
    XPCWrappedNative case.

2)  The vast majority of the callers proceed to QI on the pointer anyway, and a
    second addref is cheap; it's the first addref after a CC that can be
    expensive on a cycle-collected object.

Going through the changes one by one:

* In GlobalObject::GetAsSupports, we do have a change that slightly slows down
  precisely in the XPCWrappedNative global case.  That's the message managers
  and the backstagepass.  And this really only affects calls to Web IDL statics
  from those globals.

* In UnwrapArgImpl we're talking about a Web IDL method taking an "external
  interface" type, and the UnwrapReflectorToISupports call is immediately
  followed by QI anyway.

* In UnwrapXPConnectImpl we're talking about the case when we have a
  non-WebIDL-object implementation of a Web IDL interface.  Again, this is the
  message manager globals, for EventTarget.  And we have a QI call immediately
  after the UnwrapReflectorToISupports.

* In the generated HasInstance hook for EventTarget we will be slightly slower
  when the LHS of the instanceof is an XPCWrappedNative.  And not much slower,
  because again there's an immediate QI.

* In InstallXBLField we're never going to have an XPCWrappedNative as thisObj;
  it's always an Element in practice.  So this is no more expensive than before.

* In sandbox's GetPrincipalOrSOP we now have an extra addref.  But it was
  followed by various QIs anyway.

* In XPCConvert::JSValToXPCException we have an extra addref if someone throws
  an XPCWrappedNative, which is fairly unlikely; our actual Exception objects
  are on Web IDL bindings.  Plus we have an immediate QI.

* In xpc::HasInstance we have an extra addred if the LHS of instanceof is an
  XPCWrappedNative.  But, again, there's an immediated QI after the
  UnwrapReflectorToISupports.

* In xpcJSWeakReference::Init we are likely doing an extra addref, but again
  immediately followed by QI.

I think it's worth making this change just to remove the footgun and that the
perf impact, if any, is pretty minimal.
2017-07-10 16:05:26 -04:00
Boris Zbarsky
9cdb2834a8 Bug 1371259 part 8. Get rid of nsIXPConnect::GetNativeOfWrapper. r=peterv
Most of these changes are just replacements of GetNativeOfWrapper with
UnwrapReflectorToISupports, which is all it did under the hood.

The other changes are as follows:

* In nsDOMClassInfo, we really care whether we have a window, so we can just
  UNWRAP_OBJECT to the Window interface, since Window is always on Web IDL
  bindings now.  Also, the weird compartment check hasn't been needed ever since
  GetNativeOfWrapper stopped returning things off the passed-in object's
  prototype chain (Firefox 22, bug 658909).
* The only use of do_QueryWrapper was to get a Window in nsDocument; again we
  can UNWRAP_OBJECT.
* In XPCJSRuntime, we again just want to check for a Window, so UNWRAP_OBJECT.
2017-07-10 16:05:25 -04:00
Boris Zbarsky
c524a4da7c Bug 1371259 part 7. Root the unwrapped object in XPCConvert code. r=mccr8 2017-07-10 16:05:25 -04:00
Boris Zbarsky
fa152ffab7 Bug 1371259 part 6. Root the unwrapped object in PRE_HELPER_STUB. r=mccr8 2017-07-10 16:05:25 -04:00
Boris Zbarsky
6761a93bcb Bug 1371259 part 5. Use a safer implementation of IsFileList. r=peterv 2017-07-10 16:05:25 -04:00
Boris Zbarsky
5c76874a46 Bug 1371259 part 3. Change UnwrapObject<> and the UNWRAP_OBJECT macro to allow passing in mutable object or value handles for the thing being unwrapped, and do so at various callsites. r=peterv
I did audit all UNWRAP_OBJECT callers to make sure that the lifetimes of all the
temporary Rooted or the RefPtrs they unwrap into are long enough.
2017-07-10 16:05:24 -04:00
Jan de Mooij
db3fda15b3 Bug 1378740 - Share RegExpShareds across compartments within a zone. r=jonco 2017-07-06 16:40:39 +02:00
Jan de Mooij
53de04c6f6 Bug 1375505 part 1 - Change iterator code to return JSObject* instead of returning bool + outparam. r=evilpie 2017-06-28 21:00:43 -07:00
Nathan Froyd
21dd68cb9e Bug 1376649 - extend lifetime of xpcshell's directory provider; r=ting
xpcshell has a custom directory provider that is passed in when XPCOM is
initialized.  XPCOM holds a reference to this directory provider, and
said reference is not released until XPCOM is shutdown.  Unfortunately,
the lifetime of the directory provider was not scoped properly, so it
would actually be destructed prior to shutting down XPCOM, resulting in
a stack use-after-free.

To avoid this problem, we need to move the provider so that its lifetime
outlives the call to both XPCOM init and shutdown.
2017-06-27 16:12:21 -04:00
Bill McCloskey
f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Jan de Mooij
17f7476bee Bug 627220 part 1 - Remove unused Zone* argument from external string finalizers. r=sfink 2017-06-26 10:23:50 -07:00
Nicholas Nethercote
58786e1ea7 Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange.
This patch makes the following changes to the macros.

- Removes PROFILER_LABEL_FUNC. It's only suitable for use in functions outside
  classes, due to PROFILER_FUNCTION_NAME not getting class names, and it was
  mostly misused.

- Removes PROFILER_FUNCTION_NAME. It's no longer used, and __func__ is
  universally available now anyway.

- Combines the first two string literal arguments of PROFILER_LABEL and
  PROFILER_LABEL_DYNAMIC into a single argument. There was no good reason for
  them to be separate, and it forced a '::' in the label, which isn't always
  appropriate. Also, the meaning of the "name_space" argument was interpreted
  in an interesting variety of ways.

- Adds an "AUTO_" prefix to PROFILER_LABEL and PROFILER_LABEL_DYNAMIC, to make
  it clearer they construct RAII objects rather than just being function calls.
  (I myself have screwed up the scoping because of this in the past.)

- Fills in the 'js::ProfileEntry::Category::' qualifier within the macro, so
  the caller doesn't need to. This makes a *lot* more of the uses fit onto a
  single line.

The patch also makes the following changes to the macro uses (beyond those
required by the changes described above).

- Fixes a bunch of labels that had gotten out of sync with the name of the
  class and/or function that encloses them.

- Removes a useless PROFILER_LABEL use within a trivial scope in
  EventStateManager::DispatchMouseOrPointerEvent(). It clearly wasn't serving
  any useful purpose. It also serves as extra evidence that the AUTO_ prefix is
  a good idea.

- Tweaks DecodePool::SyncRunIf{Preferred,Possible} so that the labelling is
  done within them, instead of at their callsites, because that's a more
  standard way of doing things.

--HG--
extra : rebase_source : 318d1bc6fc1425a94aacbf489dd46e4f83211de4
2017-06-22 17:08:53 +10:00
Nicholas Nethercote
033f83145c Bug 1375387 - Reorder and section-ify GeckoProfiler.h. r=mstange.
This patch gives some structure and order to the profiler's API.

It also renames AutoProfilerRegister as AutoProfilerRegisterThread, to match
profiler_register_thread().
2017-06-22 14:28:47 +10:00
Nicholas Nethercote
4b364cf3f3 Bug 1375299 (part 1) - Reduce usage of MOZ_GECKO_PROFILER. r=mstange.
This patch reduces the differences between builds where the profiler is enabled
and those where the profiler is disabled. It does this by removing numerous
MOZ_GECKO_PROFILER checks.

These changes have the following consequences.

- Various functions and classes are now defined in all builds, and so can be
  used unconditionally: profiler_add_marker(), profiler_set_js_context(),
  profiler_clear_js_context(), profiler_get_pseudo_stack(), AutoProfilerLabel.
  (They are effectively no-ops in non-profiler builds, of course.)

- The no-op versions of PROFILER_* are now gone. The remaining versions are
  almost no-ops when the profiler isn't built.

--HG--
extra : rebase_source : 8fb5e8757600210c2f77865694d25162f0b7698a
2017-06-22 06:26:16 +10:00
Carsten "Tomcat" Book
8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Bill McCloskey
6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Carsten "Tomcat" Book
ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Bill McCloskey
4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Olli Pettay
2edc8a2488 bug 1358898, ensure AsyncFreeSnowWhite is run often enough, r=mccr8,nfroyd 2017-06-16 20:00:04 +03:00
Jan Beich
587d174016 Bug 1373096 - Unbreak --enable-warnings-as-errors build without GeckoProfiler after bug 1372901. r=mstange
MozReview-Commit-ID: ABh2bw5CbFm

--HG--
extra : rebase_source : 9ee7dd73d9a821722b4e9f21fa8a30e31bc907e8
2017-06-15 01:37:26 +00:00
Sebastian Hengst
1b26da1b2f merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-06-15 11:17:07 +02:00
Sebastian Hengst
20d16dadd3 merge mozilla-inbount to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 36YqbsnO3en
2017-06-15 11:11:30 +02:00
Florian Quèze
fd8b6d1c71 Bug 1372901 - Add a pseudo stack frame showing which module is being imported by a Cu.import call, r=mstange. 2017-06-15 00:58:25 +02:00
Sebastian Hengst
c267095078 Backed out changeset 0ee807301e66 (bug 1358898) for crashing in test_add_task_run_next_test.js during Linux build. r=backout 2017-06-14 21:25:49 +02:00
Olli Pettay
48ebc09772 Bug 1358898, ensure AsyncFreeSnowWhite is run often enough, r=mccr8 2017-06-14 21:43:37 +03:00
Marco Castelluccio
42f83ca8dc Bug 1363469 - Define signal handlers to dump and reset coverage counters. r=froydnj,kanru
--HG--
extra : rebase_source : 8fa73f2bfd1eab95caee891d6d68090b58c3ba67
extra : histedit_source : 7b7c633ebecc71508e4c0a4d1161104a511869c5%2C61fefafbedb869fffddb8182d8bfac29108ee1bb
2017-06-14 09:50:44 +01:00
Jan de Mooij
bf6aed7a06 Bug 1370608 part 3 - Use JS_NewEnumerateStandardClasses outside js/src. r=bz 2017-06-14 10:39:11 +02:00
Jan de Mooij
83f290de99 Bug 1370608 part 1 - Move newEnumerate hook from ObjectOps to ClassOps. r=evilpie,bz 2017-06-14 10:37:44 +02:00
Peter Van der Beken
9b9495bf79 Bug 1252211 - Remove DOMCI for TreeSelection, XULCommandDispatcher and XULControllers. r=bz.
--HG--
extra : rebase_source : 5a24af4928dbd7754850c6e3ceff6646bfe58c93
2017-05-18 09:07:25 +02:00
Henri Sivonen
432653453a Bug 1261841 part 2 - Use encoding_rs instead of uconv. r=emk,mystor.
MozReview-Commit-ID: 15Y5GTX98bv
2017-06-13 13:23:23 +03:00
Carsten "Tomcat" Book
4a5a3d9f30 Backed out changeset 2c51cdd42834 (bug 1252211) for bustage 2017-06-13 12:20:33 +02:00
Peter Van der Beken
9d549d2f23 Bug 1252211 - Remove DOMCI for TreeSelection, XULCommandDispatcher and XULControllers. r=bz.
--HG--
extra : rebase_source : db24985f7e8f6d4ca4df13015d565ec0063ba355
extra : source : f361697cb50b47dc4db94a6730b6604ab69217f5
2017-05-18 09:07:25 +02:00
Bill McCloskey
0b17d548b6 Bug 1371119 - Remove watchdog observers in XPCJSContext destructor (r=mccr8)
MozReview-Commit-ID: 5tj1hbom6zR
2017-06-12 20:21:43 -07:00
Bill McCloskey
a134fb522b Bug 1371119 - Load JS prefs per context rather than per runtime (r=mccr8)
MozReview-Commit-ID: 4M1uEcIB0Mq
2017-06-12 20:21:43 -07:00
Andrea Marchesini
d5b5f35f62 Bug 1369073 - Expose MessagePort/MessageChannel to xpcshell tests, r=bholley 2017-05-31 21:16:03 +02:00
Ryan VanderMeulen
d3f265330e Merge m-c to autoland. a=merge 2017-05-25 16:44:01 -04:00
Jon Coppeard
e105bc74f0 Bug 1309651 - Record time taken by GC parallel tasks r=sfink data-r=bsmedberg 2017-05-25 10:35:54 -04:00
Andrew McCreight
1471488de6 Bug 1367521 - Fix misspellings of "delegate". r=dholbert
MozReview-Commit-ID: KqOnp8rpCZD

--HG--
extra : rebase_source : 90bf8965737a1e808a5d2305ad395bdc99102cd1
2017-05-24 10:43:11 -07:00
Ryan VanderMeulen
38a48a48ce Backed out 4 changesets (bug 816784) for intermittent GC crashes.
Backed out changeset 9a553b9dc922 (bug 816784)
Backed out changeset ac4a48a831ce (bug 816784)
Backed out changeset e80197b11567 (bug 816784)
Backed out changeset 7e8f428a3edf (bug 816784)
2017-05-24 12:07:07 -04:00
Ting-Yu Chou
6d83ca4000 Bug 816784 part 2 - Optimize NukeCrossCompartmentWrappers() to iterate only the targetting wrappers. r=jonco
Changed the type of argument |targetFilter| of NukeCrossCompartmentWrappers()
from CompartmentFilter to JSCompartment* because it is always a single target
compartment, and we can optimize the iteration not to iterate the outer map.

MozReview-Commit-ID: 7cDCgJI0H9z

--HG--
extra : rebase_source : 4973dfd4c3326bf48b78088979962e425e35030c
2017-05-03 13:56:54 +08:00
Chris H-C
7a3995e709 bug 1364503 - Allow GC/CC MAX_PAUSE collection in opt-out r=bsmedberg,mccr8
While we're here, also align their buckets and give them bug_numbers fields.

To change buckets for GC_MAX_PAUSE_MS we need to rename to _2. Because of
GC_MAX_PAUSE_MS' use as a historical perf metric, we need to leave it in-place
for now.

MozReview-Commit-ID: Cffo3q1pR5E

--HG--
extra : rebase_source : 9843ca718dea8694be8029530a0f8646352c5b37
2017-05-19 16:12:24 -04:00
Ting-Yu Chou
e11749eeba Bug 816784 part 2 - Optimize NukeCrossCompartmentWrappers() to iterate only the targetting wrappers. r=jonco
Changed the type of argument |targetFilter| of NukeCrossCompartmentWrappers()
from CompartmentFilter to JSCompartment* because it is always a single target
compartment, and we can optimize the iteration not to iterate the outer map.

MozReview-Commit-ID: 7cDCgJI0H9z

--HG--
extra : rebase_source : ee9341168a28b5e6f273c512b0562ee4ddc297bc
extra : source : e80197b115673f259293d112da61c8dd9edc121e
2017-05-03 13:56:54 +08:00
Olli Pettay
0d4ccffc95 Bug 1367164 - Use IdleDispatch for async snow white killer on main thread, r=mccr8 2017-05-23 17:04:18 -04:00
Jan Beich
f8cf3b18dd Bug 1373004 - Add missing #include for MOZ_THREAD_LOCAL. r=billm
MozReview-Commit-ID: FKlkgohI4fl

--HG--
extra : rebase_source : 39243d3426594c0c30d506d9237d07e28f878ca8
2017-06-14 18:35:57 +00:00
Bob Owen
035cf9bdc2 Bug 1339105 Part 1: Implement Windows Level 3 content process sandbox policy. r=jimm
MozReview-Commit-ID: L8wcVhdLvFe

--HG--
extra : source : c3fb60fbc32660719c1b8b06dc785abd4559d6c0
2017-05-22 20:41:27 +01:00
Wes Kocher
848c9aa744 Backed out 3 changesets (bug 1339105) for plugin process leaks a=backout
Backed out changeset 431267ab28de (bug 1339105)
Backed out changeset 445875fbf13b (bug 1339105)
Backed out changeset c3fb60fbc326 (bug 1339105)

MozReview-Commit-ID: 4HYUQbHHnox
2017-05-22 15:14:23 -07:00
Bob Owen
edf3a239b1 Bug 1339105 Part 1: Implement Windows Level 3 content process sandbox policy. r=jimm
MozReview-Commit-ID: L8wcVhdLvFe
2017-05-22 20:41:27 +01:00
Sebastian Hengst
89e33081c6 Backed out changeset 50bf4c923818 (bug 1339105) for Windows bustage: calling protected constructor of class 'nsAString' at sandboxBroker.cpp(208,11). r=backout on a CLOSED TREE 2017-05-22 16:16:16 +02:00
Bob Owen
f24abd4ac3 Bug 1339105 Part 1: Implement Windows Level 3 content process sandbox policy. r=jimm
MozReview-Commit-ID: L8wcVhdLvFe
2017-05-22 14:29:06 +01:00
Kris Maglione
d82e509e37 Bug 1354733: Part 2 - Never rewrap dead wrappers. r=bholley
MozReview-Commit-ID: 2oSGtKe9pkI

--HG--
extra : rebase_source : 48fb1050ebfdf6e3c6f16cda13842b3e1eb4eb06
2017-05-20 11:51:05 -07:00
Steve Fink
51871e1507 Bug 1364547 - Call the slice end callback for every slice, r=jonco
Currently, the final slice of an incremental GC only gets a GC_CYCLE_END callback, not a GC_SLICE_END callback. So if you are doing anything that expects to see all of the slices, you will be missing one.

Simplify the setup so that every GC is bracketed with CYCLE_BEGIN/END, and every slice is bracketed with SLICE_BEGIN/END, treating a nonincremental as a GC with a single slice (which it is for everything else.)

--HG--
extra : rebase_source : 8e21300819d517b3e35de14930f53b3ab737a44e
2017-05-15 08:06:24 -07:00
Boris Zbarsky
cba820b01b Bug 1189822 part 2. Remove the DOM proxy expando object hashtable in xpconnect. r=peterv 2017-05-17 00:52:53 -04:00
Mike Hommey
02a06f7958 Bug 1363992 - Remove support for making jemalloc4 the default. r=njn
--HG--
extra : rebase_source : 77e1c13aa329637d0ec875439d572ee06e6919fa
2017-05-11 13:16:00 +09:00
Andrew McCreight
6d13ed70db Bug 1363555 - Make IS_TEAROFF_CLASS into a function. r=mrbkap
Right now, it is a macro, which causes a warning with clang about
extraneous parentheses. Turning it into a function fixes that and is
also nicer.

MozReview-Commit-ID: KTPA9b6oeUu

--HG--
extra : rebase_source : ae063db5a4b5b14bc4a3a8f64adbbecfc897edd9
2017-05-09 15:34:02 -07:00
Andrew McCreight
f8742e48d2 Bug 1363544 - Call into nsXPConnect directly in the loader and XPCShellImpl. r=mrbkap
MozReview-Commit-ID: 7ZnHdAG1Jmk

--HG--
extra : rebase_source : ff79438edb136ba0e4127173608d605793e7e3b7
2017-05-09 14:08:15 -07:00
Kris Maglione
a4e4191399 Bug 1356826: Part 4 - Add Cu.isInAutomation and Cu.crashIfNotInAutomation helpers. r=bholley
MozReview-Commit-ID: ADqVqF2XraG

--HG--
extra : rebase_source : 5b4ff1ceb7f3123f585559a954e59291c91e5554
extra : source : c46fed6e4f6a928df2b06fca6b3f004fd4bb0cc7
2017-04-15 14:23:58 -07:00
Iris Hsiao
6559420d58 Backed out 15 changesets (bug 1358846, bug 1356826) for talos error. a=backout
Backed out changeset 96ea13bb00c5 (bug 1358846)
Backed out changeset b533d7f9b9c2 (bug 1358846)
Backed out changeset 7dcb80a051a3 (bug 1358846)
Backed out changeset 26825f1e33dd (bug 1358846)
Backed out changeset 98b57ff82a54 (bug 1358846)
Backed out changeset b9088593e34f (bug 1358846)
Backed out changeset cb2518673c56 (bug 1358846)
Backed out changeset 889c487a5d41 (bug 1358846)
Backed out changeset 459b36092b7a (bug 1356826)
Backed out changeset c861e23ec8ef (bug 1356826)
Backed out changeset d47998fa24cd (bug 1356826)
Backed out changeset b02e89c67132 (bug 1356826)
Backed out changeset c46fed6e4f6a (bug 1356826)
Backed out changeset 237268e3d9d2 (bug 1356826)
Backed out changeset 527435fc20db (bug 1356826)
2017-05-12 17:45:21 +08:00
Kris Maglione
602cb201f5 Bug 1356826: Part 4 - Add Cu.isInAutomation and Cu.crashIfNotInAutomation helpers. r=bholley
MozReview-Commit-ID: ADqVqF2XraG

--HG--
extra : rebase_source : ea5df06eb9162f9f8c5816f49fb44d9f41947126
2017-04-15 14:23:58 -07:00
Carsten "Tomcat" Book
455239782b Merge mozilla-central to mozilla-inbound 2017-05-10 15:30:44 +02:00
kedziorski.lukasz@gmail.com
f815a0af4b Bug 1359436 - Add leak checking to CycleCollectedJSContext and related classes. r=mccr8 2017-05-09 13:59:00 +02:00
Andrew McCreight
087c406acb Bug 1363538 - Remove some derelict testing code from XPCShellImpl.cpp. r=mrbkap
MozReview-Commit-ID: 96UyB317H0W

--HG--
extra : source : 0a74ed4854d784856f28cf48a422f4aa0763fd22
2017-05-09 14:35:23 -07:00
Andrea Marchesini
1981f67eb3 Bug 1362119 - part 1 - Moving dom/base/Script{Loader,Element}.* in dom/script, r=ehsan
This patch does these things:

1. it moves nsScriptElement, nsScriptLoader, ScriptSettings, nsIScriptElement
   and nsIScriptLoaderObserver in dom/script
2. it renames nsScriptElement to mozilla::dom::ScriptElement
3. it renames nsScriptLaoder to mozilla::dom::ScriptLoader

--HG--
rename : dom/base/nsScriptElement.cpp => dom/script/ScriptElement.cpp
rename : dom/base/nsScriptElement.h => dom/script/ScriptElement.h
rename : dom/base/nsScriptLoader.cpp => dom/script/ScriptLoader.cpp
rename : dom/base/nsScriptLoader.h => dom/script/ScriptLoader.h
rename : dom/base/ScriptSettings.cpp => dom/script/ScriptSettings.cpp
rename : dom/base/ScriptSettings.h => dom/script/ScriptSettings.h
rename : dom/base/nsIScriptElement.h => dom/script/nsIScriptElement.h
rename : dom/base/nsIScriptLoaderObserver.idl => dom/script/nsIScriptLoaderObserver.idl
2017-05-08 08:24:22 +02:00
Carsten "Tomcat" Book
f0d6de60d7 Backed out changeset 5d77f6b14633 (bug 1362119) for android bustage in nsCCUncollectableMarker.cpp:500:7: error: 'TraceScriptHolder' is not a member of 'mozilla'
--HG--
rename : dom/script/ScriptSettings.cpp => dom/base/ScriptSettings.cpp
rename : dom/script/ScriptSettings.h => dom/base/ScriptSettings.h
rename : dom/script/nsIScriptElement.h => dom/base/nsIScriptElement.h
rename : dom/script/nsIScriptLoaderObserver.idl => dom/base/nsIScriptLoaderObserver.idl
rename : dom/script/ScriptElement.cpp => dom/base/nsScriptElement.cpp
rename : dom/script/ScriptElement.h => dom/base/nsScriptElement.h
rename : dom/script/ScriptLoader.cpp => dom/base/nsScriptLoader.cpp
rename : dom/script/ScriptLoader.h => dom/base/nsScriptLoader.h
2017-05-08 09:54:38 +02:00
Andrea Marchesini
7a4ef797cb Bug 1362119 - part 1 - Moving dom/base/Script{Loader,Element}.* in dom/script, r=ehsan
This patch does these things:

1. it moves nsScriptElement, nsScriptLoader, ScriptSettings, nsIScriptElement
   and nsIScriptLoaderObserver in dom/script
2. it renames nsScriptElement to mozilla::dom::ScriptElement
3. it renames nsScriptLaoder to mozilla::dom::ScriptLoader

--HG--
rename : dom/base/nsScriptElement.cpp => dom/script/ScriptElement.cpp
rename : dom/base/nsScriptElement.h => dom/script/ScriptElement.h
rename : dom/base/nsScriptLoader.cpp => dom/script/ScriptLoader.cpp
rename : dom/base/nsScriptLoader.h => dom/script/ScriptLoader.h
rename : dom/base/ScriptSettings.cpp => dom/script/ScriptSettings.cpp
rename : dom/base/ScriptSettings.h => dom/script/ScriptSettings.h
rename : dom/base/nsIScriptElement.h => dom/script/nsIScriptElement.h
rename : dom/base/nsIScriptLoaderObserver.idl => dom/script/nsIScriptLoaderObserver.idl
2017-05-08 08:24:22 +02:00
André Bargull
11bb19e7da Bug 1359294 - Remove toLocaleLowerCase/toLocaleUpperCase callbacks in XPCLocale. r=Waldo
--HG--
extra : rebase_source : 711d5bfc896a48f63b6c825823ba5aef5c93413c
extra : histedit_source : 7a34417565cf6151c39d7c68c776505142098f24
2017-05-03 09:55:06 -07:00
Nathan Froyd
3261352ea3 Bug 1361514 - convert XPCLocaleObserver to NS_DECL_OWNINGTHREAD; r=gabor
The pattern we're using here has a name, so let's use that instead.
2017-05-03 11:48:54 -04:00
Jan de Mooij
f480e9ecdf Bug 1237504 - Refactor proxy slot layout to allow proxies to have more than 2 slots. r=bz,jonco
The patch makes the following proxy changes:

* The number of slots in ProxyValueArray is now dynamic and depends on the number of reserved slots we get from the Class.
* "Extra slots" was renamed to "Reserved slots" to make this clearer.
* All proxy Classes now have 2 reserved slots, but it should be easy to change that for proxy Classes that need more than 2 slots.
* Proxies now store a pointer to these slots and this means GetReservedSlot and SetReservedSlot can be used on proxies as well. We no longer need GetReservedOrProxyPrivateSlot and SetReservedOrProxyPrivateSlot.

And some changes to make DOM Proxies work with this:

* We now store the C++ object in the first reserved slot (DOM_OBJECT_SLOT) instead of in the proxy's private slot. This is pretty nice because it matches what we do for non-proxy DOM objects.
* We now store the expando in the proxy's private slot so I removed GetDOMProxyExpandoSlot and changed the IC code to get the expando from the private slot instead.
2017-04-28 14:12:28 +02:00
Bill McCloskey
9862d9c932 Bug 1359245 - Remove some tracing callbacks at shutdown (r=mccr8)
When we just had CycleCollectedJSContext (and no CycleCollectedJSRuntime) a
weird thing happened at shutdown:
1. We would call JS_DestroyContext from ~CycleCollectedJSContext. By that time,
   the ~XPCJSContext destructor had already finished.
2. Destroying the context runs a final GC. That GC would call back into various
   GC callbacks, such as TraceBlackJS and TraceGrayJS.
3. These callbacks would do a virtual method call:
   http://searchfox.org/mozilla-central/rev/876c7dd30586f9c6f9c99ef7444f2d73c7acfe7c/xpcom/base/CycleCollectedJSRuntime.cpp#791
4. Normally this method call would call into
   XPCContext::TraceNativeBlackRoots. However, C++ changes the vtable for an
   object during destruction. So we would only call CycleCollectedJSContext's
   version of TraceNativeBlackRoots, which is empty. So we never traced anything.

When I moved this code into the runtime, we actually do call into
XPCJSRuntime::TraceNativeBlackRoots at that time. So the behavior changed, and
that was causing crashes once I nulled out the TLS as you asked. So I removed
these callbacks for the last GC.

MozReview-Commit-ID: 3do13bjpwQj
2017-04-27 15:34:46 -07:00
Bill McCloskey
1d5c5ef48b Bug 1359245 - Keep a linked list of CycleCollectedJSContexts in the runtime (r=mccr8)
This patch keeps a list of all the cooperatively scheduled contexts that are
linked to a runtime. In places where we need to iterate over all contexts (for
GC, specifically), it iterates over the list.

MozReview-Commit-ID: 3pKJX78f2l0
2017-04-27 15:34:46 -07:00
Bill McCloskey
267ad1f2b0 Bug 1359245 - Initial support for cooperative contexts (r=mccr8)
This patch adds initial support for cooperatively scheduled
CycleCollectedJSContexts.

MozReview-Commit-ID: 5pfPubHUanL
2017-04-27 15:34:46 -07:00
Bill McCloskey
11b1f07146 Bug 1359245 - Get rid of CycleCollectedJSRuntime::MainContext (r=mccr8)
This is another method that assumes one context per runtime. This patch
eliminates the method.

MozReview-Commit-ID: JHcQ1nyiHSP
2017-04-27 15:34:46 -07:00
Bill McCloskey
1e5747d0b4 Bug 1359245 - Eliminate nsXPConnect::mContext (r=mccr8)
This field assumes there is one XPCJSContext globally (i.e., per nsXPConnect
instance). This patch eliminates the field by using different paths to
reach the context.

MozReview-Commit-ID: FjR6cTZ5QfZ
2017-04-27 15:34:46 -07:00
Bill McCloskey
133ed14a85 Bug 1359245 - Eliminate some XPCJSContext::Get() usage (r=mccr8)
XPCJSContext::Get() now does a TLS lookup, which is a little more expensive
than looking up a global variable. This patch removes as many of the TLS
lookups as possible.

MozReview-Commit-ID: GsqzJn55Lya
2017-04-27 15:34:46 -07:00
Bill McCloskey
3e774f9f8a Bug 1359245 - Eliminate nsXPConnect::GetContextInstance() (r=mccr8)
This method assumes there is one global XPCJSContext. This patch eliminates
uses of it.

MozReview-Commit-ID: L2AkBGh5TnC
2017-04-27 15:34:46 -07:00
Bill McCloskey
51147a69b6 Bug 1359245 - Use TLS to return XPCJSContext::Get() (r=mccr8)
Once we have multiple XPCJSContext's, we may have to figure out which one we're
using with TLS. A later patch tries to remove as many of these TLS lookups
as possible so that performance doesn't suffer.

MozReview-Commit-ID: 50uHpDLZmUH
2017-04-27 15:34:46 -07:00
Wes Kocher
c90904f9bf Merge inbound to central, a=merge CLOSED TREE
MozReview-Commit-ID: 9HQViJrDT6S
2017-04-26 17:30:31 -07:00
Tom Tromey
3e96a70858 Bug 1334278 - have FormatStackDump return UniqueChars; r=froydnj
Change FormatStackDump to return UniqueChars and fix up the users.  This
removes a bit more manual memory management.

MozReview-Commit-ID: 60GBgeS4rzg

--HG--
extra : rebase_source : 15060321f567816ca434cdf1ef816d8322ceefff
2017-04-21 12:47:06 -06:00
Jon Coppeard
eb3c9870bf Bug 1352430 - Add barrier to wrapper cache to clear dying objects that have not yet been finalized r=bz r=sfink
* * *
Code review followup

--HG--
extra : rebase_source : 10c1fd603c2dd1ac2ff5770ae9aec2e9131681ce
2017-04-26 11:18:39 +01:00
Jon Coppeard
f67bc06071 Bug 1352430 - Update XPConnect sweeping to handle incrementally finalized objects r=mccr8 r=sfink
--HG--
extra : rebase_source : 10c974bedd003cf23de9e32ad7ae202441c92db9
2017-04-26 11:18:13 +01:00
Jon Coppeard
8c75ba5bbb Bug 1352430 - Update the GC finalize callback to communicate the new state r=sfink r=mccr8
--HG--
extra : rebase_source : ebd661eee50bbf48f21c12e6a1c6df9015f81beb
2017-04-26 10:57:08 +01:00
Nicholas Nethercote
bc1d6a21a2 Bug 1358320 - Make TimeStamp::ProcessCreation()'s outparam optional. r=gsvelto.
TimeStamp::ProcessCreations()'s aIsInconsistent outparam is ignored by the
majority of its caller. This patch makes it optional. Notably, this makes
ProcessCreation() easier to use in a constructor's initializer list.
2017-04-26 14:55:54 +10:00
Jon Coppeard
d7e0c83dcc Bug 1359001 - Make AutoAssertGCCallback a no-op in opt builds r=sfink 2017-04-25 10:56:34 +01:00
Tom Tromey
bcbdcb14bb Bug 1334278 - change JS_smprintf to return UniqueChars; r=froydnj
This changes JS_smprintf to return UniqueChars, rather than relying on
manual memory management.

MozReview-Commit-ID: ENjQJODYdD1

--HG--
extra : rebase_source : 4c8ad4719dce205a7ef25e41eca25c5af793bb47
2017-03-03 15:10:11 -07:00
Jan de Mooij
113e7692b5 Bug 1358047 - Move Baseline CacheIR code map from JitCompartment to JitZone. r=djvj 2017-04-24 12:41:04 +02:00
Wes Kocher
d973551173 Merge inbound to central, a=merge
MozReview-Commit-ID: FHfhKIIlItM
2017-04-21 17:30:43 -07:00
Zibi Braniecki
61ac53ebb8 Bug 1358543 - Only set new locale callbacks in xpc_LocalizeContext if they're not set. r=smaug
With changes introduced in bug 1356066 I made the xpc_LocalizeContext be
called on each app locale change to update the default locale in each context.

Unfortunately, this function is also assigning the locale callbacks and
with my change it started doing it on each language change.

In this patch I'm first checking if we do have XPCLocaleCallbacks for the
given context and only if we don't, I assign them.

MozReview-Commit-ID: 7AiCsJfKBID

--HG--
extra : rebase_source : 1efe65895759ffc07e0047d063a405d757cb1092
2017-04-21 09:49:42 -07:00
Hannes Verschore
e8f7043d0b Bug 1319746: Add a memory reporter for CFGGraph on BaselineScript, r=njn 2017-04-21 19:37:06 +02:00