mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-08 22:08:16 +00:00
Bug 1061827 - Nfc.js serializes all the messages, even in release mode. r=allstars.chh
This commit is contained in:
parent
50f643b1d6
commit
35c6d11acf
@ -365,13 +365,11 @@ NfcContentHelper.prototype = {
|
||||
fireRequestSuccess: function fireRequestSuccess(requestId, result) {
|
||||
let request = this.takeRequest(requestId);
|
||||
if (!request) {
|
||||
debug("not firing success for id: " + requestId +
|
||||
", result: " + JSON.stringify(result));
|
||||
debug("not firing success for id: " + requestId);
|
||||
return;
|
||||
}
|
||||
|
||||
debug("fire request success, id: " + requestId +
|
||||
", result: " + JSON.stringify(result));
|
||||
debug("fire request success, id: " + requestId);
|
||||
Services.DOMRequest.fireSuccess(request, result);
|
||||
},
|
||||
|
||||
@ -389,7 +387,7 @@ NfcContentHelper.prototype = {
|
||||
},
|
||||
|
||||
receiveMessage: function receiveMessage(message) {
|
||||
debug("Message received: " + JSON.stringify(message));
|
||||
DEBUG && debug("Message received: " + JSON.stringify(message));
|
||||
let result = message.json;
|
||||
|
||||
switch (message.name) {
|
||||
|
@ -232,7 +232,8 @@ XPCOMUtils.defineLazyGetter(this, "gMessageManager", function () {
|
||||
*/
|
||||
|
||||
receiveMessage: function receiveMessage(message) {
|
||||
debug("Received '" + JSON.stringify(message) + "' message from content process");
|
||||
DEBUG && debug("Received message from content process: " + JSON.stringify(message));
|
||||
|
||||
if (message.name == "child-process-shutdown") {
|
||||
this.removePeerTarget(message.target);
|
||||
this.nfc.removeTarget(message.target);
|
||||
@ -398,7 +399,7 @@ Nfc.prototype = {
|
||||
*/
|
||||
onEvent: function onEvent(event) {
|
||||
let message = Cu.cloneInto(event, this);
|
||||
debug("Received message from NFC Service: " + JSON.stringify(message));
|
||||
DEBUG && debug("Received message from NFC Service: " + JSON.stringify(message));
|
||||
|
||||
// mapping error code to error message
|
||||
if (message.status !== undefined && message.status !== NFC.NFC_SUCCESS) {
|
||||
|
Loading…
Reference in New Issue
Block a user