nsIURIKey key(aURI); *_result = NS_STATIC_CAST(nsIXULPrototypeDocument*, mPrototypeTable.Get(&key));
mPrototypeTable.Get(aURI, _result);
nsXULPrototypeCache::GetPrototype(nsIURI* aURI, nsIXULPrototypeDocument** _result){    nsresult rv = NS_OK;    nsIURIKey key(aURI);    *_result = NS_STATIC_CAST(nsIXULPrototypeDocument*, mPrototypeTable.Get(&key));    if (! *_result) {        // No prototype in XUL memory cache. Spin up FastLoad Service and        // look in FastLoad file.        rv = StartFastLoad(aURI);        if (NS_SUCCEEDED(rv)) {            nsCOMPtr<nsIObjectInputStream> objectInput;            gFastLoadService->GetInputStream(getter_AddRefs(objectInput));            rv = StartFastLoadingURI(aURI, nsIFastLoadService::NS_FASTLOAD_READ);            if (NS_SUCCEEDED(rv)) {                nsCOMPtr<nsIURI> oldURI;                gFastLoadService->SelectMuxedDocument(aURI, getter_AddRefs(oldURI));                // Create a new prototype document.                nsCOMPtr<nsIXULPrototypeDocument> protoDoc;                rv = NS_NewXULPrototypeDocument(nsnull,                                                NS_GET_IID(nsIXULPrototypeDocument),                                                getter_AddRefs(protoDoc));                if (NS_FAILED(rv)) return rv;                rv = protoDoc->Read(objectInput);                if (NS_SUCCEEDED(rv)) {                    NS_ADDREF(*_result = protoDoc);                    PutPrototype(protoDoc);                    gFastLoadService->EndMuxedDocument(aURI);                }                RemoveFromFastLoadSet(aURI);            }        }    }    return rv;}