Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
Перейти к файлу
nboyd%atg.com 83d7acfbb7 Hi Norris, Simon,
I looked into this somewhat and I noticed the following:

1) There is a bug in Interpreter.java, line 1695. It sets the variable "i" to
the line number of the special call, but overwrites it on line 1699.  It then
passes this value to ScriptRuntime.callSpecial
2) In "generateScriptICode" in Interpreter.java the variable
itsData.itsSourceFile fails to be set to itsSourceFile.  This causes a null
source file name to be passed to handleCompilationDone when "Widget.js" is
compiled.  That is why you
initially see "<stdin>, line 6" when the debugger comes up (the debugger
interprets a null source name as "stdin").  I simply modified it as follows
(this might not be the right thing to do?):

  private InterpretedScript generateScriptICode(Context cx,
                                                  Scriptable scope,
                                                  Node tree,
                                                  Object securityDomain)
    {
        itsSourceFile = (String) tree.getProp(Node.SOURCENAME_PROP);
        itsData.itsSourceFile = itsSourceFile;
        ...

and that corrected the problem.

However there seems to be no way for the debugger to detect that the script
passed to handleCompilationDone() is the argument of an "eval()". So I modifed
NativeGlobal.evalSpecial() to munge the filename to indicate this (by appending
"(eval)" to it).  That way a separate window is created in the debugger to hold
the compiled eval code.  This is probably not be the best way to solve the
problem.

I have attached the files I modified.

Cheers,

Chris

Simon Massey wrote:

> Christopher,
>
> Attached is the code that trips the debugger up. The debugger comes up. You
minimize the console to reveal Widget.js file window. You click 'Go'. The
Widget.js window looses all the code in it and is just replaced by the evaluated
code:
>
>   this.invokedByEval()
>
> The rhino tip I have is rhino15R2pre.zip
>
> I am running it with the command:
>
> start javaw org.mozilla.javascript.tools.debugger.JSDebugger -f Widget.js -f
Main.js
>
> using the JVM:
>
>   java version "1.3.0"
>   Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
>   Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
>
> on Win2k.
>
> Just in case you are wondering why on earth my code wants to do this, it is
because I want to do some introspection. The real Widget invokes all its methods
that have a particular substring in their names:
>
>         for( key in this ){
>                 if( key.indexOf('reflect') == 0 ){
>                         var evalStr = "this."+key+"()";
>                         eval(evalStr);
>                 }
>         }
>
> Thanks for the great code. I have the real Widget stabilized and am happily
using the debugger on my other files.
>
> Thanks again!
>
> Simon Massey
>
2001-06-19 19:27:21 +00:00
README Adding newline, testing 2000-12-14 15:53:14 +00:00
accessible Replaced NO_SHARED_LIB & NO_STATIC_LIB with BUILD_SHARED_LIBS, BUILD_STATIC_LIBS, FORCE_STATIC_LIB & FORCE_SHARED_LIB. Added FORCE_USE_PIC. 2001-06-18 22:10:38 +00:00
apache/gzip/src
build landing fix for #84325 on the tip. r=dougt, sr=granrose, a=scc 2001-06-15 03:22:50 +00:00
calendar
caps bug #85271: sr=waterson, r={beard, jag, dbaron}, a=asa. Eliminate features of |nsXPIDLC?String| that keep it out of the string hierarchy (i.e., using assigment to rebind ownership, static |Copy| members, and |getter_Shares|), fixing some leaks in the process. 2001-06-17 05:23:38 +00:00
cck Fix for bug 85998: Customizing Animated Logo doesn't work (r=bobj) 2001-06-15 17:50:20 +00:00
chrome bug #85271: sr=waterson, r={beard, jag, dbaron}, a=asa. Eliminate features of |nsXPIDLC?String| that keep it out of the string hierarchy (i.e., using assigment to rebind ownership, static |Copy| members, and |getter_Shares|), fixing some leaks in the process. 2001-06-17 05:23:38 +00:00
cmd
config Set DEF_FILE & IMPORT_LIBRARY to NULL when setting SHARED_LIBRARY to NULL. Should fix OS/2 tinderbox bustage. 2001-06-19 00:08:53 +00:00
content fix for 73605: nsHTMLContentSerializer outputs <textarea> contents as attributes 2001-06-19 07:37:15 +00:00
db Missed one. 2001-06-18 22:28:54 +00:00
dbm Replaced NO_SHARED_LIB & NO_STATIC_LIB with BUILD_SHARED_LIBS, BUILD_STATIC_LIBS, FORCE_STATIC_LIB & FORCE_SHARED_LIB. Added FORCE_USE_PIC. 2001-06-18 22:10:38 +00:00
directory Remove workaround for WS6 bug in-lieu of vendor patch listed at http://www.mozilla.org/unix/solaris-build.html . 2001-06-15 06:19:24 +00:00
docshell Bug 77913 - tab focus not cycling around in dialogs. r=jag, sr=jst, a=blizzard. 2001-06-19 05:35:24 +00:00
dom Replaced NO_SHARED_LIB & NO_STATIC_LIB with BUILD_SHARED_LIBS, BUILD_STATIC_LIBS, FORCE_STATIC_LIB & FORCE_SHARED_LIB. Added FORCE_USE_PIC. 2001-06-18 22:10:38 +00:00
editor Replaced NO_SHARED_LIB & NO_STATIC_LIB with BUILD_SHARED_LIBS, BUILD_STATIC_LIBS, FORCE_STATIC_LIB & FORCE_SHARED_LIB. Added FORCE_USE_PIC. 2001-06-18 22:10:38 +00:00
ef
embedding Replaced NO_SHARED_LIB & NO_STATIC_LIB with BUILD_SHARED_LIBS, BUILD_STATIC_LIBS, FORCE_STATIC_LIB & FORCE_SHARED_LIB. Added FORCE_USE_PIC. 2001-06-18 22:10:38 +00:00
expat Replaced NO_SHARED_LIB & NO_STATIC_LIB with BUILD_SHARED_LIBS, BUILD_STATIC_LIBS, FORCE_STATIC_LIB & FORCE_SHARED_LIB. Added FORCE_USE_PIC. 2001-06-18 22:10:38 +00:00
extensions Replaced NO_SHARED_LIB & NO_STATIC_LIB with BUILD_SHARED_LIBS, BUILD_STATIC_LIBS, FORCE_STATIC_LIB & FORCE_SHARED_LIB. Added FORCE_USE_PIC. 2001-06-18 22:10:38 +00:00
gc/boehm Bugzilla Bug 84822 Boehm does not compile on Solaris 8 due to error in os_dep.c 2001-06-15 19:29:38 +00:00
gconfig
gfx Bug 83920 - remove XIE and gdkpixbuf options for image scaling. 2001-06-18 22:10:25 +00:00
gfx2 Replaced NO_SHARED_LIB & NO_STATIC_LIB with BUILD_SHARED_LIBS, BUILD_STATIC_LIBS, FORCE_STATIC_LIB & FORCE_SHARED_LIB. Added FORCE_USE_PIC. 2001-06-18 22:10:38 +00:00
grendel Now have all bundle resources being properly copied, including icons and needed libraries. jrg... 2001-04-08 09:58:35 +00:00
htmlparser 82500 - Make sure that DidBuildModel gets called only once per document. 2001-06-18 21:18:37 +00:00
include For 73856 -- adding new values to NPPVariable enumeration type, sr=vidur, ar=av 2001-04-03 21:29:48 +00:00
intl Replaced NO_SHARED_LIB & NO_STATIC_LIB with BUILD_SHARED_LIBS, BUILD_STATIC_LIBS, FORCE_STATIC_LIB & FORCE_SHARED_LIB. Added FORCE_USE_PIC. 2001-06-18 22:10:38 +00:00
java *not part of the build* 2001-06-19 00:16:08 +00:00
jpeg Replaced NO_SHARED_LIB & NO_STATIC_LIB with BUILD_SHARED_LIBS, BUILD_STATIC_LIBS, FORCE_STATIC_LIB & FORCE_SHARED_LIB. Added FORCE_USE_PIC. 2001-06-18 22:10:38 +00:00
js Hi Norris, Simon, 2001-06-19 19:27:21 +00:00
js2 Made parenthesized field names js2-only. Renamed language directives to pragmas and reworked their syntax as well as that of use and import directives. 2001-06-16 00:41:34 +00:00
l10n Part of the fix for bug 76567 (load viewsource.css on demand rather than at startup) and bug 60892 (show title on the viewsource window) r=harishd,brendan sr=jst 2001-05-02 04:45:21 +00:00
layout Bug 68012: Allow frames in a frameset to be manually resized by dragging the border. This is accomplished by changing the reflow from a ResizeReflow, which was blocked by block to box adapter optimizations as the window had not changed size, to a ReflowDirtyChild. r=jst@netscape.com, sr=attinasi@netscape.com, a=drivers@mozilla.org (blizzard) 2001-06-19 08:29:13 +00:00
lib [Not part of build] Support for sending all console output to the Mac OS X Console application / or command line terminal. Replaces all of the standard SIOUX routines. 2001-06-18 22:29:30 +00:00
mailnews Fix for bug # 80060. Fixed removedirectory() such that the selected directory gets 2001-06-19 06:06:21 +00:00
modules resurrect lost file 2001-06-19 14:58:03 +00:00
mozilla new project started 2001-04-03 22:13:38 +00:00
msgsdk
mstone http stuff 2000-05-10 23:20:05 +00:00
netwerk Fixes bug 84847 "refresh displays stale content when using squid proxy" 2001-06-19 00:29:23 +00:00
network/protocol/http
nsprpub Made the build_prerr rule work. 2001-06-14 23:02:04 +00:00
nunet
parser Replaced NO_SHARED_LIB & NO_STATIC_LIB with BUILD_SHARED_LIBS, BUILD_STATIC_LIBS, FORCE_STATIC_LIB & FORCE_SHARED_LIB. Added FORCE_USE_PIC. 2001-06-18 22:10:38 +00:00
plugin/oji/MRJ Backing out changes to nsIPluginStreamListener2 fixed by bug 82415 r=dougt sr=attinasi a=dbaron 2001-05-31 01:23:02 +00:00
privacy
profile bug 52930, r=matt, sr=alecf, a=blizzard, use local-panels.dtd instead of internally defined entities, also fix panel titles to reference correct entity in local-panels.dtd 2001-06-18 20:56:12 +00:00
rdf Replaced NO_SHARED_LIB & NO_STATIC_LIB with BUILD_SHARED_LIBS, BUILD_STATIC_LIBS, FORCE_STATIC_LIB & FORCE_SHARED_LIB. Added FORCE_USE_PIC. 2001-06-18 22:10:38 +00:00
security final checkin of NSCP roots to mozilla. changed USPS roots per request. 2001-06-19 17:12:04 +00:00
silentdl
string Replaced NO_SHARED_LIB & NO_STATIC_LIB with BUILD_SHARED_LIBS, BUILD_STATIC_LIBS, FORCE_STATIC_LIB & FORCE_SHARED_LIB. Added FORCE_USE_PIC. 2001-06-18 22:10:38 +00:00
suite
sun-java backing out edburns's removal of necessary typedefs 2001-04-03 23:29:26 +00:00
themes 67359 - Need icons for mail thread pane icons for offline messages, r=andreww, sr=bienvenu, a=asa 2001-06-16 01:12:52 +00:00
timer
tools Automatically set BaseDir to cwd(), this avoids possibility of manual error and not finding mozconfig files properly. 2001-06-16 06:30:22 +00:00
tripledb
uriloader Replaced NO_SHARED_LIB & NO_STATIC_LIB with BUILD_SHARED_LIBS, BUILD_STATIC_LIBS, FORCE_STATIC_LIB & FORCE_SHARED_LIB. Added FORCE_USE_PIC. 2001-06-18 22:10:38 +00:00
view Fix for bug 77507. Set default background color correctly. Warn if it isn't set correctly. r=waterson,sr=attinasi,a=blizzard 2001-05-25 15:00:51 +00:00
wallet
webshell Replaced NO_SHARED_LIB & NO_STATIC_LIB with BUILD_SHARED_LIBS, BUILD_STATIC_LIBS, FORCE_STATIC_LIB & FORCE_SHARED_LIB. Added FORCE_USE_PIC. 2001-06-18 22:10:38 +00:00
webtools Changing despot owner to endico@mozilla.org with her permission 2001-06-19 04:04:34 +00:00
widget increase slop size when forcing newly opened windows onscreen, and force it onto the closest monitor, rather than the grayrgn's rect. bug 76790 r=hyatt,pchen a=blizzard 2001-06-19 00:21:17 +00:00
xpcom Fix for 85986. If we find a shortcut and we are not resolving it, it is ok to 2001-06-19 03:17:20 +00:00
xpfc
xpfe This should've gone in with yesterday's checkin. Should fix OS/2 bustage 2001-06-19 17:07:12 +00:00
xpinstall Replaced NO_SHARED_LIB & NO_STATIC_LIB with BUILD_SHARED_LIBS, BUILD_STATIC_LIBS, FORCE_STATIC_LIB & FORCE_SHARED_LIB. Added FORCE_USE_PIC. 2001-06-18 22:10:38 +00:00
.cvsignore new project started 2001-04-03 22:13:38 +00:00
LEGAL
LICENSE
Makefile.in bug 76050, build js/jsd after xpidl. r=cls 2001-05-15 20:42:29 +00:00
aclocal.m4 Update build to use nspr.m4. 2001-04-07 04:34:53 +00:00
allmakefiles.sh bug 76050, add venkman and jsd makefiles. r=cls 2001-05-15 20:48:23 +00:00
client.mak fix commented out lines for the next time we need to use them 2001-06-05 00:25:32 +00:00
client.mk Oops. wrong tree 2001-06-13 02:54:50 +00:00
configure Replaced NO_SHARED_LIB & NO_STATIC_LIB with BUILD_SHARED_LIBS, BUILD_STATIC_LIBS, FORCE_STATIC_LIB & FORCE_SHARED_LIB. Added FORCE_USE_PIC. 2001-06-18 22:10:38 +00:00
configure.in Replaced NO_SHARED_LIB & NO_STATIC_LIB with BUILD_SHARED_LIBS, BUILD_STATIC_LIBS, FORCE_STATIC_LIB & FORCE_SHARED_LIB. Added FORCE_USE_PIC. 2001-06-18 22:10:38 +00:00
embed.mak NOT PART OF BUILD. Fixed recent breakage and merged export/install dirs into single list. b=68668 2001-02-23 12:54:24 +00:00
embed.mk NOT PART OF BUILD. Updated Unix/Linux embedding makefile to work once more. Changed target modules for recent layout/content split. b=68668 2001-02-21 12:27:11 +00:00
makefile.win security needs to be built after layout now due to idl issues 2001-05-02 05:03:41 +00:00
mozilla.kdevprj new project started 2001-04-03 22:13:38 +00:00
mozilla.lsm new project started 2001-04-03 22:13:38 +00:00
nglayout.mac
nglayout.mk
trex.mak
trex.mk