Skip to content
Browse files

removed comments fixed objet property bug on encrypt

  • Loading branch information...
1 parent ccd4068 commit 55db40298da3117fb29be5edee9d7692c1778a5f @daviddahl committed Oct 23, 2012
Showing with 13 additions and 13 deletions.
  1. +0 −12 extension/domcrypt/components/domcrypt.js
  2. +13 −1 extension/domcrypt/content/DOMCryptMethods.jsm
View
12 extension/domcrypt/components/domcrypt.js
@@ -50,7 +50,6 @@ function log(aMessage) {
XPCOMUtils.defineLazyGetter(this, "crypto", function (){
Cu.import("resource://domcrypt/DOMCryptMethods.jsm");
-
return DOMCryptMethods;
});
@@ -75,11 +74,6 @@ XPCOMUtils.defineLazyGetter(this, "Addressbook", function (){
* that runs all WeaveCrypto (NSS) functions off main thread via ctypes
*/
-// const nsIClassInfo = Ci.nsIClassInfo;
-// const DOMCRYPT_CONTRACTID = "@droplettr.com/domcrypt;1";
-// const DOMCRYPT_CID = Components.ID("{66af630d-6d6d-4d29-9562-9f1de90c1798}");
-// const IDOMCrypt = Components.interfaces.IDOMCrypt;
-
function DOMCryptAPI() {}
DOMCryptAPI.prototype = {
@@ -89,12 +83,6 @@ DOMCryptAPI.prototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIDOMGlobalPropertyInitializer,
Ci.nsIObserver,]),
- // classInfo : XPCOMUtils.generateCI({ classID: DOMCRYPT_CID,
- // contractID: DOMCRYPT_CONTRACTID,
- // classDescription: "DOMCrypt",
- // flags: nsIClassInfo.DOM_OBJECT,
- // interfaces: [IDOMCrypt]
- // }),
sandbox: null,
/**
View
14 extension/domcrypt/content/DOMCryptMethods.jsm
@@ -826,7 +826,9 @@ var DOMCryptMethods = {
*
* @returns Object
*/
-function GenerateCallbackObject() { }
+function GenerateCallbackObject() {
+ log("GenerateCallbackObject() constructor");
+}
GenerateCallbackObject.prototype = {
@@ -981,6 +983,16 @@ GenerateCallbackObject.prototype = {
*/
handleEncrypt: function GCO_handleEncrypt(aCipherMessage)
{
+ log("handleEncrypt...");
+ log(aCipherMessage);
+ log(this.encrypt.sandbox);
+ aCipherMessage.__exposedProps__ = {
+ iv: "r",
+ content: "r",
+ pubKey: "r",
+ wrappedKey: "r",
+ };
+
let callback = this.makeEncryptCallback(aCipherMessage);
let sandbox = this.encrypt.sandbox;
sandbox.importFunction(callback, "encryptCallback");

0 comments on commit 55db402

Please sign in to comment.
Something went wrong with that request. Please try again.