Commit Graph

84 Commits

Author SHA1 Message Date
Nathan Froyd
01583602a9 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

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Bobby Holley
f8fad054ff Bug 1214488 - Allow native callers in GetEntryGlobal. r=me 2015-10-13 22:17:33 -07:00
Ryan VanderMeulen
7f057e1c5f Backed out changeset 0dca237df7e2 (bug 1160307) for causing bug 1184752.
--HG--
extra : rebase_source : 56a2060af6a1d4cbb1f21665d65e50ec3b834265
2015-07-16 20:38:13 -04:00
Tom Tromey
3ff8c1f3fa 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
6d8f096996 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
f366ad344b Bug 1149891, backout bug 1081038 because it made us run mutation observer callbacks against the spec, part 1, r=bholley
--HG--
extra : rebase_source : 2ca34acdc148fceb35439aff38b97daf51f1fd65
2015-05-29 19:10:19 +03:00
Tom Tromey
4de4e872d4 Bug 1168593 - Make AutoStableStringChars::init use MOZ_WARN_UNUSED_RESULT. r=jandem 2015-05-28 11:57:00 -04:00
Tom Tromey
13be65d0c5 Bug 1050500 - Add callee information to Javascript timeline markers. r=smaug
--HG--
extra : rebase_source : dbd9e09496ca7c0e4f9798adf1f8f72749537d1a
2015-05-20 05:28:00 -04:00
Andrew McCreight
9e8f4b219e Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Jim Blandy
ebd83c9a61 Bug 1152577: Add 'aReason' argument to AutoEntryScript constructor, and provide plausible names for its instantiations. r=bholley
--HG--
extra : rebase_source : 8ab7a3628a5b4d94b957f24e23e4c5c7871db97c
2015-04-08 21:23:48 -04:00
Ryan VanderMeulen
da1028199c Merge m-c to fx-team. a=merge 2015-03-27 12:21:41 -04:00
Dave Townsend
eb35f7fae8 Bug 1144750: Don't attempt to report errors that will cause the warnings only reporter to assert. r=bholley
--HG--
extra : rebase_source : 328482c7113e94c9dc698fc65766021a41079c71
extra : source : 7588e6588dd381d20d81ef8f0b4be1bfc0d6eefc
2015-03-18 14:51:18 -07:00
Wes Kocher
fd52ad5f87 Backed out changeset 7588e6588dd3 (bug 1144750) for static analysis failures 2015-03-26 15:52:13 -07:00
Dave Townsend
42af708faa Bug 1144750: Don't attempt to report errors that will cause the warnings only reporter to assert. r=bholley
--HG--
extra : rebase_source : afcab129d7daa4690fca49fc5940f23f0ca3f5ac
2015-03-18 14:51:18 -07:00
Bobby Holley
125cbceb13 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
aa8cde4b8e Bug 1101416 - Don't assert against pending exceptions in AutoNoJSAPI. r=luke,r=smaug 2014-12-17 16:34:37 -08:00
Nikhil Marathe
3d31470511 Bug 1107777 - Add autoJSAPIOwnsErrorReporting flag to JSContext options. AutoJSAPI sets it. r=bholley 2014-12-16 02:02:37 -08:00
Nikhil Marathe
d5cdc68ca7 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
455f15535d Bug 1103324 - Instantiate an AutoNoJSAPI when dispatching IPC messages. r=billm 2014-12-06 09:51:14 -08:00
Gabor Krizsanits
172768a8cc Bug 1081038 - part1: Microtask in AutoEntryScript. r=bholley 2014-11-14 16:46:26 +01:00
Kannan Vijayan
4ac6dd569f Bug 1050774 - Record script execution in timeline view. r=bholley 2014-11-13 16:22:24 -05:00
Bobby Holley
32aeec5df6 Bug 1092388 - Clamp the entry and incumbent global to the current global if their principals don't match. r=bz 2014-11-13 11:13:36 -08:00
Carsten "Tomcat" Book
b7f71a3e33 Backed out changeset b1f8365b8a92 (bug 1081038) for dt Test Failures on a CLOSED TREE 2014-11-13 11:48:21 +01:00
Gabor Krizsanits
a6f3398faa Bug 1081038 - part 1: Microtask in AutoEntryScript. r=bholley 2014-11-13 09:50:12 +01:00
Bobby Holley
3b960027ba Bug 1081537 - Followup bustage fix. r=me 2014-10-17 19:08:45 +02:00
Bobby Holley
3268a57801 Bug 1081537 - Fall back to the addon global (if one exists) in GetEntryDocument. r=bz 2014-10-17 17:19:19 +02:00
Bobby Holley
99864a2a38 Bug 1070842 - Introduce an API on AutoJSAPI to allow Gecko to handle exceptions without meddling from the JS engine. r=bz 2014-09-29 15:34:21 +02:00
Bobby Holley
be9e0c4e41 Bug 1070696 - Implement a JSObject* override to AutoJSAPI::Init(). r=smaug 2014-09-21 21:31:53 +02:00
Bobby Holley
e3eca2660e Bug 1070696 - Rename xpc::GetNativeForGlobal to xpc::NativeGlobal and make it accept non-global JSObjects. r=smaug
The method is infallible, and making the callers invoke
js::GetGlobalForObjectCrossCompartment manually is dumb.
2014-09-21 21:31:53 +02:00
Jim Blandy
9425b091ec Bug 971673: Assert that AutoJSAPI is always given a JSContext. r=bobowen 2014-08-28 10:00:56 -07:00
Bobby Holley
43e0dc6c0c Bug 981218 - Remove the JSAutoCompartment from cx pushing. r=bobowen
By this point, AutoJSAPI takes care of entering the correct compartment, so this
no longer serves a purpose.
2014-08-21 17:13:50 -07:00
Bobby Holley
993920dcec Bug 796938 - Switch nsHTMLDocument::Open and XMLDocument::Load to a new GetEntryDocument API and remove nsContentUtils::GetDocumentFromContext. r=smaug 2014-08-19 12:02:06 -07:00
Bobby Holley
ad265a7fcd Bug 951991 - Implement GetEntryGlobal. r=smaug 2014-08-19 12:02:05 -07:00
Bobby Holley
a87c8777d9 Bug 1052089 - Swap out the SafeJSContextGlobal for the new UnprivilegedJunkScope. r=billm 2014-08-18 10:57:30 -07:00
Bobby Holley
a5c1a27839 Bug 1052052 - Convert AutoJSContext to AutoJSAPI. r=gabor
With this change, the only cx push left in the tree happens inside of AutoJSAPI. \o/
2014-08-14 18:47:16 -07:00
Bobby Holley
e70ddb7476 Bug 1052052 - Hoist Auto*JSContext into nsContentUtils and kill nsCxPusher.{cpp,h}. r=gabor 2014-08-14 18:47:15 -07:00
Bobby Holley
850fc35028 Bug 1052052 - Hoist AutoCxPusher into ScriptSettings.h. r=gabor 2014-08-14 18:47:15 -07:00
Ryan VanderMeulen
30ae466592 Backed out changesets 5b1a3161f614, 17a9673ed782, and a9b8c346d295 (bug 1052052) for B2G non-unified bustage. 2014-08-14 17:23:10 -04:00
Bobby Holley
b9ebf1d31f Bug 1052052 - Convert AutoJSContext to AutoJSAPI. r=gabor
With this change, the only cx push left in the tree happens inside of AutoJSAPI. \o/
2014-08-14 12:54:37 -07:00
Bobby Holley
3e4d70a655 Bug 1052052 - Hoist Auto*JSContext into nsContentUtils and kill nsCxPusher.{cpp,h}. r=gabor 2014-08-14 12:54:34 -07:00
Bobby Holley
35f3a10cb0 Bug 1052052 - Hoist AutoCxPusher into ScriptSettings.h. r=gabor 2014-08-14 12:53:52 -07:00
Seth Fowler
0fd6e994ae Bug 913586 (Part 4) - Update Maybe users in dom. r=bz
--HG--
extra : rebase_source : 7b6159b00b3bf4f919b30f1bccc8939cc04fe526
2014-08-13 15:39:41 -07:00
Bobby Holley
7c1bca4f69 Bug 1052042 - Move the pre-pop GC to AutoEntryScript. r=billm 2014-08-13 15:36:44 -07:00
Steve Fink
cc506319cc Bug 1022773 - Fix AutoJSAPI initialization rooting by annotating nsIScriptContext.GetWindowProxy and (temporarily) runtime-rooting, r=bholley 2014-07-01 09:02:10 -07:00
Olli Pettay
67c5293976 Bug 1029866 - Rename InitUsingWin(...) to Init(...), r=bobowencode
--HG--
extra : rebase_source : e04aac99fe64270f283cf49ed52b8f7512a2fa3b
2014-06-25 13:17:17 +03:00
Bob Owen
30816b5c06 Bug 1025476 - Part 1: Add compulsory Init functions to AutoJSAPI. r=bholley 2014-06-19 08:21:14 +01:00
Jim Blandy
49477722f8 Bug 971673: Replace ScriptSettingsStack's array with a C++-stack-allocated linked list. r=bholley 2014-06-12 23:24:13 -07:00
Bobby Holley
2e76633b8f Bug 990090 - Add a version of AutoJSAPIWithErrorsReportedToWindow that takes an nsIGlobalObject. r=bz 2014-06-12 10:02:33 -07:00
Boris Zbarsky
2ad17a72df Bug 1019163. Hold a weak ref to the principal in AutoEntryScript, to reduce call overhead. r=bholley 2014-06-04 22:48:06 -04:00
Chris Peterson
aca9b90afe Bug 990764 - Replace MOZ_ASSUME_UNREACHABLE in dom. r=smaug 2014-04-20 00:36:40 -07:00