зеркало из https://github.com/mozilla/pjs.git
Fix leak when handling key events on zombie pages. b=192336 r+sr=roc a=asa
This commit is contained in:
Родитель
fec45c9fee
Коммит
ebdf14098b
|
@ -5989,8 +5989,8 @@ PresShell::HandleEvent(nsIView *aView,
|
|||
if (nsnull != frame) {
|
||||
PushCurrentEventInfo(nsnull, nsnull);
|
||||
|
||||
nsIEventStateManager *manager;
|
||||
if (NS_OK == mPresContext->GetEventStateManager(&manager)) {
|
||||
nsCOMPtr<nsIEventStateManager> manager;
|
||||
if (NS_OK == mPresContext->GetEventStateManager(getter_AddRefs(manager))) {
|
||||
//change 6-01-00 mjudge,ftang adding ime as an event that needs focused element
|
||||
if (NS_IS_KEY_EVENT(aEvent) || NS_IS_IME_EVENT(aEvent) || aEvent->message == NS_CONTEXTMENU_KEY) {
|
||||
//Key events go to the focused frame, not point based.
|
||||
|
@ -6133,7 +6133,6 @@ PresShell::HandleEvent(nsIView *aView,
|
|||
if (GetCurrentEventFrame()) {
|
||||
rv = HandleEventInternal(aEvent, aView, NS_EVENT_FLAG_INIT, aEventStatus);
|
||||
}
|
||||
NS_RELEASE(manager);
|
||||
}
|
||||
#ifdef NS_DEBUG
|
||||
if ((nsIFrameDebug::GetShowEventTargetFrameBorder()) && (GetCurrentEventFrame())) {
|
||||
|
|
|
@ -5989,8 +5989,8 @@ PresShell::HandleEvent(nsIView *aView,
|
|||
if (nsnull != frame) {
|
||||
PushCurrentEventInfo(nsnull, nsnull);
|
||||
|
||||
nsIEventStateManager *manager;
|
||||
if (NS_OK == mPresContext->GetEventStateManager(&manager)) {
|
||||
nsCOMPtr<nsIEventStateManager> manager;
|
||||
if (NS_OK == mPresContext->GetEventStateManager(getter_AddRefs(manager))) {
|
||||
//change 6-01-00 mjudge,ftang adding ime as an event that needs focused element
|
||||
if (NS_IS_KEY_EVENT(aEvent) || NS_IS_IME_EVENT(aEvent) || aEvent->message == NS_CONTEXTMENU_KEY) {
|
||||
//Key events go to the focused frame, not point based.
|
||||
|
@ -6133,7 +6133,6 @@ PresShell::HandleEvent(nsIView *aView,
|
|||
if (GetCurrentEventFrame()) {
|
||||
rv = HandleEventInternal(aEvent, aView, NS_EVENT_FLAG_INIT, aEventStatus);
|
||||
}
|
||||
NS_RELEASE(manager);
|
||||
}
|
||||
#ifdef NS_DEBUG
|
||||
if ((nsIFrameDebug::GetShowEventTargetFrameBorder()) && (GetCurrentEventFrame())) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче