Commit Graph
82 Commits
Author SHA1 Message Date
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
Bevis Tseng a87b520aed Bug 1114937 - Part 6: Deprecate RILContentHelper. r=echen 2015-06-16 18:56:38 +08:00
Thomas Zimmermann 337a758eb8 Bug 1171994: Separate RIL I/O interfaces, r=htsai
This patch separates the current interface of |RilConsumer| into
two distinct classes. |RilWorker| provides the public interface
and |RilConsumer| provides the internal implementation. Running
|RilConsumer| on a worker thread will be easier this way.
2015-07-17 12:10:01 +02:00
Ryan VanderMeulen ec61c7d2d7 Backed out 6 changesets (bug 1171994) for causing smoketest bustage. a=me
Backed out changeset 46061230e77a (bug 1171994)
Backed out changeset ea00769b70df (bug 1171994)
Backed out changeset 2dc847e4650c (bug 1171994)
Backed out changeset 14ec8c87f973 (bug 1171994)
Backed out changeset 31cdbef9fe22 (bug 1171994)
Backed out changeset 463528fcee4d (bug 1171994)
2015-07-15 12:53:28 -04:00
Thomas Zimmermann c39e2a323a Bug 1171994: Separate RIL I/O interfaces, r=htsai
This patch separates the current interface of |RilConsumer| into
two distinct classes. |RilWorker| provides the public interface
and |RilConsumer| provides the internal implementation. Running
|RilConsumer| on a worker thread will be easier this way.
2015-07-14 16:57:00 +02: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
Juan Gomez 89035d527e Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj 2015-07-03 18:29:00 -07:00
Ryan VanderMeulen 7aba9d7002 Backed out changeset 8b4e4083639e (bug 1171931) for B2G debug emulator bustage. 2015-06-25 19:48:42 -04:00
Juan Gomez 7323e89a40 Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj 2015-06-24 14:11:00 -04:00
Thomas Zimmermann 8a57b476df Bug 1094177: Call |Keystore::Shutdown| to cleanup key store, r=chucklee 2014-12-03 07:26:29 -08:00
Bobby Holley b2b763cb29 Bug 1052052 - Hoist Auto*JSContext into nsContentUtils and kill nsCxPusher.{cpp,h}. r=gabor 2014-08-14 18:47:15 -07:00
Ryan VanderMeulen df43fcf12d Backed out changesets 5b1a3161f614, 17a9673ed782, and a9b8c346d295 (bug 1052052) for B2G non-unified bustage. 2014-08-14 17:23:10 -04:00
Bobby Holley 10dec58cfc Bug 1052052 - Hoist Auto*JSContext into nsContentUtils and kill nsCxPusher.{cpp,h}. r=gabor 2014-08-14 12:54:34 -07:00
Kyle Huey fbc9937dbd Bug 1050509: Shut down the KeyStore socket during system shutdown to avoid leaks. r=tdz 2014-08-08 11:11:36 -07:00
Yoshi Huang bedae28513 Bug 933588 - Part 1: NFC service. r=khuey 2014-02-19 15:14:22 +08:00
Birunthan Mohanathas eeb9aaaa94 Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
Vicamo Yang c87d236d1b Bug 977995 - remove mNetdWorker from SystemWorkerManager. r=khuey, f=vchang
There are multiple defects in NetworkWorker and the related parts
since the C++ rewrite.  1) NetworkService holds a reference to
NetworkWorker and never releases it.  It has to wait until the cycle
collector comes up to resolve their ownership loop and free
NetworkWorker manually.  However 2) nsINetworkWorker::shutdown is
never called, and that leaves everything living till the end,
inclusive of that gNetdConsumer in Netd.cpp.  3) when GC comes to free
NetworkWorker, it calls its parent destructor ~NetConsumer(), which
in turn calls ~RefCounted<NetdConsumer>().  Having a valid
gNetdConsumer in Netd.cpp follows its refCnt is not zero and this
triggers an assertion in ~RefCounted<NetdConsumer>().

So, some obvious treatments here.  A) NetworkService should call
nsINetworkWorker::shutdown upon receiving a shutdown observer event
and release the reference to NetworkWorker.  B) NetworkWorker should
never be double ref-counted.  Move NetdConsumer implementation into a
separated class.
2014-04-11 22:27:55 +08:00
Chuck Lee 72e59375ea Bug 975813 - Support IPv6 in Network Manager. r=vicamo,fabrice 2014-02-28 20:24:35 +08:00
Dimi Lee ed5ee4db40 Bug 864931 - Rewrite net worker in C++. r=fabrice, r=vchang 2014-01-29 19:38:50 +08:00
Terrence Cole 368d3facb6 Bug 959787 - Handlify several JSAPI interfaces that can GC, Part 6; r=jonco 2014-01-17 10:10:17 -08:00
Tom Schuster 4a7dd51a60 Bug 939294 - Change xpidl jsval to handles. r=gabor,bz,khuey,bsmedberg,terrence 2014-01-09 18:39:36 +01:00
Ehsan Akhgari 68bfe70f09 Bug 927728 - Part 1: Replace PRUnichar with char16_t; r=roc
This patch was automatically generated by the following script:

#!/bin/bash
# Command to convert PRUnichar to char16_t

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*modules/libmar*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name prtypes.h \
       ! -name Char16.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRUnichar char16_t
