Commit 09f9addb authored by Georg Koppen's avatar Georg Koppen
Browse files

Bug 24398: Plugin-container process exhausts memory

The plugin-container process can thrash/crash due to increasing memory
consumption after our workaround for bug 24052. The patch provided by a
cypherpunk (big thanks!) deals with that as far as the Developer Tools
are concerned.
parent 846fa9ea
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -697,12 +697,17 @@ function newChannelForURL(url, { policy, window, principal }) {
  try {
    return NetUtil.newChannel(channelOptions);
  } catch (e) {
    if (e.name === "NS_ERROR_UNKNOWN_PROTOCOL" &&
        !(url.startsWith("file://"))) {
      // In xpcshell tests on Windows, nsExternalProtocolHandler::NewChannel()
      // can throw NS_ERROR_UNKNOWN_PROTOCOL if the external protocol isn't
      // supported by Windows, so we also need to handle the exception here if
      // parsing the URL above doesn't throw.
      return newChannelForURL("file://" + url, { policy, window, principal });
    }

    throw e;
  }
}

// Fetch is defined differently depending on whether we are on the main thread