Commit Graph

158 Commits

Author SHA1 Message Date
Andrew McCreight
e8cbbfcbb1 Bug 1379023, part 4 - Remove mSystemPrincipal fields from mozJSSubScriptLoader and mozJSComponentLoader. r=mrbkap
The lone remaining use is trivial.

MozReview-Commit-ID: Gx0K69ArMJ2
2017-07-07 11:29:48 -07:00
Andrew McCreight
cb87257422 Bug 1379023, part 3 - Make WriteCachedScript assert about the system principal not require the argument. r=mrbkap
MozReview-Commit-ID: FRgjZ32ULqj
2017-07-07 11:27:53 -07:00
Andrew McCreight
30fc68cb25 Bug 1379023, part 2 - Remove unused systemPrincipal argument to ReadCachedScript. r=mrbkap
MozReview-Commit-ID: D59LfiHXbXJ
2017-07-07 11:14:04 -07:00
Andrew McCreight
959d2938a8 Bug 1379023, part 1 - Directly compute if we're compiling in a content compartment in DoLoadSubScriptWithOptions. r=mrbkap
The existing code uses various intermediate objects, but the only
thing they are used for now is to figure out if the compartment we're
in has the system principal or not, so just compute that directly.

MozReview-Commit-ID: FMoWfAX8rGW
2017-07-06 16:30:44 -07:00
Bill McCloskey
ce42826bdf Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Nicholas Nethercote
a58025002f 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.
2017-06-22 17:08:53 +10:00
Carsten "Tomcat" Book
238bf154d5 Backed out changeset 4f6302a98ae4 (bug 1372405) 2017-06-21 13:59:26 +02:00
Bill McCloskey
67e8af4720 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
bbe9441993 Backed out changeset 9846de3bd954 (bug 1372405) 2017-06-20 08:27:02 +02:00
Bill McCloskey
f69608368b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Alex Gaynor
dd2a59500e 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
2017-06-07 11:00:24 -04:00
Kris Maglione
0e0a0857ee Bug 1363301: Always provide live wrappers for ScriptSourceObjects. r=shu,bholley
MozReview-Commit-ID: LTNN66FywU4
2017-06-14 15:38:59 -07:00
Florian Quèze
b271e3fe16 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
Andrew McCreight
0f7cb13eac Bug 989373, part 5 - Eliminate |function| from subscript loader. r=kmag
Thanks to the previous patch, we never set any of the function
arguments, so they can be removed, and various code for running
functions can be deleted.

MozReview-Commit-ID: BTIIyDtBPMR
2017-05-17 09:21:54 -07:00
Andrew McCreight
204e251abe Bug 989373, part 4 - Remove reuse global flag from subscript loader. r=kmag
FindTargetObject in DoLoadSubScriptWithOptions will always return a
global object, so the boolean values we pass around to determine if a
global was being reused will always be false. The next patch will
eliminate the various |function| arguments that are now unused.

MozReview-Commit-ID: GvPNFGluRub
2017-05-15 15:04:45 -07:00
Andrew McCreight
dff2384e2f Bug 1365417 - mozJSComponentLoader::FindTargetObject() is infallible. r=kmag
MozReview-Commit-ID: Iw4ke16CTKg
2017-05-16 14:27:50 -07:00
Kris Maglione
2cd3833299 Bug 1361900: Part 7 - Use the script preloader in content processes in subscript and component loaders. r=mccr8
MozReview-Commit-ID: 4b5XwORYlAz
2017-04-30 21:53:49 -07:00
Sebastian Hengst
63dda6594f Backed out changeset 3c716b3b4541 (bug 1361900) 2017-05-13 18:53:25 +02:00
Kris Maglione
cf37efb8b1 Bug 1361900: Part 7 - Use the script preloader in content processes in subscript and component loaders. r=mccr8
MozReview-Commit-ID: 4b5XwORYlAz
2017-04-30 21:53:49 -07:00
Andrea Marchesini
80bc31371c 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
2017-05-08 08:24:22 +02:00
Carsten "Tomcat" Book
c4daf63d34 Backed out changeset 5d77f6b14633 (bug 1362119) for android bustage in nsCCUncollectableMarker.cpp:500:7: error: 'TraceScriptHolder' is not a member of 'mozilla' 2017-05-08 09:54:38 +02:00
Andrea Marchesini
71aba8e0ee 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
2017-05-08 08:24:22 +02:00
Kris Maglione
906b4d1986 Bug 1359653: Part 6 - Use the script precompiler in the JS component loader and subscript loader. r=mccr8,shu
MozReview-Commit-ID: HMl0xbAARHK
2017-05-03 22:06:33 -07:00
Sebastian Hengst
cd9951aeaf Backed out changeset a505dcbe8a02 (bug 1359653) 2017-05-06 11:02:18 +02:00
Kris Maglione
cf95f450b3 Bug 1359653: Part 6 - Use the script precompiler in the JS component loader and subscript loader. r=mccr8,shu
MozReview-Commit-ID: HMl0xbAARHK
2017-05-03 22:06:33 -07:00
Kris Maglione
959e20ef00 Bug 1356810: Use noScriptRval option by default for loadSubScript. r=billm
MozReview-Commit-ID: 50QVvrG4lzV
2017-04-15 09:32:34 -07:00
Andrew McCreight
3ce95981b4 Bug 1356799, part 4 - Remove unused argument to ReadScript. r=mrbkap
MozReview-Commit-ID: I5Jf0Fan7VN
2017-04-14 16:43:08 -07:00
Andrew McCreight
4bc465b680 Bug 1356799, part 3 - Handlify the target argument to ReadScript{,Async}. r=mrbkap
MozReview-Commit-ID: GOodGQ647qI
2017-04-14 16:35:34 -07:00
Andrew McCreight
dcf2af66d9 Bug 1356799, part 2 - Don't use JS:: for handle types in subscript loader. r=mrbkap
Also, be consistent with the rest of the code and use a handle
typedef in one place.

MozReview-Commit-ID: KY3cnLemoUl
2017-04-15 06:47:07 -07:00
Andrew McCreight
5dc71271b3 Bug 1356799, part 1 - Use one line per arg for methods with many args in subscript loader. r=mrbkap
MozReview-Commit-ID: BPZp6I0LSBH
2017-04-15 06:44:35 -07:00
Andrew McCreight
6b953d11e8 Bug 1356666, part 4 - Use handles as arguments in mozJSSubscriptLoader. r=mrbkap
MozReview-Commit-ID: 9fClU6BIWfT
2017-04-14 14:38:51 -07:00
Andrew McCreight
4001c0589d Bug 1356666, part 3 - Mark some functions in mozJSSubscriptLoader static. r=mrbkap
MozReview-Commit-ID: 7JsyR6B84Gz
2017-04-14 14:33:17 -07:00
Andrew McCreight
e96634ee68 Bug 1356666, part 2 - Fix some style issues in mozJSSubScriptLoader. r=mrbkap
mSystemPrincipal is an nsCOMPtr so it does not need to be explicitly
initialized.

Fields don't have to be lined up.

Empty function bodies don't need to be commented as such.

The blank line at the start of mozJSComponentLoader.cpp prevents Emacs
from using the mode line.

MozReview-Commit-ID: 7Az1x8jmxTI
2017-04-14 14:13:19 -07:00
Andrew McCreight
30ea73f258 Bug 1356666, part 1 - Rename target_obj to targetObj in mozJSSubscriptLoader. r=mrbkap
MozReview-Commit-ID: 89WugjhzPLk
2017-04-14 14:10:40 -07:00
Kris Maglione
8006ffc56d Bug 1333990: Follow-up: Use safer conversion functions when creating error message JS strings. r=bz
MozReview-Commit-ID: FimoWFIgUxL
2017-03-17 16:53:04 -07:00
Andrew McCreight
4abe3378d0 Bug 1344527 - Give up in ReadScriptAsync if we can't create a promise. r=bholley
MozReview-Commit-ID: Hq4vJZmfDpc
2017-03-09 09:24:28 -08:00
Jan Varga
2e688f6e8b Bug 1311057 - Part 1: Remove support for packaged apps from asmjscache; r=luke 2017-03-06 18:38:40 +01:00
Sylvestre Ledru
4c790b3a90 Bug 1338086 - Remove useless else blocks in order to reduce complexity in js/ r=bbouvier
MozReview-Commit-ID: Giwp0K1YoBH
2017-02-14 15:50:56 +01:00
Olli Pettay
3898f7d882 Bug 1326507, remove NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS, r=mccr8 2017-01-03 21:47:55 +02:00
Shu-yu Guo
314651e95b Bug 1315592 - Handle JS compilation errors in the async subscript loader. (r=bholley) 2016-12-02 17:36:42 -08:00
Tom Schuster
9dbf6d683f Bug 755821 - Parse arguments of Function constructor properly. r=shu 2016-10-15 11:47:00 +09:00
Jan de Mooij
21f6f04f90 Bug 1302448 part 2 - Rename XPCJSRuntime to XPCJSContext. r=mrbkap 2016-09-14 15:48:17 +02:00
Nicholas Nethercote
d2598a3a5e Bug 1297300 - Add missing checks to GetSpec() calls in caps/ and js/. r=mrbkap.
This required making GetScriptLocation() fallible.
2016-08-30 14:22:04 +10:00
Shu-yu Guo
45f2e559d8 Bug 1263355 - Rewrite the frontend: bindings. (r=jorendorff,Waldo) 2016-08-25 01:28:47 -07:00
Kan-Ru Chen
a9b19d0584 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES
2016-08-24 14:47:04 +08:00
Jan de Mooij
bfe36450fc Bug 1292892 part 5 - Replace most nsContentUtils::RootingCx calls with dom::RootingCx. r=bz,terrence 2016-08-11 14:39:23 +02:00
Jan de Mooij
0dfc221719 Bug 1286159 - Clean up FinishOffThread* APIs for off-thread parsing. r=jonco 2016-07-19 09:19:54 +02:00
Jan de Mooij
f1ef5969c3 Bug 1274915. Switch JS::DescribeScriptedCaller to walk through saved frames when walking the JS stack. r=bzbarsky 2016-05-26 20:36:09 -04:00
Kyle Huey
a9cf047227 Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Tooru Fujisawa
19440c925e Bug 1153978 - Part 2: Clear pending exception thrown from XDR related APIs when ignoring ReadCachedScript failure. r=bz 2016-03-22 16:48:38 +09:00