Closed
Bug 553597
Opened 15 years ago
Closed 15 years ago
content.location is undefined when passed to string::replace
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
DUPLICATE
of bug 553407
People
(Reporter: mludha, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a4pre) Gecko/20100319 Minefield/3.7a4pre
content.location is undefined when passed as a replacement argument to string::replace. This doesn't happen with other properties of content like content.name. Also it is not console-specific as I discovered this behavior in my extension.
Reproducible: Always
Steps to Reproduce:
Enter
alert("(a)".replace('a', top.opener.content.location)); alert(top.opener.content.location;
into the Error Console
Actual Results:
First pop-up says (undefined), second one gives correct url
Expected Results:
Both pop-ups should give the same result
Tested on a clean install, doesn't happen with latest Firefox/3.6
Comment 1•15 years ago
|
||
Looks like a JavaScript bug to me. I think location's toString() method [1] should be called.
[1] http://mxr.mozilla.org/mozilla-central/source/dom/interfaces/base/nsIDOMLocation.idl#63
Assignee: nobody → general
Status: UNCONFIRMED → NEW
Component: DOM: Core & HTML → JavaScript Engine
Ever confirmed: true
OS: Windows XP → All
QA Contact: general → general
Hardware: x86 → All
Version: unspecified → Trunk
Comment 2•15 years ago
|
||
Could be xpconnect related problem.
Comment 3•15 years ago
|
||
I am pretty sure I fixed this on the tracemonkey branch. This should be merged over into m-c soon. CC'ing sayrer to make sure this is being tracked.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•