Commit Graph

174 Commits

Author SHA1 Message Date
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
Nicholas Nethercote
1f65390cc9 Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm.
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.

As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.
2016-08-08 12:18:10 +10:00
Andrea Marchesini
3e782b8fc6 Bug 1288736 - Add some missing rv.SuppressException(), r=smaug 2016-07-22 16:50:10 +02:00
Andrew McCreight
5cbfd5ead4 Bug 1287623, part 1 - Use StaticRefPtr for sScriptCacheCleaner. r=smaug 2016-07-21 09:54:16 -07:00
Wes Kocher
971937eaaf Backed out 5 changesets (bug 1287623) for static build bustage CLOSED TREE
Backed out changeset a48daec87ec9 (bug 1287623)
Backed out changeset 248153344e15 (bug 1287623)
Backed out changeset 8aa409c9b1ce (bug 1287623)
Backed out changeset 602d4d88e806 (bug 1287623)
Backed out changeset 114da8bdc0b0 (bug 1287623)
2016-07-20 15:40:33 -07:00
Andrew McCreight
0202a3f7bf Bug 1287623, part 1 - Use StaticRefPtr for sScriptCacheCleaner. r=smaug 2016-07-20 15:19:00 -07:00
Ehsan Akhgari
7782233baf Bug 1277135 - Add an rval argument to JS::CloneAndExecuteScript(); r=jorendorff 2016-07-19 19:40:51 -04:00
Andrew McCreight
9ea83ae5f3 Bug 1272423 - Refuse to send large messages via the message manager. r=baku
Large IPC messages will hit a fatal assert, so reject message manager
messages earlier.

Also, collect telemetry on the rejected messages.
2016-06-09 09:35:19 -07:00
Andrew McCreight
56f2f26b8d Bug 1275707, part 3 - Rename MESSAGE_MANAGER_MESSAGE_SIZE. r=baku
Now that digits have been filtered out of the message manager message
names to avoid creating thousands of similar keys, we can reenable the
telemetry by renaming it. Also, update the description to address
bsmedberg's comments, and add me to the list of alert emails.
2016-06-01 15:11:06 -07:00
Andrew McCreight
b1200dbede Bug 1275707, part 2 - Remove numbers from the message manager message names. r=billm
There are a huge number of different message manager messages with
names of the form "ublock0:sb:{N}", where {N} is some number from 1 to
over 1000. Having so many different keys seems to cause problems for
telemetry and makes it harder to tell how many messages of each type
there really are, so this patch combines them by eliminating any
digits. It will also help for the webdev tools that use channels with
names like "debug:server1.conn5.child1:packet". This will create some
ambiguity (eg there are some messages of the form "ublock:sb:{N}"),
but that should be a minor issue.
2016-06-01 15:11:06 -07:00
Andrew McCreight
af2410d014 Bug 1275707, part 1 - Factor out a common method for message manager size telemetry. r=billm 2016-06-01 15:11:06 -07:00
Kyle Huey
a9cf047227 Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Andrew McCreight
054b1a2317 Bug 1260908 - Fix type of kMinTelemetryMessageSize. r=smaug 2016-04-14 09:22:44 -07:00
Alexandre Poirot
8a897edf8d Bug 1258496 - Purge message manager cached scripts on 'message-manager-flush-caches' notification. r=smaug 2016-04-13 11:04:11 -07:00
Andrew McCreight
ace7c88d0c Bug 1263235, part 2 - Make PContent::AsyncMessage and PContentBridge::AsyncMessage's data argument last. r=smaug 2016-04-09 06:50:59 -07:00
Bill McCloskey
a772e66968 Bug 1260908 - Record IPC message sizes (r=dvander) 2016-04-01 11:22:27 -07:00
Wes Kocher
a1f94ce495 Backed out 2 changesets (bug 1260908) for build bustage
Backed out changeset 5582a25d289d (bug 1260908)
Backed out changeset 9612cef48d43 (bug 1260908)

MozReview-Commit-ID: BKeDiGZ8Z8B
2016-04-01 10:44:27 -07:00
Bill McCloskey
0b4bff6e58 Bug 1260908 - Record IPC message sizes (r=dvander) 2016-04-01 09:59:19 -07:00
Boris Zbarsky
679821ced0 Bug 1257335. Replace some AutoSafeJSContext uses with AutoJSAPI or AutoJSContext uses. r=bholley
In general, using an AutoJSAPI inited with an object is NOT the same as using
AutoSafeJSContext (or AutoJSAPI inited without an object) and then entering the
compartment of the object: the former will report exceptions to the global of
the object as it comes off the stack, while the latter will not.  This only
really matters if we have an object from a window or worker global and hence
might fire error events, or report internal stuff to the web console.

The changes to initing with an object made in this bug are OK for the following
reasons:

1) dom/base/Console.cpp: Always clears its exception before coming off the stack.
2) dom/base/nsDOMClassInfo.cpp: Inits with a non-web global.
3) dom/base/nsFrameMessageManager.cpp: Inits with a non-web global.
4) dom/media/MediaPermissionGonk.cpp: We probably want the caller to notice if
   anything here throws.
