Closed Bug 568975 Opened 12 years ago Closed 12 years ago

m-c message manager slowed down event handling a bit

Categories

(Core :: DOM: Events, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: smaug, Assigned: smaug)

References

Details

Attachments

(2 files)

Attached patch patchSplinter Review
We can reduce the needed QIing
Attachment #448119 - Flags: review?(jst)
Comment on attachment 448119 [details] [diff] [review]
patch

- In nsPIDOMWindow.h:

   // These two variables are special in that they're set to the same
   // value on both the outer window and the current inner window. Make
   // sure you keep them in sync!
   nsCOMPtr<nsPIDOMEventTarget> mChromeEventHandler; // strong
+  nsCOMPtr<nsPIDOMEventTarget> mParentTarget; // strong
   nsCOMPtr<nsIDOMDocument> mDocument; // strong
 
Given the above comment this member doesn't fit in here.

r=jst with that fixed.
Attachment #448119 - Flags: review?(jst) → review+
Oops, I move mParentTarget under mDocument.
Attached patch patchSplinter Review
Clear mEventTarget when disconnecting messageManager.

I posted this to tryserver to see if this doesn't regress
one browser chrome test.
(In reply to comment #3)

> I posted this to tryserver to see if this doesn't regress
> one browser chrome test.

How did this work? Can we move jst's r+ forward and land this? 

Full disclosure, I really need bug 571438 landed and it depends on this patch.
I think we could move r+, but bug 571438 needs still a review.
Comment on attachment 450634 [details] [diff] [review]
patch

 nsInProcessTabChildGlobal::Disconnect()
 {
+  nsCOMPtr<nsIDOMWindow> win = do_GetInterface(mDocShell);
+  nsCOMPtr<nsPIDOMWindow> pwin = do_QueryInterface(win);
+  if (pwin) {
+    pwin->SetChromeEventHandler(pwin->GetChromeEventHandler());
+  }

I don't understand this change, seems like a no-op to me, but there may be more to this than meets the eye...
That change clears mParentTarget in windows.

I'll add a comment.
http://hg.mozilla.org/mozilla-central/rev/e4816b85e694
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
I'll add still the comment.
You need to log in before you can comment on or make changes to this bug.