Closed Bug 801241 Opened 12 years ago Closed 12 years ago

location.href = "URL" fails in Scratchpad

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19
Tracking Status
firefox19 + fixed

People

(Reporter: dveditz, Assigned: bholley)

References

Details

(Keywords: regression)

Attachments

(1 file)

On a Mac Nightly I get an error in the Scratchpad trying to execute location.href = "http://www.mozilla.org" and the location does not change. This worked fine in an Oct 11 Nightly, and I get the errors in the Oct 12 nightly. CC'ing bholley because he has touched the location object (in case that's the problem) and because in that range he checked in http://hg.mozilla.org/mozilla-central/rev/ab15ebccc0c0 which touches evalInSandbox(). STR: 1. Shift-F2 to open the scratchpad 2. type => location.href = "http://www.mozilla.org"; 3. Cmd/Ctrl-R to execute Expected: Navigation to www.mozilla.org Actual: error comment gets pasted into the Scratchpad
So the issue here is that JS_DescribeScriptedCaller returns false when it finds no JS code on the stack, which we were incorrectly interpretting as an exception. The interesting thing here though is that there _should_ be JS code on the stack. What's actually happening is that GetContextFromStack skips over the top JS context (the sandbox context) because it isn't associated with a DOM window. This seems totally wrong IMO, and I'm going to file another bug to fix it.
Comment on attachment 671425 [details] [diff] [review] Bug 801241 - Properly handle |false| return false from JS_DescribeScriptedCaller. v1 Whoops, somehow bugzilla lost the review flag. :\
Attachment #671425 - Flags: review?(bzbarsky)
Blocks: 797204
Comment on attachment 671425 [details] [diff] [review] Bug 801241 - Properly handle |false| return false from JS_DescribeScriptedCaller. v1 r=me
Attachment #671425 - Flags: review?(bzbarsky) → review+
Assignee: nobody → bobbyholley+bmo
Component: Developer Tools: Scratchpad → DOM
Product: Firefox → Core
OS: Mac OS X → All
Hardware: x86 → All
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Depends on: 802968
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: