Commit Graph

151 Commits

Author SHA1 Message Date
Tooru Fujisawa
556e7c80df Bug 1283710 - Part 5: Rename message to toStringResult if it is the result of toString. r=bholley,jwalden,froydnj 2016-08-14 20:39:31 +09:00
Tooru Fujisawa
044b5a993c Bug 1283710 - Part 4: Do not duplicate message in ExpandErrorArgumentsVA, and remove message parameter from WarningReporter. r=jwalden 2016-08-14 20:39:31 +09:00
Cameron McCormack
a8ce0e16c4 Bug 1309082 - Part 1: Extract image tracking from nsDocument into a separate, refcounted object. r=bholley
This is refcounted as we'll need to hold strong references to the ImageTracker
from style structs that load images.

MozReview-Commit-ID: 994gE9tOjAn
2016-10-13 15:04:15 +08:00
Jan de Mooij
b402a91ead Bug 1302448 part 1 - Rename CycleCollectedJSRuntime to CycleCollectedJSContext. r=mccr8 2016-09-14 15:47:32 +02:00
Jan de Mooij
acea709a0a Bug 1292892 part 3 - Pass RootingContext to ScriptErrorEvent, DispatchScriptErrorEvent. r=bz 2016-08-11 14:39:22 +02:00
Jan de Mooij
7aaedf17ba Bug 1292892 part 2 - Some RootingContext cleanup. r=bz,terrence 2016-08-11 14:39:22 +02:00
Jan de Mooij
bd0f1c9018 Bug 1292892 part 1 - Stop using JSRuntime outside SpiderMonkey. r=bz,terrence,fitzgen,kanru 2016-08-11 14:39:22 +02:00
Olli Pettay
68fea95059 Bug 1292699 - Add a small helper to deal with cases when native side needs to ensure that slow script dialog shows up, r=bholley 2016-08-08 23:29:05 +03:00
Boris Zbarsky
94ee2d733d Bug 1289129. When setting up an AutoJSAPI with a global, make sure to expose that global to active JS. r=mccr8 2016-07-27 11:05:36 -04:00
Boris Zbarsky
bc044bf637 Bug 1282150 part 6. Get rid of GetSafeJSContext. r=bholley 2016-07-07 20:08:26 -04:00
Boris Zbarsky
218b278258 Bug 1282150 part 3. Add a way to get the JSRuntime for the thread, and use it in various places for rooting. r=bholley 2016-07-07 20:08:26 -04:00
Boris Zbarsky
cb47ca8628 Bug 1282150 part 2. Get rid of GetDefaultJSContextForThread. r=bholley 2016-07-07 20:08:26 -04:00
Boris Zbarsky
f271f3b4f3 Bug 1282150 part 1. Add a mozilla::dom::danger::GetJSContext API. r=bholley 2016-07-07 20:08:26 -04:00
Boris Zbarsky
c3889c8b5d Bug 1279313 part 1. Simplify AutoEntryScript to not make callers pass in a JSContext. r=bholley 2016-07-07 20:08:25 -04:00
Jan de Mooij
31bd9d01bb Bug 1283855 part 5 - Make warning reporter APIs take JSContext instead of JSRuntime. r=arai 2016-07-05 11:06:05 +02:00
Boris Zbarsky
f21ed792e7 Bug 767938 part 10. Remove the now write-only XPCJSContextStack's actual stack of JSContexts and AutoCxPusher. r=bholley 2016-06-24 14:19:51 -04:00
Boris Zbarsky
4302520f70 Bug 767938 part 9. Move the JSAutoRequest from AutoCxPusher to AutoJSAPI, because we're about to kill off AutoCxPusher. r=bholley 2016-06-24 14:19:51 -04:00
Boris Zbarsky
b701321a3b Bug 767938 part 7. Remove the now-debug-only uses of XPCJSContextStack::Peek and Count(). r=bholley 2016-06-24 14:19:50 -04:00
Boris Zbarsky
08aa29906e Bug 767938 part 6. Get rid of XPConnect's GetCurrentJSContext getter. r=bholley 2016-06-24 14:19:50 -04:00
Boris Zbarsky
c22f2628d7 Bug 767938 part 5. Stop using the JSContext stack to get the current JSContext. r=bholley 2016-06-24 14:19:50 -04:00
Boris Zbarsky
701c9e4db7 Bug 767938 part 3. Make AutoJSAPI a ScriptSettingsStackEntry. r=bholley 2016-06-24 14:19:50 -04:00
Boris Zbarsky
73b3ab45b9 Bug 767938 part 2. Move control over pushing/popping ScriptSettingsStackEntry instances into subclasses, so we can do the conditional pushing/popping AutoJSAPI will need. r=bholley 2016-06-24 14:19:50 -04:00
Boris Zbarsky
2ad0d6e510 Bug 767938 part 1. Change ScriptSettingsStackEntry to allow having stack entries that are neither candidates for being entry globals nor candidates for being incumbent globals. r=bholley 2016-06-24 14:19:50 -04:00
Boris Zbarsky
dad6444819 Bug 1276327. Remove the non-debug use of CxPusherIsStackTop(). r=bholley 2016-06-20 17:40:39 -04:00
Jan de Mooij
776a5c9ce9 Bug 1277278 part 3 - Rename error reporter callback to warning reporter, assert it's only used for warnings. r=luke 2016-06-07 20:30:48 +02:00
Jan de Mooij
2474a5e7b4 Bug 1277278 part 1 - Remove ContextOptions and make autoJSAPIOwnsErrorReporting the default. r=luke 2016-06-07 20:30:48 +02:00
Boris Zbarsky
782a0a5e96 Bug 1276276 part 5. Change AutoCxPusher to not worry about nsIScriptContext, since its JSContext never has one anymore. r=smaug 2016-06-02 10:34:40 -04:00
Boris Zbarsky
5e889be918 Bug 1276276 part 2. Change AutoEntryScript to always use the safe jscontext instead of trying to find a global-specific one. r=smaug 2016-06-02 10:34:39 -04:00
Boris Zbarsky
cf418cb737 Bug 1276276 part 1. Make AutoJSAPI hold a strong ref to the nsIGlobalObject it's initialized with, so it won't go away while we're working with it. r=smaug 2016-06-02 10:34:39 -04:00
Boris Zbarsky
eae0cd4ef7 Bug 1275999 part 4. Change XPCJSContextStack::Push to return void. r=bholley 2016-05-27 09:53:32 -04:00
Aryeh Gregor
dafcf4b652 Bug 1193762 part 4 - Avoid nsCOMPtr in ternary operator; r=froydnj 2016-05-01 21:29:22 +03:00
Olli Pettay
0fd40d8ce7 Bug 1257096, don't try to report about unusual unhandled rejected Promises, r=bz,waldo 2016-04-20 02:29:21 +03:00
Nathan Froyd
1d19f68110 Bug 1177488 - use |const char*| for representing async call reasons; r=bz,fitzgen
Using a simple |const char*| is more memory-efficient than allocating a
JS string. We still have to allocate the JS string for passing things
into JS, but ideally we will be able to move the point of allocation
much closer to where it's actually needed, rather than indiscriminantly
doing it all the time.
2016-03-23 10:40:53 -04:00
Wes Kocher
dc720b3761 Backed out changeset 95494e68c722 (bug 1177488) for crashes in test_bug732665.xul CLOSED TREE
MozReview-Commit-ID: IFUHUBUCnCD
2016-03-25 12:11:48 -07:00
Nathan Froyd
e3370b97e9 Bug 1177488 - use |const char*| for representing async call reasons; r=bz,fitzgen
Using a simple |const char*| is more memory-efficient than allocating a
JS string. We still have to allocate the JS string for passing things
into JS, but ideally we will be able to move the point of allocation
much closer to where it's actually needed, rather than indiscriminantly
doing it all the time.
2016-03-23 10:40:53 -04:00
Boris Zbarsky
a50c6aa31a Bug 1255817 part 2. Get rid of AutoJSAPI::OwnsErrorReporting and AutoJSAPI::TakeOwnershipOfErrorReporting. r=bholley 2016-03-23 11:44:54 -04:00
Boris Zbarsky
3df1f7c947 Bug 1255817 part 1. Make AutoJSAPI always take ownership of error reporting. r=bholley 2016-03-23 11:44:54 -04:00
Boris Zbarsky
5c293ef701 Bug 1257725 part 6. Get rid of ThreadsafeAutoJSContext. r=bholley 2016-03-23 11:02:57 -04:00
Boris Zbarsky
17eb1e3d40 Bug 1257306. Simplify the implementation of AutoSafeJSContext (and therefore AutoJSContext, since AutoSafeJSContext will no longer be an AutoJSContext). r=bholley 2016-03-17 23:23:55 -04:00
Boris Zbarsky
c181bb2d05 Logging patch for bug 1256008. r=khuey 2016-03-15 17:25:53 -04:00
Boris Zbarsky
49c8f8377b Bug 1256424. Get rid of ThreadsafeAutoSafeJSContext. r=bholley 2016-03-14 20:48:39 -04:00
Wes Kocher
8f4c132a28 Backed out changeset ee3c99e6f676 (bug 1177488) for LeakSanitizer failures
MozReview-Commit-ID: FFfF4u2vOrS
2016-03-14 13:15:21 -07:00
Nathan Froyd
63fef39e49 Bug 1177488 - use |const char*| for representing async call reasons; r=bz,fitzgen
Using a simple |const char*| is more memory-efficient than allocating a
JS string.  We still have to allocate the JS string for passing things
into JS, but ideally we will be able to move the point of allocation
much closer to where it's actually needed, rather than indiscriminantly
doing it all the time.
2016-03-08 16:29:25 -05:00
Boris Zbarsky
7a37820bb0 Fix the asset for bug 1112920 to not touch uninitialized memory. Totally my fault, since I moved it above the mCx assignment, and now we have a CLOSED TREE. 2016-03-09 23:17:10 -05:00
Boris Zbarsky
840ce8ebbd Bug 1255192 part 2. Clean up the JSContext usage around xpc::FindExceptionStackForConsoleReport now that it just needs a JSContext for rooting. r=bholley 2016-03-09 22:27:14 -05:00
Bobby Holley
04e68b8140 Bug 1112920 - Assert against pending exceptions in AutoJSAPI::InitInternal. v1 r=luke,r=smaug 2016-03-09 22:27:13 -05:00
Boris Zbarsky
2a02551283 Bug 1255181. Remove AutoJSAPI::InitWithLegacyErrorReporting. r=bholley 2016-03-09 19:02:25 -05:00
Boris Zbarsky
63091385d1 Bug 1254847 part 3. Make AutoEntryScript always take ownership of error reporting. r=bholley 2016-03-09 19:02:03 -05:00
Boris Zbarsky
4d8d19d5b8 Bug 1254846. Add an AutoEntryScript constructor that takes a JSObject instead of an nsIGlobalObject, for convenience. r=bholley 2016-03-09 15:28:26 -05:00
Boris Zbarsky
43973730c3 Bug 1254230 kinda-fix. Make sure to never send script errors with stacks attached to the console service if the associated windows have already had FreeInnerObjects called on them. r=bholley 2016-03-08 17:21:40 -05:00