Exception when sending document.location in $.post

Exception when sending document.location in $.post

Hello!
I started using jQuery only recently so the behaviour I'm experiencing
may be the expected one. I suspect it's not though.
I have the following piece of code:
// Code
jQuery.post("trackclick.php",{ fromURL: document.location });
It works correctly in IE 8.0 but when I try it in Firefox 3.0.16 I get
an error:
// Error
Error: [Exception... "Component returned failure code: 0x80004001
(NS_ERROR_NOT_IMPLEMENTED) [nsIDOMLocation.host]" nsresult:
"0x80004001 (NS_ERROR_NOT_IMPLEMENTED)" location: "JS frame ::
http://code.jquery.com/jquery-latest.js :: anonymous :: line 604"
data: no]
Source file: http://code.jquery.com/jquery-latest.js Line: 604
If I do it like this it works in firefox too:
// Code
var from = new String(document.location);
jQuery.post("trackclick.php",{ fromURL: from });
So I guess I was just wondering if this is supposed to happen. The
documentation says "Object must be Key/Value pairs". Is
document.location not considered a value?
--