Closed Bug 541390 Opened 12 years ago Closed 3 years ago

Permission denied for <> to call method UnnamedClass.handleEvent


(Core :: XPConnect, defect)

1.9.2 Branch
Windows Vista
Not set





(Reporter: Honza, Unassigned)


(Whiteboard: [firebug-p2])

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

It's closely related to:
Which have been fixed.

The original report is here:

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
5) Press Next on the page -> Exception thrown

If "X" version of Firebug is installed (tracing enabled, e.g. 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).

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:
(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.

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

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

I have again tested the two other related bugs.
1) bug 483672 using:
2) bug 502959 using:
these work for me.

Only the new one (described in comment 0) does not.


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)
        originalHandler.handleEvent(event); //<----- this throws an exception
    catch (exc)
        if (FBTrace.DBG_ERRORS)
            FBTrace.sysout("spy.onHTTPSpyReadyStateChange: EXCEPTION "+
               exc, [exc, event]);

Whiteboard: [firebug-p1] → [firebug-p2]
Per policy at If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Closed: 3 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.