Commit Graph

6533 Commits

Author SHA1 Message Date
Boris Zbarsky
8f7c90d6be Bug 1473149. Add an external string variant that keeps a DynamicAtom alive. r=njn,rwood
The change to call AsStatic() in SetKnownLiveAtom is drive-by performance cleanup.
2018-07-10 11:21:42 -07:00
Kris Maglione
8ff07d3c3f Bug 1472495: Don't report shared memmapped cache as explicit memory. r=erahm
MozReview-Commit-ID: 7xWJOdg3mfg

--HG--
extra : rebase_source : 8bb19b94495ae99ec1c4083cd88bd8915003886f
extra : amend_source : e72654de7148415e6999632a0da3f598648685a6
2018-06-30 16:33:50 -07:00
Andreea Pavel
2ef6a9ab83 Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2018-07-08 00:54:23 +03:00
Bobby Holley
4da035394a Bug 1447856 - Make the watchdog tests actually wait for completion. r=arai
MozReview-Commit-ID: KjvUxJSrmtk

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

--HG--
extra : moz-landing-system : lando
2018-07-07 07:20:50 +00:00
Kris Maglione
2ced7f0d8b Bug 1471091: Follow-up: Fix crash in devtools tests when they execute process scripts multiple times. r=bustage 2018-07-07 13:15:44 -07:00
Kris Maglione
8751f930ce Bug 1471091: Avoid cloning and caching process scripts. r=mccr8
We only run process scripts once per process, so there's no need to compile
them for the compilation scope, or to keep a separate cloned copy alive for
the length of the session.

This patch changes the caching behavior of message managers to compile
single-use scripts directly for the target global, and avoid caching them for
the rest of the session. It also changes the preloader to drop references to
these scripts after they've been executed and/or encoded, as appropriate.

MozReview-Commit-ID: EfKo2aYbBxl

--HG--
extra : rebase_source : aebc5812bef4413d497ac4fdb59aced00a5a4c8e
extra : absorb_source : cf5795eb0bff47d08b1ab45f002afb3f05109c93
extra : histedit_source : e92619d2a818095241c52d8f1961ccad38300d32
2018-06-29 18:07:46 -07:00
Ciure Andrei
f61df5dc45 Backed out 4 changesets (bug 1461450, bug 1471726) for linting failure xpidl.py CLOSED TREE
Backed out changeset 6e8148c1ca7f (bug 1461450)
Backed out changeset 2a02d86bc113 (bug 1461450)
Backed out changeset 1907567a85c5 (bug 1471726)
Backed out changeset c4df8eab6d1c (bug 1471726)
2018-07-07 03:12:10 +03:00
Nika Layzell
95e4893811 Bug 1471726 - Part 2: Add basic tests for jsval array codegen, r=mccr8 2018-07-06 19:53:04 -04:00
Jan de Mooij
e918a3c855 Bug 1472973 part 8 - Use JS::GetNonCCWObjectGlobal in XrayAwareCalleeGlobal. r=bz 2018-07-06 18:16:24 +02:00
Jan de Mooij
396c86f339 Bug 1472973 part 7 - Use JS::GetNonCCWObjectGlobal in mozJSComponentLoader::FindTargetObject. r=bz
js::GetJSMEnvironmentOfScriptedCaller returns either nullptr or a NonSyntacticVariablesObject.
2018-07-06 18:16:24 +02:00
Jan de Mooij
b6f0af2059 Bug 1472973 part 6 - Use JS::GetNonCCWObjectGlobal in subscript loader. r=bz 2018-07-06 18:16:24 +02:00
Jan de Mooij
09149a5c4a Bug 1472973 part 3 - Remove some GetGlobalForObjectCrossCompartment calls on globals/WindowProxy. r=bz 2018-07-06 18:16:23 +02:00
Jan de Mooij
a51f9bdda9 Bug 1472973 part 2 - Use JS::GetNonCCWObjectGlobal in some functions where we unwrapped the object. r=bz 2018-07-06 18:16:23 +02:00
Jan de Mooij
3201853e80 Bug 1468752 part 4 - Remove JS_GetGlobalForObject. r=bz 2018-07-06 12:54:00 +02:00
Christian Holler
2a3b6f8ca3 Bug 1471532 - Support Windows in ASan Nightly Reporter builds. r=froydnj
MozReview-Commit-ID: AK2dBOgoazY

