Граф коммитов

60 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 1e9c395548 Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj
Same approach as the other bug, mostly replacing automatically by removing
'using mozilla::Forward;' and then:

  s/mozilla::Forward/std::forward/
  s/Forward</std::forward</

The only file that required manual fixup was TestTreeTraversal.cpp, which had
a class called TestNodeForward with template parameters :)

MozReview-Commit-ID: A88qFG5AccP
2018-06-02 09:33:26 +02:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Kris Maglione 166dab340b Bug 1461062: Follow-up: Fix rebase bustage. r=bustage CLOSED TREE
MozReview-Commit-ID: 2fjL5eCL2xP

--HG--
extra : amend_source : 1fef859835028292ca163d840a61077bf05fcc06
2018-05-16 19:07:01 -07:00
Jan de Mooij 80e44e8003 Bug 1461292 part 1 - Rename JSAutoCompartment to JSAutoRealm. r=bz,luke 2018-05-16 10:53:16 +02:00
Jon Coppeard 0924042900 Bug 1456774 - Remove linear search for finished parse task and type off thread parse token r=jandem r=baku 2018-05-10 14:51:14 +01:00
Nika Layzell 0c3ba13e4c Bug 1437167 - Part 1: Stop using PRIntervalTime as the argument to CondVar::Wait and Monitor::Wait, r=mstange, r=froydnj 2018-04-10 17:49:47 -04:00
Nicolas B. Pierron 51b99ad845 Bug 1401939 - Align XDR content to avoid undefined behaviours. r=kmag,tcampbell 2018-03-13 18:00:50 +00:00
Brindusan Cristian cc88a1d417 Backed out changeset 294a422d49b0 (bug 1401939) for sm-arm64 failures on /builds/worker/workspace/build/src/js/src/vm/Xdr.cpp CLOSED TREE 2018-03-12 20:55:23 +02:00
Nicolas B. Pierron dbd24194ed Bug 1401939 - Align XDR content to avoid undefined behaviours. r=kmag,tcampbell 2018-03-12 18:23:13 +00:00
Jan de Mooij 7f30bf48a7 Bug 1417844 part 2 - Remove JSVersion from CompileOptions, CompartmentBehaviors, scripts. r=evilpie 2017-11-17 12:12:39 +01:00
Kris Maglione 30d4691c07 Bug 1404741: Don't call mozJSComponentLoader::CompilationScope during URLPreloader critical section. r=mccr8
The URLPreloader's initialization code accesses the Omnijar cache off-main
thread. It can do so safely only as long as the main thread is blocked, or
running code which is guaranteed never to touch Omnijar, while its critical
section runs.

While that was guaranteed for previous versions of the code, some invariants
changed when we began using the component loader's shared global for initial
compilation. Once the global is created, we can safely use it to initialize
compilation. But creating the global invokes a large amount of Gecko code,
some of which touches Omnijar in the process.

MozReview-Commit-ID: 48WoIZtGPTo

--HG--
extra : rebase_source : 9bd5d884e32cfa59c022edb00078aac050acb20b
2017-10-06 15:09:11 -07:00
Kris Maglione 1b2f22b34a Bug 1396366: Make sure the URLPreloader cache is only written once. r=erahm
MozReview-Commit-ID: FA1BPQ5c6nP

--HG--
extra : rebase_source : 68137a0378cfb2138144c8f53b6b25352c21233d
2017-09-08 13:44:32 -07:00
Kris Maglione 3529438886 Bug 1381976: Part 1 - Use the shared module global for script pre-compilation. r=mccr8
When we pre-compile scripts for a different global than they are eventually
executed in, we need to clone them into the new global before we can execute
them, which can be expensive. This also prevents us from using lazy parsing,
since lazy functions are currently eagerly compiled when cloned.

Since the vast majority of the scripts compiled by the preloader are executed
in the shared modules scope, initially compiling them there removes a lot of
startup overhead. For the few that aren't, we don't lose anything by compiling
them in the shared module global, but we also don't gain anything over
compiling them in the XPConnect compilation scope.

