content.location is undefined when passed to string::replace

RESOLVED DUPLICATE of bug 553407

Status

()

RESOLVED DUPLICATE of bug 553407
9 years ago
9 years ago

People

(Reporter: mludha, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

9 years ago
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
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

9 years ago
Could be xpconnect related problem.

Comment 3

9 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
Last Resolved: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 553407
You need to log in before you can comment on or make changes to this bug.