} else {
}  if (NS_FAILED(rv)) {
nsJSChannel::InternalOpen(PRBool aIsAsync, nsIStreamListener *aListener,                          nsISupports *aContext, nsIInputStream **aResult){    nsCOMPtr<nsILoadGroup> loadGroup;    // Add the javascript channel to its loadgroup so that we know if    // network loads were canceled or not...    mStreamChannel->GetLoadGroup(getter_AddRefs(loadGroup));    if (loadGroup) {        loadGroup->AddRequest(this, aContext);    }    // Synchronously execute the script...    // mIsActive is used to indicate the the request is 'busy' during the    // the script evaluation phase.  This means that IsPending() will     // indicate the the request is busy while the script is executing...    mIsActive = PR_TRUE;    nsresult rv = mIOThunk->EvaluateScript(mStreamChannel);    // Remove the javascript channel from its loadgroup...    if (loadGroup) {        loadGroup->RemoveRequest(this, aContext, rv);    }    // We're no longer active, it's now up to the stream channel to do    // the loading, if needed.    mIsActive = PR_FALSE;    if (NS_SUCCEEDED(rv) && !mWasCanceled) {        // EvaluateScript() succeeded, and we were not canceled, that        // means there's data to parse as a result of evaluating the        // script.        // Get the stream channels load flags (!= mLoadFlags).        nsLoadFlags loadFlags;        mStreamChannel->GetLoadFlags(&loadFlags);        if (loadFlags & LOAD_DOCUMENT_URI) {            // We're loaded as the document channel. Stop all pending            // network loads.            rv = StopAll();        }        if (NS_SUCCEEDED(rv)) {            // This will add mStreamChannel to the load group.            if (aIsAsync) {                rv = mStreamChannel->AsyncOpen(aListener, aContext);            } else {                rv = mStreamChannel->Open(aResult);            }        }    } else {        // Propagate the failure down to the underlying channel...        mStreamChannel->Cancel(rv);    }    return rv;}