MozReview-Commit-ID: CEh42BmIMhL

--HG--
extra : rebase_source : 93f639022375dd3f0b8e06533e829ce4089d46b7
2017-08-25 19:36:44 -07:00
Kris Maglione c4a2fd3bfb Bug 1363482: Part 2 - Allow pre-loading file and JAR entry contents off-thread during startup. r=erahm
MozReview-Commit-ID: 8bKzYpXBQvT

--HG--
extra : rebase_source : 6750d471a0a39338b5145e2dab9d953b4c30a63f
2017-08-30 15:47:17 -07:00
Kris Maglione 6bad4f8ef7 Bug 1366511: Part 3 - Add mozilla::ToResult() to convert other result types to equivalent Result. r=nbp,ehsan
Also adds a mozilla/ResultExtensions.h header to define the appropriate
conversion functions for nsresult and PRResult. This is in a separate header
since those types are not available in Spidermonkey, and this is the pattern
other *Extensions.h headers follow.

Also removes equivalent NS_TRY macros and WrapNSResult inlines that served the
same purpose in existing code, and are no longer necessary.

MozReview-Commit-ID: A85PCAeyWhx

--HG--
extra : rebase_source : a5988ff770888f901dd0798e7717bcf6254460cd
2017-08-29 21:28:31 -07:00
Kris Maglione c9899cb3fa Bug 1366511: Part 2 - Allow autoconverting Err(nsresult) to nsresult. r=ehsan,nbp
This allows MOZ_TRY and MOZ_TRY_VAR to be transparently used in XPCOM methods
when compatible Result types are used.

Also removes a compatibility macro in SimpleChannel.cpp, and an identical
specialization in AddonManagerStartup, which are no longer necessary after
this change.

MozReview-Commit-ID: 94iNrPDJEnN

--HG--
extra : rebase_source : 24ad4a54cbd170eb04ded21794530e56b1dfbd82
2017-08-29 21:28:22 -07: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
Kris Maglione 37a0f65e57 Bug 1385822 - Don't save new scripts from child process after cache flush. r=erahm
MozReview-Commit-ID: GKInmHvwVMP
2017-07-31 14:30:51 -07:00
Kris Maglione 09fd6d1778 Bug 1382329: Part 4 - Hold mMonitor while accessing scripts in the write thread. r=erahm
MozReview-Commit-ID: 66se8G27sqQ

--HG--
extra : rebase_source : 4fc09a04b4ebee937f614f9f271404ca20ab2c01
2017-07-19 14:16:56 -07:00
Kris Maglione f4d43b3b71 Bug 1382329: Part 3 - Wait for pending parse tasks to finish before freeing scripts. r=erahm,nbp
Off-thread parse tasks depend on the memory allocated by the main-thread
script preloader, so that memory needs to be kept alive until they finish. In
normal use cases, this is guaranteed, but when the browser shuts down very
quickly (as sometimes happens in tests), or we invalidate the startup caches
in the middle of the startup process, they can sometimes be freed too early.

MozReview-Commit-ID: GQmkVbWgTH9

--HG--
extra : rebase_source : 523fb559f3d71f16be11ae275ab1f6ea3900eff8
2017-07-25 15:23:12 -07:00
Kris Maglione d3ebec307a Bug 1382329: Part 2 - Eagerly encode scripts for the startup cache. r=erahm,nbp
MozReview-Commit-ID: JqCqQZ2rO2z

--HG--
extra : rebase_source : 14874cae551f10f091461c9e9b1d9a48c99afc2b
2017-07-19 12:44:17 -07:00
Kris Maglione 4c48c5dab8 Bug 1382329: Part 1 - Enable lazy source whenever compiling for the preloader. r=mccr8,nbp
In general, we always want to compile with lazy source whenever we intend to
store code in the startup bytecode cache. Currently, we only do so when the
main StartupCache is available (which is only in the parent process), even if
we'll be storing code in the ScriptPreloader cache.

