mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 485396 - Crash in [@ NS_GetInnermostURI - nsDOMStorage::InitAsLocalStorage] with Chromebug running, r=dcamp
This commit is contained in:
parent
76cc4c16be
commit
3351eafdf6
@ -528,6 +528,11 @@ nsDOMStorage::InitAsLocalStorage(nsIPrincipal *aPrincipal)
|
||||
rv = aPrincipal->GetURI(getter_AddRefs(uri));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Check if we really got any URI. System principal doesn't return a URI
|
||||
// instance and we would crash in NS_GetInnermostURI bellow.
|
||||
if (!uri)
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
nsCOMPtr<nsIURI> innerUri = NS_GetInnermostURI(uri);
|
||||
if (!innerUri)
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
|
Loading…
Reference in New Issue
Block a user