5) dom/xbl/nsXBLPrototypeBinding.cpp: Inits with a non-web global.
6) dom/xul/nsXULElement.cpp: Inits with a non-web global.
7) extensions/pref/autoconfig/src/nsJSConfigTriggers.cpp: Inits with a non-web global.
8) ipc/testshell/XPCShellEnvironment.cpp: Inits with a non-web global.
2016-03-18 10:48:38 -04: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
Peter Van der Beken
456149fc8d Bug 1251655 - Remove support for JavaScript-DOM-class and JavaScript-DOM-interface. r=bz. 2016-02-14 15:59:48 +01:00
Andrew McCreight
9f6b653800 Bug 1247679, part 3 - Replace NS_IMPL_CYCLE_COLLECTION_TRACE_JSVAL_MEMBER_CALLBACK with JS_MEMBER. r=smaug 2016-02-22 10:11:02 -08:00
Mantaroh Yoshinaga
dd7c670d79 Bug 1174624 - Add the Transferable parameter into SendAsyncMessage of nsFrameMessageManager. r=baku 2016-01-31 22:48:00 +01:00
Nathan Froyd
bdc467ec3c Bug 1247362 - move mAnonymousGlobalScope tracing into nsMessageManagerScriptExecutor; r=mccr8 2016-02-09 17:08:53 -05:00
Nicholas Nethercote
e0264e9695 Bug 1187151 (part 15) - Replace nsBaseHashtable::Enumerate() calls in dom/ with iterators. r=baku. 2016-01-28 14:08:19 -08:00
Kyle Huey
e95edb30a9 Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Lars T Hansen
b83bd4ebc0 Bug 1231337 - part 2, conditionally enable shared memory for dedicated workers. r=khuey 2016-01-06 16:31:38 +01:00
Jeff Walden
4f31020ada Bug 1235615 - Split JS::CompartmentOptions into JS::CompartmentCreationOptions that are immutable characteristics of a compartment, and JS::CompartmentBehaviors that may be changed after the compartment's been created. r=terrence 2015-12-28 16:15:52 -06:00
Nicholas Nethercote
912eaff274 Bug 1187782 (part 8) - Replace nsBaseHashtable::EnumerateRead() calls in dom/base/ with iterators. r=khuey. 2015-11-04 21:35:12 -08:00
Nicholas Nethercote
c3dd845118 Bug 1187782 (part 7) - Replace nsBaseHashtable::EnumerateRead() calls in dom/base/ with iterators. r=khuey. 2015-11-04 19:43:45 -08: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
David Rajchenbach-Teller
208afad125 Bug 1212244 - Same-process sendAsyncMessage can now throw instead of OOM. r=smaug 2015-10-07 12:42:43 +02:00
Andrea Marchesini
272ccddb77 Bug 1209461 - Remove compilation warnings in nsFrameMessageManager, r=smaug 2015-09-29 16:36:36 +01:00
Kan-Ru Chen
109c869902 Bug 1186843 - Don't recreate message manager. r=smaug 2015-09-21 17:51:08 +08:00
Kan-Ru Chen
4c9b40e2db Bug 1186843 - Always cache delayed scripts in message manager 2015-09-21 17:51:08 +08:00
Andrea Marchesini
8cbd09f629 Bug 1203426 - Rename StructuredCloneIPCHelper to StructuredCloneData, r=smaug 2015-09-10 21:50:58 +01:00
Andrea Marchesini
7e0fc5e2de Bug 1201806 - part 1 - Remove OwningSerializedStructuredCloneBuffer and use StructuredCloneIPCHelper everywhere in IPC code, r=smaug 2015-09-09 08:10:32 +01:00
Andrea Marchesini
a2c814e845 Bug 1198795 - ipc/StructuredCloneUtils should be merged with StructuredCloneHelper, r=smaug 2015-09-02 17:20:30 +01:00
Nicholas Nethercote
63a1be5456 Bug 1200484 (part 7) - Use JS column numbers in GetParamsForMessage(). r=billm. 2015-09-01 17:56:03 -07:00
Christoph Kerschbaumer
194bbc9e01 Bug 1196057 - Use channel->Open2() in dom/base/nsFrameMessageManager.cpp (r=sicking) 2015-08-21 20:33:23 -07:00
Bill McCloskey
0ebfc4c021 Bug 1189550 - In parent process, cpmm.initialProcessData should be same as ppmm.initialProcessData (r=smaug) 2015-08-03 10:41:24 -07:00
Carsten "Tomcat" Book
cea52705a3 Backed out changeset b821b18a1bfb (bug 1189550) for breaking GU Tests 2015-08-03 09:38:27 +02:00
Bill McCloskey
843825d2f6 Bug 1189550 - In parent process, cpmm.initialProcessData should be same as ppmm.initialProcessData (r=smaug) 2015-08-02 17:29:55 -07:00
Carsten "Tomcat" Book
e6e850d811 Backed out changeset 8e006947db44 (bug 1186780) 2015-07-27 08:00:29 +02:00
Kyle Huey
1f0f23a0c9 Bug 1186780: Replace EnumerateRead with new iterators in some DOM code. r=bkelly 2015-07-26 19:34:29 -07:00
David Major
46cbb8b3e3 Bug 1106264: Log the message name for nsSameProcessAsyncMessage OOMs. r=jimm 2015-07-22 13:43:02 -04:00
Eric Rahm
090300842d Bug 1183824 - Remove NS_ENSURE_TRUE(mCallback, NS_ERROR_NOT_INITIALIZED) warning from nsFrameMessageManager::DispatchAsyncMessageInternal. r=smaug 2015-07-14 17:21:49 -07:00
Birunthan Mohanathas
a29151dc87 Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00