Skip to content

Commit

Permalink
3.0b4.rev17
Browse files Browse the repository at this point in the history
* Issue with closeLockFd closing when it didnt need to so it errored,
fixed that
* About page not working in Fx47 or Fx48 even with the newly implemented
fix suggested
  • Loading branch information
Noitidart committed Mar 16, 2016
1 parent 3d1c453 commit 2dc84ad
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 15 deletions.
21 changes: 15 additions & 6 deletions bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,25 @@ function initAndRegisterAboutProfilist() {
return Ci.nsIAboutModule.ALLOW_SCRIPT | Ci.nsIAboutModule.URI_CAN_LOAD_IN_CHILD;
},

newChannel: function(aURI, aSecurity) {

// var channel = Services.io.newChannel(core.addon.path.pages + 'cp.xhtml', null, null);
var channel;
newChannel: function(aURI, aSecurity_or_aLoadInfo) {
var redirUrl;
if (aURI.path.toLowerCase().indexOf('?html') > -1) {
channel = Services.io.newChannel(core.addon.path.pages + 'html.xhtml', null, null);
redirUrl = core.addon.path.pages + 'html.xhtml';
} else {
channel = Services.io.newChannel(core.addon.path.pages + 'cp.xhtml', null, null);
redirUrl = core.addon.path.pages + 'cp.xhtml';
}

var channel;
if (Services.vc.compare(core.firefox.version, '47.*') > 0) {
console.error('trying new way!!!!!!!!!!!');
var redirURI = Services.io.newURI(redirUrl, null, null);
channel = Services.io.newChannelFromURIWithLoadInfo(redirURI, aSecurity_or_aLoadInfo);
} else {
console.error('doing old way');
channel = Services.io.newChannel(redirUrl, null, null);
}
channel.originalURI = aURI;

return channel;
}
});
Expand Down
24 changes: 15 additions & 9 deletions modules/workers/MainWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -1327,14 +1327,19 @@ function getIsRunningFromIniFromPlat(aProfPath, aOptions={}) {
}

var closeLockFd = function() {
var rez_closeLockFd = ostypes.API('close')(rez_lockFd);
console.log('rez_closeLockFd:', rez_closeLockFd);
if (!cutils.jscEqual(rez_closeLockFd, 0)) {
// failed to close
throw new MainWorkerError('getIsRunningFromIniFromPlat -> ostypes.api.close', {
msg: 'failed to close cParentLockPath: "' + cParentLockPath + '"',
errno: ctypes.errno
});
if (!cutils.jscEqual(rez_lockFd, -1)) {
console.info('CLOSING LOCKFD');
var rez_closeLockFd = ostypes.API('close')(rez_lockFd);
console.log('rez_closeLockFd:', rez_closeLockFd);
if (!cutils.jscEqual(rez_closeLockFd, 0)) {
// failed to close
throw new MainWorkerError('getIsRunningFromIniFromPlat -> ostypes.api.close', {
msg: 'failed to close cParentLockPath: "' + cParentLockPath + '"',
errno: ctypes.errno
});
}
} else {
console.info('NO NEED TO CLOSE LOCKFD');
}
};

Expand Down Expand Up @@ -3675,7 +3680,8 @@ function updateIntoWindow(aNativeWindowPtrStr) {
if (cutils.jscEqual(oldSmallIcon, 0)) {
console.error('Failed to apply SMALL icon with setClassLong, winLastError:', ctypes.winLastError);
}


// free mem of old icons
if (!cutils.jscEqual(oldBigIcon, 0)) {
var oldBigHICON;
if (ostypes.IS64Bit) {
Expand Down

0 comments on commit 2dc84ad

Please sign in to comment.