Merge last of bustage fixup from the plugin UI to electrolysis.
authorBenjamin Smedberg <benjamin@smedbergs.us>
Wed, 10 Feb 2010 14:25:01 -0500
changeset 46653 5603d4b9af300439da13f66b6e7ab39b87e76be6
parent 46652 834671736c6b47c1d27b4e8a6be4fbec1ab7d437 (current diff)
parent 38043 6f73d59a7a7b11c420c4b8a9e646431d478f0d33 (diff)
child 46654 45dcc1e10d76e1f41d4e30ad9562aaef5869f91f
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
milestone1.9.3a2pre
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) {