Jan de Mooij
da9820d563
Bug 1292892 part 3 - Pass RootingContext to ScriptErrorEvent, DispatchScriptErrorEvent. r=bz
2016-08-11 14:39:22 +02:00
Jan de Mooij
5a6befce76
Bug 1292892 part 2 - Some RootingContext cleanup. r=bz,terrence
2016-08-11 14:39:22 +02:00
Jan de Mooij
0ad12515f4
Bug 1292892 part 1 - Stop using JSRuntime outside SpiderMonkey. r=bz,terrence,fitzgen,kanru
2016-08-11 14:39:22 +02:00
Olli Pettay
06c2ac8e59
Bug 1292699 - Add a small helper to deal with cases when native side needs to ensure that slow script dialog shows up, r=bholley
...
--HG--
extra : rebase_source : ab0fc332e5b54921d7a05e0c008c65b29947ee27
2016-08-08 23:29:05 +03:00
Boris Zbarsky
3f84f0b441
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
0184b4df38
Bug 1282150 part 6. Get rid of GetSafeJSContext. r=bholley
2016-07-07 20:08:26 -04:00
Boris Zbarsky
d208b0de7a
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
e990418707
Bug 1282150 part 2. Get rid of GetDefaultJSContextForThread. r=bholley
2016-07-07 20:08:26 -04:00
Boris Zbarsky
6542e6c3f0
Bug 1282150 part 1. Add a mozilla::dom::danger::GetJSContext API. r=bholley
2016-07-07 20:08:26 -04:00
Boris Zbarsky
eb139d85bf
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
31f7512e9f
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
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