Bugzilla
Quick Search
Browse
Advanced Search
Reports
Quick Search Help
Documentation
New Account
Log In
Login with GitHub
Remember
Forgot Password
Mozilla Home
Privacy
Cookies
Legal
Attachment 8860904 Details for
Bug 1356558
[patch]
(WIP) Supress nsAutoScriptBlocker when destroying PreShell, PresContext, etc at Hide()
1356558_wip.patch (text/plain), 1.41 KB, created by
Bevis Tseng[:bevis][:btseng](Exited)
(
hide
)
Description:
(WIP) Supress nsAutoScriptBlocker when destroying PreShell, PresContext, etc at Hide()
Filename:
MIME Type:
Creator:
Bevis Tseng[:bevis][:btseng](Exited)
Size:
1.41 KB
patch
obsolete
># HG changeset patch ># User Bevis Tseng <btseng@mozilla.com> ># Date 1493032398 -28800 ># Mon Apr 24 19:13:18 2017 +0800 ># Node ID 2faaedaedbef75aa1b331899a6c29688984958a8 ># Parent 8e969cc9aff49f845678cba5b35d9dd8aa340f16 >Bug 1356558 - Supress nsAutoScriptBlocker when destroying PreShell, PresContext, etc at Hide(). > >diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp >--- a/layout/base/nsDocumentViewer.cpp >+++ b/layout/base/nsDocumentViewer.cpp >@@ -2194,19 +2194,24 @@ nsDocumentViewer::Hide(void) > mPresShell->CaptureHistoryState(getter_AddRefs(layoutState)); > } > >- DestroyPresShell(); >- >- DestroyPresContext(); >- >- mViewManager = nullptr; >- mWindow = nullptr; >- mDeviceContext = nullptr; >- mParentWidget = nullptr; >- >- nsCOMPtr<nsIBaseWindow> base_win(mContainer); >- >- if (base_win && !mAttachedToParent) { >- base_win->SetParentWidget(nullptr); >+ { >+ // Suppress the nsAutoScriptBlocker in DestroyPresShell() to prevent reentry >+ // when destroying PresShell/PresContext, etc. >+ nsAutoScriptBlocker blockScripts; >+ DestroyPresShell(); >+ >+ DestroyPresContext(); >+ >+ mViewManager = nullptr; >+ mWindow = nullptr; >+ mDeviceContext = nullptr; >+ mParentWidget = nullptr; >+ >+ nsCOMPtr<nsIBaseWindow> base_win(mContainer); >+ >+ if (base_win && !mAttachedToParent) { >+ base_win->SetParentWidget(nullptr); >+ } > } > > return NS_OK;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
|
Review
Attachments on
bug 1356558
:
8860904
|
8861270
|
8861342
|
8862749
|
8863995
|
8865332