зеркало из https://github.com/mozilla/gecko-dev.git
bug 1271436 - use do_GetInterface() a little less r=smaug
This commit is contained in:
Родитель
256fff4fc9
Коммит
a868a5867f
|
@ -2103,10 +2103,9 @@ nsFrameLoader::MaybeCreateDocShell()
|
|||
|
||||
if (OwnerIsMozBrowserOrAppFrame()) {
|
||||
// For inproc frames, set the docshell properties.
|
||||
nsCOMPtr<nsIDocShellTreeItem> item = do_GetInterface(docShell);
|
||||
nsAutoString name;
|
||||
if (mOwnerContent->GetAttr(kNameSpaceID_None, nsGkAtoms::name, name)) {
|
||||
item->SetName(name);
|
||||
docShell->SetName(name);
|
||||
}
|
||||
mDocShell->SetFullscreenAllowed(
|
||||
mOwnerContent->HasAttr(kNameSpaceID_None, nsGkAtoms::allowfullscreen) ||
|
||||
|
|
|
@ -105,7 +105,7 @@ SpeakerManager::Init(nsPIDOMWindowInner* aWindow)
|
|||
{
|
||||
BindToOwner(aWindow);
|
||||
|
||||
nsCOMPtr<nsIDocShell> docshell = do_GetInterface(GetOwner());
|
||||
nsCOMPtr<nsIDocShell> docshell = GetOwner()->GetDocShell();
|
||||
NS_ENSURE_TRUE_VOID(docshell);
|
||||
docshell->GetIsActive(&mVisible);
|
||||
|
||||
|
|
|
@ -910,7 +910,7 @@ private:
|
|||
if (topWorkerPrivate->IsDedicatedWorker()) {
|
||||
nsCOMPtr<nsPIDOMWindowInner> window = topWorkerPrivate->GetWindow();
|
||||
if (window) {
|
||||
nsCOMPtr<nsIDocShell> docShell = do_GetInterface(window);
|
||||
nsCOMPtr<nsIDocShell> docShell = window->GetDocShell();
|
||||
if (docShell) {
|
||||
nsresult rv = docShell->GetDefaultLoadFlags(&loadFlags);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
|
Загрузка…
Ссылка в новой задаче