Closed Bug 541390 Opened 15 years ago Closed 6 years ago

Permission denied for <http://www.osx.eu> to call method UnnamedClass.handleEvent

Categories

(Core :: XPConnect, defect)

1.9.2 Branch
x86
Windows Vista
defect
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: Honza, Unassigned)

Details

(Whiteboard: [firebug-p2])

Firebug user reported another problem with Permission denied to call method UnnamedClass.handleEvent.

It's closely related to:
https://bugzilla.mozilla.org/show_bug.cgi?id=483672
https://bugzilla.mozilla.org/show_bug.cgi?id=502959
Which have been fixed.

The original report is here:
http://code.google.com/p/fbug/issues/detail?id=2746

STR:
1) Install Firebug 1.5 (on Firefox 3.6)
2) Make sure all panels are enabled (Firebug status bar icon -> Enable All Panels)
3) Make suer XHR spy is on (Console panel, mini tab menu -> Show XMLHttpRequests). It should be - by default.
4) Load http://www.osx.eu/firebug/
5) Press Next on the page -> Exception thrown

If "X" version of Firebug is installed (tracing enabled, e.g. http://getfirebug.com/releases/firebug/1.5X/firebug-1.5.0b9.xpi). You can open tracing console (Firebug -> Open Firebug Tracing), check ERRORS option, repeat the scenario and see the error (+ the location where it occurred in Firebug source code).

Honza
Whiteboard: [firebug-p1]
unable to reproduce this with 3.6 (released version) and Firebug 1.5.0.

Clicking "next" fires a Post (with response 302 "temporarily moved") and a GET (200 OK).
Retested with fresh Firefox 3.6 and Firebug 1.5 and I can still see the problem.

Did you open the tracing console and checked the ERRORS option? I can clearly see the exception there (Firebug Tracing Console).

I have also put the test case (from Firebug issue 2746) online here:
http://getfirebug.com/tests/issues/2746/
(should be there in 20 min)

Using the test case you can see the symptom of the bug: after pressing next, the edit field is *not* updated (since the XHR callback handler is not executed).

If I switch off the "Show XMLHttpRequests" option (Firebug Console panel), the text in the edit field is replaced by "request count: 14" after pressing next, which is the correct behavior.

Honza
ah, no I didn't have the Tracing version installed. Will retest...
Rob, could you reproduce this one?
This looks like a real problem.
Honza
ok, I see the problem now.

onHTTPSpyReadyStateChange: EXCEPTION Error: Permission denied for <http://getfirebug.com> to call method UnnamedClass.handleEvent
Blake, I know you fixed bug 483672 and bug 502959 I think this could be somehow related.

Honza
I have again tested the two other related bugs.
1) bug 483672 using: http://www.janodvarko.cz/firebug/tests/1586/Issue1586.htm
2) bug 502959 using: http://www.kylehuey.com/moz/testRequest.php
these work for me.

Only the new one (described in comment 0) does not.
http://www.osx.eu/firebug/

===

The problem is related to the way how Firebug monitors XHR requests. Firebug replaces the original callback handler with its own (to monitor all XHR states).

// 1. Firebug remembers the original callbck.
var originalHandler = xhrRequest.onreadystatechange;

// 2. Firebug overrides the original handler with its own.
xhrRequest.onreadystatechange = onFirebugsReadyStateChangeHandler;

// 3. When the onFirebugsReadyStateChangeHandler is called, Firebug
// also calls the original handler
function callPageHandler(spy, event, originalHandler)
{
    try
    {
        originalHandler.handleEvent(event); //<----- this throws an exception
    }
    catch (exc)
    {
        if (FBTrace.DBG_ERRORS)
            FBTrace.sysout("spy.onHTTPSpyReadyStateChange: EXCEPTION "+
               exc, [exc, event]);
        }
    }
}

Honza
Whiteboard: [firebug-p1] → [firebug-p2]
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.