The main side-effect of this is that scripts which are used in a content
process do not use lazy source, but *do* use lazy parsing. And since we need
to clone pre-loaded scripts into their target compartment before executing, we
end up eagerly compiling those lazy functions on the main thread as soon as we
execute the script, in order to clone them. And this causes two side-effects
of its own:

1) It's terrible for startup performance.

2) It creates new scope chains which didn't exist when the clone began, and
which are likely responsible for bug 1367896.

MozReview-Commit-ID: 6lZLb68zitp

--HG--
extra : rebase_source : 2f2bc11d0123fd7e14c2a5e716a764e7ab8ded46
2017-07-19 11:57:18 -07:00
Andrea Marchesini 50f9ea47a3 Bug 1350958 - Finish labeling ProxyReleaseEvent, r=billm 2017-07-14 08:49:22 +02:00
Kris Maglione 9291c127d9 Bug 1371248: Avoid hangs when preloader cache flush is triggered during shutdown. r=erahm
MozReview-Commit-ID: FpW53d5TTCG

--HG--
extra : rebase_source : 28b5343d276e2a2422bb438ca25de87740f65d2c
2017-06-28 14:46:30 -07: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
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
Bevis Tseng d1637b9c5a Bug 1372453 - Part 2: Name the caller of ProxyReleaseEvent. r=billm
MozReview-Commit-ID: LYhSWnZkq0i
2017-06-14 09:27:17 +08:00
Kris Maglione 9c9dbaaaa3 Bug 1364974: Part 5 - Perform off-thread decode operations in chunks, rather than singly. r=shu
MozReview-Commit-ID: DapDuQ8rdTI

--HG--
extra : rebase_source : 5273199757af7e72c1396d1bc62a564c0d5adb0f
2017-05-16 19:42:12 -07:00
Kris Maglione 63c946826b Bug 1364974: Part 4 - Replace CachedScript::mStatus and related logic with original and final process sets. r=erahm
The current logic is fairly hard to follow, and fails to account for changes
in the set of processes a script needs to be executed in when deciding whether
to write a new cache file. These changes simplify that logic considerably,
increase the chances that we'll correctly pre-decode a script that's needed in
a given process during startup.

MozReview-Commit-ID: BvqjKU8FDHW

--HG--
extra : rebase_source : 132af63ee8f8df5b5d704580d40735c12ed74ed9
2017-05-22 23:01:39 -07:00
Kris Maglione 341bdc643d Bug 1364934: Ignore cached scripts from content processes which were removed in a cache flush. r=erahm
MozReview-Commit-ID: AnmsM3WiZMX

--HG--
extra : rebase_source : 9c240099272cc1546dfe35764f130d5b6356f4e2
2017-05-17 22:55:14 -07:00
Kris Maglione 51f7df2898 Bug 1361900: Part 11 - Make sure new cache file is closed before renaming on Windows. r=me
MozReview-Commit-ID: KpJpId6eULt

--HG--
extra : rebase_source : c8552d69195d353b3ca6302cff03e5641ac49c07
2017-05-13 22:55:34 -07:00
Kris Maglione 3bc458e421 Bug 1361900: Part 10 - Replace linked lists with a single hashtable. r=erahm
MozReview-Commit-ID: 3qXnswsP6Z0

--HG--
extra : rebase_source : 289775a1e6ac452081fb2ec80346f803a51710c5
extra : source : 75b28187fa5ed70fafdd30565a12584b301b9104
2017-05-13 22:43:08 -07:00
Kris Maglione a09d901e45 Bug 1361900: Part 9 - Sort scripts by initial load time before saving. r=erahm
MozReview-Commit-ID: 54UN2DVK4xM