2014-01-04 10:02:17 -05:00
Henry Chang dbf7f9b395 Bug 935363 - Add and make use of NetworkService xpcom. r=vyang, r=vchang 2013-11-15 17:35:33 +08:00
Garner Lee c8d368e50d Bug 933635 - Part 3: NFC IPC Sources. r=yoshi 2013-11-01 17:45:46 +08:00
Vicamo Yang 4f08b90661 Bug 920551 - 2.h/2: fix dom/system/gonk/*. r=hsinyi,khuey 2013-10-29 16:12:45 +08:00
Nathan Froyd 9bc269e179 Bug 928916 - use services::GetObserverService more in dom/; r=smaug 2013-10-21 08:58:12 -04:00
Chuck Lee 92a4d78a0f Bug 789217 - 0003. Bring up keystore. r=khuey 2013-10-01 12:09:57 +08:00
Thomas Zimmermann fafde04f8a Bug 912996: Remove memcpy when reading from Unix socket, r=qdot
We used to allocate memory on the stack when reading from a file
descriptor and copied the result into an instance of UnixSocketRawData.

This patch

 - cleans up the interface of UnixSocketRawData,
 - removes the large stack allocation (64KiB), and
 - removes the unnecessary memcpy.

Other memcpys for sending data have been moved into the constructor
of UnixSocketRawData.
2013-09-06 10:18:35 +02:00
Ms2ger 5a51413d49 Bug 901323 - Don't include nsContentUtils.h unnecessarily; r=jlebar 2013-08-14 08:56:21 +02:00
Marco Chen 346b20f7f2 Bug 895822 - To initilize AudioManager service in SystemWorkerManager for monitoring the headset change and setting configuration of audio backend. r=dhylands 2013-08-13 15:12:53 +08:00
Nicholas Nethercote 966f6b5ff2 Bug 901750 - Change return type of |JSNative| from |JSBool| to |bool|. code=nnethercote,jandem. r=luke,bz. 2013-08-02 00:41:57 -07:00
Bobby Holley 0df174a07e Bug 899245 - Rename JS_GetGlobalForScopeChain to JS::CurrentGlobalOrNull. r=luke
This was done with perl/grep.
2013-07-29 16:45:27 -07:00
Vicamo Yang 8bf72587b1 Bug 879671 - 1/2: pass multiple initial options to ril_worker. r=yoshi 2013-06-07 15:32:20 +08:00
Bobby Holley c9c266aea9 Bug 868130 - Remove the lion's share of JSAutoRequests in gecko. r=gabor
There are still a handful that either are used with other runtimes, or that
happen very early/late in cx the lifetime of various things where it doesn't
necessarily make sense to have a cx on the stack. This should definitely ensure
that we're not doing double-duty with the nsCxPusher change, though.
2013-05-22 10:05:28 -06:00
Bobby Holley c3247a55cf Bug 868130 - Include nsCxPusher.h everywhere we need it, and stop including it from nsContentUtils.h. r=gabor 2013-05-22 10:05:26 -06:00
Bobby Holley c56a87ba34 Bug 871299 - Remove JS_GetGlobalObject from SystemWorkerManager and RIL. r=mrbkap 2013-05-14 10:16:51 -07:00
Sankha Narayan Guria b4a935c1df Bug 867414 - Rename SafeAutoJSContext to AutoSafeJSContext. r=bholley 2013-05-06 09:04:17 -04:00
Bobby Holley 18bc49a336 Bug 865729 - Remove nsIJSContextStack from dom/foo. r=gabor 2013-04-29 11:16:18 -07:00
Trevor Saunders d17c0e1db1 bug 859646 - fix b2g code that checks what infallible TArray::EnsureLengthAtleast() returns r=jlebar 2013-04-08 23:35:56 -04:00
Jose Cortes f315874029 Bug 842186 - Replace use of jsval with JS::Value in h and cpp files in the dom/system/ and dom/file/ directories. r=jwalden 2013-04-02 16:14:00 -07:00
Bobby Holley 7570d65d99 Bug 834732 - Get rid of footgun bool param for nsCxPusher and use an explicit enum. r=mrbkap
The goal here is to get rid of this crap entirely, and make nsCxPusher always
push. But that's a scary change, so we do it in chunks. This patch, in particular,
should have zero behavioral change. This means preserving some very wrong behavior.
For instance, currently SafeAutoJSContext never pushes a damn thing, because the
safe JSContext doesn't have an associated nsIScriptContext. We preserve this
behavior, and in fact convert various similarly-buggy consumers to
SafeAutoJSContext, so that we can hoist the behavioral change into a subsequent
patch.
2013-02-26 11:04:09 -08:00
Chuck Lee 4b95e11c81 Bug 835719 - 0002. Encode command string into UTF-8 byte array. r=terrence 2013-02-21 17:48:15 +08:00
Kyle Machulis b69b55a00f Bug 840294: Check RIL validity before writing to socket; r=tzimmerman 2013-02-21 15:21:34 -08:00
Vicamo Yang 130e9688c7 Bug 814579: connect client socket by id. r=qDot 2013-02-04 21:26:43 +08:00
Daniel Holbert 5b89eda997 back out 9a7369b9bc9d (bug 814579) for B2G Arm opt Mn & X orange 2013-02-02 00:01:25 -08:00
Vicamo Yang 71643e084a Bug 814579: connect client socket by id. r=qDot 2013-02-02 13:06:27 +08:00
Vicamo Yang aaa62aefa7 Bug 826931 - Part 3/3: use mozilla::ipc::UnixSocket. r=qDot 2013-02-01 20:28:22 +08:00
Vicamo Yang 0868e9bb7b Bug 826977 - Part 2/4: SystemWorkerManager & RadionInterfaceLayer changes. r=qDot 2013-01-24 14:42:07 +08:00
Steve Fink 73a0743c5e Bug 827225 - Rename JS_GetTypedArrayType to JS_GetArrayBufferViewType, add TYPE_DATAVIEW. r=bz, sr=dmandelin 2013-01-07 15:12:00 -08:00
Mats Palmgren cc093a3de0 Bug 820230 - Add missing #include to fix compile error. r=me 2012-12-12 00:15:07 +01:00