Commit Graph

290 Commits

Author SHA1 Message Date
Kyle Huey
94f653c385 Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Thomas Nguyen
97a89c9c3f Bug 1216407 - Use mozilla/Endian.h for NfcService. r=yoshi 2015-12-22 00:04:00 +01:00
Lars T Hansen
24ab5fa8d9 Bug 1176214 - Part 11: Changes to DOM, except for WebGL. r=bz, r=clb 2015-11-25 19:04:50 +01:00
Thomas Nguyen
e4efbd17e8 Bug 1087928 - write marionette-webapi tests for ontagfound. r=yoshi 2015-11-24 18:00:00 +01:00
Thomas Nguyen
be853deb2d Bug 1055959 - [NFC] testNfcBadSessionIdError testcase fail. r=yoshi 2015-11-15 19:13:00 +01:00
Thomas Nguyen
5645d7e0d3 Bug 976457 - B2G NFC: API for supporting NFC_A tags. r=yoshi r=smaug 2015-11-13 02:01:00 +01:00
Birunthan Mohanathas
94998cf5fe Bug 1219392 - Capitalize mozilla::unused to avoid conflicts. r=froydnj 2015-11-02 07:53:26 +02:00
Thomas Nguyen
796a915525 Bug 1166210 - Remove ServicesSetting changes listener in NfcContentHelper. r=yoshi 2015-10-22 20:43:00 +02:00
Nathan Froyd
e4e2da55c9 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
Thomas Nguyen
3fe497d525 Bug 1168704 - Rename setFocusApp in nslNfcContentHelper. r=yoshi 2015-10-07 23:55:00 +02:00
Chris Peterson
dd2fcb9b7d Bug 1207030 - Enable -Wshadow flag in more directories that have no -Wshadow warnings. r=glandium 2015-09-22 21:39:03 -07:00
Shu-yu Guo
45211869c8 Bug 1202902 - Mass replace toplevel 'let' with 'var' in preparation for global lexical scope. (rs=jorendorff) 2015-09-15 11:19:45 -07:00
Nicholas Nethercote
69d088e45f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.
2015-08-27 20:44:53 -07:00
Nick Robson
f3e110d556 Bug 904479 - Added createPromiseWithId() that returns id of resolver r=kanru,nsm 2015-08-19 14:53:22 -07:00
Thomas Zimmermann
304c06d1ce Bug 1173802: Store global NFC service in ref-counted variable, r=allstars.chh
|ClearOnShutdown| deletes pointers by assigning |nullptr|. This
patch converts |gNfcService| to a smart pointer, so that cleaning
its value during shutdown will actually destruct the instance.
2015-07-31 10:07:25 +02:00
Thomas Zimmermann
1b12df7548 Bug 1173802: Replace |assertIsNfcServiceThread| with thread-safe checks, r=allstars.chh
The main thread writes the NFC thread's field in the NFC service
instance, but the function |assertIsNfcServiceThread| uses this
value on the NFC worker thread itself. Also clearing this value
happens on main, while the NFC thread still executes code. Calls
to |assertIsNfcServiceThread| can therefore fail if they occur
during an NFC shutdown.

This patch replaces the unsafe and racy |assertIsNfcServiceThread|
with the much simpler |NfcConsumer::IsNfcServiceThread|. The new
method tests the current thread against a thread pointer that has
been stored in |NfcConsumer|.
2015-07-31 10:07:25 +02:00
Thomas Zimmermann
49ce74a35d Bug 1173802: Clean up |NfcEventDispatcher|, r=allstars.chh
This patch moves |NfcEventDispatcher| to the namespace of |NfcConsumer|
and renames it to |DispatchNfcEventRunnable|. The NFC service is stored
in the runnable itself.
2015-07-31 10:07:25 +02:00
Thomas Zimmermann
39d0c82370 Bug 1173802: Run |NfcConsumer| on NFC thread, r=allstars.chh
This patch moves NFC thread onto the NFC service thread by applying
the following changes:

 * The methods |Start| and |Shutdown| now send runnables to the NFC
   thread that start or stop an NFC consumer. After shutting down a
   cleanu-up runnable frees all resources on the main thread.

 * Received messages are forwarded directly from the I/O thread to
   the NFC thread and unpacked there. There's no intermediate hop
   over the main thread any more.

 * Similarly to receiving, packed massages are forwarded directly
   from the NFC thread to the I/O thread. No intermediate hop over
   main is required.

 * On connection errors, |NfcConsumer| sends a runnable to the main
   thread to shutdown NFC.
