B2G/gecko/dom/apps/src/AppsUtils.jsm
// Clones a app, without the manifest.
Clones a app, without the manifest.
Clones a app without the manifest .
function cloneAppObject(aApp) {
    return {
      name: aApp.name,
      csp: aApp.csp,
      installOrigin: aApp.installOrigin,
      origin: aApp.origin,
      receipts: aApp.receipts ? JSON.parse(JSON.stringify(aApp.receipts)) : null,
      installTime: aApp.installTime,
      manifestURL: aApp.manifestURL,
      appStatus: aApp.appStatus,
      removable: aApp.removable,
      id: aApp.id,
      localId: aApp.localId,
      basePath: aApp.basePath,
      progress: aApp.progress || 0.0,
      installState: aApp.installState || "installed",
      downloadAvailable: aApp.downloadAvailable,
      downloading: aApp.downloading,
      readyToApplyDownload: aApp.readyToApplyDownload,
      downloadSize: aApp.downloadSize || 0,
      lastUpdateCheck: aApp.lastUpdateCheck,
      updateTime: aApp.updateTime,
      etag: aApp.etag,
      packageEtag: aApp.packageEtag,
      manifestHash: aApp.manifestHash,
      packageHash: aApp.packageHash,
      staged: aApp.staged,
      installerAppId: aApp.installerAppId || Ci.nsIScriptSecurityManager.NO_APP_ID,
      installerIsBrowser: !!aApp.installerIsBrowser,
      storeId: aApp.storeId || "",
      storeVersion: aApp.storeVersion || 0,
      redirects: aApp.redirects
    };
  }
function cloneAppObject ( aApp ) { return { name : aApp . name , csp : aApp . csp , installOrigin : aApp . installOrigin , origin : aApp . origin , receipts : aApp . receipts ? JSON . parse ( JSON . stringify ( aApp . receipts ) ) : null , installTime : aApp . installTime , manifestURL : aApp . manifestURL , appStatus : aApp . appStatus , removable : aApp . removable , id : aApp . id , localId : aApp . localId , basePath : aApp . basePath , progress : aApp . progress || 0.0 , installState : aApp . installState || "installed" , downloadAvailable : aApp . downloadAvailable , downloading : aApp . downloading , readyToApplyDownload : aApp . readyToApplyDownload , downloadSize : aApp . downloadSize || 0 , lastUpdateCheck : aApp . lastUpdateCheck , updateTime : aApp . updateTime , etag : aApp . etag , packageEtag : aApp . packageEtag , manifestHash : aApp . manifestHash , packageHash : aApp . packageHash , staged : aApp . staged , installerAppId : aApp . installerAppId || Ci . nsIScriptSecurityManager . NO_APP_ID , installerIsBrowser : ! ! aApp . installerIsBrowser , storeId : aApp . storeId || "" , storeVersion : aApp . storeVersion || 0 , redirects : aApp . redirects } ; }
Clones a app, without the manifest.
Clones a app without the manifest .