Opened 12 years ago
Closed 12 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 12 years ago by
comment:2 Changed 12 years ago by
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 12 years ago by
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 12 years ago by
Also, FWIW, window.location
or just location
should be preferred to document.location
.
comment:5 Changed 12 years ago by
IE 8.0.7600.16385 on Windows 7, alerts "true" both times with no crash.
comment:6 Changed 12 years ago by
Owner: | set to jaubourg |
---|---|
Status: | new → pending |
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 12 years ago by
Status: | pending → new |
---|
@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 12 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
There is a large issue with $.isPlainObject(), I'm closing this ticket. Please refer to #7780
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.