Closed Bug 633880 Opened 14 years ago Closed 1 year ago

Regression on chrome to page to chrome interaction (wrappers?)

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: sroussey, Assigned: sicking)

References

()

Details

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b11) Gecko/20100101 Firefox/4.0b11 Build Identifier: It looks like a wrapper issue Reproducible: Always Steps to Reproduce: 1. Install latest Firebug 1.7alpha (or SVN) 2. Install Illuminations beta: https://addons.mozilla.org/en-US/firefox/addon/illuminations-for-developers/versions/1.1.5beta3 3. Go here: http://dev.sencha.com/deploy/dev/examples/organizer/organizer.html 4. Enable Illuminations panel inside Firebug 5. Click on Data button 6. Click on the JsonStore 7. Click on the Records side panel Works in Firefox 3.6 and it used to work in Firefox 4 as late as 1/18/2011 (I made a screencast that day, using Minefield). Broken in FF4b11 Actual Results: An error gets generated and therefore nothing shows in the records panel Expected Results: Records show
This might affect Firebug and other extensions
What is the error?
TypeError fileName "http://dev.sencha.com/deploy/dev/ext-all.js" lineNumber 7 message "e.call is not a function" name "TypeError" stack "([object Proxy])@http://dev.sencha.com/deploy/dev/ext-all.js:7 @:0 " It look like the callback function does not exist. In extension: object.data.each(function(record){...});
Ok, looks like this is a fallout from us making chrome Functions not expose any properties by default (which is an important security fix). The extension is going to have to fix this. Basically what we recommend doing is creating a content function that is bound to the chrome function. Take a look at the InstallTrigger and console API code in the browser for an example. Jonas, we really need documentation and developer outreach for this.
Assignee: nobody → jonas
Status: UNCONFIRMED → NEW
Ever confirmed: true
Component: General → Other
OS: Windows 7 → All
Product: Core → Tech Evangelism
QA Contact: general → other
Hardware: x86 → All
Content page code (uncompressed): each : function(fn, scope){ var items = [].concat(this.items); for(var i = 0, len = items.length; i < len; i++){ if(fn.call(scope || items[i], items[i], i, len) === false){ break; } } } In this case it is fn.call is not a function
Is fn a function exposed by chrome?
Something like this: // find current window win = window.wrappedJSObject; object = win.Ext.StoreMgr.get("name"); object.data.each(function(record){...}); So the fn is visible, but not fn.call? OK, I'll ask somewhere about how the console API gets done (I *will* be at Mozilla Thursday morning, by chance). BTW: If you meant to cc Jonas, you didn't. Or he might find this some other way, in which case, never-mind.
Oh, Jonas is there now
Yeah, so the chrome function is exposed, but content can't see any properties on it by default (in particular not fn.call/fn.apply/fn.bind).
Thanks, I know you're busy. Rewriting around it.
I didn't mean to sound dismissive, Jonas is just more qualified to talk about this. I moved this over to evangelism to make sure we do communicate about this. You are not the first to run into this change.
I didn't think you were dismissive at all. I appreciate brevity. And I'm following the work on quora & memory leaks. I was sincere when I said thanks!
Product: Tech Evangelism → Tech Evangelism Graveyard
Status: NEW → RESOLVED
Closed: 1 year ago
Component: Other → DOM: Core & HTML
Product: Tech Evangelism Graveyard → Core
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.