Back out 2d4a6e2237f9. Logging no longer needed.

This commit is contained in:
Jonas Sicking 2009-11-19 17:52:28 -08:00
parent 0cf80bf052
commit 3b6fad6365
2 changed files with 0 additions and 48 deletions

View File

@ -509,15 +509,6 @@ nsScriptLoader::ProcessScriptElement(nsIScriptElement *aElement)
!aElement->GetScriptAsync(); !aElement->GetScriptAsync();
mPreloads.RemoveElementAt(i); mPreloads.RemoveElementAt(i);
if (nsContentUtils::GetBoolPref("content.scriptloader.logloads")) {
nsCString spec;
request->mURI->GetSpec(spec);
printf("Grabbing existing speculative load for %s (%p). async:%d defer:%d\n",
spec.get(), request.get(), aElement->GetScriptAsync(),
request->mDefer);
}
rv = CheckContentPolicy(mDocument, aElement, request->mURI, type); rv = CheckContentPolicy(mDocument, aElement, request->mURI, type);
if (NS_FAILED(rv)) { if (NS_FAILED(rv)) {
// Note, we're dropping our last ref to request here. // Note, we're dropping our last ref to request here.
@ -567,14 +558,6 @@ nsScriptLoader::ProcessScriptElement(nsIScriptElement *aElement)
request->mIsInline = PR_FALSE; request->mIsInline = PR_FALSE;
request->mLoading = PR_TRUE; request->mLoading = PR_TRUE;
if (nsContentUtils::GetBoolPref("content.scriptloader.logloads")) {
nsCString spec;
request->mURI->GetSpec(spec);
printf("Starting normal load for %s (%p). async:%d defer:%d\n",
spec.get(), request.get(), aElement->GetScriptAsync(),
request->mDefer);
}
rv = StartLoad(request, type); rv = StartLoad(request, type);
if (NS_FAILED(rv)) { if (NS_FAILED(rv)) {
return rv; return rv;
@ -587,10 +570,6 @@ nsScriptLoader::ProcessScriptElement(nsIScriptElement *aElement)
request->mLineNo = aElement->GetScriptLineNumber(); request->mLineNo = aElement->GetScriptLineNumber();
if (nsContentUtils::GetBoolPref("content.scriptloader.logloads")) {
printf("Creating inline request (%p).\n", request.get());
}
// If we've got existing pending requests, add ourselves // If we've got existing pending requests, add ourselves
// to this list. // to this list.
if (!hadPendingRequests && ReadyToExecuteScripts() && if (!hadPendingRequests && ReadyToExecuteScripts() &&
@ -630,10 +609,6 @@ nsScriptLoader::ProcessRequest(nsScriptLoadRequest* aRequest)
nsAFlatString* script; nsAFlatString* script;
nsAutoString textData; nsAutoString textData;
if (nsContentUtils::GetBoolPref("content.scriptloader.logloads")) {
printf("Running request (%p).\n", aRequest);
}
// If there's no script text, we try to get it from the element // If there's no script text, we try to get it from the element
if (aRequest->mIsInline) { if (aRequest->mIsInline) {
// XXX This is inefficient - GetText makes multiple // XXX This is inefficient - GetText makes multiple
@ -984,13 +959,6 @@ nsScriptLoader::OnStreamComplete(nsIStreamLoader* aLoader,
NS_ASSERTION(request, "null request in stream complete handler"); NS_ASSERTION(request, "null request in stream complete handler");
NS_ENSURE_TRUE(request, NS_ERROR_FAILURE); NS_ENSURE_TRUE(request, NS_ERROR_FAILURE);
if (nsContentUtils::GetBoolPref("content.scriptloader.logloads")) {
nsCString spec;
request->mURI->GetSpec(spec);
printf("Finished loading %s (%p). status:%d\n", spec.get(), request,
aStatus);
}
nsresult rv = PrepareLoadedRequest(request, aLoader, aStatus, aStringLen, nsresult rv = PrepareLoadedRequest(request, aLoader, aStatus, aStringLen,
aString); aString);
if (NS_FAILED(rv)) { if (NS_FAILED(rv)) {
@ -1144,14 +1112,6 @@ nsScriptLoader::PreloadURI(nsIURI *aURI, const nsAString &aCharset,
request->mLoading = PR_TRUE; request->mLoading = PR_TRUE;
request->mDefer = PR_FALSE; // This is computed later when we go to execute the request->mDefer = PR_FALSE; // This is computed later when we go to execute the
// script. // script.
if (nsContentUtils::GetBoolPref("content.scriptloader.logloads")) {
nsCString spec;
request->mURI->GetSpec(spec);
printf("Starting speculative load for %s (%p).\n", spec.get(),
request.get());
}
nsresult rv = StartLoad(request, aType); nsresult rv = StartLoad(request, aType);
if (NS_FAILED(rv)) { if (NS_FAILED(rv)) {
return; return;

View File

@ -4,13 +4,6 @@
<!-- Async script that isn't preloaded --> <!-- Async script that isn't preloaded -->
<script async src="file_bug503481.sjs?blockOn=R&body=runFirst();"></script> <script async src="file_bug503481.sjs?blockOn=R&body=runFirst();"></script>
<script> <script>
function enableLogs(b) {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var prefs = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
prefs.setBoolPref("content.scriptloader.logloads", b);
}
enableLogs(true);
firstRan = false; firstRan = false;
secondRan = false; secondRan = false;
thirdRan = false; thirdRan = false;
@ -44,7 +37,6 @@ function done() {
parent.is(forthRan, true, "forth should have run by onload"); parent.is(forthRan, true, "forth should have run by onload");
parent.is(fifthRan, true, "fifth should have run by onload"); parent.is(fifthRan, true, "fifth should have run by onload");
parent.is(sixthRan, true, "sixth should have run by onload"); parent.is(sixthRan, true, "sixth should have run by onload");
enableLogs(false);
parent.SimpleTest.finish(); parent.SimpleTest.finish();
} }