mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 18:08:58 +00:00
Make sure not to access members of deleted SheetLoadDatas. Bug 308766, r+sr=jst
This commit is contained in:
parent
71c092caac
commit
b8cf83ad82
@ -1831,12 +1831,16 @@ CSSLoaderImpl::LoadChildSheet(nsICSSStyleSheet* aParentSheet,
|
||||
}
|
||||
|
||||
NS_ADDREF(data);
|
||||
PRBool syncLoad = data->mSyncLoad;
|
||||
|
||||
// Load completion will release the data
|
||||
rv = LoadSheet(data, state);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// If syncLoad is true, |data| will be deleted by now.
|
||||
if (!syncLoad) {
|
||||
data->mMustNotify = PR_TRUE;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user