--HG--
extra : rebase_source : 1065a2f3b10913ac574cf1187d717f21fc2994e6
extra : histedit_source : 3042e51e496e4e8593b367d89332a9199bf3999c
2018-06-27 11:19:00 +02:00
Olli Pettay
b053857985 Bug 1472431, nodes in Shadow DOM aren't orphan, if they are in composed document, r=mccr8 2018-07-01 22:28:17 +03:00
Kris Maglione
2bbae5374b Bug 1470365: Part 1 - Add a compact, read-only, shared-memory string map class. r=erahm
This class implements a shared memory key-value store that fits into a single
memory mapped segment. All of the runtime data for its instances are stored in
the shared memory region, which means that memory overhead for each instance
in each process is only a few bytes.

Importantly, the key and value strings returned by this class are also
pointers into the shared memory region, which means that once an instance is
created, its memory cannot be unmapped until process shutdown.

For the uses I intend to put it to, this is a reasonable constraint. If we
need to use it for shorter-lived maps in the future, we can add an option to
return non-literal dependent strings that will be copied if they need to be
kept alive long term.

MozReview-Commit-ID: 5BwAaDsb7HS

--HG--
extra : rebase_source : b472fe628018f88a2c4d6b3de4b7143aeca55e14
extra : absorb_source : 5cdeb568cfd2b4a5a767191402e699e61e653b3b
2018-06-29 22:50:41 -07:00
Kris Maglione
fd093e7cca Bug 1463587: Part 1 - Add helper class for creating snapshots of shared memory regions. r=jld,erahm
This class allows us to map a read-write shared memory region, and then safely
remap it read-only, so that it can be shared with sandboxed content processes.

MozReview-Commit-ID: 2PJMQgOwA4V

--HG--
extra : rebase_source : c556cabfa7d379a91dc9ef7171ac0a7d7d8fb32e
extra : absorb_source : e78e304ed95891c694050f79a0bb5d40d11ee884
2018-06-22 20:30:23 -07:00
Andrew Swan
07dcc1c764 Bug 1451519 Convert specialpowers to a webextension r=kmag
This is a quick-and-dirty port.  It might be nice to replace
SpecialPowersObserver with the webextensions content script injection
system at some point, but that isn't practical right now (since WE experiments
cannot implement new APIs visible to content scripts).

MozReview-Commit-ID: GinCu3VcbWK

--HG--
rename : testing/specialpowers/bootstrap.js => testing/specialpowers/api.js
extra : rebase_source : 0faf7d21c8868c957ddc7fede0d56809f27dc161
extra : intermediate-source : ffb9ce93b92dd6396bfe038d3f6a8bcf929ec277
extra : source : cca596eadd0437dc75b75c119b6c7a405805f703
2018-06-27 13:10:51 -07:00
Coroiu Cristina
896ef35dfd Backed out changeset 722113b8204d (bug 1451519) for browser-chrome failures at browser/base/content/test/performance/browser_startup_content.js on a CLOSED TREE
--HG--
rename : testing/specialpowers/api.js => testing/specialpowers/bootstrap.js
2018-06-29 22:13:46 +03:00
Andrew Swan
849bbbb42d Bug 1451519 Convert specialpowers to a webextension r=kmag
This is a quick-and-dirty port.  It might be nice to replace
SpecialPowersObserver with the webextensions content script injection
system at some point, but that isn't practical right now (since WE experiments
cannot implement new APIs visible to content scripts).

MozReview-Commit-ID: GinCu3VcbWK

--HG--
rename : testing/specialpowers/bootstrap.js => testing/specialpowers/api.js
extra : rebase_source : 8be131e80d95a6bf6e86c994fdfa40c14ba610eb
extra : source : cca596eadd0437dc75b75c119b6c7a405805f703
2018-06-27 13:10:51 -07:00
André Bargull
781fc92292 Bug 1471900: Change return type of JS_EncodeStringToBuffer to bool. r=jandem 2018-06-28 07:35:20 -07:00
Cosmin Sabou
a612a6fdf5 Merge mozilla-central to mozilla-inbound. a=merge 2018-06-28 13:13:46 +03:00
Cosmin Sabou
f4b3baf021 Merge mozilla-inbound to mozilla-central. a=merge 2018-06-28 13:04:23 +03:00
imjching
4867775c4c Bug 1469072 - Add infrastructure to move Activity Stream into its own content process. r=kmag,mconley
Summary:
This patch adds the infrastructure to move Activity Stream (about:newtab, about:home,
and about:welcome) into its own special content process - the privileged content
process. This feature of running Activity Stream in the privileged content process
is disabled by default. (See "browser.tabs.remote.separatePrivilegedContentProcess"
preference.) We can deal with other about: pages in a follow-up.

