Last Comment Bug 653364 - isTrusted undefined on new hashchange event
: isTrusted undefined on new hashchange event
Status: RESOLVED FIXED
: regression
Product: Core
Classification: Components
Component: Document Navigation (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Justin Lebar (not reading bugmail)
:
Mentors:
Depends on:
Blocks: 628069
  Show dependency treegraph
 
Reported: 2011-04-28 00:39 PDT by John P Baker
Modified: 2011-06-11 00:41 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (6.44 KB, patch)
2011-04-28 10:40 PDT, Justin Lebar (not reading bugmail)
no flags Details | Diff | Review
Patch v2 (5.86 KB, patch)
2011-04-28 13:15 PDT, Justin Lebar (not reading bugmail)
bzbarsky: review+
Details | Diff | Review

Description John P Baker 2011-04-28 00:39:21 PDT
My addon contains the following code

handleEvent : function bug420605_handleEvent(aEvent) {
    switch (aEvent.type) {

...

      case "hashchange":
        if (aEvent.isTrusted)
          this.onHashChange(aEvent);
        break;

...

aEvent.isTrusted is now undefined here.

bz in bug 628069 comment #19 replied:
> Hmm.  The classinfo for the new event doesn't include nsIDOMNSEvent.  That's
> true for popstate as well, looks like.

> John, can you please file a followup
> bug on that?
Comment 1 Justin Lebar (not reading bugmail) 2011-04-28 10:40:49 PDT
Created attachment 528898 [details] [diff] [review]
Patch v1

I think popstate is fine, because it has DOM_CLASSINFO_EVENT_MAP_ENTRIES.  The
hashchange event had DOM_CLASSINFO_DOCUMENT_MAP_ENTRIES, which was problematic.

Anyway, I added tests for both popstate and hashchange.
Comment 2 Boris Zbarsky [:bz] 2011-04-28 13:00:27 PDT
Comment on attachment 528898 [details] [diff] [review]
Patch v1

Why the changes to dom/tests/mochitest/bugs/Makefile.in ?
Comment 3 Justin Lebar (not reading bugmail) 2011-04-28 13:03:57 PDT
Oops.  That was an errant hg revert --rev qparent.
Comment 4 Justin Lebar (not reading bugmail) 2011-04-28 13:15:09 PDT
Created attachment 528941 [details] [diff] [review]
Patch v2

Un-removed tests, per comment 2
Comment 5 Boris Zbarsky [:bz] 2011-04-28 13:25:37 PDT
Comment on attachment 528941 [details] [diff] [review]
Patch v2

r=me
Comment 6 Justin Lebar (not reading bugmail) 2011-05-05 13:51:41 PDT
http://hg.mozilla.org/mozilla-central/rev/5efc266040c7

Note You need to log in before you can comment on or make changes to this bug.