Commit Graph

149 Commits

Author SHA1 Message Date
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
Benjamin Bouvier
e9e5750ced Bug 1251308; r=luke
MozReview-Commit-ID: AqsMX4m7Qh9
2016-03-09 11:20:11 +01:00
Luke Wagner
786af33c6f Bug 1239601 - improve the UniquePtr situation (r=jandem) 2016-01-15 18:26:20 -06:00
Yury Delendik
9d66bcc1d8 Bug 1218029 - Adds ScriptLoadHandler and implements OnIncrementalData callback. r=djvj 2015-12-01 08:00:58 -06:00
Yury Delendik
e2f6e193ca Bug 1218029 - Adds IncrementalStreamLoader interface stubs. r=djvj 2015-11-30 08:54:11 -06:00
Birunthan Mohanathas
ac37dec517 Bug 1219392 - Capitalize mozilla::unused to avoid conflicts. r=froydnj 2015-11-02 07:53:26 +02:00
Nathan Froyd
4e6d8f6705 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi
2015-10-18 01:24:48 -04:00
Christoph Kerschbaumer
22c292db5a Bug 1206149 - Use channel->AsyncOpen2() js/xpconnect/loader/mozJSSubScriptLoader.cpp (r=sicking) 2015-09-19 20:26:09 -07:00
Fabrice Desré
c4e3562ccd Bug 1179102 - The async version of loadSubscript doesn't get the right JS version. r=bholley 2015-07-01 16:26:08 -07:00
Shu-yu Guo
6254376e59 Bug 1165486 - Use JS::CompileForNonSyntacticScope in Gecko where we used to set polluted global scope. (r=bz, rs=bholley) 2015-06-21 11:49:57 -07:00