Merge last of bustage fixup from the plugin UI to electrolysis.
Merge last of bustage fixup from the plugin UI to electrolysis.
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -1405,16 +1405,17 @@ function BrowserShutdown()
catch(ex) {
Components.utils.reportError(ex);
}
var os = Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService);
os.removeObserver(gSessionHistoryObserver, "browser:purge-session-history");
os.removeObserver(gXPInstallObserver, "xpinstall-install-blocked");
+ os.removeObserver(gMissingPluginInstaller.pluginCrashed, "plugin-crashed");
try {
gBrowser.removeProgressListener(window.XULBrowserWindow);
gBrowser.removeTabsProgressListener(window.TabsProgressListener);
} catch (ex) {
}
PlacesStarButton.uninit();
--- a/modules/plugin/Makefile.in
+++ b/modules/plugin/Makefile.in
@@ -63,17 +63,17 @@ endif
ifeq ($(OS_ARCH),WINNT)
TOOL_DIRS += default/windows
endif
ifeq ($(OS_ARCH),OS2)
TOOL_DIRS += default/os2
endif
-ifdef PBBUILD
+ifdef PBBUILD_BIN
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
TOOL_DIRS += default/mac
endif
endif
ifdef ENABLE_TESTS
ifneq (,$(filter WINNT Darwin Linux OS2 SunOS,$(OS_ARCH)))
DIRS += test
--- a/toolkit/crashreporter/CrashSubmit.jsm
+++ b/toolkit/crashreporter/CrashSubmit.jsm
@@ -268,28 +268,28 @@ Submitter.prototype = {
if(aFlag & STATE_STOP) {
this.iframe.docShell.removeProgressListener(this);
// check general request status first
if (!Components.isSuccessCode(aStatus)) {
this.element.removeChild(this.iframe);
if (this.errorCallback) {
this.errorCallback(this.id);
- this.cleanup();
}
+ this.cleanup();
return 0;
}
// check HTTP status
if (aRequest instanceof Ci.nsIHttpChannel &&
aRequest.responseStatus != 200) {
this.element.removeChild(this.iframe);
if (this.errorCallback) {
this.errorCallback(this.id);
- this.cleanup();
}
+ this.cleanup();
return 0;
}
var ret = parseKeyValuePairs(this.iframe.contentDocument.documentElement.textContent);
this.element.removeChild(this.iframe);
this.submitSuccess(ret);
}
return 0;
@@ -298,29 +298,32 @@ Submitter.prototype = {
onLocationChange: function(aProgress, aRequest, aURI) {return 0;},
onProgressChange: function() {return 0;},
onStatusChange: function() {return 0;},
onSecurityChange: function() {return 0;},
submit: function Submitter_submit()
{
let [dump, extra] = getPendingMinidump(this.id);
- if (!dump.exists() || !extra.exists())
+ if (!dump.exists() || !extra.exists()) {
+ this.cleanup();
return false;
+ }
this.dump = dump;
this.extra = extra;
let iframe = this.document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "iframe");
iframe.setAttribute("type", "content");
let self = this;
function loadHandler() {
if (iframe.contentWindow.location == "about:blank")
return;
iframe.removeEventListener("load", loadHandler, true);
- self.submitForm();
+ if (!self.submitForm())
+ self.cleanup();
}
iframe.addEventListener("load", loadHandler, true);
this.element.appendChild(iframe);
this.iframe = iframe;
iframe.webNavigation.loadURI("chrome://global/content/crash-submit-form.xhtml", 0, null, null, null);
return true;
}
--- a/xpcom/threads/nsEnvironment.cpp
+++ b/xpcom/threads/nsEnvironment.cpp
@@ -132,17 +132,17 @@ nsEnvironment::Get(const nsAString& aNam
return rv;
}
/* Environment strings must have static duration; We're gonna leak all of this
* at shutdown: this is by design, caused how Unix/Linux implement environment
* vars.
*/
-typedef nsBaseHashtableET<nsCStringHashKey,char*> EnvEntryType;
+typedef nsBaseHashtableET<nsCharPtrHashKey,char*> EnvEntryType;
typedef nsTHashtable<EnvEntryType> EnvHashType;
static EnvHashType *gEnvHash = nsnull;
static PRBool
EnsureEnvHash()
{
if (gEnvHash)
@@ -173,17 +173,17 @@ nsEnvironment::Set(const nsAString& aNam
NS_ENSURE_SUCCESS(rv, rv);
nsAutoLock lock(mLock); // autolock unlocks automagically
if (!EnsureEnvHash()){
return NS_ERROR_UNEXPECTED;
}
- EnvEntryType* entry = gEnvHash->PutEntry(nativeName);
+ EnvEntryType* entry = gEnvHash->PutEntry(nativeName.get());
if (!entry) {
return NS_ERROR_OUT_OF_MEMORY;
}
char* newData = PR_smprintf("%s=%s",
nativeName.get(),
nativeVal.get());
if (!newData) {