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
Boris Zbarsky
d54ffd537c
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
bfc4e6d316
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
c1b732f3d9
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
f018afdaa4
Bug 1252565 part 2. Make dom::WarningOnlyErrorReporter handle workers. r=bholley
2016-03-01 16:53:22 -05:00
Wes Kocher
adfb7f3fb9
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
2016-03-02 10:44:11 -08:00
Boris Zbarsky
fb768d696e
Bug 1252565 part 2. Make dom::WarningOnlyErrorReporter handle workers. r=bholley
2016-03-01 16:53:22 -05:00
Boris Zbarsky
b4e65ce236
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
1a7b3bc8de
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
e8af293d33
Bug 1252565. Make dom::WarningOnlyErrorReporter handle workers. r=bholley
2016-03-01 16:53:22 -05:00
Boris Zbarsky
9860ecf4b9
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
e95edb30a9
Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug
2016-01-30 09:05:36 -08:00
Tom Tromey
2177f7ad7f
Bug 757969 - use __thread in ThreadLocal; r=froydnj
2016-01-22 10:33:44 -07:00
Boris Zbarsky
10bf49ff92
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
44be0e2b6a
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
72da573d4d
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
Nikhil Marathe
d52fe095ba
Bug 1225717. Make AutoJSAPI::TakeOwnershipOfErrorReporting actually work on workers as long as no one calls JS_ReportPendingException manually. r=bholley
2015-11-20 16:29:41 -05:00
Tom Tromey
78a4089dd0
Bug 1160307 - capture async stack frames on Javascript timeline markers. r=fitzgen, r=smaug r=Paolo
2015-11-05 11:31:00 +01: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
Bobby Holley
6c2889d971
Bug 1214488 - Allow native callers in GetEntryGlobal. r=me
2015-10-13 22:17:33 -07:00
Ryan VanderMeulen
f9e08f4bc8
Backed out changeset 0dca237df7e2 (bug 1160307) for causing bug 1184752.
2015-07-16 20:38:13 -04:00
Tom Tromey
ce3642ea48
Bug 1160307 - Capture async stack frames on Javascript timeline markers. r=fitzgen, r=smaug, r=Paolo
2015-07-15 12:15:00 -04:00
Boris Zbarsky
9839f696ce
Bug 1174486 part 2. Add a way to explicitly report a pending exception on an AutoJSAPI that has taken ownership of error reporting. r=bholley
...
This is needed for some cases that currently report an exception and then do
some other work on the same cx (specifically, nsXBLProtoImplField::InstallField).
2015-06-15 20:10:38 -04:00
Olli Pettay
e5c0524c64
Bug 1149891, backout bug 1081038 because it made us run mutation observer callbacks against the spec, part 1, r=bholley
2015-05-29 19:10:19 +03:00
Tom Tromey
432a71e8cd
Bug 1168593 - Make AutoStableStringChars::init use MOZ_WARN_UNUSED_RESULT. r=jandem
2015-05-28 11:57:00 -04:00
Tom Tromey
9ff6bd9297
Bug 1050500 - Add callee information to Javascript timeline markers. r=smaug
2015-05-20 05:28:00 -04:00
Andrew McCreight
92010d3e4c
Bug 1152551, part 2 - Fix mode lines in dom/. r=jst
2015-05-03 15:32:37 -04:00
Jim Blandy
f94dd3b1df
Bug 1152577: Add 'aReason' argument to AutoEntryScript constructor, and provide plausible names for its instantiations. r=bholley
2015-04-08 21:23:48 -04:00
Ryan VanderMeulen
ef0ab06f80
Merge m-c to fx-team. a=merge
2015-03-27 12:21:41 -04:00
Dave Townsend
1e39268277
Bug 1144750: Don't attempt to report errors that will cause the warnings only reporter to assert. r=bholley
2015-03-18 14:51:18 -07:00
Wes Kocher
a480ed49af
Backed out changeset 7588e6588dd3 (bug 1144750) for static analysis failures
2015-03-26 15:52:13 -07:00
Dave Townsend
ea61e22619
Bug 1144750: Don't attempt to report errors that will cause the warnings only reporter to assert. r=bholley
2015-03-18 14:51:18 -07:00
Bobby Holley
10b24f16f2
Bug 1147215 - Add a helper to get the current window with a null check. r=smaug
2015-03-26 12:24:53 -07:00
Bobby Holley
405635d923
Bug 1101416 - Don't assert against pending exceptions in AutoNoJSAPI. r=luke,r=smaug
2014-12-17 16:34:37 -08:00
Nikhil Marathe
291c925e41
Bug 1107777 - Add autoJSAPIOwnsErrorReporting flag to JSContext options. AutoJSAPI sets it. r=bholley
2014-12-16 02:02:37 -08:00
Nikhil Marathe
8276591cbb
Bug 1107684 - ScriptSettings.cpp xpc::ErrorReport::Init() callers should not pass string where boolean is expected. r=bholley
2014-12-04 09:47:48 -08:00
Bobby Holley
7292d0428b
Bug 1103324 - Instantiate an AutoNoJSAPI when dispatching IPC messages. r=billm
2014-12-06 09:51:14 -08:00
Gabor Krizsanits
5c434f1084
Bug 1081038 - part1: Microtask in AutoEntryScript. r=bholley
2014-11-14 16:46:26 +01:00
Kannan Vijayan
f7e1348563
Bug 1050774 - Record script execution in timeline view. r=bholley
2014-11-13 16:22:24 -05:00