location.href = "URL" fails in Scratchpad

RESOLVED FIXED in Firefox 19

Status

()

Core
DOM
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: dveditz, Assigned: Bobby Holley (parental leave - send mail for anything urgent))

Tracking

({regression})

Trunk
mozilla19
regression
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox19+ fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
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
(Reporter)

Updated

5 years ago
status-firefox19: --- → affected
tracking-firefox19: --- → +
Created attachment 671425 [details] [diff] [review]
Bug 801241 - Properly handle |false| return false from JS_DescribeScriptedCaller. v1

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+
https://hg.mozilla.org/integration/mozilla-inbound/rev/6ed5f4767b57
Assignee: nobody → bobbyholley+bmo
Component: Developer Tools: Scratchpad → DOM
Product: Firefox → Core
OS: Mac OS X → All
Hardware: x86 → All
https://hg.mozilla.org/mozilla-central/rev/6ed5f4767b57
Status: NEW → RESOLVED
Last Resolved: 5 years ago
status-firefox19: affected → fixed
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Depends on: 802968
You need to log in before you can comment on or make changes to this bug.