From b0548b1e2d702a6aa0b2014715993099b7aa52c5 Mon Sep 17 00:00:00 2001 From: Yoshi Huang Date: Mon, 15 Dec 2014 18:01:34 +0800 Subject: [PATCH] Bug 1111523 - isP2P and sessionToken shouldn't exist in nfc-manager-tech-discover wrapper. r=dimi --- dom/nfc/gonk/Nfc.js | 2 +- dom/nfc/nsNfc.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dom/nfc/gonk/Nfc.js b/dom/nfc/gonk/Nfc.js index 939747d0485..2afaddd5b8c 100644 --- a/dom/nfc/gonk/Nfc.js +++ b/dom/nfc/gonk/Nfc.js @@ -482,7 +482,7 @@ Nfc.prototype = { let sysMsg = new NfcTechDiscoveredSysMsg(message.sessionToken, message.isP2P, - message.records); + message.records || null); gSystemMessenger.broadcastMessage("nfc-manager-tech-discovered", sysMsg); break; case "TechLostNotification": diff --git a/dom/nfc/nsNfc.js b/dom/nfc/nsNfc.js index 530bf9fa1d4..06825552686 100644 --- a/dom/nfc/nsNfc.js +++ b/dom/nfc/nsNfc.js @@ -573,6 +573,10 @@ NFCTechDiscoveredWrapper.prototype = { let peer = aWindow.MozNFCPeer._create(aWindow, peerImpl); aMessage.peer = peer; } + + delete aMessage.isP2P; + delete aMessage.sessionToken; + return aMessage; },