Commit Graph

136 Commits

Author SHA1 Message Date
Boris Zbarsky
9b1f1daa04 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
cca4d3bf70 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
ad60b5c087 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
16f83caaad Bug 767938 part 6. Get rid of XPConnect's GetCurrentJSContext getter. r=bholley 2016-06-24 14:19:50 -04:00
Boris Zbarsky
edb18fcfaf 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
674ca7344c Bug 767938 part 3. Make AutoJSAPI a ScriptSettingsStackEntry. r=bholley 2016-06-24 14:19:50 -04:00
Boris Zbarsky
e7805058b1 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
78464e8e2a 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
30a9fd5097 Bug 1276327. Remove the non-debug use of CxPusherIsStackTop(). r=bholley 2016-06-20 17:40:39 -04:00
Jan de Mooij
dad997a833 Bug 1277278 part 3 - Rename error reporter callback to warning reporter, assert it's only used for warnings. r=luke
--HG--
extra : rebase_source : ac1febc5220d649853f35c29de89a5e9ffb4fe98
2016-06-07 20:30:48 +02:00
Jan de Mooij
66faed38af Bug 1277278 part 1 - Remove ContextOptions and make autoJSAPIOwnsErrorReporting the default. r=luke
--HG--
extra : rebase_source : aa1dcba100a3bb7a5057b07284cf4a99353afe5a
2016-06-07 20:30:48 +02:00
Boris Zbarsky
718461c894 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
43a4676066 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
2385de9556 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
e9c3b988dd Bug 1275999 part 4. Change XPCJSContextStack::Push to return void. r=bholley 2016-05-27 09:53:32 -04:00
Aryeh Gregor
585263dafa Bug 1193762 part 4 - Avoid nsCOMPtr in ternary operator; r=froydnj 2016-05-01 21:29:22 +03:00
Olli Pettay
cc6d1d9827 Bug 1257096, don't try to report about unusual unhandled rejected Promises, r=bz,waldo
--HG--
extra : rebase_source : a53d6853feeae3c54f307cef71edcdba4f771803
2016-04-20 02:29:21 +03:00
Nathan Froyd
cccdd9fbca 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
ea76ed99d7 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
418aa2af4f 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
e3b2de6aa9 Bug 1255817 part 2. Get rid of AutoJSAPI::OwnsErrorReporting and AutoJSAPI::TakeOwnershipOfErrorReporting. r=bholley 2016-03-23 11:44:54 -04:00
Boris Zbarsky
865750a216 Bug 1255817 part 1. Make AutoJSAPI always take ownership of error reporting. r=bholley 2016-03-23 11:44:54 -04:00
Boris Zbarsky
08a17f586c Bug 1257725 part 6. Get rid of ThreadsafeAutoJSContext. r=bholley 2016-03-23 11:02:57 -04:00
Boris Zbarsky
770278cde1 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
73264695a7 Logging patch for bug 1256008. r=khuey 2016-03-15 17:25:53 -04:00
Boris Zbarsky
3ff438ab43 Bug 1256424. Get rid of ThreadsafeAutoSafeJSContext. r=bholley 2016-03-14 20:48:39 -04:00
Wes Kocher
168746512d Backed out changeset ee3c99e6f676 (bug 1177488) for LeakSanitizer failures
MozReview-Commit-ID: FFfF4u2vOrS

