Commit Graph

5826 Commits

Author SHA1 Message Date
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
Geoff Brown
9fd2e18b44 Bug 1255284 - Skip test_bug484459.xul on linux-opt for intermittent failures; r=me,test-only 2017-06-26 10:11:52 -06: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
Florian Quèze
66f6d259bc Bug 1374282 - script generated patch to remove Task.jsm calls, r=Mossop. 2017-06-22 12:51:42 +02: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
Florian Quèze
e8657ec4a4 Bug 1374759 - mozJSComponentLoader::LoadModule should add a pseudo stack frame showing which script is loaded, r=mstange. 2017-06-20 22:11:06 +02: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
Alex Gaynor
45abd268c3 Bug 1221148 - Allow passing blob:// URIs to mozIJSSubScriptLoader; r=smaug
This is useful for legacy addons as we increasingly lockdown filesystem access
in content processes.

MozReview-Commit-ID: AZbsSFpbIvt

--HG--
extra : rebase_source : 56dfe91ac9fbeb0bd48dc8a2f87ed6038e7521cc
2017-06-07 11:00:24 -04:00
Kris Maglione
9c02fdf113 Bug 1363301: Always provide live wrappers for ScriptSourceObjects. r=shu,bholley
MozReview-Commit-ID: LTNN66FywU4

--HG--
extra : rebase_source : 6fc6bd6077229fe511b02116b9e3f9eb1c99f2fa
2017-06-14 15:38:59 -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
a5e2cbd774 Bug 1373047 - mozJSSubScriptLoader::LoadSubScript should add a pseudo stack frame showing which script is loaded, r=mstange. 2017-06-15 00:58:25 +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
Jan Keromnes
d14a6bb45e Bug 1372877 - Use nullptr in /js (clang-tidy: modernize-use-nullptr). r=nbp
--HG--
extra : rebase_source : cac11ab1f6be2dc44630aba992c2ce75d783fe66
2017-06-14 07:36:00 -04: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
Carsten "Tomcat" Book
bd7620cf36 Merge mozilla-central to mozilla-inbound 2017-06-13 12:11:42 +02:00
Carsten "Tomcat" Book
d67ef71097 merge mozilla-inbound to mozilla-central a=merge 2017-06-13 12:09:48 +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
Andrew McCreight
b314f1f7d0 Bug 1372295 - Call SetLocationForGlobal in a single location in the loader. r=kmag
SetLocationForGlobal is called on globals created for JSMs to give
them a nice name for about:memory. Right now this is done in
ImportInto and LoadModule, but I think it makes more sense to set the
name once, right after the global is created. Calling GetSpec on aURI
seems to return the same spec we'd use in these two call sites. This
change makes it easier to label the shared JSM global nicely in bug
1186409.

MozReview-Commit-ID: 5qKMbzLEiuG

--HG--
extra : rebase_source : c5f104381187cf55a171916364fba527c44b4172
2017-06-12 10:45:52 -07:00
Ehsan Akhgari
3615b687a6 Bug 1361461 - Dispatch the compartment-nuking part of WindowDestroyedEvent to the idle queue; r=smaug 2017-06-08 09:49:49 -04:00
Carsten "Tomcat" Book
383edc0429 Backed out changeset 575e351a12af (bug 1361461) for causing frequent reftest assertion failures like Assertion failure: false (Ran out of memory while building cycle collector graph), at z:/build/build/src/xpcom/base/nsCycleCollector.cpp:929
--HG--
extra : rebase_source : d4b0d05b42656579e35efde2d676c2f8f0115299
2017-06-08 11:27:43 +02:00
Ehsan Akhgari
8e38408bd7 Bug 1361461 - Dispatch the compartment-nuking part of WindowDestroyedEvent to the idle queue; r=smaug 2017-06-07 21:49:03 -04:00
Ehsan Akhgari
3cc0bd4b17 Backout bug 1361461 due to potentially introducing some intermittent reftest failures 2017-06-07 13:01:24 -04:00
Ehsan Akhgari
db983a3ae9 Bug 1361461 - Dispatch the compartment-nuking part of WindowDestroyedEvent to the idle queue; r=smaug 2017-06-07 10:57:09 -04:00
Kris Maglione
bd72f4a6ff Bug 1366402: Use AutoMemMap helper in mozJSComponentLoader. r=mccr8
This helper is already being used in the script preloader, and encapsulates
all of the memory mapping and RAII logic used to do the same in the component
loader. Reusing it there allows us to remove a lot of redundant code.

This is applied on top of the patches for bug 989373 in order to avoid
conflicts.

MozReview-Commit-ID: AJ26qV4JLci

--HG--
extra : rebase_source : 88a338ef9a88ff0b775f3f31600f32892b932940
extra : amend_source : 8312eef5078b2782c872ae964c23c2adb54f5ef7
2017-05-20 12:20:35 -07:00
Ehsan Akhgari
3abec0f53d Bug 1370100 - Make browser_dead_object.js correctly wait for the window to be destroyed instead of relying on the scheduling of the corresponding event; r=kmag 2017-06-04 21:42:09 -04:00
Kris Maglione
e51750a9c4 Bug 1322235: Part 6 - Replace AddonPolicyService with a stub implementation in ExtensionPolicyService. r=mixedpuppy,zombie
This replaces the JS policy service stubs with a pure C++ version which
directly makes policy decisions based on active WebExtensionPolicy objects.

This is the first step in a larger refactoring, which will remove the
ExtensionManagement module entirely, and replace the current add-on policy
service with direct, non-virtual access to native WebExtensionPolicy objects.

It will also be followed by related changes to migrate the content script and
extension page matching to native code, based on the existing MatchPattern and
WebExtensionPolicy bindings.

MozReview-Commit-ID: 2MpbmXZGiPZ

--HG--
extra : rebase_source : 8b268618164b45605143e858665e592de829a6fa
2017-06-03 17:12:14 -07:00
Ehsan Akhgari
bcf998a848 Bug 1370101 - Make test_windowProxyDeadWrapper.html correctly wait for the window to be destroyed instead of relying on the scheduling of the corresponding event; r=kmag 2017-06-04 19:33:16 -04:00
Ehsan Akhgari
a621e63109 Bug 1368275 - Make test_nukeContentWindow.html correctly wait for the window to be destroyed instead of relying on the scheduling of the corresponding event; r=kmag 2017-06-03 12:20:27 -04:00
Ting-Yu Chou
2ac7ffc557 Bug 1363963 - Check whether there are expando object attached before trying to retrieve it. r=bholley
In most cases no expando object has ever been attached, we don't need to do a
lot of things and realize it in the last minute.

MozReview-Commit-ID: 5u9ivZQj5L8

--HG--
extra : rebase_source : 71405f978a7c832a6694206bf0410debe596967c
2017-05-26 10:04:40 +08: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
Florian Quèze
0adcd1d3e9 Bug 1358798 - add a test preventing us from loading scripts unintentionally during startup, r=mconley,mccr8. 2017-05-31 23:00:43 +02:00