Reviewers: mconley

Tags: #secure-revision

Bug #: 1469072

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

MozReview-Commit-ID: 5gIrP4LxcIt

--HG--
extra : rebase_source : d43c411ae60aad3d5a3a496e6729de0b547b4acd
2018-06-20 14:04:51 -04:00
Kris Maglione
6dd32d12e3 Bug 1442737: Use shared JSM global for compilation and privileged junk scopes. r=bholley
MozReview-Commit-ID: 3rLgxQVtc0X

--HG--
extra : rebase_source : 9486cd685b4db0f5f282a8cd362a05056064f32e
extra : intermediate-source : a1db50f691f000a0261a57d39da75675592ada9c
extra : source : 8477472996e06d06a21d8e602e4a92d0ec130ea3
2018-06-24 19:16:33 -07:00
Kris Maglione
14d61004ed Bug 1470793: Stop eagerly XDR encoding scripts in the preloader cache. r=erahm
MozReview-Commit-ID: 2e85c34zt8v

--HG--
extra : rebase_source : 82b750185b598418d2ad0842090fc53bfbeedde3
2018-06-24 18:37:50 -07:00
Kris Maglione
923f03d3d3 Bug 1471089: Improve handling of pre-loaded content processes in script preloader. r=erahm
MozReview-Commit-ID: GwZzQ0ic5Et

--HG--
extra : rebase_source : 0c02b45af7ea9f1bea9e9a4bd466b69aa97eb0f9
2018-06-25 17:45:34 -07:00
Coroiu Cristina
614012f859 Backed out changeset a1db50f691f0 (bug 1442737) for frequent mochitest failures on e.g: dom/workers/test/browser_fileURL.js 2018-06-27 10:58:48 +03:00
Jeff Gilbert
5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Kris Maglione
4f10d70a3d Bug 1442737: Use shared JSM global for compilation and privileged junk scopes. r=bholley
MozReview-Commit-ID: 3rLgxQVtc0X

--HG--
extra : rebase_source : 77afa66ef4fcdf8ac0ce1e2cae99d7a0992bc421
extra : amend_source : c97299a71b9b20370ae79ce4dd33c1833ca3f22f
extra : source : 8477472996e06d06a21d8e602e4a92d0ec130ea3
2018-06-24 19:16:33 -07:00
Margareta Eliza Balazs
616a3ce82b Backed out changeset 8477472996e0 (bug 1442737) for frequent mochitest failures e.g.: toolkit/components/alerts/test/test_principal.html 2018-06-26 11:28:50 +03:00
Kris Maglione
a81efd6ad5 Bug 1442737: Use shared JSM global for compillation and privileged junk scopes. r=bholley
MozReview-Commit-ID: 3rLgxQVtc0X

--HG--
extra : rebase_source : bc15130d4db2f449569dbefe1a11c39b2ba1ad10
2018-06-24 19:16:33 -07:00
Andi-Bogdan Postelnicu
f0ebe92a4a Bug 1453795 - XPConnect - Initialize member fields in classes/ structures. r=peterv
--HG--
extra : rebase_source : 656f79f07e30e4d1f410ff3c72d71650c8498812
2018-06-15 14:25:49 +03:00
Brindusan Cristian
f321a9bf6d Backed out changeset 32d9328cab02 (bug 1453795) as requested by Andi. CLOSED TREE 2018-06-21 13:30:07 +03:00
Andi-Bogdan Postelnicu
b5f08ab328 Bug 1453795 - XPConnect - Initialize member fields in classes/ structures. r=peterv
--HG--
extra : rebase_source : b996be8c8e2a7fea85f12c986644948360b47821
2018-06-15 14:25:49 +03:00
Jan de Mooij
cf5e1222da Bug 1469217 part 6 - Remove JSPROP_SHADOWABLE, address review comments. r=anba 2018-06-21 11:05:42 +02:00
Jan de Mooij
b47f1cb4ba Bug 1469217 part 3 - Clean up TryResolvePropertyFromSpecs; remove a bunch of macros. r=anba 2018-06-21 11:05:42 +02:00
Jan de Mooij
45a7ade57e Bug 1469217 part 2 - Add APIs taking getter/setter objects instead of JSNatives. r=anba 2018-06-21 11:05:42 +02:00
Jan de Mooij
539de0ae06 Bug 1469217 part 1 - Remove JSPROP_PROPOP_ACCESSORS. r=anba 2018-06-21 11:05:41 +02:00
Tom Schuster
7c01dffca0 Bug 1469540 - Remove option to disable Array.prototype.values. r=jandem
--HG--
extra : rebase_source : 5b935db0e58c076b289a7b5a3a8a43fe6e9446b3
2018-06-05 14:57:13 +02:00
Jan Beich
f2740b785d Bug 1468928 - Unbreak build without GeckoProfiler after bug 1405374. r=mstange
In file included from objdir/js/xpconnect/src/Unified_cpp_js_xpconnect_src1.cpp:110:
js/xpconnect/src/nsXPConnect.cpp:76:37: error: use of undeclared identifier
      'profiler_register_thread'
    JS::SetProfilingThreadCallbacks(profiler_register_thread, profiler_unregister_thread);
                                    ^