--HG--
extra : rebase_source : 0c7f5e290b388b2f35837a5f757f2d962b973da3
2016-03-14 13:15:21 -07:00
Nathan Froyd
6b6c2a1fcd 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
58fe6d3754 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
692754b232 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
9444208244 Bug 1112920 - Assert against pending exceptions in AutoJSAPI::InitInternal. v1 r=luke,r=smaug 2016-03-09 22:27:13 -05:00
Boris Zbarsky
c1e007e11b Bug 1255181. Remove AutoJSAPI::InitWithLegacyErrorReporting. r=bholley 2016-03-09 19:02:25 -05:00
Boris Zbarsky
36d4079be7 Bug 1254847 part 3. Make AutoEntryScript always take ownership of error reporting. r=bholley 2016-03-09 19:02:03 -05:00
Boris Zbarsky
d0363ce0e6 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
3e5ab54341 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
Boris Zbarsky
2e2d6cac3d Bug 1254380 part 3. Skip firing error events for mainthread out of memory exceptions via AutoJSAPI::ReportException. r=bholley 2016-03-08 17:21:40 -05:00
Boris Zbarsky
81b9b7ac71 Bug 1254380 part 2. Go ahead and log the stack from our exception in AutoJSAPI::ReportException even if we don't have a window. r=bholley 2016-03-08 17:21:40 -05:00
Boris Zbarsky
5b4134a282 Bug 1254380 part 1. Find the relevant window when the compartment we've got is an addon sandbox compartment in AutoJSAPI exception/warning reporting code. r=bholley 2016-03-08 17:21:40 -05:00
Boris Zbarsky
4f623415e0 Bug 1252565 part 2. Make dom::WarningOnlyErrorReporter handle workers. r=bholley 2016-03-01 16:53:22 -05:00
Wes Kocher
cba1a7bd55 Backed out 2 changesets (bug 1252565) for windows build bustage CLOSED TREE
Backed out changeset 9de2c10a1cc3 (bug 1252565)
Backed out changeset fc5c4cb02d24 (bug 1252565)

MozReview-Commit-ID: GCQedQwqslg

--HG--
extra : amend_source : 5fb6bd99e2ac56c01c06e1004262dfeb2ea56410
2016-03-02 10:44:11 -08:00
Boris Zbarsky
3bad87c74a Bug 1252565 part 2. Make dom::WarningOnlyErrorReporter handle workers. r=bholley 2016-03-01 16:53:22 -05:00
Boris Zbarsky
1538f85b56 Bug 1072144 part 6. Switch WorkerRunnable::Run to calling TakeOwnershipOfErrorReporting on its AutoJSAPI/AutoEntryScript and remove the remaining JS_ReportPendingException callers in worker code. r=khuey 2016-03-01 16:52:27 -05:00
Wes Kocher
01574acd0a Backed out changeset 96580db9b356 (bug 1252565) for test_recursion.html failures
MozReview-Commit-ID: 1ycmM8vfG3d
2016-03-01 15:40:46 -08:00
Boris Zbarsky
68dc8de0a0 Bug 1252565. Make dom::WarningOnlyErrorReporter handle workers. r=bholley 2016-03-01 16:53:22 -05:00
Boris Zbarsky
3dba4c9b72 Bug 1248719. Fix things so that taking ownership of error reporting on an AutoJSAPI on a worker is OK even if that AutoJSAPI was initialized without an explicit global. r=bholley 2016-02-17 22:56:36 -05:00
Kyle Huey
91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Tom Tromey
5412728905 Bug 757969 - use __thread in ThreadLocal; r=froydnj 2016-01-22 10:33:44 -07:00
Boris Zbarsky
89a6485e7f Bug 1172246. Make sure CallSetup's handling of exceptions it wants to deal with itself works even when the callable is a JSNative that uses the JS_Report*Error APIs instead of throwing exceptions in the usual way. r=bholley 2015-06-08 16:16:27 -04:00
Boris Zbarsky
888bc2d651 Back out bug 1172246 because of mochitest-JP bustage. Who needs tests that we care about running on try anyway? 2015-11-20 18:00:27 -05:00
Boris Zbarsky
bc25c907d6 Bug 1172246. Make sure CallSetup's handling of exceptions it wants to deal with itself works even when the callable is a JSNative that uses the JS_Report*Error APIs instead of throwing exceptions in the usual way. r=bholley 2015-06-08 16:16:27 -04:00