--HG--
extra : rebase_source : 034c0020678d04d6087e3a40ab76499958ac748c
extra : source : 2a48f8b743d158bc744a776bd939c80a242e1446
2017-05-13 14:08:42 -07:00
Kris Maglione 589a82d7ba Bug 1361900: Part 6 - Add content process support for the script preloader. r=erahm,gabor
MozReview-Commit-ID: 6hDQAI52bKC

--HG--
extra : rebase_source : 46e8d5ed5965e483fa4b0bd8f6f4403e0bb771dc
extra : source : 4227bcda00babd2d5980dca3b42cb4b467da38c4
2017-05-02 17:17:52 -07:00
Kris Maglione fc0586811d Bug 1361900: Part 4 - Use a separate script cache for scripts loaded in the child process. r=erahm,gabor
MozReview-Commit-ID: EIdwmuTOl90

--HG--
extra : rebase_source : d2f6ba18a03cb54459e98b9d2ff03bc3d9567e83
extra : source : ad243db647c708b74859d73e8787b5b34897c140
2017-05-09 19:52:17 -07:00
Kris Maglione a8eba3c140 Bug 1361900: Part 2 - Add process types field to cached script data. r=erahm
MozReview-Commit-ID: Gvh672XD0ar

--HG--
extra : rebase_source : 4391f60ab8f1eaa3df646f7acbc2652be2487f0c
extra : source : 39ffa8a7801a7807a1097ea2c9290c772cd54a9b
2017-05-03 17:21:31 -07:00
Sebastian Hengst 0bc683dcda Backed out changeset 39ffa8a7801a (bug 1361900) 2017-05-13 18:53:50 +02:00
Sebastian Hengst e1ddae17f8 Backed out changeset ad243db647c7 (bug 1361900) 2017-05-13 18:53:40 +02:00
Sebastian Hengst 0f6e08c578 Backed out changeset 4227bcda00ba (bug 1361900) 2017-05-13 18:53:30 +02:00
Sebastian Hengst f2d93e36db Backed out changeset 2a48f8b743d1 (bug 1361900) 2017-05-13 18:53:15 +02:00
Sebastian Hengst b5071f569a Backed out changeset 75b28187fa5e (bug 1361900) 2017-05-13 18:53:10 +02:00
Sebastian Hengst f8b2c3d68c Backed out changeset 0b38ac21c7a5 (bug 1361900) 2017-05-13 18:52:25 +02:00
Sebastian Hengst 1e386fe967 Backed out changeset 23dc7b443bb0 (bug 1361900) 2017-05-13 18:51:57 +02:00
Kris Maglione 8d9a00892f Bug 1361900: Fix one last merge botch, and fix a false rooting hazard warning.
MozReview-Commit-ID: JpKYYEBpbQj

--HG--
extra : rebase_source : 5bbb462ed3255c631cc1c280359af8c9c2224239
extra : histedit_source : 444c4c02eb1a3ced85cef09f7b7a6e7f5b9235b5%2Cb16ca4316a1aabf5e5c1b8641a0e1818d815da76
2017-05-12 18:14:12 -07:00
Kris Maglione 40bbc14054 Bug 1361900: Follow-up: Fix order of execution issue. r=me
MozReview-Commit-ID: DcmTlzxskUj
2017-05-12 15:46:34 -07:00
Kris Maglione 23518f0244 Bug 1361900: Part 10 - Replace linked lists with a single hashtable. r=erahm
MozReview-Commit-ID: 3qXnswsP6Z0

--HG--
extra : rebase_source : 1edbf92171003d9ad2c4cfebabbb8a1d7f2d4e24
2017-05-03 16:57:31 -07:00
Kris Maglione 220b0239c3 Bug 1361900: Part 9 - Sort scripts by initial load time before saving. r=erahm
MozReview-Commit-ID: 54UN2DVK4xM

--HG--
extra : rebase_source : f7cb39eb05bb86a03a17b97cbe2cb9d8dd1008fe
2017-05-01 14:12:01 -07:00