Commit c5662e87 authored by Kagami Sascha Rosylight's avatar Kagami Sascha Rosylight
Browse files

Bug 1539884 - Part 37: Add strong references for arguments in callers r=masayuki

parent 496a0d78
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -811,8 +811,10 @@ bool nsCopySupport::FireClipboardEvent(EventMessage aEventMessage,
    nsEventStatus status = nsEventStatus_eIgnore;
    InternalClipboardEvent evt(true, originalEventMessage);
    evt.mClipboardData = clipboardData;
    EventDispatcher::Dispatch(targetElement, presShell->GetPresContext(), &evt,
                              nullptr, &status);

    RefPtr<nsPresContext> presContext = presShell->GetPresContext();
    EventDispatcher::Dispatch(targetElement, presContext, &evt, nullptr,
                              &status);
    // If the event was cancelled, don't do the clipboard operation
    doDefault = (status != nsEventStatus_eConsumeNoDefault);
  }
+4 −4
Original line number Diff line number Diff line
@@ -2721,8 +2721,8 @@ class FocusBlurEvent : public Runnable {
    return EventDispatcher::Dispatch(mTarget, mContext, &event);
  }

  nsCOMPtr<nsISupports> mTarget;
  RefPtr<nsPresContext> mContext;
  const nsCOMPtr<nsISupports> mTarget;
  const RefPtr<nsPresContext> mContext;
  EventMessage mEventMessage;
  bool mWindowRaised;
  bool mIsRefocus;
@@ -2762,8 +2762,8 @@ class FocusInOutEvent : public Runnable {
    return NS_OK;
  }

  nsCOMPtr<nsISupports> mTarget;
  RefPtr<nsPresContext> mContext;
  const nsCOMPtr<nsISupports> mTarget;
  const RefPtr<nsPresContext> mContext;
  EventMessage mEventMessage;
  nsCOMPtr<nsPIDOMWindowOuter> mOriginalFocusedWindow;
  nsCOMPtr<nsIContent> mOriginalFocusedContent;
+3 −1
Original line number Diff line number Diff line
@@ -1809,7 +1809,9 @@ void EventStateManager::FireContextClick() {
      AutoHandlingUserInputStatePusher userInpStatePusher(true, &event);

      // dispatch to DOM
      EventDispatcher::Dispatch(mGestureDownContent, mPresContext, &event,
      RefPtr<nsIContent> gestureDownContent = mGestureDownContent;
      RefPtr<nsPresContext> presContext = mPresContext;
      EventDispatcher::Dispatch(gestureDownContent, presContext, &event,
                                nullptr, &status);

      // We don't need to dispatch to frame handling because no frames
+1 −1
Original line number Diff line number Diff line
@@ -1167,7 +1167,7 @@ class EventStateManager : public nsSupportsWeakReference, public nsIObserver {
  // member variables for the d&d gesture state machine
  LayoutDeviceIntPoint mGestureDownPoint;  // screen coordinates
  // The content to use as target if we start a d&d (what we drag).
  nsCOMPtr<nsIContent> mGestureDownContent;
  RefPtr<nsIContent> mGestureDownContent;
  // The content of the frame where the mouse-down event occurred. It's the same
  // as the target in most cases but not always - for example when dragging
  // an <area> of an image map this is the image. (bug 289667)
+4 −2
Original line number Diff line number Diff line
@@ -151,8 +151,10 @@ void TextComposition::DispatchEvent(
  if (aDispatchEvent->mMessage == eCompositionChange) {
    aDispatchEvent->mFlags.mOnlySystemGroupDispatchInContent = true;
  }
  EventDispatcher::Dispatch(mNode, mPresContext, aDispatchEvent, nullptr,
                            aStatus, aCallBack);
  RefPtr<nsINode> node = mNode;
  RefPtr<nsPresContext> presContext = mPresContext;
  EventDispatcher::Dispatch(node, presContext, aDispatchEvent, nullptr, aStatus,
                            aCallBack);

  OnCompositionEventDispatched(aDispatchEvent);
}
Loading