nsCOMPtr<nsIChromeRegistry> reg(do_GetService(kChromeRegistryCID, &rv)); if (NS_SUCCEEDED(rv) && reg) { PRBool allow; reg->AllowScriptsForSkin(uri, &allow); if (!allow) mScriptAccessTable->Put(&key, document); }
nsXBLService::GetBindingDocument(const nsCString& aURLStr, nsIDocument** aResult){  *aResult = nsnull;    // We've got a file.  Check our key binding file cache.  nsStringKey key(aURLStr);  nsCOMPtr<nsIDocument> document;  document = dont_AddRef(NS_STATIC_CAST(nsIDocument*, mBindingTable->Get(&key)));  if (!document) {    nsCOMPtr<nsIURL> uri;    nsComponentManager::CreateInstance("component://netscape/network/standard-url",                                       nsnull,                                       NS_GET_IID(nsIURL),                                       getter_AddRefs(uri));    uri->SetSpec(aURLStr);    FetchBindingDocument(uri, getter_AddRefs(document));    if (document) {      // Put the key binding doc into our table.      mBindingTable->Put(&key, document);    }    else return NS_ERROR_FAILURE;  }  *aResult = document;  NS_IF_ADDREF(*aResult);  return NS_OK;}