Bug Tracker

Opened 9 years ago

Closed 9 years ago

#7743 closed bug (wontfix)

IE8: jQuery.isPlainObject( document.location ) throws an Invalid Pointer exception

Reported by: jaubourg Owned by: jaubourg
Priority: undecided Milestone: 1.6
Component: unfiled Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:

Description

Found this one when the document.location test in test/unit/ajax.js failed.

jQuery.isPlainObject( document.location ) throws an Invalid Pointer exception in IE8. The inspector shows that document.location.constructor is an Invalid Pointer and as such cannot be accessed at all.

I suspect document.location is not the only variable with that issue so adding object !== document.location as a safeguard doesn't seem like an option.

Change History (8)

comment:1 Changed 9 years ago by jaubourg

Seems it's even more complicated than this. See: http://jsfiddle.net/vZ6xf/

When you load the page, jQuery.isPlainObject( document.location ) returns true. When you click "Run", it throws an exception.

Probably something to do with the cache.

Gotta love IE.

comment:2 Changed 9 years ago by jaubourg

So, in short, we could try/catch and return false, except the first time atound, it won't throw an exception and return true.

comment:3 Changed 9 years ago by jaubourg

Ben Alman doesn't seem to have an exception thrown at him using an XP VM with IE 8.0.6001.18372. I'm using IE 8.0.6001.18975 on Vista (no VM).

comment:4 Changed 9 years ago by cowboy

Also, FWIW, window.location or just location should be preferred to document.location.

comment:5 Changed 9 years ago by dmethvin

IE 8.0.7600.16385 on Windows 7, alerts "true" both times with no crash.

comment:6 Changed 9 years ago by snover

Owner: set to jaubourg
Status: newpending

I’m not able to reproduce this issue. XP SP3 8.0.6001.18702. jaubourg, are you sure your IE is up to date?

comment:7 Changed 9 years ago by jaubourg

Status: pendingnew

@snover: like I said, 8.0.6001.18975. Vista does not propose any update.

Even if the crash is a temporary IE bug OR a Vista problem OR a jaubourg's Vista problem (who knows? ;) ), fact is it returns true for everybody else, which it shouldn't.

comment:8 Changed 9 years ago by Rick Waldron

Resolution: wontfix
Status: newclosed

There is a large issue with $.isPlainObject(), I'm closing this ticket. Please refer to #7780

Note: See TracTickets for help on using tickets.