Back out WeirdAl's patch from bug 398579 to see if it caused the perf regression on Linux.

git-svn-id: svn://10.0.0.236/trunk@240181 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
reed%reedloden.com
2007-12-01 01:23:11 +00:00
parent ce70f15e34
commit 4b7e224f5f
2 changed files with 10 additions and 18 deletions

View File

@@ -1396,7 +1396,6 @@ mozJSComponentLoader::ImportInto(const nsACString & aLocation,
JSObject * *_retval)
{
nsresult rv;
*_retval = nsnull;
if (!mInitialized) {
rv = ReallyInit();
@@ -1406,12 +1405,19 @@ mozJSComponentLoader::ImportInto(const nsACString & aLocation,
nsCOMPtr<nsIIOService> ioService = do_GetIOService(&rv);
NS_ENSURE_SUCCESS(rv, rv);
// Get the URI.
nsCAutoString scheme;
rv = ioService->ExtractScheme(aLocation, scheme);
if (NS_FAILED(rv) ||
!scheme.EqualsLiteral("resource")) {
*_retval = nsnull;
return NS_ERROR_INVALID_ARG;
}
// Get the resource:// URI.
nsCOMPtr<nsIURI> resURI;
rv = ioService->NewURI(aLocation, nsnull, nsnull, getter_AddRefs(resURI));
nsCOMPtr<nsIFileURL> fileURL = do_QueryInterface(resURI, &rv);
// If we don't have a file URL, then the location passed in is invalid.
NS_ENSURE_SUCCESS(rv, NS_ERROR_INVALID_ARG);
NS_ENSURE_SUCCESS(rv, rv);
// Get the file belonging to it.
nsCOMPtr<nsIFile> file;

View File

@@ -67,20 +67,6 @@ function run_test() {
do_check_true(scope2.XPCOMUtils == scope.XPCOMUtils);
// try on a new object using a file URL
var res = Components.classes["@mozilla.org/network/protocol;1?name=resource"]
.getService(Components.interfaces.nsIResProtocolHandler);
var resURI = res.newURI("resource://gre/modules/XPCOMUtils.jsm", null, null);
dump("resURI: " + resURI + "\n");
var filePath = res.resolveURI(resURI);
do_check_eq(filePath.indexOf("file://"), 0);
var scope3 = {};
Components.utils.import(filePath, scope3);
do_check_eq(typeof(scope3.XPCOMUtils), "object");
do_check_eq(typeof(scope3.XPCOMUtils.generateModule), "function");
do_check_true(scope3.XPCOMUtils == scope.XPCOMUtils);
// make sure we throw when the second arg is bogus
var didThrow = false;
try {