mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 948850 - B2G NFC: to add onpeerready causes app to be killed. r=khuey
This commit is contained in:
parent
f56afe3f82
commit
d8d069d181
@ -1815,8 +1815,15 @@ Navigator::HasNfcSupport(JSContext* /* unused */, JSObject* aGlobal)
|
||||
return win && (CheckPermission(win, "nfc-read") ||
|
||||
CheckPermission(win, "nfc-write"));
|
||||
}
|
||||
#endif // MOZ_NFC
|
||||
|
||||
/* static */
|
||||
bool
|
||||
Navigator::HasNfcPeerSupport(JSContext* /* unused */, JSObject* aGlobal)
|
||||
{
|
||||
nsCOMPtr<nsPIDOMWindow> win = GetWindowFromGlobal(aGlobal);
|
||||
return win && CheckPermission(win, "nfc-write");
|
||||
}
|
||||
#endif // MOZ_NFC
|
||||
|
||||
#ifdef MOZ_TIME_MANAGER
|
||||
/* static */
|
||||
|
@ -273,6 +273,7 @@ public:
|
||||
#endif // MOZ_B2G_FM
|
||||
#ifdef MOZ_NFC
|
||||
static bool HasNfcSupport(JSContext* /* unused */, JSObject* aGlobal);
|
||||
static bool HasNfcPeerSupport(JSContext* /* unused */, JSObject* aGlobal);
|
||||
#endif // MOZ_NFC
|
||||
#ifdef MOZ_TIME_MANAGER
|
||||
static bool HasTimeSupport(JSContext* /* unused */, JSObject* aGlobal);
|
||||
|
@ -23,7 +23,9 @@ interface MozNfc : EventTarget {
|
||||
*/
|
||||
DOMRequest checkP2PRegistration(DOMString manifestUrl);
|
||||
|
||||
[Func="Navigator::HasNfcPeerSupport"]
|
||||
attribute EventHandler onpeerready;
|
||||
[Func="Navigator::HasNfcPeerSupport"]
|
||||
attribute EventHandler onpeerlost;
|
||||
[ChromeOnly]
|
||||
void eventListenerWasAdded(DOMString aType);
|
||||
|
Loading…
Reference in New Issue
Block a user