js/xpconnect/src/nsXPConnect.cpp:76:63: error: use of undeclared identifier
      'profiler_unregister_thread'
    JS::SetProfilingThreadCallbacks(profiler_register_thread, profiler_unregister_thread);
                                                              ^

MozReview-Commit-ID: HrBGEkByEum

--HG--
extra : rebase_source : b588e8f04d44d07c348120efc6008e6c24b8949e
2018-06-15 10:12:23 +00:00
Boris Zbarsky
9b13c30592 Bug 1467870. When cloning Xray expando chains for an adopt into the Xray compartment, don't lose expandos. r=mrbkap
This does mean that if the node is adopted back into the original document the
expandos would end up on the reflector at that point.  I think that's OK;
people shouldn't be adopting things in that direction.  Futhermore, if they
adopt, then set expandos, then adopt back they already get this behaviorl

So if we decide we don't want that, we should probably just avoid copying own
props when reparenting into a global whose principals don't subsume the old
global.
2018-06-14 19:06:43 -04:00
Jan de Mooij
a2548dc268 Bug 1468252 part 2 - Rename GetOriginalEval to GetRealmOriginalEval, remove scope argument. r=evilpie
--HG--
extra : rebase_source : f1aa3fc12fc775bf64318d16246555badbe83e78
2018-06-14 09:07:30 -07:00
Tom Schuster
f7c7d0f881 Bug 1435813 - Enable Array.prototype.flat and Array.prototype.flatMap in release builds. r=till
--HG--
extra : rebase_source : adc7e839e4d241857a89df6c6669c241a14466da
2018-06-05 14:41:41 +02:00
Jan de Mooij
2b3ff5c90a Bug 1468219 - Rename JS_InitStandardClasses to JS::InitRealmStandardClasses, remove obj argument. r=anba
--HG--
extra : rebase_source : 5c092c37298e89096b85524e92d143ff2447f31f
2018-06-13 12:47:47 -07:00
Jan de Mooij
de211d96a6 Bug 1468137 - Remove JS_Get*Prototype APIs; use JS::GetRealm*Prototype instead. r=evilpie
--HG--
extra : rebase_source : 9d5e815b83b3a71ab3e74fc2c0e2feb1009f2af9
2018-06-13 12:47:40 -07:00
Joel Maher
1ef32bf5c6 Bug 1405428 - skip-if = verify on xpcshell tests which do not pass test-verify. r=gbrown 2018-06-13 11:34:40 -04:00
Mike Conley
bf614c6737 Bug 1458375 - Make ScriptPreloader wait until browser-idle-startup-tasks-finished before writing cache. r=kmag
Originally, the ScriptPreloader stopped recording and wrote its cache when the
browser-delayed-startup-finished notification fired for the first window, but there
are other scripts (both in the content and WebExtension processes) that might run
soon after that we also want to cache.

This patch still makes the parent process stop recording scripts after
browser-delayed-startup-finished, but only prepares and writes the cache
once browser-idle-startup-tasks-finished fires, when it is much more likely
that the content and WebExtension caches are ready to go.

MozReview-Commit-ID: KiBEVvuqQkA

--HG--
extra : rebase_source : 6f0fde65cdafdecf72242a06416fef10304637b8
2018-06-11 12:19:02 -07:00
Steve Fink
bc2be79d2a Bug 1405374 - Register JS threads with the profiler, r=jonco
--HG--
extra : rebase_source : c29dffb341bff5e3f020ad0be6d48c045e178a5c
2018-06-07 15:37:08 -07:00