Re: Javascript source not showing when eval'd with evalInSandbox

182 views
Skip to first unread message

Jan Honza Odvarko

unread,
Oct 8, 2012, 6:32:29 AM10/8/12
to Firebug
Could this be related to the following report?
http://code.google.com/p/fbug/issues/detail?id=2198

Do you have a test case I could try out?

Honza


On Oct 8, 11:30 am, Michail Frolov <frol...@pobox.com> wrote:
> I am using Firebug 1.10.3 with Firefox 15.0.1
>
> I have an extension that runs a script in a Sandbox with a web page's
> window object set up as prototype.  I am using evalInSandbox to first eval
> a small script in the Sandbox and then I use evalInSandbox again to eval a
> large script in the same Sandbox.
>
> Firebug detects the scripts and displays one as *undefined* and another as
> a named script (I am using //@ sourceURL in the large script) in the
> Scripts panel in the script drop down menu.  When I select *inline* to show
> the source of either one of them, Firebug displays a blank panel.
>
> Any ideas what I can do to to fix this?  What can I do to troubleshoot this?
>
> Thanks,
> Michail.

Michail Frolov

unread,
Oct 8, 2012, 4:42:50 PM10/8/12
to fir...@googlegroups.com
It does not look like the linked bug describes the same problem.

I can select the file but I do not see it loaded into the source pane (it's blank)

I will try to put a test case together but I don't have much free time.  Might take a while.

Michail.

Michail Frolov

unread,
Oct 8, 2012, 5:30:27 PM10/8/12
to fir...@googlegroups.com
I attached a zip file with a simple extension.

Install this extension by using the Windows registry:

[HKEY_CURRENT_USER\Software\Mozilla\Firefox\Extensions]
"acme...@acmetest.com"="<full path to>\\Test Extension\\AcmeTest"

The extension injects a single line script into a page using evalInSandbox.  Selecting this script in Firebug will not show the source of the script.

Michail.
Test Extension.zip

Jan Honza Odvarko

unread,
Oct 9, 2012, 10:07:15 AM10/9/12
to Firebug
Thanks for the test case!

I believe that the problem is hidden in the way how Firebug is
filtering out all scripts that are coming from chrome://
which is also this case.

Note that Firebug is focused on content (page) JS debugging.

Honza

On Oct 8, 11:30 pm, Michail Frolov <frol...@pobox.com> wrote:
> I attached a zip file with a simple extension.
>
> Install this extension by using the Windows registry:
>
> [HKEY_CURRENT_USER\Software\Mozilla\Firefox\Extensions]
> "acmet...@acmetest.com"="<full path to>\\Test Extension\\AcmeTest"
>  Test Extension.zip
> 12KViewDownload

Michail Frolov

unread,
Oct 9, 2012, 7:10:54 PM10/9/12
to fir...@googlegroups.com
I am not sure about this.

Initially I gave my inline script a name with a full chrome:// path and the script was not showing up in the drop down scripts menu at all.

After looking through the FBTrace logs I discovered that the script was being filtered because it started with "chrome:"  I renamed my inline script to give it a name without any path or in the test case not give it a name.  This way Firebug does not filter the script and shows it in the drop down menu but yet it does not display its contents.

I have a feeling I would have to file a bug for this.

Michail.

Jan Honza Odvarko

unread,
Oct 10, 2012, 2:25:32 AM10/10/12
to Firebug
On Oct 10, 1:10 am, Michail Frolov <frol...@pobox.com> wrote:
> I am not sure about this.
>
> Initially I gave my inline script a name with a full chrome:// path and the
> script was not showing up in the drop down scripts menu at all.
>
> After looking through the FBTrace logs I discovered that the script was
> being filtered because it started with "chrome:"  I renamed my inline
> script to give it a name without any path or in the test case not give it a
> name.  This way Firebug does not filter the script and shows it in the drop
> down menu but yet it does not display its contents.
>
> I have a feeling I would have to file a bug for this.
OK, please do.

Honza

>
> Michail.
Reply all
Reply to author
Forward
0 new messages