Closed Bug 274276 Opened 20 years ago Closed 6 years ago

can't prettyprint bookmarks.js and bookmarksMenu.js

Categories

(Other Applications Graveyard :: Venkman JS Debugger, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: Biesinger, Assigned: rginda)

Details

(Note: This may be a bug in JS Engine... please reassign if so)

steps to reproduce:
1. start js debugger
2. click view|prettyprint
3.  doubleclick bookmarks.js -> __toplevel__
or: doubleclick bookmarksMenu.js -> __toplevel__

actual results:
"    1 Unable to Pretty Print this function."

Expected results:
prettyprinted file.

note that this works fine with, for example, browser.js.

tested on linux seamonkey cvs, from yesterdayish.
** ASSERTION FAILED: caught exception reloading pretty printed source
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE)
[jsdIScript.isLineExecutable]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)" 
location: "JS frame :: chrome://venkman/content/venkman-static.js :: ppst_reload
:: line 1247"  data: no] **
<top>
anonymous@58
ppst_reload@1267
cmdReloadTab@2372
dispatchCommand@353
dispatch@230
onMenuCommand@56
oncommand@1
[anonymous]@0

I guess this means
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/js/jsd/jsd_xpc.cpp&mark=1382#1374
is failing.

One thing that caught my eye when looking at both bookmarks.js and browser.js
(double-clicking the filename to see 'real' source, not PP) is that browser.js'
license was coloured a bluey-colour, but bookmarks.js wasn't. I don't know what
makes decisions on the colour, but it seems odd.

Using CVS trunk Seamonkey, Sun 12 Dec 2004  0:29:21.03 GMT.
I probably should have mentioned this in bug 274174.  The other trick with
__toplevel__ is that it usually goes away (is garbage collected) right after it
runs.  Once a script object has been GC'd, it can't be pretty printed.  The
trick is to put a breakpoint in the top level code, and pretty print it while
stopped.  That's probably why I never hooked up the ability to pretty print from
the file item in the Loaded Scripts view.

As far as colored vs. not colored; Venkman won't colorize files over 1500 lines,
by default.  You can change this with the "services.source.colorizeLimit" pref.
Oh, and that assertion is probably ASSERT_VALID_EPHEMERAL failing, because the
script has been GC'd.
(In reply to comment #3)
> Oh, and that assertion is probably ASSERT_VALID_EPHEMERAL failing, because the
> script has been GC'd.

Surely the exception would have been NS_ERROR_NOT_AVAILABLE (0x80040111) then,
and not NS_ERROR_FAILURE (0x80004005)?
yeah, good point.
QA Contact: caillon → venkman
Component is obsolete so resolving bugs as INCOMPLETE
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INCOMPLETE
Product: Other Applications → Other Applications Graveyard
You need to log in before you can comment on or make changes to this bug.