2015-07-31 10:07:25 +02:00
Thomas Zimmermann
0844d8d8d3 Bug 1173802: Move NFC socket and messaging code into |NfcConsumer|, r=allstars.chh
|NfcConsumer| will encapsulates all NFC socket and messaging code. It
wil be able to run solely on the NFC worker thread.
2015-07-31 10:07:25 +02:00
Birunthan Mohanathas
47ed3a3675 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
01df2f691b Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj 2015-07-03 18:29:00 -07:00
Thomas Zimmermann
12ce0039b9 Bug 1173334: Open nfcd connections with socket type SOCK_SEQPACKET, allstars.chh
NFC requires sequential transfer of individual messages. Using the
socket type SOCK_SEQPACKET guarantees these properties.
2015-06-25 08:29:04 -07:00
Wes Kocher
e9f41e61d2 Merge m-c to inbound, a=merge 2015-06-16 16:53:03 -07:00
Boris Zbarsky
7458783133 Bug 1174954 part 1. Stop throwing DOMErrors from JS-implemented webidl, since we can now throw content-side Errors instead. r=bholley 2015-06-16 16:44:10 -04:00
Krzysztof Mioduszewski
716ded1750 Bug 1172159 - [NFC] Introduce getFocusTabId function. r=allstars.chh 2015-06-16 04:06:00 -04:00
Wes Kocher
6cc232193a Merge m-c to inbound, a=merge CLOSED TREE 2015-06-10 18:38:28 -07:00
Birunthan Mohanathas
6d5d42e7dc Bug 968520 - Add mozilla::fallible to more FallibleTArray calls. r=froydnj
This calls were already fallible due to their type (FallibleTArray). This
commit merely makes that fact visible at the call site.
2015-06-10 14:30:41 -07:00
Krzysztof Mioduszewski
080c1366db Bug 1165340 - Part 3: Update xpcshell tests. r=allstars.chh 2015-06-03 05:06:00 -04:00
Krzysztof Mioduszewski
2bfdb6324f Bug 1165340 - Part 2: Consult ACE before dispatching HCI system message. r=allstars.chh 2015-06-01 10:39:00 -04:00
Krzysztof Mioduszewski
2699e045d0 Bug 1165340 - Part 1: Use SEUtils and se_consts in HCI system message configurator. r=allstars.chh 2015-06-01 10:38:00 -04:00
Dimi Lee
3443f8db48 Bug 1170053 - [Aries] Not able to share a picture using NFC. r=yoshi 2015-06-03 15:54:55 +08:00
Yoshi Huang
5c5fafe2be Bug 1168292 - Part 3: add tabId in notifyUserAccepted. r=dimi 2015-05-27 18:10:37 +08:00
Yoshi Huang
c70a58767a Bug 1168292 - Part 2: notify listener with correct tabId. r=dimi 2015-05-27 17:31:43 +08:00
Yoshi Huang
6021f94f4b Bug 1168292 - Part 1: update SYSTEM_APP_ID. r=dimi 2015-05-27 11:50:14 +08:00
Thomas Zimmermann
d4f5bad1fa Bug 1166638: Use |ListenSocketConsumer| in |ListenSocket|, r=kmachulis, dlee, chucklee, shuang
This patch converts |ListenSocket| to forward events to an instance
of |ListenSocketConsumer|. All users are converted and the related
listener and consumer classes are removed.
2015-05-26 13:24:20 +02:00
Thomas Zimmermann
f07de924ac Bug 1166638: Use |StreamSocketConsumer| in |StreamSocket|, r=kmachulis, dlee, chucklee, htsai
This patch converts |StreamSocket| to forward events and data to an
instance of |StreamSocketConsumer|. All users are converted and the
related listener and consumer classes are removed.
2015-05-26 13:24:20 +02:00
Yoshi Huang
250f777226 Bug 1165841 - Part 5: remove listener when window is destroyed. r=dimi 2015-05-20 15:01:16 +08:00
Yoshi Huang
228a6fba97 Bug 1165841 - Part 4: using eventListeners. r=dimi 2015-05-20 10:45:30 +08:00
Yoshi Huang
9d1bf4e51c Bug 1165841 - Part 3: remove _rfState and init from NfcContentHelper. r=dimi 2015-05-20 17:10:17 +08:00
Yoshi Huang
25e7c1cde9 Bug 1165841 - Part 2: move window-related code to nsNfc.js. r=dimi 2015-05-20 17:06:38 +08:00
Yoshi Huang
13e67c3bad Bug 1165841 - Part 1: add window into nsINfcEventListener. r=dimi 2015-05-20 16:36:16 +08:00
Dimi Lee
10f0e79193 Bug 1162836 - Fix NFC marionette testcase fail. r=yoshi 2015-05-19 20:29:25 +08:00
Thomas Zimmermann
f3630711c2 Bug 1164425: Cleanup interfaces of |ListenSocket|, r=kmachulis
This patch removes |ListenSocket::GetSocketAddr|, which is unused
and not thread-safe. The |Listen| methods now return error codes.
2015-05-20 10:50:43 +02:00
Carsten "Tomcat" Book
1f415f3e51 Backed out changeset 17bd0777339a (bug 1164425) 2015-05-20 10:30:55 +02:00
Thomas Zimmermann
ab30c72531 Bug 1164425: Cleanup interfaces of |ListenSocket|, r=kmachulis
This patch removes |ListenSocket::GetSocketAddr|, which is unused
and not thread-safe. The |Listen| methods now return error codes.
2015-05-20 09:54:27 +02:00
Thomas Zimmermann
8b0060a692 Bug 1161020: Implement new socket-connector interface for NFC, r=allstars.chh
This patch moves |NfcConnector| into its own file and implements
the new socket-connector interface.
2015-05-19 13:28:46 +02:00
Andrea Marchesini
54e2145f4a Bug 1163388 - patch 2 - get rid of nsIDOMFile, r=ehsan 2015-05-18 14:52:26 +01:00
Andrew McCreight
c979f253c0 Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Thomas Zimmermann
cdb9a0fb00 Bug 1156352: Remove |UnixSocketRawData| from NFC interfaces, r=allstars.chh 2015-04-23 13:48:48 +02:00
Andrea Marchesini
0a7d105a0f Bug 1156632 - Remove unused forward class declarations - patch 3 - dom/{events,xbl,xslt,xul} and others, r=ehsan 2015-04-22 08:29:18 +02:00