Closed Bug 663879 Opened 13 years ago Closed 13 years ago

Kill AddEventListenerByIID/RemoveEventListenerByIID from extensions

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: sicking, Assigned: sicking)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch Patch to fix (obsolete) — Splinter Review
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.
Attached patch Patch to fixSplinter Review
The previous patch lacked adjustments to the QI implementations. This one seems to be passing tryserver.
Attachment #538974 - Flags: review?(Olli.Pettay)
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
Closed: 13 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 → ---
http://hg.mozilla.org/mozilla-central/rev/ab2e92a211e1
Status: REOPENED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: