Kill AddEventListenerByIID/RemoveEventListenerByIID from extensions

RESOLVED FIXED

Status

()

Core
DOM
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: sicking, Assigned: sicking)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Created attachment 538949 [details] [diff] [review]
Patch to fix

I checked all code paths called by HandleEvent and they always QI and bail if the event doesn't implement the desired interface.

Still running this through tryserver, as it seems like some of this code is platform dependent, so not asking for review yet.
Created attachment 538974 [details] [diff] [review]
Patch to fix

The previous patch lacked adjustments to the QI implementations. This one seems to be passing tryserver.
Attachment #538974 - Flags: review?(Olli.Pettay)
Attachment #538949 - Attachment is obsolete: true

Comment 2

6 years ago
Comment on attachment 538974 [details] [diff] [review]
Patch to fix


> NS_IMETHODIMP mozInlineSpellChecker::HandleEvent(nsIDOMEvent* aEvent)
> {
>+  nsAutoString eventType;
>+  aEvent->GetType(eventType);
>+
>+  if (eventType.EqualsLiteral("blur"))
>+    return Blur(aEvent);
>+  if (eventType.EqualsLiteral("click"))
>+    return MouseClick(aEvent);
>+  if (eventType.EqualsLiteral("keypress"))
>+    return KeyPress(aEvent);

Coding style is:
if (expr) {
  stmt;
}


>+  if (eventType.EqualsLiteral("mousedown"))
>+    return MouseDown(aEvent);
>+  if (eventType.EqualsLiteral("mouseup"))
>+    return MouseUp(aEvent);
>+  if (eventType.EqualsLiteral("mousemove"))
>+    return MouseMove(aEvent);

if (expr) {
  stmt;
}
Attachment #538974 - Flags: review?(Olli.Pettay) → review+
Checked in to m-c:
http://hg.mozilla.org/mozilla-central/rev/967b254211be

Thanks for the review!
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Aww, crap, this wasn't the one I intended to land. This depends on bug 663461.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Landed http://hg.mozilla.org/integration/mozilla-inbound/rev/ab2e92a211e1

Thanks for review!
http://hg.mozilla.org/mozilla-central/rev/ab2e92a211e1
Status: REOPENED → RESOLVED
Last Resolved: 6 years ago6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.