Compare commits

..

1280 Commits

Author SHA1 Message Date
igor%mir2.org
f2aa6a70ce From http://bugzilla.mozilla.org/show_bug.cgi?id=225831#c22 :
Fix for bug 225831

The patch adds new parse tree node type, Token.RETURN_POPV, to return the value
stored by the last Token.POPV and updates interpreter/optimizer to support POPV
for functions and the new nodes. With this it in place NodeTransformer changes
code to return from finally to first store via POPV the result of the original
return, then execute finally and then return the stored value fixing bug
225831.

The patch does not depend on changes to avoid using temporaries during
expression evaluation as I initially expected but it does depend on the change
to use recursion of NodeTransformer which is committed on the bug branch so log
it here.


git-svn-id: svn://10.0.0.236/branches/templess_bytecode_225831@150025 18797224-902f-48f8-a5cc-f745e15eee43
2003-12-04 11:30:03 +00:00
igor%mir2.org
13af7cdb7a Using recursion in NodeTransformer instead of iterator for greater flexibility of tree work
git-svn-id: svn://10.0.0.236/branches/templess_bytecode_225831@149926 18797224-902f-48f8-a5cc-f745e15eee43
2003-12-02 17:25:01 +00:00
igor%mir2.org
5bb4acf87e Work on bug 225831:
Some preparations to change NodeTransformer to use recursion instead of iteretaor as it would make life simpler to implement fix for bug 226517


git-svn-id: svn://10.0.0.236/branches/templess_bytecode_225831@149925 18797224-902f-48f8-a5cc-f745e15eee43
2003-12-02 15:23:55 +00:00
igor%mir2.org
1192a41e48 From http://bugzilla.mozilla.org/show_bug.cgi?id=225831#c21 :
Check for local overuse

The patch adds checks in Interpreter to throw an exception if number of locals
exceeds 256 and switch to use activation if number of variables exceeds 256. In
this way silent reuse of locals would be avoided and interpreter limitations
are exposed earlier.

Without the the patch js1_5/Regress/regress-226507.js would go to infinite loop
when N there is increased to 257.


git-svn-id: svn://10.0.0.236/branches/templess_bytecode_225831@149874 18797224-902f-48f8-a5cc-f745e15eee43
2003-12-01 18:23:46 +00:00
igor%mir2.org
0a432d2774 From http://bugzilla.mozilla.org/show_bug.cgi?id=225831#c20 :
reuse of locals

To allow reuse of additional locals that interpreter/optimizer has to allocate
to support try/catch/finally and for (in) patch adds new parse node node,
Token.LOCAL_BLOCK to indicate sequence of statements that needs new local. In
this way simple stack-like allocation of local slots in the interpreter
provides locals reuse and in the optimizer the locals can be treated in the
same way as temporaries and does not require initial preallocation.


git-svn-id: svn://10.0.0.236/branches/templess_bytecode_225831@149873 18797224-902f-48f8-a5cc-f745e15eee43
2003-12-01 17:14:41 +00:00
igor%mir2.org
50bda67745 From http://bugzilla.mozilla.org/show_bug.cgi?id=225831#c19 :
using temporaries, not locals, to hold intermediate results in optimizer

The patch changes omj/optimizer/Block.java to use temporaries instead of locals
to hold results of common this subexpressions since in the optimizer
temporaries are reused while locals are not unless special measures are taken.

Since the previous patches changes moved creation of temporaries to static
method in OptTransformer, the change removed the need to pass IRFactory
instance around Block and FatBlock and the patch removes it.


git-svn-id: svn://10.0.0.236/branches/templess_bytecode_225831@149853 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-30 15:38:23 +00:00
igor%mir2.org
bcc5719262 From http://bugzilla.mozilla.org/show_bug.cgi?id=225831#c18 :
templess catch

Currently handling of the catch statement involves creation of 2 locals per
catch block, one to store catch object and another to hold catch scope during
its setup. The second usage should use temporary instead since additional
catch, finally or with blocks can not appear between the initial creation of
scope and creation of with object that uses it. So effectively it is a
temporary and as previous patches shows it could be eliminated.

The patch just does that via changing Token.NEWSCOPE nodes into
Token.CATCH_SCOPE since the former was used only to support catch nodes. The
new node is responsible for populating properly the scope objects based on the
exception thus eliminating the last temporary usage in the Interpreter and
simplifying catch parsing trees substantially.


git-svn-id: svn://10.0.0.236/branches/templess_bytecode_225831@149852 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-30 10:51:53 +00:00
igor%mir2.org
2b8f80b63d Commenting out debug printouts
git-svn-id: svn://10.0.0.236/branches/templess_bytecode_225831@149841 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-29 19:26:52 +00:00
igor%mir2.org
029886bdf6 From http://bugzilla.mozilla.org/show_bug.cgi?id=225831#c17 :
templess enum

Patch adds new parse tree node, Token.ENUM_ID, to get id string from
enumeration object that is used to implement "for (x in y)". In this way code
to generate byte code to store the result of enumNext to compare it with null
and assign to enum counter becomes unnecessary.


git-svn-id: svn://10.0.0.236/branches/templess_bytecode_225831@149840 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-29 19:12:36 +00:00
igor%mir2.org
9a61fc3f3d From http://bugzilla.mozilla.org/show_bug.cgi?id=225831#c16 :
templess calls in interpreter

The patch changes interpreter not to use temporaries to calculate both function
reference and function this for function calls. The patch moved away the code
to transform parsing tree in NodeTrandformer and instead adds necessary logic
to interpreter. The code is moved to the OptTransformer so optimizer still uses
it.
The patch changes few special interpreter byte codes that supported function
this calculations to place on the stack both function reference and its this.
In this way byte code for calls became more compact and faster.

It seems that direct code generation from non-transformed call subtree would
shrink generated byte code in the optimizer as well but since various
optimizations there depends on particular transformed tree structure I left it
as is since the optimizer handles references properly


git-svn-id: svn://10.0.0.236/branches/templess_bytecode_225831@149825 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-28 18:00:59 +00:00
igor%mir2.org
d0a1ae80b5 From http://bugzilla.mozilla.org/show_bug.cgi?id=225831#c15 :
removal of unused Node.cloneNode

The previous patches removes the need to to have Node.cloneNode so the patch
removes it.


git-svn-id: svn://10.0.0.236/branches/templess_bytecode_225831@149676 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-24 14:53:13 +00:00
igor%mir2.org
22e05ce99f From http://bugzilla.mozilla.org/show_bug.cgi?id=225831#c14 :
usings dups for [] and {}

The patch changes code to generate [] and {} to use dups instead of temporaries to get shorter byte code both for interpreter and optimizer. With the patch the test case now passes in the interpreted mode.


git-svn-id: svn://10.0.0.236/branches/templess_bytecode_225831@149675 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-24 12:42:46 +00:00
igor%mir2.org
48713b116f From comments for
http://bugzilla.mozilla.org/show_bug.cgi?id=225831 :

templess op=

The patch changes generation of code for various op= to use dup commands
instead of saving lvalue into temporaries and then restoring it from
temporaries to store assignment result. In this way more compact code is
generated both for interpreter and optimizer and IRFactory code for op= is
simplified since it is no longer necessary to apply optimization of loading
numbers and strings twice instead of using temporaries as DUP is the fastest
way to duplicate even constant values.

The price for this is the need to support 2 additional node types, SETELEM_OP
and SETPROP_OP, but most of the code for them is shared with SETELEM and
SETPROP so the total code bloat is not that big.


git-svn-id: svn://10.0.0.236/branches/templess_bytecode_225831@149657 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-23 19:44:07 +00:00
igor%mir2.org
2cdeb1ce87 Added missed debug string conversion for typeofname
git-svn-id: svn://10.0.0.236/branches/templess_bytecode_225831@149633 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-22 20:51:30 +00:00
igor%mir2.org
a5267aaeff From CVS comments for http://bugzilla.mozilla.org/show_bug.cgi?id=225831 :
templess switch

Another source for stack depth miscalculations is switch code, where stack was
not updated to account for IF jump.  The patch resolves via using 2 new byte
codes, Icode_DUPSECOND duplicating stack element one below top and
Icode_IFEQ_POP which would pop additional stack element in case of successful
jump. In this way switch condition will be popped from the stack when done.

To prevent stack miscalculations, the patch adds explicit checks for expected
stack change during code generation. The overhead of this self checking should
be very low.

The patch also adds one line fix to optimizer/Codegen to release switch
register after code for switches is generated.


git-svn-id: svn://10.0.0.236/branches/templess_bytecode_225831@149632 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-22 20:44:18 +00:00
igor%mir2.org
776c546185 From comments for http://bugzilla.mozilla.org/show_bug.cgi?id=225831:
Different handling of "if" and "?"

One of the reasons of stack miscalculations is that current IRFactory reuse the
code for "if" statement when generation tree for "?". Since then/else parts of
"?" places an object to stack while then/else of "if" suppose to keep stack the
same, so effectively byte code generation end up assuming 2 additional objects
on stack, not one, for each "?".

The problem presents in the optimizer as well, so class files claims more stack
space then necessary there also.

Patch handles that via using Token.HOOK for parse subtree representing "?" and
adding code to interpreter/optimizer to process that properly.

Patch also adds missed stack adjustments for &&, ||, __proto__ and __parent__
in Interpreter.

I will committ the patch to the branch after regression testing.


git-svn-id: svn://10.0.0.236/branches/templess_bytecode_225831@149612 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-21 13:36:01 +00:00
igor%mir2.org
2dc354fa94 From bugzilla comments for http://bugzilla.mozilla.org/show_bug.cgi?id=225831 :
First part: no more temporaries for post ++ and --


This is trivial part since the patch changes IR-Factory to always creates
Token.INC/Token.DEC nodes for post ++ and --. Previously it happens only for
child nodes of ++ or -- where IRFactory.hasSideEffects() returns true but the
rest of code in Rhino both in interpreter and optimizer modes contained full
support for INC/DEC applied for arbitrary complex lvalue expression. Or did I
miss something?


git-svn-id: svn://10.0.0.236/branches/templess_bytecode_225831@149443 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 18:38:17 +00:00
(no author)
14d18a9ce7 This commit was manufactured by cvs2svn to create branch
'templess_bytecode_225831'.

git-svn-id: svn://10.0.0.236/branches/templess_bytecode_225831@149442 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 18:31:56 +00:00
igor%mir2.org
2f5a617661 Fixing debug printout of icode: CALLSPECIAL prinout was not updated to reflect proper value of only 6 additional bytes for bytecode.
git-svn-id: svn://10.0.0.236/trunk@149441 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 18:31:55 +00:00
jst%mozilla.jstenback.com
b911762504 Attempting to fix orangeness...
git-svn-id: svn://10.0.0.236/trunk@149440 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 18:26:58 +00:00
jst%mozilla.jstenback.com
f2d7a3363a Fix related to regression bug 147811. Make declaring on* functions trigger the event listener registration code so that event handlers get registerd by simply declaring a global (or whatever the scope) function with the name of a event handler. r=caillon@aillon.org, sr=brendan@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@149439 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 17:54:39 +00:00
igor%mir2.org
160c2c14f8 To mark special properties __proto__ and __parent__ in parse tree use integer ids instead of strings so it is easier to check tree consitency.
git-svn-id: svn://10.0.0.236/trunk@149438 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 17:39:43 +00:00
igor%mir2.org
39d6efa02e Finalizing toSource() support: do not put () arround {} for source representation of objects that are part of recursive toSource call.
For details, see http://bugzilla.mozilla.org/show_bug.cgi?id=225465


git-svn-id: svn://10.0.0.236/trunk@149437 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 17:37:21 +00:00
bzbarsky%mit.edu
a2b2b6f817 GTK1 and xlib versions of the patch for bug 102578.
For xlib, patch by Andrej Czapszys (czapszys@comcast.net), r=blizzard,
sr=bryner

For GTK1, patch by Kenneth Herron (kjh-5727@comcast.net), r=blizzard,
sr=bzbarsky


git-svn-id: svn://10.0.0.236/trunk@149436 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 17:03:24 +00:00
pschwartau%netscape.com
38371edcc4 Removing skip of fileName and lineNumber test; these properties are now supported by Rhino. See bug 225817.
git-svn-id: svn://10.0.0.236/trunk@149435 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 16:48:12 +00:00
dwitte%stanford.edu
26947b6c95 fixing bogus comment.
git-svn-id: svn://10.0.0.236/trunk@149434 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 15:43:51 +00:00
timeless%mozdev.org
66d2996e83 Bug 223900 GRE Bustage (AIX, BEOS)
Second attempt


git-svn-id: svn://10.0.0.236/trunk@149433 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 11:26:07 +00:00
igor%mir2.org
c9d562a370 Changing wrapping of caught Java exceptions: now they are constructed with JavaException constructor, have fileName, lineNumber defined to point to script line that executed Java code triggering exception and have javaException property pointing to the wrapped exception object.
For details, see http://bugzilla.mozilla.org/show_bug.cgi?id=225817


git-svn-id: svn://10.0.0.236/trunk@149432 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 11:04:29 +00:00
timeless%mozdev.org
e38b440cca Bug 223900 - GRE Bustage (BEOS)
/boot/home/tinderbox/BeOS_5.0_Depend/mozilla/xpcom/glue/standalone/nsGREDirServiceProvider.cpp: In function `PRBool GRE_GetCurrentProcessDirectory(char *)':
 /boot/home/tinderbox/BeOS_5.0_Depend/mozilla/xpcom/glue/standalone/nsGREDirServiceProvider.cpp:248: `buf' undeclared (first use this function)
 /boot/home/tinderbox/BeOS_5.0_Depend/mozilla/xpcom/glue/standalone/nsGREDirServiceProvider.cpp:248: (Each undeclared identifier is reported only once
 /boot/home/tinderbox/BeOS_5.0_Depend/mozilla/xpcom/glue/standalone/nsGREDirServiceProvider.cpp:248: for each function it appears in.)


git-svn-id: svn://10.0.0.236/trunk@149431 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 10:27:12 +00:00
timeless%mozdev.org
0c9788be07 Bug 223900 GRE Bustage (AIX, BEOS)
"/usr/include/sys/param.h", line 91.9: 1540-0848 (S) The macro name "MAXPATHLEN" is already defined with a diff
erent definition.
 "/home/tbox/builds/tinderbox/AIX_5.1_Clobber/mozilla/xpcom/glue/standalone/nsGREDirServiceProvider.h", line 47.
9: 1540-0425 (I) "MAXPATHLEN" is defined on line 47 of "/home/tbox/builds/tinderbox/AIX_5.1_Clobber/mozilla/xpco
m/glue/standalone/nsGREDirServiceProvider.cpp".
 gmake[5]: *** [nsGREDirServiceProvider.o] Error 1


git-svn-id: svn://10.0.0.236/trunk@149430 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 10:25:46 +00:00
timeless%mozdev.org
5a1907b913 Bug 106386 Correct misspellings in source code
Changes strings which meant "referring"
patch by ajvincent@juno.com r=timeless sr=dmose


git-svn-id: svn://10.0.0.236/trunk@149429 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 10:05:45 +00:00
igor%mir2.org
80ac133884 Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=225817 :
Proper support for fileName and lineNumber in Error objects.


git-svn-id: svn://10.0.0.236/trunk@149428 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 09:45:01 +00:00
neil%parkwaycc.co.uk
3ab9a9a922 Bug 218825, part 4: delete nsIFolder and move the code to nsIMsgFolder r=bienvenu sr=Henry.Jia
git-svn-id: svn://10.0.0.236/trunk@149426 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 09:37:23 +00:00
neil%parkwaycc.co.uk
0cfe9a61d9 Bug 218825, part 3: delete nsMsgFolder and move the code to nsMsgDBFolder r=bienvenu sr=Henry.Jia
git-svn-id: svn://10.0.0.236/trunk@149425 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 09:35:48 +00:00
pete.zha%sun.com
f09f6c7269 bug 124029 Roaming - 4.x-HTTP-compatible
patch 134896
r=ben.bucksch@beonex.com sr=bz-vacation@mit.edu


git-svn-id: svn://10.0.0.236/trunk@149424 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 08:20:17 +00:00
timeless%mozdev.org
c3c8f7a9bc Bug 225527 Crash [@ map2tsv] null section
r=bryner


git-svn-id: svn://10.0.0.236/trunk@149423 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 06:48:34 +00:00
timeless%mozdev.org
3383df1ee1 Bug 224668 make dependency updating honor -s
r=bryner


git-svn-id: svn://10.0.0.236/trunk@149422 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 06:38:05 +00:00
timeless%mozdev.org
b6bbf28d90 Bug 222077 Warning: String literal converted to char*
r=dwitte sr=roc


git-svn-id: svn://10.0.0.236/trunk@149421 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 06:28:04 +00:00
bsmedberg%covad.net
3ba87acc99 Bug 223900 - Clean up MFCEmbed to use the GRE properly (don't link against xpcom.dll), and make the GRE glue libs more embedder-friendly and flexible. r=adamlock/dougt sr=dougt
git-svn-id: svn://10.0.0.236/trunk@149420 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 06:13:49 +00:00
dbaron%dbaron.org
cf4b71aec2 Remove unneeded chromeOverride variable. b=225936 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@149419 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 04:10:55 +00:00
ben%bengoodger.com
46dc290107 Don't use Accel+I to open the bookmarks bar on Mac - Accel+I is traditionally mapped to Info on MacOS.
git-svn-id: svn://10.0.0.236/trunk@149417 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 02:27:26 +00:00
chanial%noos.fr
775c1ea05b missed a file, thx to Steffen for the patch. Also, remove trailing spaces
git-svn-id: svn://10.0.0.236/trunk@149416 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 01:46:46 +00:00
pschwartau%netscape.com
70dae15a15 Removing inner () 's from Section 4 of test. See bug 225831 comment 7.
git-svn-id: svn://10.0.0.236/trunk@149415 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 00:46:52 +00:00
dbaron%dbaron.org
95ad7ff8b9 Turn DetermineFrameType into InitFrameType. b=225911 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@149414 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 00:35:17 +00:00
rlk%trfenv.com
e9da1aaa85 Bug 153671 - Navigator Help - some corrections.
Bug 182186 - Navigator Help - Type Ahead Find needed
Patch by Daniel Wang (stolenclover@yahoo.com.tw) r=rlk@trfenv.com


git-svn-id: svn://10.0.0.236/trunk@149413 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-16 23:39:43 +00:00
rlk%trfenv.com
96abacba96 Bug 153671 - Navigator Help - some corrections.
Bug 182186 - Navigator Help - Type Ahead Find needed
Patch by Daniel Wang (stolenclover@yahoo.com.tw)


git-svn-id: svn://10.0.0.236/trunk@149412 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-16 23:38:38 +00:00
silver%warwickcompsoc.co.uk
22de09afdc Bug 207949 Show Chatzilla as installable extension in Firebird GUI/FE
r=rginda@hacksrus.com


git-svn-id: svn://10.0.0.236/trunk@149411 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-16 23:23:51 +00:00
despotdaemon%netscape.com
bdb6c53a38 Pseudo-automatic update of changes made by silver@warwickcompsoc.co.uk.
git-svn-id: svn://10.0.0.236/trunk@149410 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-16 23:20:16 +00:00
pschwartau%netscape.com
cb48952b2e Adding comments.
git-svn-id: svn://10.0.0.236/trunk@149409 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-16 23:10:49 +00:00
pschwartau%netscape.com
d48c5cb589 Nope, that last correction was wrong; fixing mistake. See bug 225289 comment 9.
git-svn-id: svn://10.0.0.236/trunk@149408 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-16 23:07:28 +00:00
pschwartau%netscape.com
ac8e5377b5 Adding three more sections, by igor@fastmail.fm.
git-svn-id: svn://10.0.0.236/trunk@149407 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-16 22:03:14 +00:00
bzbarsky%mit.edu
ce1db15495 Make nsJARURI implement nsIURL. Bug 224797, r=andreas.otte@debitel.net,
sr=darin


git-svn-id: svn://10.0.0.236/trunk@149406 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-16 21:43:43 +00:00
brendan%mozilla.org
eba71d0335 Fix ALTPREREQ2, it was just plain busted (225289, r=zack-web@gmx.de based on his similar patch).
git-svn-id: svn://10.0.0.236/trunk@149405 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-16 21:34:59 +00:00
dbaron%dbaron.org
01d5186c80 Remove unneeded mIsTable member variable. r+sr=bzbarsky b=225902
git-svn-id: svn://10.0.0.236/trunk@149404 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-16 21:12:17 +00:00
dbaron%dbaron.org
af2bdc9aec Add comments connecting two quirks.
git-svn-id: svn://10.0.0.236/trunk@149403 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-16 18:49:00 +00:00
tor%cs.brown.edu
ce73381d48 Bug 225015 - prevent assert caused by access to nonexistent frame.
r=sicking, sr=bryner


git-svn-id: svn://10.0.0.236/trunk@149402 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-16 18:11:04 +00:00
jocuri%softhome.net
3970a6befe Bug 65320: Extra options on editproducts.cgi & editcomponents.cgi; r=jouni; a=justdave.
git-svn-id: svn://10.0.0.236/trunk@149401 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-16 09:30:07 +00:00
bzbarsky%mit.edu
e145168a0f Be a little smarter about handling the mess that is broken images. Only look
for a frame if we've had a frame at some point in the past; this should keep us
from calling GetPrimaryFrameFor quite so much during pageload.  Bug 225848,
r+sr=jst


git-svn-id: svn://10.0.0.236/trunk@149399 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-16 07:34:25 +00:00
scott%scott-macgregor.org
d0644ba3e9 Bug #98564 --> caret overlaps the last character in textfield (if positioned after the last char).
Patch written by kin.


r=smontagu
sr=sfraser


git-svn-id: svn://10.0.0.236/trunk@149398 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-16 07:08:55 +00:00
scott%scott-macgregor.org
23ab93b882 remove old twisty images for tree controls
git-svn-id: svn://10.0.0.236/trunk@149397 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-16 04:34:05 +00:00
scott%scott-macgregor.org
87469d1691 Replace twisty icons for tree controls in thunderbird with the +/- images
git-svn-id: svn://10.0.0.236/trunk@149396 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-16 04:32:59 +00:00
scott%scott-macgregor.org
ce64ddc3d9 toolbar style cleanup
git-svn-id: svn://10.0.0.236/trunk@149395 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-16 04:31:32 +00:00
chanial%noos.fr
e1350f87e9 update update_notifications.provider.0.datasource, even if we don't use it (patch by Steffen Wilberg)
git-svn-id: svn://10.0.0.236/trunk@149394 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-16 04:01:31 +00:00
chanial%noos.fr
24d6c5e52c update general.useragent.contentlocale (patch by Steffen Wilberg)
git-svn-id: svn://10.0.0.236/trunk@149393 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-16 03:59:29 +00:00
chanial%noos.fr
6ed9b7a036 update startup.homepage_override_url, even if we don't use it (patch by Steffen Wilberg)
git-svn-id: svn://10.0.0.236/trunk@149392 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-16 03:53:39 +00:00
chanial%noos.fr
ba58f50155 remove the pref intl.content.lang: it was only used for the communicator sidebars.
git-svn-id: svn://10.0.0.236/trunk@149391 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-16 03:34:56 +00:00
bzbarsky%mit.edu
784c9898e4 Fix serialization of inherit/initial nsCSSRect values. Bug 225841, r+sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@149390 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-16 02:06:38 +00:00
bzbarsky%mit.edu
94d2d661ce -moz-initial, not initial. Use CSS keyword table to prevent this happening
again.  Bug 120903, r+sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@149389 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-16 01:12:50 +00:00
wchang0222%aol.com
ea406ede5f Bugzilla bug 219913: define _PR_HAVE_THREADSAFE_GETHOST for OS/2 so that
we can issue concurrent gethostbyname calls.  Moved the definition of
_PR_GLOBAL_THREADS_ONLY, BSD_SELECT, and TCPV40HDRS from configure.in to
_os2.h.
Modified files: configure configure.in _os2.h


git-svn-id: svn://10.0.0.236/trunk@149388 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-16 01:10:49 +00:00
wchang0222%aol.com
82c3ca13e1 Bugzilla bug 224707: added Linux HPPA support. The patch came from the
Debian Mozilla package (maintainer is Takuo KITAME <kitame@debian.org>).


git-svn-id: svn://10.0.0.236/trunk@149385 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-16 00:10:16 +00:00
pschwartau%netscape.com
444d1db2bf Initial add. Regression test for bug 225831, by igor@fastmail.fm.
git-svn-id: svn://10.0.0.236/trunk@149384 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-16 00:04:18 +00:00
wchang0222%aol.com
2b8874ac88 Bugzilla bug 224707: added Linux HPPA support. The patch came from the
Debian Mozilla package (maintainer is Takuo KITAME <kitame@debian.org>).
Modified Files: _linux.cfg _linux.h


git-svn-id: svn://10.0.0.236/trunk@149383 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-16 00:03:50 +00:00
chanial%noos.fr
7ae49ce7c7 fix leftover noted by Steffen
git-svn-id: svn://10.0.0.236/trunk@149381 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 23:41:42 +00:00
wchang0222%aol.com
0199ff8322 Bugzilla bug 207803: added 64-bit UltraSPARC FreeBSD support to NSPR. The
patch was contributed by Joe Marcus Clarke <marcus@freebsd.org>, Thomas
Moestl <tmm@FreeBSD.org>, and Kris Kennaway <kris@freebsd.org>.  r=wtc.
Modified Files: configure configure.in _freebsd.cfg _freebsd.h


git-svn-id: svn://10.0.0.236/trunk@149380 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 23:39:36 +00:00
pschwartau%netscape.com
a98654fa55 Correcting another error (I believe; see bug 209919 comment 14).
git-svn-id: svn://10.0.0.236/trunk@149377 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 23:22:00 +00:00
pschwartau%netscape.com
fb5e1151d0 Fixing more errors in the test - see bug 225289 comment 6.
git-svn-id: svn://10.0.0.236/trunk@149376 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 23:19:27 +00:00
scott%scott-macgregor.org
45069a4ba3 Bug #225413 --> Make the windows animated biff alert dialog use the account name instead of the user name. This meant
adding some extra padding to the alert window as well.

r=jst
sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@149375 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 22:48:30 +00:00
pschwartau%netscape.com
6ee576b822 Fixing an error in the test.
git-svn-id: svn://10.0.0.236/trunk@149374 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 22:47:03 +00:00
scott%scott-macgregor.org
cb703598ba Improve the look of the biff animated alert window for thunderbird. Add a different border, change the padding
and change the background color.


git-svn-id: svn://10.0.0.236/trunk@149373 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 22:46:53 +00:00
scott%scott-macgregor.org
826c0b29b0 Bug #225413 --> Make the windows animated biff alert dialog use the account name instead of the user name.
r=jst
sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@149372 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 22:17:34 +00:00
bzbarsky%mit.edu
97058364d2 Don't use precision so high it gets rounded in a way we don't want. Bug
118117, r+sr=roc


git-svn-id: svn://10.0.0.236/trunk@149370 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 21:51:39 +00:00
bryner%brianryner.com
c6fc0e8155 No need to keep an owning reference to an element's NodeInfo if we already have an owning reference to the element. Bug 225825, r=bz, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@149369 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 21:29:07 +00:00
bryner%brianryner.com
d432cd07bc fixing typo
git-svn-id: svn://10.0.0.236/trunk@149368 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 20:59:54 +00:00
chanial%noos.fr
7331d35222 MacOS X doesn't like manifest files that mix lines with and without a specified location.
git-svn-id: svn://10.0.0.236/trunk@149367 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 20:14:00 +00:00
chanial%noos.fr
cbe7e3c146 distclean removal of buildconfig.html
git-svn-id: svn://10.0.0.236/trunk@149366 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 19:48:41 +00:00
chanial%noos.fr
76a6250e6a move build.dtd handling in toolkit/locale
git-svn-id: svn://10.0.0.236/trunk@149365 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 19:43:56 +00:00
chanial%noos.fr
9c2e0d6e1a move the buildconfig.html handling in toolkit/content
git-svn-id: svn://10.0.0.236/trunk@149364 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 19:33:35 +00:00
bzbarsky%mit.edu
2338b95b38 Have a way to disable the Postscript/* printers via pref even in builds with
the PS module built in.  Bug 225686, patch by dvschweiger@web.de (David
Schweiger), r=biesi, sr=bzbarsky


git-svn-id: svn://10.0.0.236/trunk@149363 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 19:25:14 +00:00
chanial%noos.fr
1889dbe752 studying Mac bustage
git-svn-id: svn://10.0.0.236/trunk@149362 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 19:03:00 +00:00
wchang0222%aol.com
397b035e41 Removed an extraneous character (`) after #endif.
git-svn-id: svn://10.0.0.236/trunk@149361 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 16:16:33 +00:00
wchang0222%aol.com
c3fd04c8d8 Removed an extraneous comma (,) at the end of an enum type definition.
git-svn-id: svn://10.0.0.236/trunk@149360 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 16:15:01 +00:00
cbiesinger%web.de
8e398d1990 fixing mac bustage
git-svn-id: svn://10.0.0.236/trunk@149358 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 15:29:14 +00:00
cbiesinger%web.de
2513e3d54b 78919 part 2. always return a nsIMIMEInfo from the OS HelperAppServices, and don't
create MIMEInfos outside of them directly.
r=bzbarsky sr=darin


git-svn-id: svn://10.0.0.236/trunk@149357 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 15:01:39 +00:00
bsmedberg%covad.net
68aec1f7ac Bug 221994 - Log chrome registry errors during XPInstall to help diagnose error -239. Patch by bugzilla@bsdchicks.com (Doc Wilco) thank you! r=me sr=bryner
git-svn-id: svn://10.0.0.236/trunk@149356 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 14:57:28 +00:00
alex.fritze%crocodile-clips.com
6a1a24f48b Fix style attribute, broken by bug #7639 checkin. (SVG only - not switched on in default builds)
git-svn-id: svn://10.0.0.236/trunk@149353 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 11:08:07 +00:00
bryner%brianryner.com
256a35e124 it's been a long day
git-svn-id: svn://10.0.0.236/trunk@149351 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 09:20:33 +00:00
bryner%brianryner.com
5e8aee7b0b Fixing some SVG bustage
git-svn-id: svn://10.0.0.236/trunk@149350 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 08:53:35 +00:00
bryner%brianryner.com
43fe192100 fix debug build bustage
git-svn-id: svn://10.0.0.236/trunk@149349 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 08:46:23 +00:00
bryner%brianryner.com
8a2b6389c7 More ports bustage fixing. Make ~nsSocketTransport() protected for the benefit of nsDerivedSafe<nsSocketTransport>.
git-svn-id: svn://10.0.0.236/trunk@149348 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 08:43:50 +00:00
chanial%noos.fr
6ba6e993bd fixing bustage
git-svn-id: svn://10.0.0.236/trunk@149347 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 08:29:09 +00:00
chanial%noos.fr
aa952bec80 move the i18n part of browser.properties into the toolkit (intl.properties)
Even if the platform dependent files intl.properties are identical for en-US, I think it's a good idea to keep them in seperate directories, to not mislead localizers.


git-svn-id: svn://10.0.0.236/trunk@149346 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 08:26:10 +00:00
bryner%brianryner.com
f56464de41 Fixing orange (hopefully). Don't dereference a pointer in the same call where it's passed as getter_AddRefs, because that will null it out first. For now, I'm keeping a strong reference to the node info manager at these call sites since it's not clear to me that it's guaranteed to stay around after the NodeInfo is released.
git-svn-id: svn://10.0.0.236/trunk@149345 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 08:16:23 +00:00
chanial%noos.fr
8cd63ef86b split the top-level toolkit manifest file into content/jar.mn, locale/jar.mn and obsolete/jar.mn so that we no longer have to repackage everything every time we modify one of these three subdirectories.
git-svn-id: svn://10.0.0.236/trunk@149344 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 07:43:50 +00:00
chanial%noos.fr
b864945683 some simplifications on how we hide the unrequested buttons
git-svn-id: svn://10.0.0.236/trunk@149342 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 07:31:01 +00:00
bryner%brianryner.com
575eac7d96 Fix AIX bustage by making ~nsSocketTransportService() protected (so that nsDerivedSafe can call it). r=dbaron.
git-svn-id: svn://10.0.0.236/trunk@149341 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 05:52:32 +00:00
bryner%brianryner.com
98fb7d2529 deCOMtaminate nsINodeInfo and nsINodeInfoManager. See bug 225060 for details. r=sicking, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@149340 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 05:27:37 +00:00
bzbarsky%mit.edu
0976c7a3b9 Don't clear previous selection when range is extended using shift-ctrl-click.
Bug 112281, r+sr=roc


git-svn-id: svn://10.0.0.236/trunk@149339 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 04:23:53 +00:00
despotdaemon%netscape.com
dfb9ccb236 Pseudo-automatic update of changes made by webmail@kmgerich.com.
git-svn-id: svn://10.0.0.236/trunk@149338 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 03:36:39 +00:00
despotdaemon%netscape.com
7888069d3f Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@149337 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 02:47:35 +00:00
bienvenu%nventure.com
22a7273501 fix forgetting pop3 password when pop3 account is busy, r/sr=mscott 219162
git-svn-id: svn://10.0.0.236/trunk@149336 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 00:57:41 +00:00
bzbarsky%mit.edu
194ad1b078 Fix up more XUL GetFrameForPoint impls to correctly handle paint layers. Bug
225732, r+sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@149335 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 00:47:43 +00:00
caillon%returnzero.com
8c7544ce3a Minor code cleanup. No bug.
r+sr=jst


git-svn-id: svn://10.0.0.236/trunk@149334 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 00:47:12 +00:00
nelsonb%netscape.com
268f8a9402 Detect empty emailAddr strings in CERTCertificate. Bugzilla bug 211540.
git-svn-id: svn://10.0.0.236/trunk@149333 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 00:15:28 +00:00
darin%meer.net
ce4070ff8f fixes bug 92928 "Server socket support in Necko" r=dougt sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@149332 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 00:13:59 +00:00
gerv%gerv.net
123c4a9492 Bug 205418 - Relicense Spidermonkey (js/src) to MPL/LGPL/GPL. Patch by gerv; r,a=brendan.
git-svn-id: svn://10.0.0.236/trunk@149331 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 00:11:16 +00:00
nelsonb%netscape.com
15b7b08f9e Detect empty emailAddr strings in CERTCertificates. Bugzilla bug 211540.
Modified Files:
    cmd/dbck/dbck.c cmd/signtool/util.c lib/certdb/certdb.c
    lib/certdb/stanpcertdb.c lib/pkcs7/p7decode.c lib/pki/certificate.c
    lib/pki/pki3hack.c lib/smime/cmssiginfo.c lib/softoken/pkcs11u.c


git-svn-id: svn://10.0.0.236/trunk@149330 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 00:10:01 +00:00
bryner%brianryner.com
35629ed8fc Fix tree rowcount change notifications for cookie manager (bug 215656). patch by steffen.wilberg@web.de, r=bryner.
git-svn-id: svn://10.0.0.236/trunk@149329 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 00:00:39 +00:00
bryner%brianryner.com
e0fe809662 Fix toolkit tracemalloc bustage, patch by swalker.
git-svn-id: svn://10.0.0.236/trunk@149328 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 23:55:41 +00:00
scott%scott-macgregor.org
da893df730 port fix from trunk
git-svn-id: svn://10.0.0.236/trunk@149327 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 23:46:56 +00:00
scott%scott-macgregor.org
75400d1ab4 Port Bug #73801 from the trunk: Need to disable the Delete button & menu item Delete Address Book when PAB or CAB is selected
git-svn-id: svn://10.0.0.236/trunk@149326 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 23:40:36 +00:00
scott%scott-macgregor.org
b53732361c synch with trunk to pick up Bug #218825
fixes problem where default account is not getting loaded at start up.


git-svn-id: svn://10.0.0.236/trunk@149325 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 23:20:45 +00:00
gerv%gerv.net
8cb0b3e53f Bug 225303 - Cannot remove stored query when no bugs are found. Patch by gerv; r=jouni, a=justdave.
git-svn-id: svn://10.0.0.236/trunk@149324 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 23:04:17 +00:00
bzbarsky%mit.edu
4c0aeaa73b Set text-indent:0 on all form controls to keep it from inheriting down to the
anonymous blocks inside.  Bug 56253, r+sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@149323 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 23:00:56 +00:00
bzbarsky%mit.edu
f800706e85 Don't reframe when "float: left" changes to "float: right"; just reflow. Bug
55967, r+sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@149322 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 22:55:46 +00:00
cbiesinger%web.de
c3d963390e found in 194439. use delete[] to free an array, not delete. r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@149321 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 22:39:01 +00:00
neil%parkwaycc.co.uk
6d442d9a5c Supplementary patch to bug 218825, part 2: convert users of nsMsgFolder to nsMsgDBFolder r/sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@149320 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 22:03:52 +00:00
danm-moz%comcast.net
53f19e4ae6 update widget position member variable when window is moved for any reason. r=bryner,ere bug 224760, 223901
git-svn-id: svn://10.0.0.236/trunk@149319 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 21:58:08 +00:00
cbiesinger%web.de
cd2d39ac40 fixing likely crasher in previous checkin, thanks to bz for noticing it
git-svn-id: svn://10.0.0.236/trunk@149318 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 21:27:41 +00:00
despotdaemon%netscape.com
a1c9bb4761 Pseudo-automatic update of changes made by kveton@oregonstate.edu.
git-svn-id: svn://10.0.0.236/trunk@149317 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 21:25:20 +00:00
darin%meer.net
d5e48f36e8 fixes bug 210208 "add http-on-examine-merged-response notification" patch=rggammon@alumni.uwaterloo.ca r+sr=darin
git-svn-id: svn://10.0.0.236/trunk@149316 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 20:51:55 +00:00
despotdaemon%netscape.com
5237b730f8 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@149315 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 20:49:13 +00:00
cbiesinger%web.de
309250facd 194439 nsOSHelperAppService on windows doesn't support non-ASCII default description.
fix this by using *W versions of registry functions when running on an nt-based windows.
r=ere sr=bzbarsky


git-svn-id: svn://10.0.0.236/trunk@149314 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 20:48:52 +00:00
despotdaemon%netscape.com
01c0f8d7d1 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@149313 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 20:46:00 +00:00
igor%mir2.org
47b86c32e1 Allow for scripts to catch instances of EvaluatorException
git-svn-id: svn://10.0.0.236/trunk@149312 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 20:38:06 +00:00
igor%mir2.org
6a1a012bec Transform StackOverflow during parsing into runtime exception so script can detect too deep recursion during parsing.
git-svn-id: svn://10.0.0.236/trunk@149311 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 20:33:43 +00:00
bienvenu%nventure.com
45344be418 fix daylight savings time change invalidating summary files on NTFS, 136049, r/sr=mscott
git-svn-id: svn://10.0.0.236/trunk@149310 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 20:21:18 +00:00
pinkerton%netscape.com
630a193e99 really changing find nib to be more cocoa-like
git-svn-id: svn://10.0.0.236/trunk@149308 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 19:47:18 +00:00
relyea%netscape.com
651dc7dc69 Fix windows breakage.
git-svn-id: svn://10.0.0.236/trunk@149306 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 18:06:50 +00:00
tor%cs.brown.edu
5d5fcfd63e Fix c++ for{} scoping bustage. r=sicking
git-svn-id: svn://10.0.0.236/trunk@149305 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 17:58:08 +00:00
sicking%bigfoot.com
3349c7799c Fix lineendings. r=pedemonte
git-svn-id: svn://10.0.0.236/trunk@149304 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 16:54:34 +00:00
bienvenu%nventure.com
4c97760ff3 fix 223692, don't use the initial-response argument with SMTP AUTH LOGIN, patch by ch.ey@gmx.net, r/sr=me
git-svn-id: svn://10.0.0.236/trunk@149303 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 16:13:48 +00:00
igor%mir2.org
8ea93aa11f Splitting Token.ASSIGN into Token.ASSIGN and Token.ASSIGNOP where the former represents only = while ASSIGNOP is used to denote +=, -= etc. Parse tree for the 2 operations is rather different and split allowed to simplify IRFactory code.
git-svn-id: svn://10.0.0.236/trunk@149302 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 16:03:31 +00:00
bienvenu%nventure.com
603d690e18 add filter action for deleting msg from pop3 server, also fix biff notification when biff doesn't download msgs, r/sr=mscott 74430 and 221165
git-svn-id: svn://10.0.0.236/trunk@149301 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 15:24:21 +00:00
bienvenu%nventure.com
5790243fa7 fix bustage introduced with previous checkin for 219787 make thread column toggle threaded mode, r/sr=me
git-svn-id: svn://10.0.0.236/trunk@149300 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 15:02:06 +00:00
bienvenu%nventure.com
46d8a2098d fix tb account manager - fallout from 222940, patch by borggraefe@web.de, r/sr=me
git-svn-id: svn://10.0.0.236/trunk@149299 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 14:41:53 +00:00
pinkerton%netscape.com
834c2830e3 allow dragging of topmost bookmark container in container list (bug 223325)
git-svn-id: svn://10.0.0.236/trunk@149298 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 13:42:55 +00:00
neil%parkwaycc.co.uk
959cfe057d Bug 222940 Offline & Diskspace and Server Setting panes are too large p=stefan@borggraefe.com r=me sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@149297 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 11:45:58 +00:00
caillon%returnzero.com
f106859f0a Bug 225411; updating DOM 3 Core's Document.xml*
r+sr=jst


git-svn-id: svn://10.0.0.236/trunk@149295 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 11:10:11 +00:00
neil%parkwaycc.co.uk
107f944ece Bug 218825, part 2: convert users of nsMsgFolder to nsMsgDBFolder r=bienvenu sr=Henry.Jia
git-svn-id: svn://10.0.0.236/trunk@149294 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 10:51:43 +00:00
jocuri%softhome.net
d5f6f6a4a7 Bug 223473: Query not resubmitted after changing columns; r=justdave; a=justdave.
git-svn-id: svn://10.0.0.236/trunk@149293 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 10:22:06 +00:00
dwitte%stanford.edu
68dded36b0 fixing mingw bustage.
git-svn-id: svn://10.0.0.236/trunk@149292 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 07:26:58 +00:00
dwitte%stanford.edu
ed7a0822ff clean up p3p hooks in cookies. this shifts code out of the cookiservice into p3p, and stops the cookieservice calling into p3p if the user isn't using p3p. this will improve perf a tad.
b=225298, r=mvl, sr=darin


git-svn-id: svn://10.0.0.236/trunk@149291 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 06:43:08 +00:00
scott%scott-macgregor.org
4147cb0b86 Hook up the progressmeter in thunderbird so it becomes visible when we have progress to show
and it gets hidden when we stop the meteors.


git-svn-id: svn://10.0.0.236/trunk@149290 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 05:21:40 +00:00
scott%scott-macgregor.org
ab5a189002 Bug #225651 --> fix regression in reporting progress in the progressmeter for loading of imap messages.
r/sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@149289 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 05:18:48 +00:00
timeless%mozdev.org
2ec1e9ccfc Bug 219899 localization issue in browser-menubar.inc: hardcoded menu label "Window"
patch by mpconnor@rogers.com r=ben


git-svn-id: svn://10.0.0.236/trunk@149288 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 05:10:46 +00:00
bienvenu%nventure.com
6692ce2172 make hidden pref that makes column clicking keep thread sorting also make thread column be a toggle for thread/unthreading patch by mcow@well.com, neil.parkwaycc, and myself, r=me, sr=mscott 219787
git-svn-id: svn://10.0.0.236/trunk@149287 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 03:48:41 +00:00
brendan%mozilla.org
156f0ecb89 Tweak so uneval(-0) == '-0' (r=igor@fastmail.fm).
git-svn-id: svn://10.0.0.236/trunk@149286 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 03:40:36 +00:00
relyea%netscape.com
e15c678739 Add symkeyutil to the manifest file
git-svn-id: svn://10.0.0.236/trunk@149285 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 03:27:23 +00:00
relyea%netscape.com
5fe2770302 New tool to manage fixed keys in the database.
git-svn-id: svn://10.0.0.236/trunk@149284 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 03:26:47 +00:00
relyea%netscape.com
419d66af8a Changes for symkey support.
git-svn-id: svn://10.0.0.236/trunk@149283 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 03:25:52 +00:00
brendan%mozilla.org
149f0d6f02 RegExp().toString and .toSource should return '/(?:)/', not '//' (bug 225550, r=sparky).
git-svn-id: svn://10.0.0.236/trunk@149282 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 03:23:49 +00:00
bienvenu%nventure.com
50c906beb2 pave way for using STATUS command to update imap folder counts, not turned on yet, r/sr=mscott 224381
git-svn-id: svn://10.0.0.236/trunk@149281 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 03:19:58 +00:00
mkaply%us.ibm.com
61313af827 #224487
r=brendan
Os/2 only changes to work around FPU issues. See the bug.


git-svn-id: svn://10.0.0.236/trunk@149280 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 01:49:37 +00:00
wchang0222%aol.com
fd912aa996 Bugzilla bug 225619: fixed memory leaks.
git-svn-id: svn://10.0.0.236/trunk@149279 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 01:42:51 +00:00
wchang0222%aol.com
1f3c87a56c Bugzilla bug 225626: need to allocate PORTArenaPool rather than PLArenaPool
for the 'arena' member of CERTVerifyLog.  Fixed memory leaks on an error
path.


git-svn-id: svn://10.0.0.236/trunk@149278 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 01:41:15 +00:00
wchang0222%aol.com
9309786b99 Set JSS version to 3.4.2 Beta 2.
Modified Files: CryptoManager.java util/jssver.h


git-svn-id: svn://10.0.0.236/trunk@149277 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 01:37:04 +00:00
jshin%mailaps.org
f9a6fa129a bug 224748 : make hardcoded charset names canonical (r=smontagu, sr=blizzard)
git-svn-id: svn://10.0.0.236/trunk@149276 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-14 01:00:03 +00:00
gerv%gerv.net
a2ea623db1 Bug 219358 - Make attachments with all supported MIME types viewable in the edit page. Patch by gerv; r=kiko, r,a=justdave.
git-svn-id: svn://10.0.0.236/trunk@149275 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 23:44:07 +00:00
wchang0222%aol.com
53b6380376 Upgraded to NSS_3_7_9_RTM (from NSS_3_7_8_RTM).
Modified Files: manifest.mn org/mozilla/jss/CryptoManager.java


git-svn-id: svn://10.0.0.236/trunk@149274 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 23:39:46 +00:00
bzbarsky%mit.edu
01e4c21953 Detect <iframe> as HTML. Bug 224932, r+sr=darin
git-svn-id: svn://10.0.0.236/trunk@149273 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 23:22:49 +00:00
nicolson%netscape.com
396fbef1a7 Fix 225615: memory leak in SSLSocket.socketConnect.
git-svn-id: svn://10.0.0.236/trunk@149272 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 23:10:13 +00:00
nelsonb%netscape.com
037cabbbac Fix bugzilla bug 225301. r=jpierre. This patch does the following:
1. Fixes the Usage message to document the command line options.
2. Changes the "decode" function to
   a) report an error on bad signatures, only when decoding the input file,
      not when decoding an ancillary "enveloped file".
   b) only output the contents of the "detached content" file (-c option)
      when that file's content was actually used in the computation.
3. Sundry other cleanup and added comments.


git-svn-id: svn://10.0.0.236/trunk@149271 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 23:03:12 +00:00
cbiesinger%web.de
f31b771e91 bug 223990. Should have a getPrimaryExtensionForType function
r=bzbarsky sr=darin
also changes nsIMIMEService functions to start with a lowercase letter (only affects JS Callers)


git-svn-id: svn://10.0.0.236/trunk@149270 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 23:00:55 +00:00
dbaron%dbaron.org
4c629e6e15 Make aErrorCode values nsresult, since that's what they are. Remove obsolete handling of -1 for EOF and now-obsolete TODO list. b=224254 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@149269 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 22:48:05 +00:00
bzbarsky%mit.edu
163defe9c7 Save the original tagname when viewing source to prevent case-folding. Bug
63137, r=choess, sr=heikki


git-svn-id: svn://10.0.0.236/trunk@149266 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 21:55:26 +00:00
hjtoi%comcast.net
e2cfa813da Bug 220954, add test for common problem and give correct message in that case, r=timeless.
git-svn-id: svn://10.0.0.236/trunk@149263 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 21:07:29 +00:00
pinkerton%netscape.com
2bf68107eb fixing pref ordering issues so camino prefs load last. turning off loading
of favicons at launch time. just too slow.


git-svn-id: svn://10.0.0.236/trunk@149262 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 20:35:58 +00:00
bryner%brianryner.com
d5fe400381 Don't bother looking for eu-readelf and readelf on Mac OS X (the 'which' command there prints its error message to stdout, so it's hard to tell that it failed).
git-svn-id: svn://10.0.0.236/trunk@149261 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 19:43:23 +00:00
scott%scott-macgregor.org
287db570e5 synch up some pref changes with the trunk
git-svn-id: svn://10.0.0.236/trunk@149260 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 18:45:24 +00:00
pschwartau%netscape.com
9e61b1abbc Removing skips for toSource() and uneval(), now that Rhino has implemented these methods (bug 225465). Adding a comment for skip of js1_5/Regress/regress-192465.js.
git-svn-id: svn://10.0.0.236/trunk@149259 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 18:39:17 +00:00
bzbarsky%mit.edu
a657b43a94 Fix bug 225565 by looking at the actual control type. r+sr=peterv
git-svn-id: svn://10.0.0.236/trunk@149258 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 18:38:41 +00:00
scott%scott-macgregor.org
13aa34227f Bug #225564 --> cannot sort messages by junk status because we are using the wrong column id.
git-svn-id: svn://10.0.0.236/trunk@149257 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 18:33:07 +00:00
pinkerton%netscape.com
c7c52ea1cc make find panel more consistent with other cocoa apps (bug 160771)
git-svn-id: svn://10.0.0.236/trunk@149256 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 18:21:02 +00:00
chanial%noos.fr
8028cb4271 Bug 225239: fix pref window bustage. the skin contents.rdf file wasn't packaged.
git-svn-id: svn://10.0.0.236/trunk@149255 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 17:43:41 +00:00
bmlk%gmx.de
557ab433ca OS/2 crash prevention, make sure that a division by zero can not occure, bug 221975, r/sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@149254 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 17:34:46 +00:00
pinkerton%netscape.com
a6b5f9263c fix bookmark export for html and plist for safari (bug 223204)
git-svn-id: svn://10.0.0.236/trunk@149253 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 17:31:31 +00:00
timeless%mozdev.org
8ff08fa9b6 Bug 224500 Some Customize Headers dialog clean up
patch by borggraefe@despammed.com r=neil sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@149252 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 17:30:11 +00:00
timeless%mozdev.org
49d41224b4 Bug 140649 Mail and newsgroup "set as default" should be disabled on current default
patch by borggraefe@despammed.com r=neil sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@149251 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 17:28:23 +00:00
igor%mir2.org
05af4b298f Implementing uneval/toSource functionality of SpiderMonkey. Foe details, see http://bugzilla.mozilla.org/show_bug.cgi?id=225465.
git-svn-id: svn://10.0.0.236/trunk@149250 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 17:15:31 +00:00
sicking%bigfoot.com
baa6f09289 Bug 225507: Implement nsCOMArray::SafeObjectAt for out-of-bounds safe access.
r=bryner sr=alecf


git-svn-id: svn://10.0.0.236/trunk@149249 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 17:01:20 +00:00
mostafah%oeone.com
05c0a5bb11 Checked in part of attachment 135317 dealing with printing ( bug 219589 )
git-svn-id: svn://10.0.0.236/trunk@149248 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 16:41:11 +00:00
blizzard%redhat.com
fc2bfdd586 Bug #201158. Gtk2 plugins would not be resized properly when the size of the plugin port was changed. r=robin.lu sr=bryner
git-svn-id: svn://10.0.0.236/trunk@149247 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 16:38:59 +00:00
mostafah%oeone.com
e7528b4c56 Checked in rest of attachment #135386
git-svn-id: svn://10.0.0.236/trunk@149246 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 16:37:25 +00:00
blizzard%redhat.com
638544968e Bug #225357. Plugins that specify coordinates that exceed maximum X coordinates cause X errors. Limit the size of plugins on this platform to the maximum size for X windows. r=bz, sr=roc
git-svn-id: svn://10.0.0.236/trunk@149245 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 16:33:52 +00:00
mostafah%oeone.com
84704e37a3 Checking in patches for bug 185394: Date picker format does not respect local settings
git-svn-id: svn://10.0.0.236/trunk@149243 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 16:25:26 +00:00
wchang0222%aol.com
1048ab0991 Fixed a comment error. r=relyea.
git-svn-id: svn://10.0.0.236/trunk@149242 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 16:21:46 +00:00
wchang0222%aol.com
7f3eb1098d Bugzilla bug 225373: the return value of CERT_NameToAscii must be freed
with PORT_Free.
Modified Files:
	cmd/lib/secutil.c cmd/selfserv/selfserv.c
	cmd/signver/pk7print.c cmd/strsclnt/strsclnt.c
	cmd/tstclnt/tstclnt.c lib/certdb/cert.h


git-svn-id: svn://10.0.0.236/trunk@149241 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 16:10:45 +00:00
mostafah%oeone.com
045b04b1da Finalizing changes for bug 219589: Calendar Extension for Thunderbird
git-svn-id: svn://10.0.0.236/trunk@149240 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 15:24:32 +00:00
mostafah%oeone.com
f6b447d4e7 Updated Dutch translation
git-svn-id: svn://10.0.0.236/trunk@149239 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 14:49:23 +00:00
neil%parkwaycc.co.uk
6875135281 Bug 224587 Biff shouldn't alert for transient IMAP server errors r=bienvenu sr=Henry.Jia
git-svn-id: svn://10.0.0.236/trunk@149238 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 10:36:37 +00:00
bryner%brianryner.com
ea95a68391 Re-enable nsCOMPtr_base on gcc 3.x, and use the may_alias attribute for mRawPtr to avoid strict aliasing problems on gcc 3.3+. Bug 212082, r=darin, sr=dbaron.
git-svn-id: svn://10.0.0.236/trunk@149237 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 07:37:14 +00:00
bzbarsky%mit.edu
b68ca1036b Treat bogus "type" values as "text" consistently. Bug 225103, r+sr=peterv
git-svn-id: svn://10.0.0.236/trunk@149236 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 05:16:06 +00:00
bzbarsky%mit.edu
0b45220a8c Clarify when ReParentStyleContext should be called and remove more bogus style
parentage warnings.  Bug 217225, r+sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@149235 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 04:31:04 +00:00
jst%mozilla.jstenback.com
efdc7bfac3 Silly whitespace cleanup.
git-svn-id: svn://10.0.0.236/trunk@149234 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 04:15:25 +00:00
bzbarsky%mit.edu
fdf8127d9d BoxFrame should only be the point target in the background layer, and should
propagate background layer point requests to kids.  Bug 224013, r+sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@149233 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 04:13:12 +00:00
bzbarsky%mit.edu
7ee2b11b9e Fix some bogus style parentage warnings. Bug 224867, r+sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@149232 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 04:11:38 +00:00
timeless%mozdev.org
d9926a983a Bug 225523 Minor dreftool change to get consistent bonsai output
r=riceman+bmo@mail.rit.edu


git-svn-id: svn://10.0.0.236/trunk@149231 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 03:49:37 +00:00
nelsonb%netscape.com
5bf80de578 Workaround race. Reduce leaks. Not a real fix. Bugzilla bug 225525.
git-svn-id: svn://10.0.0.236/trunk@149230 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 03:41:32 +00:00
leaf%mozilla.org
5531a228d3 remove version from installer package for nightly builds.
git-svn-id: svn://10.0.0.236/trunk@149229 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 02:17:51 +00:00
wchang0222%aol.com
4480041b25 Bugzilla bug 225260: link NSPR dynamic shared libraries with the
-headerpad_max_install_names option. sr=sfraser.


git-svn-id: svn://10.0.0.236/trunk@149226 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 02:03:44 +00:00
wchang0222%aol.com
c2eafc0543 Bugzilla bug 225259: link NSS dynamic shared libraries with the
-headerpad_max_install_names option. r=ccarlen, sr=sfraser.


git-svn-id: svn://10.0.0.236/trunk@149225 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 01:59:22 +00:00
timeless%mozdev.org
f36557bbb2 Bug 8227 dreftool - rickg's phase 1 preventative crash maintenance
r=bernd

This is dreftool, resurrected with the help of kherron, bernd, and myself.

Licensing has been switched per http://bugzilla.mozilla.org/show_bug.cgi?id=8227#c45
to MPL/GPL/LGPL.

Old copies of xpcom classes have been removed, dreftool now uses the normal ones.

New:
* Builds on Linux and uses NSPR, so it should be possible to use it on most
systems.
* Member variables are screened.
* Tries to recognize NS_ENSURE early outs.
* Can parse a single file.
* The summary can indicate what it was told to parse.
* Links to LXR can be generated. Using this feature is not recommended as pieces of
mozilla tend to be on branches and the links will be bad. If for non branched content,
the links will drift as the files are changed.
* Links to Bonsai against the file revision will be generated if CVS records are
detected. This is good, unless you have local modifications in your tree.

Known issues:
* Aliasing isn't detected, so
|a = new something; *foo = a; if (!*foo) return NS_ERROR_FAILURE;| is flagged.
e.x.
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/accessible/src/html/nsHTMLSelectAccessible.cpp&rev=1.33&mark=920-921,922,923,925#920

* Assigning to dereferenced objects
|*foo = new something| is not quite correctly handled (perhaps it's misinterpreted as
|foo = new something|. e.x.
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/extensions/transformiix/source/xslt/txStandaloneXSLTProcessor.cpp&rev=1.11&mark=88,92,96,99,84#91

* Various other allocators aren't caught: strdup and co., nsCRT::, nsMemory::, ...

* There's no way to provide a user defined list of allocators.

People should of course not file bugs simply based on dreftool, they should file bugs
after verifying that the complaints from dreftool are valid.


git-svn-id: svn://10.0.0.236/trunk@149224 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 00:01:30 +00:00
wchang0222%aol.com
a51c8c21f8 Added a comment to note a question I had while reviewing the code.
git-svn-id: svn://10.0.0.236/trunk@149223 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 23:25:33 +00:00
ben%bengoodger.com
24764b480e Fix the Developer Tools jst so Inspector can be installed
git-svn-id: svn://10.0.0.236/trunk@149222 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 23:24:03 +00:00
bienvenu%nventure.com
b43d3791d3 fix downloading of truncated pop3 messages when user has changed the server user name, 222896, r/sr=mscott
git-svn-id: svn://10.0.0.236/trunk@149221 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 23:10:18 +00:00
timeless%mozdev.org
9d74e9c9a2 Bug 8227 dreftool - rickg's phase 1 preventative crash maintenance
r=bernd

This is dreftool, resurrected with the help of kherron, bernd, and myself.

Licensing has been switched per http://bugzilla.mozilla.org/show_bug.cgi?id=8227#c45
to MPL/GPL/LGPL.

Old copies of xpcom classes have been removed, dreftool now uses the normal ones.

New:
* Builds on Linux and uses NSPR, so it should be possible to use it on most
systems.
* Member variables are screened.
* Tries to recognize NS_ENSURE early outs.
* Can parse a single file.
* The summary can indicate what it was told to parse.
* Links to LXR can be generated. Using this feature is not recommended as pieces of
mozilla tend to be on branches and the links will be bad. If for non branched content,
the links will drift as the files are changed.
* Links to Bonsai against the file revision will be generated if CVS records are
detected. This is good, unless you have local modifications in your tree.

Known issues:
* Aliasing isn't detected, so
|a = new something; *foo = a; if (!*foo) return NS_ERROR_FAILURE;| is flagged.
e.x.
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/accessible/src/html/nsHTMLSelectAccessible.cpp&rev=1.33&mark=920-921,922,923,925#920

* Assigning to dereferenced objects
|*foo = new something| is not quite correctly handled (perhaps it's misinterpreted as
|foo = new something|. e.x.
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/extensions/transformiix/source/xslt/txStandaloneXSLTProcessor.cpp&rev=1.11&mark=88,92,96,99,84#91

* Various other allocators aren't caught: strdup and co., nsCRT::, nsMemory::, ...

* There's no way to provide a user defined list of allocators.

People should of course not file bugs simply based on dreftool, they should file bugs
after verifying that the complaints from dreftool are valid.


git-svn-id: svn://10.0.0.236/trunk@149220 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 22:38:24 +00:00
neil%parkwaycc.co.uk
4cf0c48eed Bug 225083 moz-icons show wrongly for 5-6-5 bitfields r=ere sr=mscott
git-svn-id: svn://10.0.0.236/trunk@149219 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 22:25:51 +00:00
neil%parkwaycc.co.uk
8fc8ee0ffa Bug 218957 about:config should load with focus in filter textbox p=steffen.wilberg@web.de r=me,pch sr=brendan,ben (yes really, four reviews).
git-svn-id: svn://10.0.0.236/trunk@149218 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 22:21:48 +00:00
brendan%mozilla.org
e510eeea3f Heal a now-bogus assertion under JS_LOCK_OBJ/JS_LOCK_SCOPE.
git-svn-id: svn://10.0.0.236/trunk@149217 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 22:14:25 +00:00
mkaply%us.ibm.com
11b7f0a89a No bug - get installer working for GCC on OS/2 - change APIs to _APIs and fix a bad variable reference
git-svn-id: svn://10.0.0.236/trunk@149216 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 21:08:39 +00:00
darin%meer.net
3a5b2a6dbb fix uninitialized variable warning, bug 204503, patch by alfredkayser@nl.ibm.com, r+sr=darin
git-svn-id: svn://10.0.0.236/trunk@149213 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 20:09:05 +00:00
jshin%mailaps.org
9c4ba03cbb bug 222346 : streamline JS script loading code (deleegate charset alias resolution to GetUnicodeDecoder()) (r=smontagu, sr=bz)
git-svn-id: svn://10.0.0.236/trunk@149212 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 19:51:12 +00:00
jshin%mailaps.org
54af465fad bug 224748 : make charset names in navigator.properties (for charset menu) canonical (r=smontagu, sr=blizzard)
git-svn-id: svn://10.0.0.236/trunk@149211 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 19:44:18 +00:00
mostafah%oeone.com
3efe345d8e Checked in patch for bug 215594: week view does not show events if Monday-Friday Only selected
git-svn-id: svn://10.0.0.236/trunk@149210 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 19:39:39 +00:00
mostafah%oeone.com
0ff0b34573 Checked in patch for bug 215683: Dragging in week view creates event on wrong day
git-svn-id: svn://10.0.0.236/trunk@149209 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 19:22:17 +00:00
mostafah%oeone.com
9e837fadc6 Checked in patch for bug 197569: Event Dialog Date Picker not initialized from selected date
git-svn-id: svn://10.0.0.236/trunk@149208 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 18:41:08 +00:00
mostafah%oeone.com
9e7a88af9b Checked in proposed fix for bug 188890: Mini month view needs to observe week start pref
git-svn-id: svn://10.0.0.236/trunk@149207 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 18:40:08 +00:00
mostafah%oeone.com
eaebe6703c Checking in patch for bug 225339: Mini month view advance month should not change selected date
git-svn-id: svn://10.0.0.236/trunk@149205 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 18:07:01 +00:00
pkw%us.ibm.com
5f0869398a Bug 197081 - AIX: Preedit string is duplicated when committed.
r=katakai@japan.sun.com, sr=blizzard@mozilla.org (platform specific)


git-svn-id: svn://10.0.0.236/trunk@149203 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 17:49:22 +00:00
pkw%us.ibm.com
58d3a2ca5e Bug 225003 - Typo in spellchecker code
r=timeless@myrealbox.com, sr=mkaply@us.ibm.com


git-svn-id: svn://10.0.0.236/trunk@149202 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 17:32:49 +00:00
mostafah%oeone.com
cba9b90000 Checking in patches for bug 185394: Date picker format does not respect local settings
git-svn-id: svn://10.0.0.236/trunk@149201 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 17:22:21 +00:00
neil%parkwaycc.co.uk
1fac0bf2c9 Supplementary patch to bug 168479 to remove a newline that the old code mistakenly ignored r=ducarroz sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@149197 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 15:56:32 +00:00
igor%mir2.org
165cf3cb60 Passing to decompiler information about function type so it can use it to customize its output in future.
git-svn-id: svn://10.0.0.236/trunk@149196 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 15:47:50 +00:00
mostafah%oeone.com
e1e60e005d Removing duplicate entries
git-svn-id: svn://10.0.0.236/trunk@149195 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 15:16:33 +00:00
mostafah%oeone.com
bb7f618427 Checked in part of patch for bug 219589: Calendar Extension for Thunderbird
git-svn-id: svn://10.0.0.236/trunk@149194 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 14:49:32 +00:00
peter%propagandism.org
f418369cdd Part of fix for bug 219848 (Cannot programmatically (JavaScript) set value of HTMLInputElement) - don't do security checks when defining DOM classes. r=caillon, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@149193 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 14:25:03 +00:00
peter%propagandism.org
ae24c544d7 Part of fix for bug 219848 (Cannot programmatically (JavaScript) set value of HTMLInputElement) - return JS_FALSE when throwing an exception. r=caillon, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@149191 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 14:19:26 +00:00
igor%mir2.org
c85150a93c Changing Decompiler.decompile to take just encoded source, flag argument controlling output format and property table so it would be possible to add more options to decompiler without changing the rest of code.
git-svn-id: svn://10.0.0.236/trunk@149190 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 12:22:12 +00:00
igor%mir2.org
039200747f Changing return type of NativeFunction.getEncodedSource() to String from Object since the idea of having anything else but String would require changes in API in any case.
git-svn-id: svn://10.0.0.236/trunk@149189 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 10:23:53 +00:00
neil%parkwaycc.co.uk
8c00ac6007 Bug 181973 Implement a system for inverting boolean prefs and apply it to the scripts listbox r=caillon sr=alecf
git-svn-id: svn://10.0.0.236/trunk@149188 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 10:13:10 +00:00
cbiesinger%web.de
c78663cde2 bug 225362. nsIStreamConverter.idl has an outdated comment. this patch also
fixes indentation of some lines. r+sr=darin


git-svn-id: svn://10.0.0.236/trunk@149187 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 09:37:35 +00:00
ben%bengoodger.com
08d27ab8ff Turn on ADT Package for installer
git-svn-id: svn://10.0.0.236/trunk@149186 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 09:31:48 +00:00
ben%bengoodger.com
6c2d04aba4 add new contents.rdf.in file for browser
git-svn-id: svn://10.0.0.236/trunk@149185 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 09:16:43 +00:00
ben%bengoodger.com
2e17bc0322 Turn on Inspector in Firebird
git-svn-id: svn://10.0.0.236/trunk@149184 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 09:15:56 +00:00
ben%bengoodger.com
20a01b0636 Enable Inspector for Firebird
git-svn-id: svn://10.0.0.236/trunk@149183 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 09:15:21 +00:00
ben%bengoodger.com
74322e5e5c Remove the right files this time.
git-svn-id: svn://10.0.0.236/trunk@149182 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 08:08:14 +00:00
ben%bengoodger.com
616c4569b3 Fix oops.
git-svn-id: svn://10.0.0.236/trunk@149181 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 08:07:33 +00:00
bryner%brianryner.com
fcd1cc5572 re-adding file
git-svn-id: svn://10.0.0.236/trunk@149180 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 08:02:33 +00:00
ben%bengoodger.com
52a8eb8c79 Actually, let's try this again.
git-svn-id: svn://10.0.0.236/trunk@149179 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 07:24:26 +00:00
chanial%noos.fr
408da0e11d bug 221597: remove reference to a communicator locale (sidebar.properties) by copying and updating it (Sidebar Internet Search Tab -> Search Bar)
git-svn-id: svn://10.0.0.236/trunk@149178 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 05:52:02 +00:00
chanial%noos.fr
76e1aa9a85 bug 225215: alt-Enter doesn't work in the search bar
git-svn-id: svn://10.0.0.236/trunk@149177 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 05:13:43 +00:00
caillon%returnzero.com
1d4e84d60a Bug 225400
Fix leaks of 2 string bundles and an nsInterfaceHashtable.
Stop using nsIPref in favor of nsIPrefService
Use members instead of pointers for hashtables that always exist
Use ContractIDs instead of CIDs
r=timeless; sr=jst


git-svn-id: svn://10.0.0.236/trunk@149176 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 04:34:17 +00:00
chanial%noos.fr
0b550136ce coding style nit
git-svn-id: svn://10.0.0.236/trunk@149175 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 03:31:56 +00:00
chanial%noos.fr
7ae768c672 bug 224241: sidebar installation is broken.
hyatt should find a way out of the Matrix :-).
patch suggested by caillon.


git-svn-id: svn://10.0.0.236/trunk@149174 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-12 03:13:40 +00:00
locka%iol.ie
8283a800fa NOT PART OF BUILD. Additional client files needed by ActiveX control when running mozilla/embedding/config
git-svn-id: svn://10.0.0.236/trunk@149173 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 23:39:12 +00:00
locka%iol.ie
0576a5c15c NOT PART OF BUILD. mozconfig file containing build settings for control
git-svn-id: svn://10.0.0.236/trunk@149172 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 23:37:53 +00:00
locka%iol.ie
fb57fc1cc1 NOT PART OF BUILD. Clean up activex installer script, invoke makensis.exe automatically instead of by hand
git-svn-id: svn://10.0.0.236/trunk@149171 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 23:37:02 +00:00
dbaron%dbaron.org
72ba171635 URL updates
git-svn-id: svn://10.0.0.236/trunk@149170 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 22:59:51 +00:00
scott%scott-macgregor.org
a96210bb0f hide black list support from the UI until we actually implement it.
git-svn-id: svn://10.0.0.236/trunk@149169 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 22:25:02 +00:00
caillon%returnzero.com
ce6c2717ae Microsoft didn't prefix their core interface names with 'ns'.
Fixing comment grammar.
No bug.
r=timeless rs=dbaron


git-svn-id: svn://10.0.0.236/trunk@149168 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 21:53:36 +00:00
dbaron%dbaron.org
2dd27d503f QueryInterface implementations shouldn't null-check out parameter. b=215352 r=dougt
git-svn-id: svn://10.0.0.236/trunk@149167 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 21:51:02 +00:00
nelsonb%netscape.com
ee8e542686 Eliminate some leaks in Stan cert code.
Partial fix to bugscape bug 53573.


git-svn-id: svn://10.0.0.236/trunk@149166 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 21:46:53 +00:00
nelsonb%netscape.com
9cebade4f2 Eliminate a cert leak. Patch is Bob Relyea's.
Parial fix for Bugscape bug 53573.


git-svn-id: svn://10.0.0.236/trunk@149165 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 21:45:48 +00:00
pschwartau%netscape.com
9d9e4cc2dc Initial add. Regression test for bug 225343.
git-svn-id: svn://10.0.0.236/trunk@149164 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 20:55:59 +00:00
locka%iol.ie
0229f3f43a Move profile opening to after component registration to prevent locked profiles from causing strange behaviour in the control. b=224455 r=bzbarsky sr=jst
git-svn-id: svn://10.0.0.236/trunk@149163 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 20:38:51 +00:00
igor%mir2.org
d97ed101b7 In ClassFileWriter.addPush(double) use DNEG to generate more compact code for -0.0 and -1.0
git-svn-id: svn://10.0.0.236/trunk@149162 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 20:31:36 +00:00
igor%mir2.org
3226e12c0a Changing just introduced CodeBlock into Callable that define call method with exactly the same signature as Function.call and changing Function to extend Callable.
Now Context defines new method "call" that provide optimized version of the following code:

Context cx = Context.enter()
try {
    callable.call(cx, scope, thisObj, args);
} finally {
    Context.exit();
}

Since Function extends Callable, it can be passed to this method directly thus simplifying ScriptableObject.call method and Java adapter code.

The new interface is used in SecurityController implementation which allows to pass interpreted functions there directly as well removing the need to have intermediate class in Interpreter.


git-svn-id: svn://10.0.0.236/trunk@149161 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 20:30:08 +00:00
igor%mir2.org
56519b18e0 Extend constant folding to cover few unary operations
git-svn-id: svn://10.0.0.236/trunk@149160 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 20:18:34 +00:00
igor%mir2.org
e34a118451 1. Make sure that -0.0 from parser are treated properly: new constant folding code there may produce it.
2. Instead of generating code to call Double constructor use the new method OptRuntime.wrapDouble() that allows to cut amount of produced byte code.


git-svn-id: svn://10.0.0.236/trunk@149159 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 20:04:38 +00:00
dbaron%dbaron.org
6ab19b722c Removed unused LineIsEmpty function.
git-svn-id: svn://10.0.0.236/trunk@149158 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 19:25:49 +00:00
dbaron%dbaron.org
c484400136 Remove BRS_NOWRAP. b=191699 r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@149157 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 19:24:01 +00:00
timeless%mozdev.org
1ca23e1d9a whitespace change. This should make lxr hits for spacemanager reasonable.
It also makes the html and diffs tolerable.


git-svn-id: svn://10.0.0.236/trunk@149156 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 19:23:37 +00:00
timeless%mozdev.org
5ea7af8bf4 Bug 189307 typeahead initializes sound when it's uninitialized instead of if it's unitialized and there's a sound to play
r=caillon sr=roc


git-svn-id: svn://10.0.0.236/trunk@149155 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 18:39:02 +00:00
jshin%mailaps.org
945f19e40d bug 44272 : make escape/unescape (in DOM) correctly work with the full range of Unicode chars. (by making it use JSengine version) (r=brendan/bz, sr=bz)
git-svn-id: svn://10.0.0.236/trunk@149154 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 17:59:54 +00:00
dwitte%stanford.edu
e0a28d7948 Cookie Manager and Exceptions window should remember column size
b=224569, r=neil, sr=alecf


git-svn-id: svn://10.0.0.236/trunk@149153 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 17:43:16 +00:00
rlk%trfenv.com
fab3fb1f7c Bug 161740 - Remove obsolete help files from builds. r=neil.parkwaycc.co.uk
git-svn-id: svn://10.0.0.236/trunk@149152 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 16:10:31 +00:00
timeless%mozdev.org
707ab63bfc Bug 172525 [ps] print legal size page fails to set '<< /PageSize [612 1008] >> setpagedevice'
patch by kjh-5727@comcast.net r=timeless sr=tor


git-svn-id: svn://10.0.0.236/trunk@149151 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 15:32:11 +00:00
neil%parkwaycc.co.uk
17e7438c93 Fix whitespace and line endings clobbered by previous checkin to bug 218825
git-svn-id: svn://10.0.0.236/trunk@149150 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 13:54:17 +00:00
neil%parkwaycc.co.uk
81182ce6ef Bug 66522 Make it easier to use mouse wheel preferences r=caillon sr=bz
git-svn-id: svn://10.0.0.236/trunk@149149 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 12:53:19 +00:00
neil%parkwaycc.co.uk
f77b49e175 Bug 218825, part 1: convert users of nsIFolder to nsIMsgFolder r=bienvenu sr=Henry.Jia
git-svn-id: svn://10.0.0.236/trunk@149148 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 10:19:05 +00:00
caillon%returnzero.com
0fcd9154d8 Get rid of an addref/release pair and be explicit about deleting our nsCookie when AddCookieToList fails, rather than it just magically dissappearing via the addref/release pair in the callee.
Bug 225203
r=dwitte; sr=jst


git-svn-id: svn://10.0.0.236/trunk@149147 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 09:39:32 +00:00
neil%parkwaycc.co.uk
4baeeb0b45 Bug 189007 Switch group without clearing QuickSearch resets view r=bienvenu sr=Henry.Jia
git-svn-id: svn://10.0.0.236/trunk@149146 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 09:37:11 +00:00
darin%meer.net
b93703e913 removing dead MacOS9 code
git-svn-id: svn://10.0.0.236/trunk@149145 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 07:32:34 +00:00
darin%meer.net
379777eb8e fixes bug 224320 "remove bogus IsDirectory canonicalization" r=dougt
git-svn-id: svn://10.0.0.236/trunk@149144 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 07:31:47 +00:00
jouni%heikniemi.net
4475d01f39 contrib/cvs-update.sh should be in Perl. r=zach, a=justdave
git-svn-id: svn://10.0.0.236/trunk@149143 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 05:58:52 +00:00
dwitte%stanford.edu
2808c2e18a mingw bustage fix. thanks stephend
git-svn-id: svn://10.0.0.236/trunk@149142 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 05:28:12 +00:00
pschwartau%netscape.com
93ef401962 Correcting mistakes, and changing style.
git-svn-id: svn://10.0.0.236/trunk@149141 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 05:21:26 +00:00
dwitte%stanford.edu
8060b33ac7 removing evil reference to a certain OS. comment-only change.
git-svn-id: svn://10.0.0.236/trunk@149140 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 05:00:25 +00:00
pschwartau%netscape.com
4312c73f96 Initial add. Regression test for bug 225289.
git-svn-id: svn://10.0.0.236/trunk@149139 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 04:56:52 +00:00
bienvenu%nventure.com
8f2b830dcd fix 225235 can't create local folders, r/sr=mscott
git-svn-id: svn://10.0.0.236/trunk@149138 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 04:05:31 +00:00
rlk%trfenv.com
260a28fac1 Removing files not used in build.
git-svn-id: svn://10.0.0.236/trunk@149137 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 03:23:53 +00:00
technutz%netscape.net
ff790d041d Bug 73801. Disable the delete menu item, context menu item and button when either a Collected or Personal address book is selected. r=neil, sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@149136 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 02:56:36 +00:00
dwitte%stanford.edu
54a6fac646 clean up some prefhandling code in nsImgManager/nsCookiePermission, to fix a bogus assert when mailnews prefs aren't available.
b=224339, r=caillon, sr=darin.


git-svn-id: svn://10.0.0.236/trunk@149135 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 02:46:06 +00:00
brendan%mozilla.org
8bb2395e5f Remove JS_UnsealObject, optimize locking of sealed objects, shrink JSContext by two JSArenaPool members (224306, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@149134 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 01:28:17 +00:00
ben%bengoodger.com
fdb3b16bbf Downloading II, the circle opens. Relocate browser download files here so Tbird can use us.
git-svn-id: svn://10.0.0.236/trunk@149133 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 01:19:49 +00:00
jpierre%netscape.com
12f7d5ece4 Fix crash in certutil if usage is omitted
git-svn-id: svn://10.0.0.236/trunk@149132 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-11 00:01:32 +00:00
dbaron%dbaron.org
a667761f99 Comment was backwards (thanks bz). b=191699
git-svn-id: svn://10.0.0.236/trunk@149131 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 23:55:53 +00:00
bzbarsky%mit.edu
c2a4fc9e33 Fix Invalidate() method to invalidate the right area. Bug 224607, patch by
roc, r=blizzard, sr=bzbarsky


git-svn-id: svn://10.0.0.236/trunk@149130 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 23:48:24 +00:00
bzbarsky%mit.edu
844c0e060a Make cloneNode() copy the current value and checked properties for inputs. Bug
197294, r+sr=jst


git-svn-id: svn://10.0.0.236/trunk@149129 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 23:46:29 +00:00
bzbarsky%mit.edu
fe8bc15211 Don't do our "enlarge the control a bit to make it look better for small sizes"
thing for fixed-width fonts -- it's unnecessary and just makes it look like
"size" is broken.  Bug 103293, r+sr=rbs


git-svn-id: svn://10.0.0.236/trunk@149128 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 23:42:43 +00:00
bienvenu%nventure.com
e0be19fe98 fix downloading news when news directory is missing, patch by gemal.dk, r/sr=me 209641
git-svn-id: svn://10.0.0.236/trunk@149127 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 23:38:10 +00:00
dbaron%dbaron.org
c53d72392a Clean up nsIFrame::IsEmpty signature and move towards making 'white-space' work on inlines. b=191699 r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@149126 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 23:36:06 +00:00
bienvenu%nventure.com
94f0a78aea fix ldap server and local folder migration to work w/o relaunch, r/sr=mscott 223560
git-svn-id: svn://10.0.0.236/trunk@149125 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 23:32:53 +00:00
despotdaemon%netscape.com
3d47176623 Pseudo-automatic update of changes made by brendan@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@149124 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 23:30:36 +00:00
neil%parkwaycc.co.uk
eca1c63970 Bug 50223 Clicking on a sidebar tab should set focus to its content r=pch sr=alecf
git-svn-id: svn://10.0.0.236/trunk@149123 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 23:15:52 +00:00
bienvenu%nventure.com
293bd4fff1 fix handling of online sub directories with imap namespaces, r/sr=mscott 219645
git-svn-id: svn://10.0.0.236/trunk@149122 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 23:13:54 +00:00
neil%parkwaycc.co.uk
b5cc2a87bf Bug 168479 Citation prefix should not be interpreted as HTML r=brade sr=mscott
git-svn-id: svn://10.0.0.236/trunk@149121 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 23:04:15 +00:00
jocuri%softhome.net
6a9a5184f6 Bug 225234: Wrong comment in editusers.cgi; r=timeless; a=myk.
git-svn-id: svn://10.0.0.236/trunk@149119 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 17:56:03 +00:00
mvl%exedo.nl
34e829cde6 Persist checkbox to block domain in the cookie manager.
bug 75119, r=biesi, sr=alecf


git-svn-id: svn://10.0.0.236/trunk@149118 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 16:56:37 +00:00
mostafah%oeone.com
d187946cac Checking in patch for Japanese translation update. (Bug 220860)
git-svn-id: svn://10.0.0.236/trunk@149117 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 16:35:44 +00:00
neil%parkwaycc.co.uk
a41d8ee812 Bug 224251 Bookmarks panel doesn't focus bookmarks tree when selected r=pch sr=alecf
git-svn-id: svn://10.0.0.236/trunk@149116 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 16:27:42 +00:00
neil%parkwaycc.co.uk
30cac637f2 Bug 135607 Add throbber to help toolbar p=rlk@trvenv.com r=me sr=alecf
git-svn-id: svn://10.0.0.236/trunk@149115 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 16:25:46 +00:00
despotdaemon%netscape.com
65c1d2af06 Pseudo-automatic update of changes made by brendan@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@149114 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 16:09:31 +00:00
timeless%mozdev.org
52a9f1dbf6 Bug 214387 nsAddressBook.h:81: warning: `struct ExportAttributesTableStruct EXPORT_ATTRIBUTES_TABLE[53]' defined but not used
r=alecf sr=alecf


git-svn-id: svn://10.0.0.236/trunk@149113 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 15:44:47 +00:00
jshin%mailaps.org
3baa0d0398 bug 221666 : the latest in a series of landing for this bug. This is to fix run-time linking error in gtk2 build.
git-svn-id: svn://10.0.0.236/trunk@149112 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 12:24:51 +00:00
ben%bengoodger.com
683034b80f remove unnecessary entries from packages-static
git-svn-id: svn://10.0.0.236/trunk@149109 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 07:18:31 +00:00
ben%bengoodger.com
caef01a43c Add satchel to the packager list
git-svn-id: svn://10.0.0.236/trunk@149108 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 07:10:53 +00:00
ben%bengoodger.com
ad7aceba0f Bind the XPIs.
git-svn-id: svn://10.0.0.236/trunk@149107 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 07:10:41 +00:00
ben%bengoodger.com
2998a34699 Include browser-region in this jst file
git-svn-id: svn://10.0.0.236/trunk@149106 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 06:44:06 +00:00
scott%scott-macgregor.org
7f97916c41 Bug #186578 --> Escape key should close standalone message window
port by mbr from the trunk.


git-svn-id: svn://10.0.0.236/trunk@149105 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 06:35:14 +00:00
scott%scott-macgregor.org
252292f6f9 remove obsolete files from the packaging list. Port by MBR.
git-svn-id: svn://10.0.0.236/trunk@149104 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 06:34:07 +00:00
scott%scott-macgregor.org
fe8ca2fc8e Port Bug #224608 to thunderbird: Remove shortcut keys from mail context menus
thanks to mbr for the patch


git-svn-id: svn://10.0.0.236/trunk@149103 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 06:31:53 +00:00
scott%scott-macgregor.org
75ffacae20 package builtinURLS.js
git-svn-id: svn://10.0.0.236/trunk@149102 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 06:29:35 +00:00
scott%scott-macgregor.org
cbff566064 export XPCNativeWrapper.js
git-svn-id: svn://10.0.0.236/trunk@149101 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 06:25:35 +00:00
scott%scott-macgregor.org
eea3c95fd0 Bug #225188 --> crash when quitting mail after posting a news article by adding a missing addref.
r/sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@149100 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 06:23:01 +00:00
hpradhan%hotpop.com
5024f10b1e bug 223108 : Syntax error when loading non-existant external javascript file
r+sr=bzbarsky


git-svn-id: svn://10.0.0.236/trunk@149099 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 05:53:48 +00:00
hpradhan%hotpop.com
20eeead4f2 bug 218297 : disabled property of input elements is not stored in history
r=jkeiser sr=jst


git-svn-id: svn://10.0.0.236/trunk@149098 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 05:52:29 +00:00
ben%bengoodger.com
14d796e4c4 Let's not actually package up these files until they work, to save on download size.
git-svn-id: svn://10.0.0.236/trunk@149097 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 04:48:00 +00:00
scott%scott-macgregor.org
53ae8c1d66 Bug #224119 --> Spell Check dialog for mailnews needs url for localized dictionaries. We are pointing it to:
http://dictionaries.mozdev.org/installation.html

for now.

sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@149096 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 04:10:06 +00:00
scott%scott-macgregor.org
38991e404b add missing window menu item for OSX
git-svn-id: svn://10.0.0.236/trunk@149095 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 04:05:23 +00:00
justdave%syndicomm.com
680df0c8f4 Bump version number to 2.17.6
git-svn-id: svn://10.0.0.236/trunk@149093 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 03:56:38 +00:00
igor%mir2.org
22cd70c941 Patch from Dave Russo to wrap arguments array properly: the code has to allocate new Object[] array since Context.newObject needs instances of Object[], not SomeObjectSubclass[], to work properly.
git-svn-id: svn://10.0.0.236/trunk@149092 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 02:18:11 +00:00
igor%mir2.org
4bde27fddc Check in Context.newArray(Scriptable scope, Object[] elements) that elements is instance of Object[] and not SomeObjectSubclass[] to expose broken usage of newArray as soon as possible.
git-svn-id: svn://10.0.0.236/trunk@149091 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 02:14:37 +00:00
rginda%hacksrus.com
3e720e5c9e fixes decoding of ctcp actions when they arrive on a view that is not the current view
git-svn-id: svn://10.0.0.236/trunk@149090 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 01:11:48 +00:00
scott%scott-macgregor.org
09607f0dbc Packaging for xmlextras
git-svn-id: svn://10.0.0.236/trunk@149089 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 00:30:08 +00:00
cbiesinger%web.de
37988be7cf #include <..> -> #include ".."
git-svn-id: svn://10.0.0.236/trunk@149088 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-10 00:01:17 +00:00
cbiesinger%web.de
1b53b28450 fix case of header file (fixes bustage probably)
git-svn-id: svn://10.0.0.236/trunk@149087 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 23:59:11 +00:00
darin%meer.net
dad5e87bbc fixes bug 225016 "make IPC startup handshake (send CLIENT_HELLO, wait for CLIENT_ID) synchronous" r=timeless
git-svn-id: svn://10.0.0.236/trunk@149086 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 23:49:24 +00:00
cbiesinger%web.de
7005e76e72 adding test program to test synchronous open of channels, rs=darin
git-svn-id: svn://10.0.0.236/trunk@149085 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 23:44:02 +00:00
ben%bengoodger.com
3060f3b48d Changing the theme internal name so it actually works in the nightlies.
git-svn-id: svn://10.0.0.236/trunk@149084 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 23:25:56 +00:00
ben%bengoodger.com
1433148a3a Changing the theme internal name so it actually works in nightlies.
git-svn-id: svn://10.0.0.236/trunk@149083 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 23:25:31 +00:00
ben%bengoodger.com
83a9aefd13 Update skin name so the new theme actually works
git-svn-id: svn://10.0.0.236/trunk@149082 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 23:24:23 +00:00
timeless%mozdev.org
5e89622ca2 Bug 225120 Remove compiler warnings
patch by arne.anka@stupido.com r=dbaron sr=bz


git-svn-id: svn://10.0.0.236/trunk@149081 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 22:51:28 +00:00
darin%meer.net
e2d1a317aa fixes bug 224240 "nsURIChecker cleanup" r=biesi sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@149080 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 22:49:57 +00:00
timeless%mozdev.org
c759b31de1 Bug 225005 assign t access key to File>Ge_t Next x News Messages
r=neil sr=roc


git-svn-id: svn://10.0.0.236/trunk@149079 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 22:47:18 +00:00
timeless%mozdev.org
3b577c1f6e Bug 68902 thread-related columns (unread, total) are poorly named
r=neil sr=roc


git-svn-id: svn://10.0.0.236/trunk@149078 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 22:43:13 +00:00
bryner%brianryner.com
9e478314d9 get rid of console window for win32 gcc builds, and limit heap size per bug 127069.
git-svn-id: svn://10.0.0.236/trunk@149077 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 22:17:10 +00:00
chanial%noos.fr
12a3024048 bug 221599 and 225150: remove ununused setter/getter in overrideHandler.js
r=biesi, sr=bz


git-svn-id: svn://10.0.0.236/trunk@149076 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 21:51:59 +00:00
jocuri%softhome.net
9aa27336fa Bug 207211: Editgroups.cgi - template for add a group page; r=myk; a=myk.
git-svn-id: svn://10.0.0.236/trunk@149075 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 21:07:26 +00:00
jshin%mailaps.org
4cc31d9a0d bug 221666 : remove redundant copy of nsComprressedCharMap.* : one more missing file in the last check-in
git-svn-id: svn://10.0.0.236/trunk@149074 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 20:47:11 +00:00
brendan%mozilla.org
b1416c6cce Revise js_DecompileValueGenerator assertion in light of JS_HAS_NO_SUCH_METHOD.
git-svn-id: svn://10.0.0.236/trunk@149073 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 20:31:16 +00:00
jshin%mailaps.org
d18d11141b bug 221666 : checked in the wrong patch(the second latest) in the previous landing. fix bustage : Sorry !
git-svn-id: svn://10.0.0.236/trunk@149072 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 19:48:11 +00:00
danm-moz%comcast.net
b50d625af6 restore removal of blur suppression from rev 1.39 accidentally deleted in rev 1.40. r=bryner
git-svn-id: svn://10.0.0.236/trunk@149071 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 19:14:09 +00:00
jshin%mailaps.org
dd5622d3bd removing 'pollution' gotten sneaked in by mistake (when landing for bug 221024)
git-svn-id: svn://10.0.0.236/trunk@149070 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 19:10:28 +00:00
jshin%mailaps.org
17a9724388 bug 221024 : add a new option for turning invisible chars. to 'nothingness' to the transliterator (r=smontagu, sr=rbs)
git-svn-id: svn://10.0.0.236/trunk@149069 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 18:52:01 +00:00
jshin%mailaps.org
8feb2a89c6 bug 221666 : remove redundant copy of nsCompressedCharMap.* (moved to intl/unicharutil) (r=smontagu, sr=rbs)
git-svn-id: svn://10.0.0.236/trunk@149068 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 18:44:11 +00:00
jshin%mailaps.org
bd4de40729 bug 221666 : remove redundant copy of nsCompressedCharMap.(h|cpp) and move them to intl/unicharutil out of gfx (r=smontagu, sr=rbs)
git-svn-id: svn://10.0.0.236/trunk@149067 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 18:39:19 +00:00
danm-moz%comcast.net
43920f3e19 tweak rev 1.137 to reduce the population of warnings from 2131 back to 2129
git-svn-id: svn://10.0.0.236/trunk@149066 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 16:33:14 +00:00
rlk%trfenv.com
f4e55c82e8 Bug 225180 - Typo in the keyboard shortcuts help section. r=rlk@trfenv.com Patch by Daniel Wang (stolenclover@yahoo.com.tw).
git-svn-id: svn://10.0.0.236/trunk@149065 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 14:54:13 +00:00
bmlk%gmx.de
92bb4f16d7 cosmetics for viewer in xul bug 137331 r/sr dbaron
git-svn-id: svn://10.0.0.236/trunk@149064 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 13:39:14 +00:00
bmlk%gmx.de
02d64302fc issue style change reflow also at the table caption when there is a style change reflow
that is targeted at the inner table frame. This is currently necessary due to bizarre
style contetxt relationsship between inner and outer table frame, bug 222846 r/sr=bzbarsky


git-svn-id: svn://10.0.0.236/trunk@149063 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 11:35:52 +00:00
bmlk%gmx.de
c10d3984b9 dont shrink mRowCount when inserting cells in a row, bug 220536, r/sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@149062 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 08:47:05 +00:00
bzbarsky%mit.edu
0c68306303 Fix bug 101320 -- padding on small border-box sizing things with non-auto
widths is not a good idea.  Very old patch by rods, r=bzbarsky (now),
sr=attinasi (then).  Did I mention this patch is old?


git-svn-id: svn://10.0.0.236/trunk@149061 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 07:40:09 +00:00
bryner%brianryner.com
a235522388 Minor fix to parsing of readelf output. Allow a hyphen in the section name, and allow 6 digit fields (i.e. section size) to be longer than 6 digits. rs=ben.
git-svn-id: svn://10.0.0.236/trunk@149060 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 07:05:21 +00:00
chanial%noos.fr
dfb16601ac Bug 225091: Ctrl+P no longer works
git-svn-id: svn://10.0.0.236/trunk@149059 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 05:49:50 +00:00
jshin%mailaps.org
e262e13b47 bug 225106 : remove redundant charset alias resoultion code (r=smontagu, sr=bz)
git-svn-id: svn://10.0.0.236/trunk@149058 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 05:45:21 +00:00
brendan%mozilla.org
d256e525a6 Restore long-lost obj=null setting so null() etc. (calling primitive-type values) fails as expected, instead of crashing (224956, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@149057 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 03:58:48 +00:00
ben%bengoodger.com
46128f559a Pinstripe for Firebird, new default theme for MacOS X. Contributed by Kevin Gerich (webmail@kmgerich.com), iconography by Stephen Horlander (stephen@noved.org)
git-svn-id: svn://10.0.0.236/trunk@149055 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 03:12:52 +00:00
ben%bengoodger.com
6c1e39c863 Pinstripe for Firebird, default theme on MacOS X. Contributed by Kevin Gerich (webmail@kmgerich.com), iconography by Stephen Horlander (stephen@noved.org)
git-svn-id: svn://10.0.0.236/trunk@149054 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 03:11:48 +00:00
scott%scott-macgregor.org
e1a1b17774 fix mac bustage
git-svn-id: svn://10.0.0.236/trunk@149053 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 01:58:21 +00:00
darin%meer.net
44587374a9 minor IDL tweak to make getNextAddr return PRNetAddr instead -- does not
change the binary interface.  r=botbot


git-svn-id: svn://10.0.0.236/trunk@149052 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 01:29:58 +00:00
bzbarsky%mit.edu
f5402856e3 Follow-up fix for crash bug 118685. Patch by mats.palmgren@bredband.net (Mats
Palmgren), r+sr=bzbarsky


git-svn-id: svn://10.0.0.236/trunk@149051 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-08 23:53:49 +00:00
samuel%sieb.net
95df239711 Bug 220700 - switching tabs should focus input box
r=rginda
chatzilla only


git-svn-id: svn://10.0.0.236/trunk@149050 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-08 23:47:04 +00:00
pschwartau%netscape.com
4416df5723 Adding one more section.
git-svn-id: svn://10.0.0.236/trunk@149049 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-08 23:02:59 +00:00
pschwartau%netscape.com
77709f023c Adding more sections.
git-svn-id: svn://10.0.0.236/trunk@149048 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-08 22:54:19 +00:00
pschwartau%netscape.com
4f34ba5dfb Removing a stray comment.
git-svn-id: svn://10.0.0.236/trunk@149047 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-08 22:50:27 +00:00
pschwartau%netscape.com
d4aebe2650 Initial add. Regression test for bug 224956.
git-svn-id: svn://10.0.0.236/trunk@149046 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-08 22:48:54 +00:00
gerv%gerv.net
ec2f077547 Bug 179339 - Simplify and improve the stored query mechanism. Patch by gerv; r,a=myk.
git-svn-id: svn://10.0.0.236/trunk@149043 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-08 21:49:20 +00:00
bzbarsky%mit.edu
26875d9420 document.config has become document.domConfig to prevent backwards-compat
issues.  Bug 222733, r+sr=jst


git-svn-id: svn://10.0.0.236/trunk@149040 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-08 19:30:30 +00:00
brendan%mozilla.org
4c11bc6c10 Atomize rt->emptyString so '' constants all share it.
git-svn-id: svn://10.0.0.236/trunk@149039 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-08 18:54:33 +00:00
gerv%gerv.net
56591eff6b Bug 225081 - Tests are failing due to checkin for bug 223913. Sorry about that - it worked on my machine, but not any machine without the excluded template. Doh. Patch by gerv; r,a=mozbot.
git-svn-id: svn://10.0.0.236/trunk@149038 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-08 18:51:07 +00:00
gerv%gerv.net
c19f469216 Bug 224913 - Need tests to check whether any templates uses the bareword "bug" or variations. Patch by gerv; r,a=justdave.
git-svn-id: svn://10.0.0.236/trunk@149037 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-08 18:09:28 +00:00
gerv%gerv.net
652b406962 Bug 195530 - Make javascript version of buglists available, part 2. This is a security fix to prevent remote sites being able to see sensitive bug data. Patch by gerv; r=justdave, r=myk, a=justdave.
git-svn-id: svn://10.0.0.236/trunk@149036 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-08 18:04:36 +00:00
cbiesinger%web.de
63fc7c860b bug 223997
PluginHostImpl should use GetTypeFromURI not FromExtension
r=peterlubczynski sr=bz


git-svn-id: svn://10.0.0.236/trunk@149035 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-08 17:01:46 +00:00
chanial%noos.fr
f37d167f0d Bug 224990: search bar is unusuable if the specified searchplugin is not found.
If the search engine is not found, fall back to find in page


git-svn-id: svn://10.0.0.236/trunk@149034 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-08 06:06:11 +00:00
samuel%sieb.net
32add6e021 Bug 224959 - ctrl-pgup and ctrl-pgdn are backwards
r=rginda
chatzilla only


git-svn-id: svn://10.0.0.236/trunk@149033 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-08 04:26:08 +00:00
ben%bengoodger.com
2535c30096 change version number, adjust script to remove timebomb (thanks Simon Paquet)
git-svn-id: svn://10.0.0.236/trunk@149032 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-08 00:33:09 +00:00
gerv%gerv.net
2d1beb3b28 Bug 221160 - crash if illegal date specified in new charts date range. Patch by gerv; r=kiko, a=justdave.
git-svn-id: svn://10.0.0.236/trunk@149031 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-08 00:27:43 +00:00
gerv%gerv.net
bbabf0eed3 Bug 186130 - collectstats.pl doesn't work if 'requirelogin' set. Patch by gerv; r=bbaetz, a=justdave.
git-svn-id: svn://10.0.0.236/trunk@149030 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-08 00:26:41 +00:00
gerv%gerv.net
9dd361788f Bug 222564 - The chart made when creating a new Product/Component is not public. Patch by gerv; r=kiko, a=justdave.
git-svn-id: svn://10.0.0.236/trunk@149029 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-08 00:25:31 +00:00
scott%scott-macgregor.org
f5ef96f82e View / Charsets / Customize dialog is not showing up. Package the right files
git-svn-id: svn://10.0.0.236/trunk@149028 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-08 00:02:03 +00:00
leaf%mozilla.org
2b11c32436 adding rough installer creation hack for release-tinderbox script
git-svn-id: svn://10.0.0.236/trunk@149027 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 23:52:00 +00:00
jocuri%softhome.net
d7ae293839 Bug 225024: Space chomping issue in create.html.tmpl; r=kiko; a=myk.
git-svn-id: svn://10.0.0.236/trunk@149026 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 23:23:55 +00:00
rlk%trfenv.com
b044ce4e43 Removing obsolete files that are not part of the build.
git-svn-id: svn://10.0.0.236/trunk@149025 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 23:08:24 +00:00
pschwartau%netscape.com
f014ff6806 Correcting a mistake in this testcase, discovered by zack-weg@gmx.de. The left and right parens were not balanced!
git-svn-id: svn://10.0.0.236/trunk@149024 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 22:47:34 +00:00
bryner%brianryner.com
f1d4967aef Add mozapps installer makefiles to allmakefiles.sh, and don't build it if --disable-installer was used. Fixes bug 224999. Does not affect the default build.
git-svn-id: svn://10.0.0.236/trunk@149023 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 22:44:35 +00:00
neil%parkwaycc.co.uk
5d89310b66 Bug 113591 Clicking on a link while offline should give instructions to go online p=gautheri@noos.fr r=me sr=brendan
git-svn-id: svn://10.0.0.236/trunk@149022 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 22:35:49 +00:00
igor%mir2.org
0f204cac48 Changes in Security API: using CodeBlock interface instead of reusing Script to represent code that should be executed with different domain.
git-svn-id: svn://10.0.0.236/trunk@149021 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 22:29:59 +00:00
igor%mir2.org
57b838f188 New interface to refer to code executed with a particular context and arguments.
git-svn-id: svn://10.0.0.236/trunk@149020 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 22:28:22 +00:00
igor%mir2.org
77a9f71f13 1. Removal of very recently introduced hideFromContextListeners: it was a wrong solution to the problem of running scripts under independent Context instances on the same thread.
2. Optimization of Context.enter()/Context.exit() when ThreadLocal is available:
Store Context[1], not Context in the variable so  Context.enter()/Context.exit() would need to access ThreadVar only once and then update the reference.


git-svn-id: svn://10.0.0.236/trunk@149019 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 22:24:53 +00:00
igor%mir2.org
01b3ff916d Added setDouble, setString that are used in IRFactory during constant folding
git-svn-id: svn://10.0.0.236/trunk@149018 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 22:18:49 +00:00
igor%mir2.org
add1f6e13c Move all contant folding logic to IRFactory where it simpler to do and possible to reuse tree nodes during folding.
git-svn-id: svn://10.0.0.236/trunk@149017 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 22:17:54 +00:00
scott%scott-macgregor.org
65e5274547 If you are building thunderbird with the dom inspector extension, then add hooks to make sure dom inspector gets overlayed into thunderbird properly.
Part of the work necessary to make a dom inspector extension for thunderbird.


git-svn-id: svn://10.0.0.236/trunk@149016 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 21:29:40 +00:00
despotdaemon%netscape.com
cd12bccd6b Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@149015 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 20:40:11 +00:00
despotdaemon%netscape.com
c3dfaf9d19 Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@149014 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 20:38:16 +00:00
despotdaemon%netscape.com
8db42b8987 Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@149013 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 20:20:35 +00:00
timeless%mozdev.org
e994f0ffcc Bug 222056 Integrate warning fix from Adobe for e_pow.c and e_sqrt.c
Patch by Adobe rs=brendan


git-svn-id: svn://10.0.0.236/trunk@149012 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 19:46:29 +00:00
pinkerton%netscape.com
bc07570b8c don't return when there is no return value for a method (bug 224654)
git-svn-id: svn://10.0.0.236/trunk@149011 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 19:38:24 +00:00
bienvenu%nventure.com
da457bda5d 186578 make escape close the stand-alone msg window, patch by gemal, r=neil.parkwaycc, sr=me
git-svn-id: svn://10.0.0.236/trunk@149010 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 19:32:56 +00:00
mostafah%oeone.com
ecba615a4c Removing DOS type carriage returns
git-svn-id: svn://10.0.0.236/trunk@149009 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 19:18:29 +00:00
scott%scott-macgregor.org
245ef1c0d2 change comment to use //
git-svn-id: svn://10.0.0.236/trunk@149008 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 19:14:06 +00:00
mostafah%oeone.com
c25872914a Synched language files after recent checkin for bug 219589
git-svn-id: svn://10.0.0.236/trunk@149007 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 19:09:16 +00:00
mostafah%oeone.com
f47155e56f Checking in part of patch
http://bugzilla.mozilla.org/attachment.cgi?id=134966&action=view
for bug 219589: Calendar Extension for Thunderbird


git-svn-id: svn://10.0.0.236/trunk@149006 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 18:25:38 +00:00
leaf%mozilla.org
9fc965e189 bug 224768, r=dbaron. update alpha to beta in version strings
git-svn-id: svn://10.0.0.236/trunk@149005 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 18:23:23 +00:00
pschwartau%netscape.com
216114a2ec Patch by zack-weg@gmx.de correcting errors in this testcase. See bug 224951.
git-svn-id: svn://10.0.0.236/trunk@149002 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 18:08:35 +00:00
pschwartau%netscape.com
7649771d19 Rearranging code to make style consistent with other tests in this directory.
git-svn-id: svn://10.0.0.236/trunk@149001 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 18:00:09 +00:00
sicking%bigfoot.com
f064fa0960 Fix build bustage by taking the bug 224331 into account.
git-svn-id: svn://10.0.0.236/trunk@149000 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 17:07:03 +00:00
sicking%bigfoot.com
53d568f224 Bug 213445: Treat not having mParent *or* not having mDocument as not being in the documnt to fix radiobuttons created through sinks other then the html-sink.
r=bryner sr=jst


git-svn-id: svn://10.0.0.236/trunk@148997 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 16:53:46 +00:00
sicking%bigfoot.com
9794c1e527 Bug 224856: Fix nsGenericDOMDataNode::AppendTextTo by not relying on mText.Get1b() being nullterminated
r=peterv sr=jst


git-svn-id: svn://10.0.0.236/trunk@148995 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 16:46:15 +00:00
relyea%netscape.com
9e80d9ec0e Repair error case for DH code in previous patch.
git-svn-id: svn://10.0.0.236/trunk@148991 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 16:21:40 +00:00
igor%mir2.org
cbe9f4c826 Do constant folding during parsing since it is cheap to do that at this stage then in optimizer during separated phase so even the interpreter will take advantage of the folding.
git-svn-id: svn://10.0.0.236/trunk@148990 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 15:58:57 +00:00
rlk%trfenv.com
ea132f7860 Bug 95770 - The help documentation should be formatted in some better way.
certs_prefs_help.xhtml, r=caillon.


git-svn-id: svn://10.0.0.236/trunk@148989 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 15:43:48 +00:00
mostafah%oeone.com
1bb14afcdb Checking in patch,
http://bugzilla.mozilla.org/attachment.cgi?id=134967&action=view
for bug 219589: Calendar Extension for Thunderbird
( Note: shortened a few filenames )


git-svn-id: svn://10.0.0.236/trunk@148987 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 15:10:44 +00:00
bsmedberg%covad.net
6e255c44a2 Use -A instead of -r HEAD to fix tbox build bustage.
git-svn-id: svn://10.0.0.236/trunk@148985 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 14:56:23 +00:00
bsmedberg%covad.net
fc76d5429e Build IPC from the trunk instead of the IPC_BRANCH_20030304 (no bug) r/sr=leaf+darin
Specifying HEAD ensures that existing trees will be moved from the branch to the trunk.


git-svn-id: svn://10.0.0.236/trunk@148984 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 14:29:30 +00:00
bsmedberg%covad.net
0050990907 Moving IPC code from the IPC_BRANCH_20030304 to the trunk. No actual code changes.
r/sr=leaf+darin


git-svn-id: svn://10.0.0.236/trunk@148982 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 13:50:30 +00:00
bsmedberg%covad.net
c7450c45fe CVS removing old location of IPC code. New location is ipc/ipcd. r/sr=leaf+darin
git-svn-id: svn://10.0.0.236/trunk@148981 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 13:13:07 +00:00
neil%parkwaycc.co.uk
8c43a17ef2 Bug 224918 When not using Download Manager, closing progress dialogs doesn't cancel download r=biesi sr=bz
git-svn-id: svn://10.0.0.236/trunk@148980 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 12:27:21 +00:00
ben%bengoodger.com
e14eae8ac1 Add XUL_APP installer to the build _after_ the xpinstall directory is built. r/sr=bryner
git-svn-id: svn://10.0.0.236/trunk@148979 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 10:52:37 +00:00
ben%bengoodger.com
10b4e0ce1e Remove installer from the build here...
git-svn-id: svn://10.0.0.236/trunk@148978 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 10:51:15 +00:00
bryner%brianryner.com
b7dacdff78 Attempting to fix Windows bustage
git-svn-id: svn://10.0.0.236/trunk@148977 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 10:16:36 +00:00
bryner%brianryner.com
05acc6f72e Inline nsIContent::GetParent() and GetDocument(). Also, remove unused return value on SetParent(). Bug 224331, r=sicking, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@148976 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 09:47:23 +00:00
ben%bengoodger.com
717c4fbbbf Don't build seamonkey installer FE for XUL_APPs. r/sr=bryner
git-svn-id: svn://10.0.0.236/trunk@148975 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 09:20:16 +00:00
bryner%brianryner.com
ff805e4a74 Don't --disable-installer.
git-svn-id: svn://10.0.0.236/trunk@148974 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 08:38:11 +00:00
jocuri%softhome.net
cc8d5406b3 Bug 198460: Better wording for create account to stress valid email address; r=kiko; a=justdave.
git-svn-id: svn://10.0.0.236/trunk@148973 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 08:27:12 +00:00
jocuri%softhome.net
75fce9c684 Bug 219475: The check for null db entries in process_bug.cgi is wrong; patch by Chuck Duvall <caduvall@glue.umd.edu>; r=bbaetz; a=justdave.
git-svn-id: svn://10.0.0.236/trunk@148968 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 08:05:01 +00:00
scott%scott-macgregor.org
8b0b941e3c add an id for the js console menu item
git-svn-id: svn://10.0.0.236/trunk@148967 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 06:44:56 +00:00
scott%scott-macgregor.org
b08c762815 remove access key for windows menu item on the mac
git-svn-id: svn://10.0.0.236/trunk@148962 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 06:21:57 +00:00
bienvenu%nventure.com
864dfd8a13 follow on fix to 195047, only one server gets junk mail purged, r/sr=mscott
git-svn-id: svn://10.0.0.236/trunk@148956 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 05:31:15 +00:00
chanial%noos.fr
18a4a9a862 add browser.search.defaultengine to the pref sanctuary
git-svn-id: svn://10.0.0.236/trunk@148954 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 05:00:06 +00:00
bzbarsky%mit.edu
26efc205f6 Strip quotes from inside col/row-specs (where there should be no quotes to
start with, but some sites just code like that).  Bug 224598, patch by
mats.palmgren@bredband.net (Mats Palmgren), r+sr=bzbarsky


git-svn-id: svn://10.0.0.236/trunk@148952 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 04:26:30 +00:00
chanial%noos.fr
8bc8fb24f1 fix bustage: build the win installer on windows only
git-svn-id: svn://10.0.0.236/trunk@148951 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 04:10:29 +00:00
relyea%netscape.com
0d72b0de0c Verify Parameters from the user before passing it on to freebl. r=nelson
git-svn-id: svn://10.0.0.236/trunk@148950 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 03:38:59 +00:00
relyea%netscape.com
17656b6e76 Add defines for DH and RSA key limits
git-svn-id: svn://10.0.0.236/trunk@148949 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 03:36:33 +00:00
bzbarsky%mit.edu
2bb01b1cd9 Fix crash bug 118685. Patch by mats.palmgren@bredband.net (Mats Palmgren),
r=bryner, sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@148948 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 03:35:05 +00:00
bzbarsky%mit.edu
c681a0e72f Bail out early if we have no area to invalidate anyway. Bug 224871, r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@148947 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 03:00:30 +00:00
ben%bengoodger.com
13a9ad61ab Turn it all on!
git-svn-id: svn://10.0.0.236/trunk@148946 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 02:46:05 +00:00
ben%bengoodger.com
2675704110 last updates
git-svn-id: svn://10.0.0.236/trunk@148945 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 02:31:10 +00:00
ben%bengoodger.com
99f9e22c27 Last script updates
git-svn-id: svn://10.0.0.236/trunk@148944 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 02:31:01 +00:00
danm-moz%comcast.net
6ee880a259 don't focus the parent of the window being closed if that parent is the hidden window. this reinstates rev 1.52, bug 22658. now bug 224058. r=ere, roc
git-svn-id: svn://10.0.0.236/trunk@148940 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 02:13:32 +00:00
ben%bengoodger.com
90e021b981 Final changes!
git-svn-id: svn://10.0.0.236/trunk@148939 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 02:07:33 +00:00
ben%bengoodger.com
9cab3f310b More updates...
git-svn-id: svn://10.0.0.236/trunk@148938 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 01:52:16 +00:00
nelsonb%netscape.com
cc3be11c3e Correct the validity checks on certain ASN.1 objects, allowing some that
were previous disallowed, and vice versa.  Bug 53339.


git-svn-id: svn://10.0.0.236/trunk@148937 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 01:41:22 +00:00
bienvenu%nventure.com
ad4fbe6192 junk folder purging only works on one account, r/sr=mscott 195047
git-svn-id: svn://10.0.0.236/trunk@148936 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 01:33:01 +00:00
bzbarsky%mit.edu
01ddaaaaa3 Fix some CSS errors
git-svn-id: svn://10.0.0.236/trunk@148935 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 01:26:51 +00:00
chanial%noos.fr
332b9f5ea6 pref save_print_settings is no more.
git-svn-id: svn://10.0.0.236/trunk@148934 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 01:24:16 +00:00
sicking%bigfoot.com
fb42908c6e Make buster build again. Not part of build.
Patch by Pike. r=me


git-svn-id: svn://10.0.0.236/trunk@148933 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-07 00:21:08 +00:00
timeless%mozdev.org
b7e5034597 Bug 224901 oom crash in MakeContentObject for form controls
r=dbaron sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@148932 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 23:10:45 +00:00
jocuri%softhome.net
e93919c453 Bug 155119: reassigning bugs to a product with no components gives 'browser' error; patch by Chuck Duvall <caduvall@glue.umd.edu>; r=bbaetz; a=justdave.
git-svn-id: svn://10.0.0.236/trunk@148931 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 21:55:25 +00:00
despotdaemon%netscape.com
c49b696468 Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148930 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 20:47:28 +00:00
mvl%exedo.nl
da65c926f9 Whitespace only change, to indicate that the previous comment was supposed to be:
Ignore the port when checking permissions. Bug 200644, r=dwitte, sr=darin


git-svn-id: svn://10.0.0.236/trunk@148927 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 20:25:13 +00:00
mvl%exedo.nl
6a86068833 Put back a line that shouldn't have been removed for bug 161130
git-svn-id: svn://10.0.0.236/trunk@148926 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 20:21:05 +00:00
bsmedberg%covad.net
993a59a794 Bug 224840 (regression from bug 212222) - the alpha sort is a reverse sort... rs=darin
git-svn-id: svn://10.0.0.236/trunk@148925 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 20:11:01 +00:00
dwitte%stanford.edu
9d98c5f605 #223782
r=jst, sr=darin
remove support for dom.disable_cookie_[get,set] prefs


git-svn-id: svn://10.0.0.236/trunk@148924 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 19:50:58 +00:00
mkaply%us.ibm.com
6ab2ee91d4 #223782
r=jst, sr=darin
remove support for dom.disable_cookie_[get,set] prefs


git-svn-id: svn://10.0.0.236/trunk@148923 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 19:35:22 +00:00
bienvenu%nventure.com
183e7b68e2 fix 54911 news posting sometimes goes to wrong news server, patch by ch.ey@gmx.net r=me, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@148922 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 19:32:01 +00:00
mkaply%us.ibm.com
f950023966 #152264
r=jshin, sr=blizzard
zh-HK support for firebird and thunderbird


git-svn-id: svn://10.0.0.236/trunk@148921 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 19:24:32 +00:00
despotdaemon%netscape.com
a4f14f794c Pseudo-automatic update of changes made by scott@scott-macgregor.org.
git-svn-id: svn://10.0.0.236/trunk@148920 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 19:19:24 +00:00
mkaply%us.ibm.com
2cc472decb #152264
r=jshin, sr=blizzard
zh-HK support for firebird and thunderbird


git-svn-id: svn://10.0.0.236/trunk@148919 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 18:57:39 +00:00
chanial%noos.fr
ddf211e154 cvs remove the obsolete wizard manager, thanks to the work by Stefan Borggraefe <borggraefe@despammed.com>, neil and timeless.
Great !!!


git-svn-id: svn://10.0.0.236/trunk@148918 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 18:40:43 +00:00
scott%scott-macgregor.org
c9843ab265 Bug #224380 --> some items in message menu should be disabled if no messages are selected
thanks to mbr for the fix

r=bienvenu
sr=mscott


git-svn-id: svn://10.0.0.236/trunk@148917 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 18:31:39 +00:00
scott%scott-macgregor.org
40429ca5cf Bug #224380 --> some items in message menu should be disabled if no messages are selected
thanks to mbr for the fix


git-svn-id: svn://10.0.0.236/trunk@148916 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 18:30:03 +00:00
scott%scott-macgregor.org
d44644c408 try to remove ctrl-m's
git-svn-id: svn://10.0.0.236/trunk@148915 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 17:12:39 +00:00
scott%scott-macgregor.org
eefb731d54 window menu for OSX tweaks. Thanks to Don Crandall for the patch
git-svn-id: svn://10.0.0.236/trunk@148914 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 16:39:48 +00:00
bienvenu%nventure.com
fd210fc968 fix problem creating local folder .msf file if missing, 224849 r/sr=mscott
git-svn-id: svn://10.0.0.236/trunk@148913 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 16:28:44 +00:00
bzbarsky%mit.edu
4bd928df94 Fixing invalid CSS
git-svn-id: svn://10.0.0.236/trunk@148912 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 16:20:15 +00:00
bzbarsky%mit.edu
598a8ea1a7 Only paint the image if its computed width or height is nonzero. Otherwise, we
may divide by zero when computing the transform matrix.  Bug 221975, r+sr=roc


git-svn-id: svn://10.0.0.236/trunk@148910 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 16:03:34 +00:00
timeless%mozdev.org
ba3b1d547f Bug 224657 errors in pref-advanced.xul when @mozilla.org/oji/jvm-config-mgr;1 or @mozilla.org/system-preference-service;1 are unavailable
r=neil sr=roc


git-svn-id: svn://10.0.0.236/trunk@148909 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 15:24:11 +00:00
timeless%mozdev.org
750b50e414 Bug 220891 Create Profile Wizard overhaul
patch by borggraefe@despammed.com r=neil sr=roc


git-svn-id: svn://10.0.0.236/trunk@148908 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 14:10:13 +00:00
timeless%mozdev.org
c833710ea6 Bug 220891 Create Profile Wizard overhaul
patch by borggraefe@despammed.com r=neil sr=roc


git-svn-id: svn://10.0.0.236/trunk@148907 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 13:33:51 +00:00
ben%bengoodger.com
b7b76bfa9a Don't build downloading code just now.
git-svn-id: svn://10.0.0.236/trunk@148906 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 09:52:01 +00:00
ben%bengoodger.com
ff992922ab Making the uninstaller work...
git-svn-id: svn://10.0.0.236/trunk@148905 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 09:44:14 +00:00
ben%bengoodger.com
334b4092f1 make the uninstaller work
git-svn-id: svn://10.0.0.236/trunk@148904 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 09:31:41 +00:00
ere%atp.fi
f13d627774 Fix for bug 200152: Clean up usage of nsImapProtocol::m_imapThreadIsRunning
r=bienvenu
sr=mscott


git-svn-id: svn://10.0.0.236/trunk@148903 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 08:57:53 +00:00
ben%bengoodger.com
c0630d86a0 Notes
git-svn-id: svn://10.0.0.236/trunk@148902 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 08:43:48 +00:00
ben%bengoodger.com
2cc71aed06 String updates
git-svn-id: svn://10.0.0.236/trunk@148901 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 08:39:50 +00:00
ben%bengoodger.com
a631b2d36a More Wizardy Goodness.
git-svn-id: svn://10.0.0.236/trunk@148900 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 08:39:37 +00:00
ben%bengoodger.com
a8d3933631 Getting closer and closer to NGInstaller1.0 every day...
git-svn-id: svn://10.0.0.236/trunk@148899 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 07:55:44 +00:00
chanial%noos.fr
7b4a062be0 cvs remove unused files.
(including pref-bidi.dtd, not part of any build see bug 79675)


git-svn-id: svn://10.0.0.236/trunk@148898 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 07:10:01 +00:00
scott%scott-macgregor.org
137209af36 more hidden window tweaks to disable some more items on the mac.
Thanks to Don Crandall for the fix.


git-svn-id: svn://10.0.0.236/trunk@148897 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 06:55:02 +00:00
scott%scott-macgregor.org
6051b8b036 OSX only: add a Windows menu item to the mac build to keep track of all open windows.
Thanks to Don Crandall for the patch!


git-svn-id: svn://10.0.0.236/trunk@148895 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 06:23:28 +00:00
pete.zha%sun.com
199b26fc47 bug 124029 Roaming - 4.x-HTTP-compatible
This is attachment 125933 of this bug
r=darin, sr=bz-vacation


git-svn-id: svn://10.0.0.236/trunk@148894 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 06:03:14 +00:00
rlk%trfenv.com
bc057f7706 Bug 220510 - Help Search: "IMAP" matches "Adding Pictures (Images) to Your Web Page". r=rlk@trfenv.com. Patch by Daniel Wang (stolenclover@yahoo.com.tw)
git-svn-id: svn://10.0.0.236/trunk@148891 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 02:39:53 +00:00
nelsonb%netscape.com
5d09f63ecc Fix some bugs in the code that formats OIDs for printing.
Bugscape bug 53334.


git-svn-id: svn://10.0.0.236/trunk@148890 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 02:02:32 +00:00
chanial%noos.fr
b7bdfc31df fix savePrintSettngs caller in showPrintProgress
git-svn-id: svn://10.0.0.236/trunk@148889 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 01:54:46 +00:00
chanial%noos.fr
eb6dab4262 fix typo
git-svn-id: svn://10.0.0.236/trunk@148884 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-06 00:47:32 +00:00
timeless%mozdev.org
714d0a4cf6 Bug 224087 IS_CJ_CHAR should not return true for u > 0xFFEF
r=smontagu sr=roc


git-svn-id: svn://10.0.0.236/trunk@148883 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 22:28:18 +00:00
timeless%mozdev.org
e1dd0aa609 Bug 223707 IS_CJK_CHAR should not return true for u > 0xFFEF
r=smontagu sr=roc


git-svn-id: svn://10.0.0.236/trunk@148882 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 22:28:14 +00:00
timeless%mozdev.org
369789aeb2 Bug 224215 Edit Attribute says "Enter the attribute name" instead of "Enter the attribute value"
r=caillon sr=heikki


git-svn-id: svn://10.0.0.236/trunk@148881 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 22:27:34 +00:00
timeless%mozdev.org
83b15b1d1b Bug 211266 void nsHTMLEntities::AddRefTable doesn't check the return value of PL_DHashTableInit
r=axel sr=heikki


git-svn-id: svn://10.0.0.236/trunk@148880 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 22:11:55 +00:00
chanial%noos.fr
ed4db1d586 keep the initial _onExitCallback when the PP page is reflown.
git-svn-id: svn://10.0.0.236/trunk@148879 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 21:46:45 +00:00
pinkerton%netscape.com
3f91eed8d5 merge more changes from chimera branch, fixed printing crash and sets dpi to
96dpi instead of 84dpi (bug 208920)


git-svn-id: svn://10.0.0.236/trunk@148878 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 21:37:58 +00:00
timeless%mozdev.org
b0eef727dd Bug 188800 js errors on addressing pref panel with --disable-ldap, address collection prefs broken
patch by borggraefe@despammed.com r=timeless sr=dmose


git-svn-id: svn://10.0.0.236/trunk@148877 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 21:13:47 +00:00
timeless%mozdev.org
b411cf6fab Bug 224127 warning: `int posix_locale_category[6]' defined but not used in nsLocaleService.cpp
r=smontagu sr=peterv


git-svn-id: svn://10.0.0.236/trunk@148876 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 21:12:10 +00:00
chanial%noos.fr
7606621add PRINTPROMPTSVC.showPageSetup() isn't clever enough to return a boolean.
git-svn-id: svn://10.0.0.236/trunk@148875 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 21:08:04 +00:00
chanial%noos.fr
cca188ddf7 correct routine name mismatch.
git-svn-id: svn://10.0.0.236/trunk@148874 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 21:01:48 +00:00
chanial%noos.fr
d5c9b0ed19 bug 224399: fix the print toolbar button. I missed an occurence of BrowserPrint(). Use of the command system and rename Browser:Print to cmd_print.
git-svn-id: svn://10.0.0.236/trunk@148873 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 20:45:34 +00:00
chanial%noos.fr
214c142de1 rename updateSettings to updateToolbar.
git-svn-id: svn://10.0.0.236/trunk@148872 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 20:35:09 +00:00
mostafah%oeone.com
d280987c2a Updated licenses. Removed extra white-spaces.
git-svn-id: svn://10.0.0.236/trunk@148870 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 18:02:03 +00:00
bzbarsky%mit.edu
a8b6d7c39d Hold a strong ref to the node we plan to remove, since we want to use it after
removing it from the tree.  Bug 221494, r+sr=jst


git-svn-id: svn://10.0.0.236/trunk@148869 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 17:54:46 +00:00
pinkerton%netscape.com
604427b585 make search bar part of default toolbar
git-svn-id: svn://10.0.0.236/trunk@148868 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 17:16:57 +00:00
timeless%mozdev.org
9e5f611907 Bug 49813 "threadsafe" nsDirectoryIndexStream uses nsDirEnumeratorUnix triggering "not thread-safe" assertion
r=darin sr=darin


git-svn-id: svn://10.0.0.236/trunk@148864 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 12:39:05 +00:00
timeless%mozdev.org
36ef811264 Bug 224644 crash (pressing backspace) [@ nsTypeAheadFind::BackOneChar]
r=caillon sr=darin


git-svn-id: svn://10.0.0.236/trunk@148863 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 11:36:41 +00:00
scott%scott-macgregor.org
c2f8b5ea9a fix ctrl-m
git-svn-id: svn://10.0.0.236/trunk@148862 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 07:49:59 +00:00
scott%scott-macgregor.org
cbbcd7d2c7 add a new line
git-svn-id: svn://10.0.0.236/trunk@148861 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 07:25:15 +00:00
ben%bengoodger.com
2743d67cab Ongoing updates...
git-svn-id: svn://10.0.0.236/trunk@148860 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 07:01:42 +00:00
nelsonb%netscape.com
478d713628 Grow handshake message buffer once per message, not once per each message
segment received.  Bugscape bug 53418.


git-svn-id: svn://10.0.0.236/trunk@148858 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 06:22:57 +00:00
bryner%brianryner.com
2097395338 Speed up mapping HTML tag enums to atoms by using an array of static atoms, indexed by enum value. This avoids a UTF16 to UTF8 conversion and atom table lookup for each tag. Add a CString version of nsINodeInfoManager::GetNodeInfo(), convert literal string callers to use that version, and remove some unused variants of GetNodeInfo(). Bug 223595, r=axel@pike.org, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@148857 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 05:17:07 +00:00
bzbarsky%mit.edu
10b1f4affb Adding style/bugs to regression tests
git-svn-id: svn://10.0.0.236/trunk@148856 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 05:01:00 +00:00
bzbarsky%mit.edu
5459f65950 Adding css parsing regression tests.
git-svn-id: svn://10.0.0.236/trunk@148855 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 05:00:14 +00:00
bzbarsky%mit.edu
460c4b1716 Fix parsing regression bug 224737. Patch by mats.palmgren@bredband.net (Mats
Palmgren), r+sr=bzbarsky


git-svn-id: svn://10.0.0.236/trunk@148854 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 04:51:17 +00:00
bzbarsky%mit.edu
04fa1dd734 Fix crash in DoCleanupFrameReferences. Bug 224091, patch by
mats.palmgren@bredband.net (Mats Palmgren), r=bzbarsky, sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@148853 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 04:40:52 +00:00
pschwartau%netscape.com
6899ed88e9 Initial add. Regression test for bug 224676.
git-svn-id: svn://10.0.0.236/trunk@148852 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 04:08:11 +00:00
timeless%mozdev.org
859d9fdc4e Bug 207865 ASSERTION: unable to normalize attribute name: 'NS_SUCCEEDED(rv)', file i:/build/mozilla/content/xul/content/src/nsXULElement.cpp, line 1301
r=neil sr=darin


git-svn-id: svn://10.0.0.236/trunk@148851 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 01:17:04 +00:00
brendan%mozilla.org
fa2d921b3b Patch from Neil Deakin <enndeakin@sympatico.ca> to fix overlong button underlines (214956, r+sr=dbaron).
git-svn-id: svn://10.0.0.236/trunk@148850 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 00:05:10 +00:00
sicking%bigfoot.com
3c192bc112 Bug 224727: Make IBM doctype trigger quirks mode rather then almost standards.
r=mkaply sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@148849 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 23:50:18 +00:00
dwitte%stanford.edu
32492a98fc removing redundant variable as a result of my previous checkin.
git-svn-id: svn://10.0.0.236/trunk@148848 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 23:15:22 +00:00
neil%parkwaycc.co.uk
c03e99e062 Bug 224608 Remove shortcut keys from context menus r=timeless sr=darin
git-svn-id: svn://10.0.0.236/trunk@148847 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 23:10:48 +00:00
bienvenu%nventure.com
b4047ebde5 fix problem importing mailing lists from outlook, patch by wind.li@sun.com, r=me, sr=mscott 149961
git-svn-id: svn://10.0.0.236/trunk@148846 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 22:46:40 +00:00
dwitte%stanford.edu
ee1a82264b remove support for dom.disable_cookie_{get,set} prefs.
b=223782, r=jst,caillon, sr=alecf,darin (yes really, four reviews).


git-svn-id: svn://10.0.0.236/trunk@148845 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 22:44:51 +00:00
scott%scott-macgregor.org
5237bf2431 add missing file
git-svn-id: svn://10.0.0.236/trunk@148844 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 22:22:45 +00:00
dbaron%dbaron.org
a469492c6e Local BSD/OS-only change on otaku.
git-svn-id: svn://10.0.0.236/trunk@148843 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 22:14:12 +00:00
neil%parkwaycc.co.uk
c06eb8249d Bug 224449 Clicking Cancel before Pause doesn't close download window p=bz r=biesi sr=darin
git-svn-id: svn://10.0.0.236/trunk@148842 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 21:33:17 +00:00
neil%parkwaycc.co.uk
f97c93aa70 Bug 224672 re-comment out dummy code that changes map name r=glazou sr=bz
git-svn-id: svn://10.0.0.236/trunk@148841 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 21:23:12 +00:00
cbiesinger%web.de
2070383715 remove unnecessary semicolon which breaks the build for some gcc versions.
no bug, rs=bsmedberg


git-svn-id: svn://10.0.0.236/trunk@148840 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 20:51:08 +00:00
bienvenu%nventure.com
23976963f8 fix 4x ab migration when pab doesn't have a filename set, r/sr=mscott 224714
git-svn-id: svn://10.0.0.236/trunk@148839 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 20:31:04 +00:00
despotdaemon%netscape.com
69bf6a8697 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148837 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 17:54:18 +00:00
peter%propagandism.org
029eafb940 Removing obsolete files (renamed to txNodeSet.*). Bug 151002. r=sicking.
git-svn-id: svn://10.0.0.236/trunk@148836 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 16:15:56 +00:00
peter%propagandism.org
c616d0358e Merging whitespace changes/renames/cleanup from TX_WALKER_BRANCH to ease merging, no functional changes. Bug 151002. r=sicking.
git-svn-id: svn://10.0.0.236/trunk@148835 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 16:06:42 +00:00
tor%cs.brown.edu
2655f63ca9 Bug 224628 - backout part of 212366 so that scrolling=no works. r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@148834 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 15:50:09 +00:00
peter%propagandism.org
c9c81b9fe5 Merging whitespace changes/renames/cleanup from TX_WALKER_BRANCH to ease merging, no functional changes. Bug 151002. r=sicking.
git-svn-id: svn://10.0.0.236/trunk@148833 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 15:15:46 +00:00
igor%mir2.org
9e8aa2c915 ClassRepository is removed from list of API classes to allow to replace it in future by direct access to optimizer.
git-svn-id: svn://10.0.0.236/trunk@148832 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 14:55:58 +00:00
igor%mir2.org
471769ba50 Adjusting examples not to assume that Context.initStandardObjects(ScriptableObject) returns ScriptableObject since that was changed back to Scriptable for compatibility.
git-svn-id: svn://10.0.0.236/trunk@148831 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 14:54:43 +00:00
igor%mir2.org
38b90d7dae Removal of initStandardObjects(boolean) not to proliferate versions of initStandardObjects: if Rhino would support recursive object sealing, it would not be necessary to call initStandardObjects with sealed flag at all.
git-svn-id: svn://10.0.0.236/trunk@148830 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 14:52:48 +00:00
igor%mir2.org
848e34384a JavaDoc @link fixes
git-svn-id: svn://10.0.0.236/trunk@148829 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 14:49:20 +00:00
neil%parkwaycc.co.uk
253d61b03d Bug 216154 Anchors in e-mails are broken p=andreas.otte@debitel.net r=bienvenu sr=bz
git-svn-id: svn://10.0.0.236/trunk@148828 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 11:23:34 +00:00
peter%propagandism.org
75c5558f07 Merging whitespace changes/renames/cleanup from TX_WALKER_BRANCH to ease merging, no functional changes. Bug 151002. r=sicking.
git-svn-id: svn://10.0.0.236/trunk@148827 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 10:13:23 +00:00
peter%propagandism.org
67008b2fb8 Adding copies of trunk version of NodeSet.* (to ease merging of TX_WALKER_BRANCH). r=sicking.
git-svn-id: svn://10.0.0.236/trunk@148826 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 09:53:16 +00:00
bryner%brianryner.com
09394d6d94 Remove ^M characters. This should fix redwood as a side effect.
git-svn-id: svn://10.0.0.236/trunk@148825 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 07:57:54 +00:00
bryner%brianryner.com
610e8a8f4d Force autoregister on the first run after completing a build (even for optimized builds) like seamonkey does.
git-svn-id: svn://10.0.0.236/trunk@148824 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 07:42:52 +00:00
ben%bengoodger.com
9657567536 ngoing work...
git-svn-id: svn://10.0.0.236/trunk@148823 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 06:52:53 +00:00
ben%bengoodger.com
caa51e9e3d Some new script fu... ongoing work in progress
git-svn-id: svn://10.0.0.236/trunk@148822 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 06:52:31 +00:00
wchang0222%aol.com
7f33747a06 Set NSS version to 3.9 Beta 2.
git-svn-id: svn://10.0.0.236/trunk@148820 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 05:52:51 +00:00
chanial%noos.fr
f44572db80 Bug 223390: "Save as" and "Save Link as..." save gzipped content when server uses gzip transfer-encoding. porting fix from the suite. Patch by bz. Thanks Jesse!
git-svn-id: svn://10.0.0.236/trunk@148819 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 05:31:55 +00:00
pinkerton%netscape.com
d38dbbb3c5 craft search urls so they support utf8 (bug 201642)
git-svn-id: svn://10.0.0.236/trunk@148818 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 05:08:46 +00:00
chanial%noos.fr
cc2fcd4d3b bug 224569: Cookie Manager and Exceptions window should remember column size. patch by Steffen Wilberg <steffen.wilberg@web.de> r=me.
some flex tweaking, also


git-svn-id: svn://10.0.0.236/trunk@148817 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 05:02:35 +00:00
chanial%noos.fr
6fd6ce1f71 bug 224453: Alt-F4 and close button should return to normal mode (IE behavior)
git-svn-id: svn://10.0.0.236/trunk@148815 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 04:18:57 +00:00
bienvenu%nventure.com
917670a6c4 additional fix for 223560, clean up ldap server migration, fix handling of ifdef ldap, r/sr=mscott
git-svn-id: svn://10.0.0.236/trunk@148814 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 03:56:10 +00:00
scott%scott-macgregor.org
787ad9b579 Bug #224514 --> automate locale version based on milestone.txt for mozilla/toolkit.
git-svn-id: svn://10.0.0.236/trunk@148813 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 03:51:25 +00:00
bzbarsky%mit.edu
a39be782a9 Correctly ignore adjacent type selectors with no combinator. Bug 224188,
r+sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@148812 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 03:16:10 +00:00
bzbarsky%mit.edu
aceed1b6c9 Treat any 1xx response like a 100 response. Bug 224537, r+sr=darin
git-svn-id: svn://10.0.0.236/trunk@148809 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 02:20:54 +00:00
nelsonb%netscape.com
463a2092db Fix numerous errors (mostly off-by-1 errors) in the code that formats
and prints certs and CRLs.  This code is common to certutil and pp.
Bug 222568  r=nicholson (for this portion).


git-svn-id: svn://10.0.0.236/trunk@148808 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 02:16:42 +00:00
bzbarsky%mit.edu
d7a72652a6 Refactor child element handling such that we don't duplicate event-firing code
all over (now we just do it in nsGenericElement and nsXULElement).  Bug 223349,
r=sicking, sr=peterv


git-svn-id: svn://10.0.0.236/trunk@148807 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 02:15:28 +00:00
bryner%brianryner.com
c9485be544 Convert imgContainerGIF to use nsCOMArray instead of nsSupportsArray. Bug 224621, r=darin, sr=tor.
git-svn-id: svn://10.0.0.236/trunk@148806 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 02:14:11 +00:00
bzbarsky%mit.edu
919f3f5dbd Fix crash when frameset is wiped out before onload events on all subframes have
fired.  Bug 212563, r+sr=jst


git-svn-id: svn://10.0.0.236/trunk@148805 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 02:01:23 +00:00
nelsonb%netscape.com
fb006ec133 Better cleanup. Plug leaks in pp. bug 222568. r=nicolson (this part).
git-svn-id: svn://10.0.0.236/trunk@148804 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 01:51:54 +00:00
nelsonb%netscape.com
deea9f0bcc Rename get_oid_string to CERT_GetOidString and export it. Also, export
CERT_DestroyOidSequence.  bug 222568.  r=jpierre (for this portion).


git-svn-id: svn://10.0.0.236/trunk@148803 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 01:48:39 +00:00
bryner%brianryner.com
915fd04e9a fix for mac blocker bug 224526. Make sure to initialize the widget atoms. r=brendan.
git-svn-id: svn://10.0.0.236/trunk@148802 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-04 01:08:48 +00:00
pinkerton%netscape.com
ae921f1c21 fix gap between personal toolbar and tab widget on panther only (bug 223667)
git-svn-id: svn://10.0.0.236/trunk@148789 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 21:00:24 +00:00
igor%mir2.org
746691406d Return type of Context.initStandardObject(ScriptableObject) is changed back to Scriptable for binary compatibility.
git-svn-id: svn://10.0.0.236/trunk@148788 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 20:42:32 +00:00
brendan%mozilla.org
b9033758e9 Move ComputeThis call up in js_Invoke so __noSuchMethod__ sees the correct |this| parameter.
git-svn-id: svn://10.0.0.236/trunk@148787 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 20:23:23 +00:00
ben%bengoodger.com
7215df0ff6 Only run browser if user asks for it to be run.
git-svn-id: svn://10.0.0.236/trunk@148786 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 20:19:30 +00:00
igor%mir2.org
d61415fb2f Removal of possibility to alter JavaAdapter through an external property as such functionality is redundant and can be emulated with altering JavaAdapter in the scope object after Context.initStandardObjects returns.
git-svn-id: svn://10.0.0.236/trunk@148785 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 19:58:17 +00:00
igor%mir2.org
8c653daa23 Use reflection to access JavaAdapter to allow to use NativeJavaObject with JavaAdapter classes absent.
git-svn-id: svn://10.0.0.236/trunk@148784 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 19:55:37 +00:00
pinkerton%netscape.com
cead6f7e8a don't run bookmark menu building code on separate thread as it would case
re-entrancy crashes at startup.


git-svn-id: svn://10.0.0.236/trunk@148783 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 19:54:43 +00:00
varga%nixcorp.com
b14757b0a9 Fix for bug 223530. null pointer dereference in nsTreeContentView.cpp [@ nsTreeContentView::ContentRemoved ]
r=me sr=bz patch by Nate Nielsen <nielsen@memberwebs.com>


git-svn-id: svn://10.0.0.236/trunk@148782 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 19:11:50 +00:00
igor%mir2.org
c420a49900 When converting function to Java interface and checking for the previous wrapping, do not use key stored in ClassCache.javaAdapterIFGlueMasters as it can be thrown away when caches are emptied and instead construct a key object from the passed class and uniqueness tag.
git-svn-id: svn://10.0.0.236/trunk@148781 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 18:15:00 +00:00
igor%mir2.org
d704d3894e In NativeJavaClass.constructSpecific use passed scope, not function pointer as scope source so shared system scope with custom top scope and custom wrap factory would work.
git-svn-id: svn://10.0.0.236/trunk@148780 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 18:06:49 +00:00
igor%mir2.org
b1fef85354 Added Kit.makeHashKeyFromPair to make combined key for hashtables from 2 objects
git-svn-id: svn://10.0.0.236/trunk@148779 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 18:04:27 +00:00
brendan%mozilla.org
586e904858 Fiddle a bit cosmetically to make arena member comparisons have the same form; add a comment.
git-svn-id: svn://10.0.0.236/trunk@148778 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 17:47:43 +00:00
blizzard%redhat.com
78b3eb75ae Bug #213734. Browser crashes when loading URL [@ XftDrawGlyphFontSpec ][@ nsFontMetricsXft::DrawString ]. Make sure to use the length of the spec buffer, not the length of the string in determining how many glyphs to render. r=jshin, sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@148777 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 17:44:54 +00:00
bsmedberg%covad.net
d806a6edb3 Bug 212222 - Load default prefs from the GRE and from the application. r/sr=alecf/darin
NOTE: This is only the backend work necessary to load prefs. The actual separation of prefs into application/embedding will happen in another bug.


git-svn-id: svn://10.0.0.236/trunk@148776 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 16:46:13 +00:00
scott%scott-macgregor.org
3c1974bae3 fix ctrl-M's in file
git-svn-id: svn://10.0.0.236/trunk@148775 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 16:43:36 +00:00
mostafah%oeone.com
fa04662bd8 Updated Polish Translation files
git-svn-id: svn://10.0.0.236/trunk@148774 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 15:48:34 +00:00
bsmedberg%covad.net
066cb26c94 Make the Mozilla build configurator ouput the correct results for --enable-chrome-format. This
does not affect the generated configure script.


git-svn-id: svn://10.0.0.236/trunk@148773 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 15:26:51 +00:00
peter%propagandism.org
c93c90cbe4 Add back $.
git-svn-id: svn://10.0.0.236/trunk@148772 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 14:56:14 +00:00
peter%propagandism.org
83f0d0bc2b Remove weird wrapping that mscott checked in
git-svn-id: svn://10.0.0.236/trunk@148771 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 14:44:04 +00:00
axel%pike.org
97b0319c52 bug 204727, p3p stylesheet cleanup, factor 5 stylesheets into one generating 5 to be packed with XUL preprocessor, r=bryner, sr=heikki
git-svn-id: svn://10.0.0.236/trunk@148770 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 13:57:35 +00:00
timeless%mozdev.org
294fb79290 Bug 224088 warning: unused variable nsresult rv' in member function nsDocShellEditorData::~nsDocShellEditorData()'
r=glazou sr=peterv


git-svn-id: svn://10.0.0.236/trunk@148769 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 13:18:38 +00:00
timeless%mozdev.org
6e60b330e4 Bug 224018 unused variables gDumpFileNameCnt, gDumpLOFileNameCnt in nsDocumentViewer.cpp
r=jst sr=jst


git-svn-id: svn://10.0.0.236/trunk@148768 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 13:17:00 +00:00
timeless%mozdev.org
58cd7cec22 Bug 116413 negative VoidArray index in GetMenuAt() in View menu on Mac
r=jfrancis sr=jst


git-svn-id: svn://10.0.0.236/trunk@148767 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 13:14:45 +00:00
timeless%mozdev.org
761d6b8d97 Bug 214959 Xdefs.h not found while building with xft support on solaris
patch by selsky@columbia.edu r=blizzard sr=rbs


git-svn-id: svn://10.0.0.236/trunk@148766 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 13:11:56 +00:00
peter%propagandism.org
fc767fddf7 Additional fix for bug 224313 ().
git-svn-id: svn://10.0.0.236/trunk@148765 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 09:18:29 +00:00
darin%meer.net
7116c0540b adding additional comments to last patch, b=223145
git-svn-id: svn://10.0.0.236/trunk@148764 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 09:10:57 +00:00
darin%meer.net
c48ac05bdb fixes bug 223145 "Numeric IPv6 addresses don't work" patch=lorenzo@colitti.com r+sr=darin
git-svn-id: svn://10.0.0.236/trunk@148763 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 08:54:49 +00:00
chanial%noos.fr
22cbcf26c8 bug 221599: remove comm.jar dependencies in nsGlobalHistory.cpp by adding history.properties for now. Putting the history in the toolkit seems highly bogus.
git-svn-id: svn://10.0.0.236/trunk@148762 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 08:14:10 +00:00
despotdaemon%netscape.com
ab421691da Pseudo-automatic update of changes made by mike.morgan@oregonstate.edu.
git-svn-id: svn://10.0.0.236/trunk@148761 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 08:10:05 +00:00
chanial%noos.fr
82f5f30086 bug 224522: collapse menuitem needs a correct accesskey "C".
Moving the crap out of history.properties.


git-svn-id: svn://10.0.0.236/trunk@148760 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 08:05:03 +00:00
chanial%noos.fr
041c0e2a8c bug 221597: removing comm.jar dependencies in contentAreaUtils.js by copying contentAreaCommands.properties for now.
git-svn-id: svn://10.0.0.236/trunk@148759 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 07:21:55 +00:00
chanial%noos.fr
e972b440fe Bug 221597: remove the comm.jar dependecies in the history panel
git-svn-id: svn://10.0.0.236/trunk@148758 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 07:10:04 +00:00
scott%scott-macgregor.org
30932a234c Bug #224313 --> crashes when clicking on mail/news accounts. Patch by Peter van der Beken.
sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@148757 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 06:49:02 +00:00
scott%scott-macgregor.org
04c9c72ddd add missing DTD to fix bustage in account central
git-svn-id: svn://10.0.0.236/trunk@148756 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 06:46:49 +00:00
darin%meer.net
20314abae1 fixes bug 223861 "default value of network.dnsCacheExpiration should be reduced" r=dougt sr=brendan
git-svn-id: svn://10.0.0.236/trunk@148755 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 05:55:07 +00:00
darin%meer.net
82a9a9c7b2 fixes bug 224505 "slight static component loader cleanup" r=bsmedberg sr=dougt
git-svn-id: svn://10.0.0.236/trunk@148754 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 05:31:14 +00:00
brendan%mozilla.org
f70ce7c556 Squeeze a few instructions out of the noSuchMethod special case, and restore needed arena metering (followup to 196097, r=sparky).
git-svn-id: svn://10.0.0.236/trunk@148753 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 05:07:41 +00:00
scott%scott-macgregor.org
a932e15615 Thunderbird only.
Bug #222783:  Leverage the pre-processor to automatically generate the correct locale version so we don't have to change
each thunderbird .rdf file.

r/sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@148752 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 05:01:38 +00:00
scott%scott-macgregor.org
27f057453a Bug #222783: Leverage the pre-processor to automatically generate the correct locale version so we don't have to change
each thunderbird .rdf file.


git-svn-id: svn://10.0.0.236/trunk@148751 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 04:58:43 +00:00
scott%scott-macgregor.org
3acab22ffe add hiddenWindow chrome url for thunderbird.
git-svn-id: svn://10.0.0.236/trunk@148750 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 04:34:11 +00:00
scott%scott-macgregor.org
e05cf80abc Implement a thunderbird version of hiddenWindow.xul on the MAC. This fixes a huge OSX usability issue where
we are DOA when you close all open thunderbird windows. This was contributed by Don Crandall. Many thanks Don!


git-svn-id: svn://10.0.0.236/trunk@148749 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 04:32:44 +00:00
brendan%mozilla.org
57f2064642 Fix missing cx param problem (223041, r=caillon, sr=dbaron).
git-svn-id: svn://10.0.0.236/trunk@148748 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 04:26:55 +00:00
justdave%syndicomm.com
b9f00dc151 Bump version number for release
git-svn-id: svn://10.0.0.236/trunk@148738 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 03:33:36 +00:00
justdave%syndicomm.com
80801cd4e8 [SECURITY] Bug 219044: A user with 'editkeywords' privileges (i.e. usually an administrator) can inject arbitrary SQL via the URL used to edit an existing keyword.
Patch by Joel Peshkin <bugreport@peshkin.net>
r= justdave, zach  a= justdave


git-svn-id: svn://10.0.0.236/trunk@148737 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 03:31:30 +00:00
justdave%syndicomm.com
a45b1913fb [SECURITY] Bug 209742: Under some circumstances, a user can obtain component descriptions for a product to which he does not normally have access.
Patch by Ryan Cleary <tryanc@interdimensions.com>
r= joel, bbaetz   a= justdave


git-svn-id: svn://10.0.0.236/trunk@148736 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 03:25:51 +00:00
justdave%syndicomm.com
e052ecbc87 [SECURITY] Bug 209376: If you know the email address of someone who has voted on a secure bug, you can access the summary of that bug even if you do not have sufficient permissions to view the bug itself.
Patch by Gervase Markham <gerv@mozilla.org>
r= justdave, bbaetz  a= justdave


git-svn-id: svn://10.0.0.236/trunk@148735 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 03:20:49 +00:00
darin%meer.net
5f464cc811 backing out my last change. it wasn't right. see bug 223084 and bug 224505 for details.
git-svn-id: svn://10.0.0.236/trunk@148734 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 02:44:23 +00:00
darin%meer.net
8172037b34 making minimo packager use MOZ_OBJDIR instead of a hardcoded objdir path.
git-svn-id: svn://10.0.0.236/trunk@148733 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 02:16:56 +00:00
darin%meer.net
4906f89b27 fixing static build orangeness, b=223084, r=timeless
git-svn-id: svn://10.0.0.236/trunk@148732 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 02:13:08 +00:00
chanial%noos.fr
9c732ec278 bug 224450: correct typos. patch by Steffen Wilberg <steffen.wilberg@web.de>
git-svn-id: svn://10.0.0.236/trunk@148731 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 00:26:39 +00:00
dbaron%dbaron.org
a6fb82fcaa Clamp -moz-opacity to the range [0.0,1.0]. b=224478 r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@148730 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 22:40:43 +00:00
igor%mir2.org
73ce41a049 Added Context.javaToJS as a convenient way to get JS values from Java objects and Context.emptyArgs so documentation does not need to refer to ScriptRuntime.emptyArgs.
git-svn-id: svn://10.0.0.236/trunk@148729 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 21:15:14 +00:00
igor%mir2.org
eab6c0c773 In WrapFactory.wrap use String.valueOf(charValue) instead of new String(new char[] { charValue }) to get string from character.
git-svn-id: svn://10.0.0.236/trunk@148728 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 21:12:08 +00:00
gerv%gerv.net
281bcb9f15 Bu 210735 - collectstats.pl broken. Removes "uninitialised value" warning. Patch by gerv; r=bbaetz, a=justdave.
git-svn-id: svn://10.0.0.236/trunk@148727 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 15:22:42 +00:00
peter%propagandism.org
fd46bc361d Restoring fix for bug 224231, didn't affect btek's Tp.
git-svn-id: svn://10.0.0.236/trunk@148726 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 15:16:24 +00:00
jocuri%softhome.net
2f086b9367 Rebuilding documentation for the 2.17.5 release; the docbook system on landfill proved to be broken.
git-svn-id: svn://10.0.0.236/trunk@148725 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 14:04:29 +00:00
peter%propagandism.org
f866a4f3f5 Back out a part of the fix for bug 224231 to see if it affects btek's Tp.
git-svn-id: svn://10.0.0.236/trunk@148723 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 13:51:42 +00:00
peter%propagandism.org
ae5e6617c4 Restoring fix for bug 224231, didn't affect btek's Tp.
git-svn-id: svn://10.0.0.236/trunk@148722 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 12:58:29 +00:00
peter%propagandism.org
318f3860a7 Back out a part of the fix for bug 224231 to see if it affects btek's Tp.
git-svn-id: svn://10.0.0.236/trunk@148721 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 11:59:54 +00:00
justdave%syndicomm.com
a99d8be27f Bug 111522: Provide ability to specify MIME type of attachment when downloading - correction of url parameter name to avoid usage conflicts with other parts of Bugzilla
Patch by Alex Vincent <ajvincent@juno.com>
r= justdave, a= justdave


git-svn-id: svn://10.0.0.236/trunk@148719 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 07:36:10 +00:00
chanial%noos.fr
b354d0bb3f split printing.css into printPreview.css and printPageSetup.css
git-svn-id: svn://10.0.0.236/trunk@148718 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 05:11:21 +00:00
chanial%noos.fr
b659562a36 Rename printPageSetup.properties to printjoboptions.properties, since this file is only used in printjoboptions.xul
git-svn-id: svn://10.0.0.236/trunk@148717 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 04:22:06 +00:00
brendan%mozilla.org
41fe9fb281 Fix JS_DropPrincipals (thanks, dbaron).
git-svn-id: svn://10.0.0.236/trunk@148716 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 03:25:25 +00:00
dbaron%dbaron.org
e0c834ff35 Make opacity work on GTK2. b=201209 r=bryner sr=roc
git-svn-id: svn://10.0.0.236/trunk@148715 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 03:14:00 +00:00
justdave%syndicomm.com
ec729b2552 Recompile docs (again) for release (for one lousy stinking paragraph)
git-svn-id: svn://10.0.0.236/trunk@148714 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 03:11:56 +00:00
justdave%syndicomm.com
87441ea6e9 Adding reference to current version of the docs being on the web
git-svn-id: svn://10.0.0.236/trunk@148711 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 02:37:21 +00:00
dbaron%dbaron.org
e86cbc3f65 Work around bustage. Temporary fix. b=223041
git-svn-id: svn://10.0.0.236/trunk@148710 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 02:31:53 +00:00
chanial%noos.fr
fb65913ddc update the header that deals with the dependencies
git-svn-id: svn://10.0.0.236/trunk@148709 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 02:28:23 +00:00
chanial%noos.fr
13a3c9f430 fix js warning (redeclaration of var printPreviewTB)
git-svn-id: svn://10.0.0.236/trunk@148708 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 02:22:19 +00:00
chanial%noos.fr
7d2b4e7deb fix left over
git-svn-id: svn://10.0.0.236/trunk@148707 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 02:21:30 +00:00
chanial%noos.fr
0e37191af0 remove duplicated code in printPreviewBindings
git-svn-id: svn://10.0.0.236/trunk@148706 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 02:04:08 +00:00
justdave%syndicomm.com
4efac79b0f Recompiled docs for release
git-svn-id: svn://10.0.0.236/trunk@148704 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 02:00:11 +00:00
chanial%noos.fr
20b3981d39 add "public" method savePrintSettings that saves the print settings to the prefs.
git-svn-id: svn://10.0.0.236/trunk@148703 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 01:46:53 +00:00
chanial%noos.fr
25c2c4fabe coding style nit
git-svn-id: svn://10.0.0.236/trunk@148702 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 01:38:52 +00:00
chanial%noos.fr
9ce927eadd remove prefs print.use_global_printsettings and print.save_print_settings (not used in the backend). They offer few if any interest. Their default behavior is kept: a print action and Page Setup change will be saved and windows share the same print settings.
git-svn-id: svn://10.0.0.236/trunk@148701 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 01:21:46 +00:00
chanial%noos.fr
8515bb2e1f Add a routine |clearObsoletePrefs| to remove/migrate the old prefs
git-svn-id: svn://10.0.0.236/trunk@148700 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 01:09:18 +00:00
brendan%mozilla.org
1208f020d1 Use eval's object principals if possible, ditto for other eval-like methods (223041, r=caillon, sr=shaver).
git-svn-id: svn://10.0.0.236/trunk@148699 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 01:04:50 +00:00
chanial%noos.fr
0f8244a114 on going work on the printing component: rename PRINTSVC to PSSVC, getValuesFromPS to updateSettings, remove duplicate getWebBrowserPrint and start removing the duplicated code in printUtils.js and printPreviewBindings.xml that lays the print preview.
git-svn-id: svn://10.0.0.236/trunk@148698 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 00:15:04 +00:00
dwitte%stanford.edu
6e9255747b removing obsolete directory.
git-svn-id: svn://10.0.0.236/trunk@148697 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-01 23:52:45 +00:00
uid502
bdc0f5a1e4 Bug 212366. Make '-moz-opacity' behave like CSS3 opacity: it does not inherit by default, and it composites the element and all its children as a group. r+sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@148696 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-01 22:34:59 +00:00
igor%mir2.org
be32fd3a90 Deprecation of get/setAttributes forms that take start argument. It was never used to pass anything but this object.
git-svn-id: svn://10.0.0.236/trunk@148695 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-01 20:23:28 +00:00
igor%mir2.org
0337a73b06 Since Undefined inherits from Scriptable, not ScriptableObject, it does not need to override get/setAttributes()
git-svn-id: svn://10.0.0.236/trunk@148694 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-01 20:21:28 +00:00
jocuri%softhome.net
4a2be884fc Bug 224397: Mismatch of user error: insufficient_privs vs insufficient_perms; patch by caduvall@glue.umd.edu (chaduv); r=justdave; a=justdave.
git-svn-id: svn://10.0.0.236/trunk@148693 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-01 20:02:47 +00:00
igor%mir2.org
0a6ec1e8e5 Removal of completely unnecessary getSlotToSet as its implementation repeated already unsuccessfully search done by getSlot. The put methods now call addSlot directly.
In addition, shared code in has and get to check/update lastAccess cache is moved to common method getNamedSlot.


git-svn-id: svn://10.0.0.236/trunk@148692 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-01 19:40:24 +00:00
bienvenu%nventure.com
39e74e5551 fix 111855 patch by frank.schoenheit@gmx.de, r=me, sr=mscott first newsgroup count not read if authentication required
git-svn-id: svn://10.0.0.236/trunk@148691 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-01 19:03:17 +00:00
bienvenu%nventure.com
28b0d46654 retain folder settings when reparsing local folders because .msf file doesn't match timestamp, 224267, r/sr=mscott
git-svn-id: svn://10.0.0.236/trunk@148690 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-01 17:27:53 +00:00
igor%mir2.org
48d483ff35 GlobalScope is removed as its introduction had to serious consequences with compatibility and usage. Instead a special purpose class ClassCache is introduces to hold various caches. The class binds itself to an arbitrary object by using new SciptableObject.associateValue method so arbitrary ScriptableObject can be used as a scope without performance penalties.
git-svn-id: svn://10.0.0.236/trunk@148689 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-01 15:34:23 +00:00
bsmedberg%covad.net
3f2c63efd6 Followup on bug 223084, fix bustage of static builds. Pass a null nsIFile* to the static component loader during autoregistration.
git-svn-id: svn://10.0.0.236/trunk@148688 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-01 14:46:08 +00:00
peter%propagandism.org
e6ae01a399 Fix for bug 224231 (Need AppendASCIItoUTF16). r=jst, sr=dbaron.
git-svn-id: svn://10.0.0.236/trunk@148687 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-01 10:57:41 +00:00
jocuri%softhome.net
ebd4ab7ca0 Bug 123565: Add to FAQ: Why can't I close bugs from "Change Several Bugs at Once" ?; r=justdave; a=justdave.
git-svn-id: svn://10.0.0.236/trunk@148684 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-01 09:51:41 +00:00
peter%propagandism.org
e303e4bc71 Fix for bug 224231 (Need AppendASCIItoUTF16). r=jst, sr=dbaron.
git-svn-id: svn://10.0.0.236/trunk@148683 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-01 09:35:48 +00:00
bryner%brianryner.com
3f3462ac17 Don't process random events from the X event queue while waiting for clipboard operations to complete. Bug 214583, r=blizzard. Not part of the default build.
git-svn-id: svn://10.0.0.236/trunk@148682 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-01 07:48:59 +00:00
bryner%brianryner.com
797a541ba7 On Linux, enable jprof to use /dev/rtc for up to 8 KHz sampling. Bug 128673, original patch by shaver, some additional fixes by me, r=shaver, sr=dbaron.
git-svn-id: svn://10.0.0.236/trunk@148681 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-01 07:34:18 +00:00
bryner%brianryner.com
6fd771cc16 Prefix all external symbols in Mozilla's libpng with MOZ_PNG_ to avoid runtime version conflicts with a system-installed libpng in static builds (bug 181936). Patch by glennrp@imagemagick.org, r=pavlov, sr=tor/bryner
git-svn-id: svn://10.0.0.236/trunk@148680 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-01 07:20:43 +00:00
wchang0222%aol.com
c7937bb4f6 Bugzilla bug 223624: fixed the compiler warning that case ecKey is not
handled in the switch statement.  r=nelsonb.


git-svn-id: svn://10.0.0.236/trunk@148679 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-01 05:17:16 +00:00
uid502
06e9e2e520 Bug 212366. Account for inverted origin of non-DIB bitmaps. Also, set the row width to the actual width of the DIB data, not the row width from the non-DIB bitmap. r=ere,sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@148675 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-01 02:00:37 +00:00
uid502
d31f6d57f4 Bug 212366. Make nsFrameInnerFrame be a moz-anonymous-box pseudoelement. This stops style on an IFRAME from being applied to both the outerframe and the innerframe. r+sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@148674 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-01 01:34:06 +00:00
ben%bengoodger.com
28e8ce6da9 Add some notes.
git-svn-id: svn://10.0.0.236/trunk@148673 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-01 00:47:35 +00:00
brendan%mozilla.org
4ee6411dcb Fix from zack-weg@gmx.de for magic number botch and early Java bug copy/paste in Math.random code (211590, r=me).
git-svn-id: svn://10.0.0.236/trunk@148672 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 23:21:13 +00:00
ben%bengoodger.com
ff3b188faa update ifdefs
git-svn-id: svn://10.0.0.236/trunk@148671 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 23:12:30 +00:00
ben%bengoodger.com
d2954433c6 Installer now actually installs! Yay!
git-svn-id: svn://10.0.0.236/trunk@148670 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 23:01:00 +00:00
bryner%brianryner.com
c9502c3574 add -framework IOKit to fix static build bustage
git-svn-id: svn://10.0.0.236/trunk@148669 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 21:44:05 +00:00
uid502
3483aac740 Bug 190735. DeCOMtaminate nsIFrame::GetFrameType. r+sr=bzbarsky ... sorry, missed some files
git-svn-id: svn://10.0.0.236/trunk@148668 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 21:00:19 +00:00
bsmedberg%covad.net
2397aa3c81 Fix static build bustage from bug 223084 - r=bryner Sorry about that!
git-svn-id: svn://10.0.0.236/trunk@148667 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 20:50:22 +00:00
uid502
e56ed2443c Bug 190735. DeCOMtaminate nsIFrame::GetFrameType. r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@148665 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 20:19:18 +00:00
pinkerton%netscape.com
ada82f9637 adding IOKit dependency for mac static build (sr=bryner, not part of build)
git-svn-id: svn://10.0.0.236/trunk@148664 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 20:07:44 +00:00
pinkerton%netscape.com
25bb086ed4 prevent adding personal toolbar buttons twice. handle drops onto toolbar in
the correct order. (bug 223207)


git-svn-id: svn://10.0.0.236/trunk@148662 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 19:50:55 +00:00
mvl%exedo.nl
7fc825928b Put back a line that shouldn't have been removed for bug 161130
git-svn-id: svn://10.0.0.236/trunk@148661 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 19:40:52 +00:00
mvl%exedo.nl
91bd989882 nsIPopupManager.getEnumerator is replaced by nsIPermissionManager.getEnumerator
bug 221232, r=dwitte, sr=bryner


git-svn-id: svn://10.0.0.236/trunk@148660 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 19:30:06 +00:00
mvl%exedo.nl
d6a249b62f Prevent crashes due to the permissions array not being initialized.
bug 223201, r=dwitte, sr=darin


git-svn-id: svn://10.0.0.236/trunk@148659 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 19:17:03 +00:00
mvl%exedo.nl
4018692979 Prevent crashes due to the permissions array not being initialized.
bug 223201, r=dwitte, sr=darin


git-svn-id: svn://10.0.0.236/trunk@148658 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 19:09:08 +00:00
jocuri%softhome.net
c6b705cb0f Fix for bug 190611: Query page crashes if any product has no versions defined; r=kiko; a=justdave.
git-svn-id: svn://10.0.0.236/trunk@148657 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 19:06:59 +00:00
scott%scott-macgregor.org
71be201b52 package offlineStartup.js
git-svn-id: svn://10.0.0.236/trunk@148656 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 19:04:18 +00:00
mkaply%us.ibm.com
3996bb85eb #220378
r=jblanco, sr=blizzard (platform specific)
Add some more default fonts for Unicode so DBCS works better


git-svn-id: svn://10.0.0.236/trunk@148654 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 16:47:52 +00:00
mkaply%us.ibm.com
8688bf2213 219165
r=pedemonte, sr=blizzard (platform specific)
Let Mozilla handle Alt+Enter


git-svn-id: svn://10.0.0.236/trunk@148653 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 16:41:20 +00:00
chanial%noos.fr
15e90379ae Don't preprocess dtd files.
git-svn-id: svn://10.0.0.236/trunk@148651 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 15:49:17 +00:00
bsmedberg%covad.net
debcb1638f Bug 135533 - Enable the chrome preprocessor for seamonkey as well as the *birds. To use the preprocessor, prefix an asterisk (*) before the file name in your jar.mn. For documentation on preprocessor directives, see http://software.hixie.ch/utilities/unix/preprocessor/ r=bryner
git-svn-id: svn://10.0.0.236/trunk@148650 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 14:01:35 +00:00
kiko%async.com.br
1bb3991816 Fix for Bug 220724: Provide standalone bug submission program. Includes
a python script that submits bugs to a specified Bugzilla instance.
README, docs and an example bug are included. Work done by Eric Raymond
<esr@thyrsus.com> and myself. a=justdave


git-svn-id: svn://10.0.0.236/trunk@148649 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 14:00:20 +00:00
mostafah%oeone.com
62f58f2713 Adding in printDialog.xul and printDialog.js
git-svn-id: svn://10.0.0.236/trunk@148648 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 13:36:29 +00:00
dwitte%stanford.edu
7c18722dfc staticify a couple of class methods.
git-svn-id: svn://10.0.0.236/trunk@148647 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 08:44:00 +00:00
nelsonb%netscape.com
517ef7b660 Remove one unnecessary transition from the SSL3 state machine.
Reduce the number of reallocations of the SSL3 handshake message buffer.
Bugscape bugs 53287 and 53337


git-svn-id: svn://10.0.0.236/trunk@148646 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 07:01:05 +00:00
scott%scott-macgregor.org
7e3e91b55c bump the extension version
git-svn-id: svn://10.0.0.236/trunk@148645 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 06:23:31 +00:00
darin%meer.net
148858946f fixes bug 223811 "getaddrinfo returns 3 addrinfo structs for each IP address [was: very long timeout for retrying IPv6 to IPv4 addresses]" r=wtc
git-svn-id: svn://10.0.0.236/trunk@148644 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 05:10:48 +00:00
timeless%mozdev.org
26e0084067 Bug 120148 Tabs don't remember which element [frame, textfield, etc] was focused when switching tabs
patch by tryandguessit@yahoo.com r=caillon sr=bryner


git-svn-id: svn://10.0.0.236/trunk@148642 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 03:56:22 +00:00
darin%meer.net
c2ce34b7e0 bug 119934, change namespace for expat symbols to avoid conflicts with
system version (fixes static gtk+2 linux build) r=peterv sr=heikki


git-svn-id: svn://10.0.0.236/trunk@148641 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 03:49:49 +00:00
pinkerton%netscape.com
a5100ddf63 added IOKit to static target
git-svn-id: svn://10.0.0.236/trunk@148640 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 03:46:00 +00:00
nelsonb%netscape.com
c625928046 Enable generation of DES2 keys with mechanism CKM_DES2_KEY_GEN. Bug 201521
git-svn-id: svn://10.0.0.236/trunk@148638 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 02:33:16 +00:00
pinkerton%netscape.com
0ae66d4d2f don't process timers after wakeup (r=sfraser, sr=bryner, bug 197863)
git-svn-id: svn://10.0.0.236/trunk@148637 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 02:31:13 +00:00
pinkerton%netscape.com
18179b8a9d cleanup, sharing toolkit base between carbon and cocoa, and using IOKit for
sleep/wake. r=pink, sr=bryner, bug 197863


git-svn-id: svn://10.0.0.236/trunk@148636 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 02:30:22 +00:00
timeless%mozdev.org
5210f7e789 Bug 16498 Finished Downloading sounds
patch by cst@andrew.cmu.edu r=varga sr=bz


git-svn-id: svn://10.0.0.236/trunk@148635 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 01:58:56 +00:00
chanial%noos.fr
9295b879df Bug 223161: New FB Help Forum for new users.
patch by Mike Connor <mpconnor@rogers.com>


git-svn-id: svn://10.0.0.236/trunk@148634 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 01:39:29 +00:00
jshin%mailaps.org
96c09420a1 bug 195093 : fix a typo (eu-US --> en-US) (thanks to tor who noticed it in bug 153586)
git-svn-id: svn://10.0.0.236/trunk@148633 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 01:26:42 +00:00
ben%bengoodger.com
ac63384ee4 Bucket O'Updates
The installer now actually installs! Provided it doesn't have to download anything. And it just stops at the end. Oh well. In time...


git-svn-id: svn://10.0.0.236/trunk@148631 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 00:49:01 +00:00
john%johnkeiser.com
d0c4c67f20 Add user documentation for Patch Viewer (bug 216707)
git-svn-id: svn://10.0.0.236/trunk@148630 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 00:01:11 +00:00
jgmyers%netscape.com
e769376d93 fix uninitialized member: bug 222182 r=sli0262 sr=blizzard
git-svn-id: svn://10.0.0.236/trunk@148629 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 23:44:06 +00:00
timeless%mozdev.org
1835d05c6c Bug 205541 Selecting "Unblock Cookies..." while on a site that you'd previously blocked allows the site to set cookies rather than just removing the block
patch by mpconnor@rogers.com r=neil sr=alecf


git-svn-id: svn://10.0.0.236/trunk@148628 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 23:27:58 +00:00
timeless%mozdev.org
71b8ae7f38 Bug 222553 Rework cookieviewer to support whitelisting
patch by mpconnor@rogers.com r=neil sr=alecf


git-svn-id: svn://10.0.0.236/trunk@148627 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 23:23:50 +00:00
bienvenu%nventure.com
ee842cec80 fix logon error from uninitialzed out param in some situations when remember password turned on, r/sr=mscott 185186
git-svn-id: svn://10.0.0.236/trunk@148626 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 23:16:32 +00:00
nelsonb%netscape.com
6aa385a182 Correct the code that detects DES2 keys based on their lengths. Bug 201521
git-svn-id: svn://10.0.0.236/trunk@148624 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 22:31:09 +00:00
despotdaemon%netscape.com
5696a40712 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148623 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 22:19:14 +00:00
chanial%noos.fr
f32631d0f9 Bug 224222: OK and Cancel buttons are unlabeled.
missed one occurence of GetApplicationLocale (bug 195093)


git-svn-id: svn://10.0.0.236/trunk@148622 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 22:14:15 +00:00
cbiesinger%web.de
09f8162087 Bug 171509
mozilla attempts to convert profiles from empty .netscape dir
fix this by checking if preferences.js exists in ~/.netscape
r=ccarlen sr=tor


git-svn-id: svn://10.0.0.236/trunk@148621 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 21:42:20 +00:00
cbiesinger%web.de
a9783f1912 Bug 223998
contentAreaUtils.js: getMIMEInfoForExtension should be getTypeFromURI
r=neil.parkwaycc.co.uk sr=bz


git-svn-id: svn://10.0.0.236/trunk@148620 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 21:34:39 +00:00
cbiesinger%web.de
e092c41cd5 bug 223143 nsHttpChannel::Suspend and Resume always return NS_OK
r=darin sr=bz


git-svn-id: svn://10.0.0.236/trunk@148619 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 21:27:38 +00:00
jocuri%softhome.net
637e3cde6b Rebuilding documentation for Bugzilla 2.17.5.
git-svn-id: svn://10.0.0.236/trunk@148618 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 21:24:11 +00:00
cbiesinger%web.de
407ee53296 bug 223151 nsJSProtocolHandler::Suspend and ::Resume not implemented
r+sr=bzbarsky


git-svn-id: svn://10.0.0.236/trunk@148617 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 21:23:15 +00:00
bsmedberg%covad.net
7768323d77 Manually committing configure, as ctlbld seems broken.
git-svn-id: svn://10.0.0.236/trunk@148616 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 21:22:21 +00:00
cbiesinger%web.de
311c6f333d 224053 patch by Malcolm Rowe malcolm-bmo@farside.org.uk
neil.parkwaycc.co.uk: review+
bienvenu: superreview+
Simple HTML (sanitizer) message view disallows numbered list  (OL) with non-default start
fix this by not rmeoving start/type/compact attributes from list tags


git-svn-id: svn://10.0.0.236/trunk@148614 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 21:14:51 +00:00
cbiesinger%web.de
740414e8f7 216894 patch by Stefan Borggraefe borggraefe@despammed.com
neil.parkwaycc.co.uk: review+
  bienvenu: superreview+
Message View Setup window too small, not resizeable


git-svn-id: svn://10.0.0.236/trunk@148613 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 21:11:55 +00:00
bsmedberg%covad.net
329c7961ce Bug 223084 - enable the static component loader by default r/sr=dougt
git-svn-id: svn://10.0.0.236/trunk@148612 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 21:11:07 +00:00
cbiesinger%web.de
f2e26f0ffc bug 112893 patch by Stefan Borggraefe mailto:borggraefe@despammed.com r/sr=bienvenu
Acct Central should get scrollbars if its content is not all visible


git-svn-id: svn://10.0.0.236/trunk@148611 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 21:09:36 +00:00
bsmedberg%covad.net
99f2f7f591 Bug 216366 - fix for activestate perl using GNU make 3.80 r=bryner
git-svn-id: svn://10.0.0.236/trunk@148610 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 21:05:56 +00:00
jocuri%softhome.net
3432be998b Bug 224218: Fix wrong version in administration.xml; r=kiko; a=justdave.
git-svn-id: svn://10.0.0.236/trunk@148609 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 20:45:26 +00:00
despotdaemon%netscape.com
3cc9f01f58 Pseudo-automatic update of changes made by silver@warwickcompsoc.co.uk.
git-svn-id: svn://10.0.0.236/trunk@148608 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 20:42:58 +00:00
despotdaemon%netscape.com
53cfd61ce2 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148607 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 20:34:58 +00:00
timeless%mozdev.org
2a26fd8e0e Bug 221876 Latest Builds in QA menu doesn't work anymore
first draft by mcsmurf@gmx.net r=jst sr=jst


git-svn-id: svn://10.0.0.236/trunk@148606 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 19:33:28 +00:00
timeless%mozdev.org
377e7e7927 Bug 106386 Correct misspellings in source code
patch by ajvincent@juno.com r=darin sr=darin


git-svn-id: svn://10.0.0.236/trunk@148605 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 19:27:47 +00:00
timeless%mozdev.org
4ea883526c Bug 221845 (Patch) (OS X) put type ahead find string on find pasteboard
patch by haasd@cae.wisc.edu r=akkana sr=sfraser


git-svn-id: svn://10.0.0.236/trunk@148604 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 19:22:23 +00:00
mostafah%oeone.com
ac6233adda Adding in Spanish translation for calendar
git-svn-id: svn://10.0.0.236/trunk@148602 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 18:57:21 +00:00
sicking%bigfoot.com
5b2076d71e Bug 190302: Set correct characterset for XSLT generated pages.
r=Pike sr=peterv


git-svn-id: svn://10.0.0.236/trunk@148599 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 18:44:14 +00:00
jocuri%softhome.net
ab06236932 Bug 216703: Need PatchReader note in install docs; patch by jkeiser (John Keiser - john@johnkeiser.com); r=jake; a=jake.
git-svn-id: svn://10.0.0.236/trunk@148598 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 18:42:21 +00:00
despotdaemon%netscape.com
7e0c656718 Pseudo-automatic update of changes made by john@johnkeiser.com.
git-svn-id: svn://10.0.0.236/trunk@148597 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 18:41:34 +00:00
mostafah%oeone.com
2759e3dccd Updated German translation from its language pack
git-svn-id: svn://10.0.0.236/trunk@148596 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 18:36:20 +00:00
mostafah%oeone.com
36074a78e2 Removed duplicate entry
git-svn-id: svn://10.0.0.236/trunk@148595 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 18:35:39 +00:00
mostafah%oeone.com
d75a0f0245 Removed extra spaces
git-svn-id: svn://10.0.0.236/trunk@148594 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 18:35:27 +00:00
despotdaemon%netscape.com
78a6482372 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148593 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 18:34:24 +00:00
despotdaemon%netscape.com
f290a96d82 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148592 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 18:33:37 +00:00
danm-moz%comcast.net
df4704abb2 cookies without a value (this is how IE deletes a cookie) are now skipped and no longer corrupt subsequent cookies. all migrated cookies are treated as domain cookies, and any extant otherwise identical host cookie is deleted. bugs 222343, 223029 r=darin,dwitte
git-svn-id: svn://10.0.0.236/trunk@148587 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 17:43:46 +00:00
timeless%mozdev.org
61db715911 Bug 217219 Messages in votes errors are incorrectly CHOMP'd
r=kiko a=justdave


git-svn-id: svn://10.0.0.236/trunk@148586 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 17:29:49 +00:00
dwitte%stanford.edu
48da57a302 add accesskeys for the cookie confirmation dialog.
b=201743, r=neil, sr=alecf


git-svn-id: svn://10.0.0.236/trunk@148585 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 17:26:44 +00:00
jocuri%softhome.net
4e316ffad4 Bug 223937: web site error while updating email address; r=myk,kiko; a=justdave.
git-svn-id: svn://10.0.0.236/trunk@148583 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 17:18:16 +00:00
jocuri%softhome.net
517d312f2f Bug 47925: describe MOVED resolution in bug_status.html; patch by chaduv (caduvall@glue.umd.edu); r=kiko; a=justdave.
git-svn-id: svn://10.0.0.236/trunk@148582 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 17:12:30 +00:00
bienvenu%nventure.com
d29bd7bd31 add install.js, used for building palm sync as an extension, not part of build 214407
git-svn-id: svn://10.0.0.236/trunk@148581 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 17:08:16 +00:00
igor%mir2.org
5964f75b61 parent and prototype fields are made privatenot to allow to mess with them from subclasses. Althoygh setter and getter can be used still to do that, at least some sanity checks can be added there.
git-svn-id: svn://10.0.0.236/trunk@148576 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 16:40:43 +00:00
igor%mir2.org
90edc3625a Use getPrototype instead of explicit reference to this.prototype
git-svn-id: svn://10.0.0.236/trunk@148575 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 16:40:42 +00:00
igor%mir2.org
89e2fd6726 passing Context instance to NativeJavaMethod.findMethod not to call Context.getContext() id some form of API to override method selection will surface
git-svn-id: svn://10.0.0.236/trunk@148574 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 16:40:41 +00:00
igor%mir2.org
67d04d3799 Added readReader
git-svn-id: svn://10.0.0.236/trunk@148573 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 16:40:40 +00:00
igor%mir2.org
fe0a96d9f1 Not to call Context.getContext() in TokenStrea/IRFactory, an explicit Context instance is passed to TokenStream constructor
git-svn-id: svn://10.0.0.236/trunk@148572 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 16:40:39 +00:00
igor%mir2.org
bb040d6d2d Use passed scope instead of the object parent scope
git-svn-id: svn://10.0.0.236/trunk@148571 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 16:39:46 +00:00
neil%parkwaycc.co.uk
d605349a2d Bug 140532 Attached messages display incorrect headers r=ducarroz sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@148570 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 16:37:21 +00:00
bienvenu%nventure.com
c95808e937 fix string fu in auth smtp password prompt, was using tmp var that could get freed up, patch by neil@parkwaycc.co.uk/dwitte@stanford.edu, r/sr=me 90507
git-svn-id: svn://10.0.0.236/trunk@148569 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 16:21:09 +00:00
bienvenu%nventure.com
3a3a7b7fdb force creation of imap server directory when it has been deleted to avoid imap server directory.sbd creation, patch by gemal.dk, r/sr=me 210683
git-svn-id: svn://10.0.0.236/trunk@148568 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 15:29:17 +00:00
varga%nixcorp.com
5c72286e7b Checking in for Jungshik Shin.
Fix for bug 195093. 'modernize'  nsILocale and nsIPlatformCharset.
r=smontagu sr=darin


git-svn-id: svn://10.0.0.236/trunk@148567 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 15:08:48 +00:00
mostafah%oeone.com
ab612cfc1b Removed extra space
git-svn-id: svn://10.0.0.236/trunk@148566 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 13:58:17 +00:00
mostafah%oeone.com
e1be7b477c Checked in patch for Japanese language update
git-svn-id: svn://10.0.0.236/trunk@148565 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 13:57:57 +00:00
peter%propagandism.org
3ba29338bc Fix for bug 126765 (Change NormalizeAttrString to GetAttrWithName). Original fix by Daniel Bratell and sicking, r=sicking, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@148564 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 13:47:29 +00:00
rbs%maths.uq.edu.au
caf1987140 bug 195038, finally add support for the quirky <font face=Symbol> on Windows to the delight of proponents of bug 33127, r=jshin, sr=roc
git-svn-id: svn://10.0.0.236/trunk@148563 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 13:44:49 +00:00
peter%propagandism.org
ce74ff7c22 Fix for bug 215465 (CSS :hover rules not working when using XML/XSLT along with an alternernate CSS). Fix by bz, r=sicking, sr=peterv.
git-svn-id: svn://10.0.0.236/trunk@148562 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 12:32:41 +00:00
peter%propagandism.org
7ba809f0ec Fix for bug 223751 (documentType's nodeValue should be null). r/sr=jst.
git-svn-id: svn://10.0.0.236/trunk@148561 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 12:24:28 +00:00
varga%nixcorp.com
8773376b20 Fix for bug 221361. right click context speed is very slow with large selections
r=jan,neil sr=alecf patch by gemal


git-svn-id: svn://10.0.0.236/trunk@148560 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 10:32:59 +00:00
neil%parkwaycc.co.uk
ca0f9533c5 Bug 223549 GenerateValidFilename should use validateFileName p=ian@arlen.demon.co.uk r=me sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@148559 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 10:12:32 +00:00
neil%parkwaycc.co.uk
b3d2608f96 Bug 78446 MailNews xul files should not have any inline styles r=bienvenu sr=bz
git-svn-id: svn://10.0.0.236/trunk@148558 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 09:48:15 +00:00
neil%parkwaycc.co.uk
2fda9aa5a8 Bug 215656 Cookie and Popup managers don't update scrollbar correctly r=mvl/dwitte sr=bryner
git-svn-id: svn://10.0.0.236/trunk@148557 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 09:33:40 +00:00
neil%parkwaycc.co.uk
e24ad8d9e4 Bug 223539 Mail views installs non-existent package r=bsmedberg sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@148556 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 09:30:05 +00:00
neil%parkwaycc.co.uk
5b7bab3f07 Bug 223963 Wrong images on mail compose insert menubutton p=sailfish@unforgettable.com r=glazou sr=mscott
git-svn-id: svn://10.0.0.236/trunk@148555 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 09:29:22 +00:00
neil%parkwaycc.co.uk
71a7a07260 Bug 75687 support --enable-chrome-format=symlink r=bsmedberg sr=bryner
git-svn-id: svn://10.0.0.236/trunk@148554 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 09:24:40 +00:00
neil%parkwaycc.co.uk
794eb87739 Bug 222694 Make windows moz-icon:s work with all colour depths r=ere sr=mscott
git-svn-id: svn://10.0.0.236/trunk@148553 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 09:22:24 +00:00
neil%parkwaycc.co.uk
c01cbb0a4b Bug 223099 Remove obsolete FTP channel code r=biesi sr=darin
git-svn-id: svn://10.0.0.236/trunk@148552 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 09:17:05 +00:00
jshin%mailaps.org
fce0204af4 bug 195093 : fix another mac bustage : add a missing '}' and a return statement
git-svn-id: svn://10.0.0.236/trunk@148551 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 07:16:08 +00:00
jshin%mailaps.org
59da8b73cf bug 195093 : fix os2 bustage
git-svn-id: svn://10.0.0.236/trunk@148550 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 06:52:39 +00:00
jshin%mailaps.org
e3f32c2ab9 bug 195093 : fix another mac bustage
git-svn-id: svn://10.0.0.236/trunk@148549 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 06:43:37 +00:00
scott%scott-macgregor.org
41983f0c78 Fix LDAP bustage (Part of Bug #223560)
git-svn-id: svn://10.0.0.236/trunk@148548 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 06:22:03 +00:00
jshin%mailaps.org
73abcac768 bug 195093 : os2 bustage fix
git-svn-id: svn://10.0.0.236/trunk@148547 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 06:14:54 +00:00
jshin%mailaps.org
eb3ee96c8c bug 195093 : fix Mac bustage
git-svn-id: svn://10.0.0.236/trunk@148546 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 06:07:48 +00:00
chanial%noos.fr
c76a54433c bug 224160: hook up Print Preview to view source.
git-svn-id: svn://10.0.0.236/trunk@148545 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 06:02:54 +00:00
jshin%mailaps.org
3984958139 bug 183729 : segfault on XftLockFace's failure (r=blizzard, sr=roc) patch by timeless + dbaron
git-svn-id: svn://10.0.0.236/trunk@148544 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 05:48:10 +00:00
dwitte%stanford.edu
4c52599d4c fixing indentation.
git-svn-id: svn://10.0.0.236/trunk@148543 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 05:25:35 +00:00
dwitte%stanford.edu
b841112632 removing reference to unused file
git-svn-id: svn://10.0.0.236/trunk@148542 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 05:16:51 +00:00
dwitte%stanford.edu
7ea279aeb3 fixing bustage
git-svn-id: svn://10.0.0.236/trunk@148541 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 05:13:20 +00:00
dwitte%stanford.edu
3504cb5336 removing unused file
git-svn-id: svn://10.0.0.236/trunk@148540 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 05:11:54 +00:00
dbaron%dbaron.org
3e6ac46d96 Backing out previous checkin.
git-svn-id: svn://10.0.0.236/trunk@148539 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 05:11:21 +00:00
jshin%mailaps.org
7550c59fbe bug 195093 : modernize nsILocale (r=smontagu, sr=darin)
git-svn-id: svn://10.0.0.236/trunk@148538 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 05:04:45 +00:00
dwitte%stanford.edu
fe93daecb5 removing nsCCookieManager.h in favor of nsNetCID.h.
b=221886, r+sr=darin


git-svn-id: svn://10.0.0.236/trunk@148537 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 04:37:14 +00:00
dbaron%dbaron.org
1da0caa6ae Rearrange inlining to fix codesize penalty of previous checkin. b=167262 r=bryner
git-svn-id: svn://10.0.0.236/trunk@148536 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 04:34:01 +00:00
bienvenu%nventure.com
bf2d6e1733 make content type comparisons case-insensitive, fixes crash when message/rfc822 is upper case, r/sr=mscott 223920
git-svn-id: svn://10.0.0.236/trunk@148535 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 04:08:23 +00:00
bienvenu%nventure.com
c4453e8939 make IMAP ACL user name comparison case-insensitive, patch by dteuscher@myrealbox.com, r=bienvenu, sr=mscott 223404
git-svn-id: svn://10.0.0.236/trunk@148534 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 04:05:06 +00:00
dbaron%dbaron.org
0aa71ca776 date works on windows as well. r=bryner
git-svn-id: svn://10.0.0.236/trunk@148533 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 04:01:33 +00:00
bienvenu%nventure.com
b9ad9aa4b1 make outlook express imported e-mails have x-mozilla-status lines so summary file regeneration won't lose read state, 223679, r/sr=mscott
git-svn-id: svn://10.0.0.236/trunk@148532 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 04:01:08 +00:00
dwitte%stanford.edu
e535af07f6 removing generation of nonexistent makefile
git-svn-id: svn://10.0.0.236/trunk@148531 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 03:47:10 +00:00
dwitte%stanford.edu
52700d7815 bustage blah bustage. thanks dbaron.
git-svn-id: svn://10.0.0.236/trunk@148530 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 03:42:52 +00:00
dbaron%dbaron.org
ce14bf9e98 Attempt to fix Windows bustage. b=167262
git-svn-id: svn://10.0.0.236/trunk@148529 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 03:34:58 +00:00
dwitte%stanford.edu
a550c18858 moving TestCookie into its new netwerk/test home.
find blame for the old TestCookie in the attic for
mozilla/extensions/cookie/tests/TestCookie.cpp.


git-svn-id: svn://10.0.0.236/trunk@148528 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 03:28:28 +00:00
darin%meer.net
f8039a263f fixes bug 180049 "Authentication Plugins" patch=cneberg@sandia.gov r=darin sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@148527 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 03:27:53 +00:00
dwitte%stanford.edu
6422112f67 removing unused wallet files.
b=204184 p=mvl r=me sr=bryner


git-svn-id: svn://10.0.0.236/trunk@148526 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 03:18:10 +00:00
dwitte%stanford.edu
5a3e11a293 remove support for network.cookies.strictDomains pref, since there's not much point in keeping it around.
b=223617, r+sr=darin, thanks to mvl for testing.


git-svn-id: svn://10.0.0.236/trunk@148525 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 03:13:54 +00:00
caillon%returnzero.com
e64c44f945 Make content grab the cached security manager off of nsContentUtils rather than ask the service manager to find one.
Bug 223192; r+sr=bzbarsky


git-svn-id: svn://10.0.0.236/trunk@148524 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 03:01:25 +00:00
dwitte%stanford.edu
53f764ca0b clean up REQUIRES lines in makefiles, since most modules don't need 'cookie' anymore.
b=221886, r+sr=darin


git-svn-id: svn://10.0.0.236/trunk@148523 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 03:00:56 +00:00
dwitte%stanford.edu
55a5a686dc remove nsCCookieManager.h in favor of nsNetCID.h.
b=221886, r+sr=darin


git-svn-id: svn://10.0.0.236/trunk@148522 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 02:59:31 +00:00
caillon%returnzero.com
34f81b2b3a Ensure that content can always grab a security manager and namespace manager.
Bug 223373; r+sr=bzbarsky


git-svn-id: svn://10.0.0.236/trunk@148521 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 02:53:08 +00:00
dwitte%stanford.edu
8d76b5f1f0 polish the nsICookieManager2::Add interface a tad.
b=222343, r=danm, sr=darin.


git-svn-id: svn://10.0.0.236/trunk@148520 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 02:50:11 +00:00
dwitte%stanford.edu
f01916197a optimize nsCookie a tad by not storing an isDomain parameter.
b=223289 r+sr=darin


git-svn-id: svn://10.0.0.236/trunk@148519 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 02:43:07 +00:00
dwitte%stanford.edu
6d7197efd4 remove unused items in wallet. the following files will be cvs removed shortly:
public/nsIKeyedStreamGenerator.idl
public/nsIPasswordSink.idl
src/nsWalletBuiltInDataSources.h
src/nsBasicStreamGenerator.cpp
src/nsBasicStreamGenerator.h

b=204184 p=mvl r=me sr=bryner


git-svn-id: svn://10.0.0.236/trunk@148518 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 02:39:10 +00:00
dwitte%stanford.edu
1304a87b34 clean up warnings in wallet
b=204184 p=timeless r=me sr=bryner


git-svn-id: svn://10.0.0.236/trunk@148517 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 02:34:16 +00:00
bzbarsky%mit.edu
881281f753 Make parsing super-large script/cdata/whatever blocks faster by using
size_forward as a lower-bound estimate for actual distance to end of string.
Bug 171124, r+sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@148516 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 02:34:03 +00:00
darin%meer.net
468bc07efc fixes bug 223352 "correct condition variable and timeout logic in nsIOThreadPool::ThreadFunc" r=wtc sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@148515 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 02:32:52 +00:00
bzbarsky%mit.edu
2ef66c24d2 Extension comparisons should be case-insensitive. Bug 223055, r=biesi, sr=darin
git-svn-id: svn://10.0.0.236/trunk@148514 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 02:20:23 +00:00
darin%meer.net
2f5f654992 fixes bug 86846 "PAC: Cannot display alert() in autproxy config file" r=biesi sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@148513 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 02:20:08 +00:00
bzbarsky%mit.edu
9b121778e7 Remove no-longer-used nav4algorithm code and corresponding debug code. Bug
223155, r+sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@148512 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 02:19:15 +00:00
darin%meer.net
7a44dc3f81 fixes bug 198806 "Image data memory leak resulting when images are saved (from browser tab)" r=dougt sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@148511 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 02:18:26 +00:00
bzbarsky%mit.edu
3f905fea8e Make nsExpatDriver and nsIExpatSink be on the same wavelength as far as passing
attributes to HandleStartElement.  Update callees as needed.  Bug 223470,
r=sicking, sr=peterv


git-svn-id: svn://10.0.0.236/trunk@148510 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 02:17:50 +00:00
ben%bengoodger.com
e543726b5f Incremental installer updates
git-svn-id: svn://10.0.0.236/trunk@148509 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 02:12:10 +00:00
timeless%mozdev.org
69949e4ab0 Bug 224016 unused variable nsresult result' in function int main(int, char**)'
r=darin sr=darin


git-svn-id: svn://10.0.0.236/trunk@148508 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 02:11:45 +00:00
ben%bengoodger.com
8121642bb9 More incremental updates.
git-svn-id: svn://10.0.0.236/trunk@148507 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 02:11:38 +00:00
timeless%mozdev.org
b18f127cb7 Bug 223697 nsMenuPopupFrame.cpp:1142:9: warning: multi-line comment
r=bz sr=bz


git-svn-id: svn://10.0.0.236/trunk@148506 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 02:09:52 +00:00
timeless%mozdev.org
69290f94cc Bug 223199 hostList leaks on OOM in nsPermissionManager::GetEnumerator
r=dwitte sr=roc


git-svn-id: svn://10.0.0.236/trunk@148505 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 02:09:13 +00:00
timeless%mozdev.org
7eaecacb3e Bug 222085 warning: initializer does not fit or is out of range: -1
r=darin sr=darin


git-svn-id: svn://10.0.0.236/trunk@148504 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 02:07:31 +00:00
timeless%mozdev.org
531f35a1cb Bug 220267 warning: unused variable const class NodeSet * nodes' In method nsresult txKeyFunctionCall::evaluate(class txIEvalContext *, class txAExprResult **)'
r=sicking sr=peterv


git-svn-id: svn://10.0.0.236/trunk@148503 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 02:06:51 +00:00
bzbarsky%mit.edu
11dc845cec Make attr() parsing have better error reporting and bail on attr(*|foo). Bug
223746, r+sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@148502 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 02:06:12 +00:00
timeless%mozdev.org
0f46196611 Bug 204184 Remove unused items from wallet.cpp/wallet.h
r=dwitte sr=bryner


git-svn-id: svn://10.0.0.236/trunk@148501 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 02:04:31 +00:00
bzbarsky%mit.edu
a152f4eba8 Add NSPR logging to content dispatch (not forced on in release builds; the
module is "URILoader").  Bug 223694, r=biesi, sr=darin


git-svn-id: svn://10.0.0.236/trunk@148500 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 02:03:41 +00:00
timeless%mozdev.org
e6ee795ff4 Bug 129104 account central for imap server should have subscribe option just like news
patch by borggraefe@despammed.com r=timeless sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@148499 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 02:01:14 +00:00
timeless%mozdev.org
58b9775369 Bug 124218 if kCSSRawKeywords gets out of sync with eCSSKeyword_COUNT nsCSSKeywords::AddRefTable might crash in DEBUG code
r=bz sr=bz


git-svn-id: svn://10.0.0.236/trunk@148498 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 01:59:15 +00:00
dbaron%dbaron.org
a7b5bdb4fe Add missing null terminator to fix crash. b=224039 Patch from Adam James Fitzpatrick <ajfitzpatrick@lurking.org>. r+sr=bzbarsky,dbaron
git-svn-id: svn://10.0.0.236/trunk@148497 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 01:53:53 +00:00
dbaron%dbaron.org
776f9f50ae Make play-during a true shorthand so it gets parsed correctly after the nsCSSDeclaration storage rewrite. b=223718 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@148496 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 01:51:00 +00:00
dbaron%dbaron.org
707d768477 Fix shutdown leak of GDK windows by destroying hidden widget before event loop shutdown. b=219521 r=blizzard sr=bryner
git-svn-id: svn://10.0.0.236/trunk@148495 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 01:48:41 +00:00
dbaron%dbaron.org
1a2977b836 Store the original string for URL values so that composer and CSSOM do not make relative URLs absolute. b=167262 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@148494 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 01:45:37 +00:00
dbaron%dbaron.org
220a62afce Implement element.style for XUL elements. Fully fault XUL attributes when style attribute is modified, and ensure that string and style rule versions of style attribute stay in sync. (HTML elements only store the latter.) b=7639 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@148493 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 01:40:33 +00:00
timeless%mozdev.org
13a53d50fd Bug 73748 Remove nsJSComponentManager.js and nsJSSupportsUtils.js
work by doronr@us.ibm.com r=timeless sr=jag


git-svn-id: svn://10.0.0.236/trunk@148492 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 01:39:08 +00:00
timeless%mozdev.org
1d6ebf2e88 Bug 222387 Release SetIcon stored icons when we are done using them
r=ere sr=bz


git-svn-id: svn://10.0.0.236/trunk@148491 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 01:35:14 +00:00
caillon%returnzero.com
f401257c19 Permit content to link to about:logo
Bug 223293; r=timeless sr=jst


git-svn-id: svn://10.0.0.236/trunk@148490 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 01:35:09 +00:00
bienvenu%nventure.com
43687bf922 fix 223062 problem downloading pop3 messages with embedded nulls, patch by ch.ey@gmx.net, r=me,sr=mscott
git-svn-id: svn://10.0.0.236/trunk@148489 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 01:32:59 +00:00
kiko%async.com.br
07fca020f4 Fix for bug 67663: globals.pl and CGI.pl emit "subroutine redefined"
messages. Fudge warnings via sillyness. r=myk, chaduv. a=myk.


git-svn-id: svn://10.0.0.236/trunk@148488 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 01:31:58 +00:00
bienvenu%nventure.com
a8e6e6d2f9 add prefs ui for offline startup to tbird offline extension, r/sr=mscott, not part of regular build, 221734
git-svn-id: svn://10.0.0.236/trunk@148486 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-30 01:12:00 +00:00
locka%iol.ie
bcaa4bc841 NOT PART OF BUILD. Fix to make CBrowse run in VC++ 7.0+
git-svn-id: svn://10.0.0.236/trunk@148483 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-29 23:04:54 +00:00
locka%iol.ie
915cbbc5a6 NOT PART OF BUILD. New c# test harness
git-svn-id: svn://10.0.0.236/trunk@148482 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-29 22:57:42 +00:00
pinkerton%netscape.com
83a68caeff change to 0.7+ and Mozilla Foundation
git-svn-id: svn://10.0.0.236/trunk@148481 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-29 20:00:35 +00:00
pinkerton%netscape.com
3d4ac2c576 correct problem where flag not set on toolbar bookmarks and schmear out
the loading of site icons to improve immediate startup (bug 223205)


git-svn-id: svn://10.0.0.236/trunk@148480 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-29 19:43:51 +00:00
pinkerton%netscape.com
f10c9606e5 clean up some issues with nib including placement of "add" buttons and
some images (bug 223413)


git-svn-id: svn://10.0.0.236/trunk@148479 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-29 19:40:33 +00:00
pinkerton%netscape.com
4d73efcf3f fix several issues: a) ensure bookmarks visible when launched via AE, open
search results window if it was hidden, preserves order of BM on drop,
fixes button states depending on container, cleanup some methods. (bug 223209)


git-svn-id: svn://10.0.0.236/trunk@148478 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-29 18:45:25 +00:00
pinkerton%netscape.com
55dc9e39fe define for panther
git-svn-id: svn://10.0.0.236/trunk@148477 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-29 17:58:15 +00:00
chanial%noos.fr
00a6832942 - Rewrite the way we handle print preview so that it can be used in any XUL app. This is achieved by adding a new "public" method to PrintUtils:
PrintUtils.printPreview(enterPPCallback, exitPPCallback) where the optional callback functions are called just before entering and after exiting PP mode

- disable all short keys in PP mode except ctrl-W and fix bug 178485 and bug 215277. Now clicking the close window icon actually closes the window.

- global vars gPrintSettingsAreGlobal, gSavePrintSettings, gPrintSettings, gOldCloseHandler, gInPrintPreviewMode, gWebProgress are removed.

- A lot of cleanup.


git-svn-id: svn://10.0.0.236/trunk@148474 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-29 08:01:27 +00:00
kiko%async.com.br
dde995876d Additional patch for bug 221039: update filterexceptions.pl to take into
account the new location for knum. Here's hoping this fixes the bustage.


git-svn-id: svn://10.0.0.236/trunk@148473 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-29 04:51:15 +00:00
kiko%async.com.br
7a5767892b Fix for bug 221039: Separating knob in edit.html.tmpl. Splits
bug/edit.html.tmpl into bug/knob.html.tmpl. Patch by Ludovic Dubost
<ludovic@pobox.com>, r=kiko, a=justdave.


git-svn-id: svn://10.0.0.236/trunk@148472 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-29 04:32:39 +00:00
kiko%async.com.br
5ab620388e Fix for bug 111522: Provide ability to specify MIME type of attachment
when downloading. Adds a 'ctype' argument to attachment.cgi which allows
one to override the content-type when viewing an attachment. Original
patch by Alex Vincent <ajvincent@juno.com>; I changed it a tiny bit.
r=kiko, myk. a=justdave.


git-svn-id: svn://10.0.0.236/trunk@148470 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-29 01:58:13 +00:00
despotdaemon%netscape.com
6ee3e00d55 Pseudo-automatic update of changes made by dmose@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148469 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-29 01:56:13 +00:00
bienvenu%nventure.com
45c61d7f0a fix regression in handling of non-7-bit ascii passwords, r=ch.ey@gmx.net, sr=mscott, a=sspitzer 218025
git-svn-id: svn://10.0.0.236/trunk@148468 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-28 21:00:57 +00:00
bienvenu%nventure.com
f059e998f9 fix pop3 inbox corruption when bayesian spam filters run on two accounts at the same time, i.e., startup, r=sspitzer, sr=mscott, a=sspitzer 218433
git-svn-id: svn://10.0.0.236/trunk@148467 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-28 19:00:48 +00:00
mostafah%oeone.com
de95a0b65e Added registering of other languages to installer
git-svn-id: svn://10.0.0.236/trunk@148464 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-28 17:51:02 +00:00
igor%mir2.org
ccac7e82cb First part of resolving http://bugzilla.mozilla.org/show_bug.cgi?id=223435 :
Allow to pass JS function to Java method accepting interface with single method. The function will be called when interface method will be called.


git-svn-id: svn://10.0.0.236/trunk@148460 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-28 08:37:30 +00:00
jocuri%softhome.net
a0d7e28441 Bug 223854: masscc on change several bugs doesn't honor usermatchmode; patch by Jon <kniht@us.ibm.com>; r=myk; a=myk.
git-svn-id: svn://10.0.0.236/trunk@148459 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-28 06:37:40 +00:00
jpierre%netscape.com
5b19d5463a Fix for 223494 - cmsutil signing does not work with hardware tokens. r=wtc, relyea
git-svn-id: svn://10.0.0.236/trunk@148458 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-28 02:34:15 +00:00
despotdaemon%netscape.com
e36d17cbf3 Pseudo-automatic update of changes made by saul.edwards@sun.com.
git-svn-id: svn://10.0.0.236/trunk@148457 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-28 02:31:48 +00:00
despotdaemon%netscape.com
f9079b9458 Pseudo-automatic update of changes made by saul.edwards@sun.com.
git-svn-id: svn://10.0.0.236/trunk@148456 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-28 02:30:51 +00:00
despotdaemon%netscape.com
f700af4b29 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148455 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-28 01:38:19 +00:00
despotdaemon%netscape.com
192c154d98 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148454 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-28 01:35:36 +00:00
despotdaemon%netscape.com
84fe6ad534 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148453 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-28 01:33:00 +00:00
ben%bengoodger.com
17a25fcea4 Adding something that helps fix problems with generated rsc headers.
git-svn-id: svn://10.0.0.236/trunk@148451 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-27 23:25:59 +00:00
timeless%mozdev.org
5a6f62a646 Bug 223336 Cannot perform search from sidebar
suggestion by zack-weg@gmx.de r=neil sr=bz a=asa


git-svn-id: svn://10.0.0.236/trunk@148450 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-27 22:26:31 +00:00
ben%bengoodger.com
55e9c0b682 Default application handler values are blank on MacOS X
git-svn-id: svn://10.0.0.236/trunk@148449 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-27 21:49:01 +00:00
bienvenu%nventure.com
b3a7ac5795 add prefs ui for offline startup, 221734, r=neil@parkway, sr=mscott, a=sspitzer
git-svn-id: svn://10.0.0.236/trunk@148447 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-27 20:13:02 +00:00
bryner%brianryner.com
714aad1d3d Don't set mCurrentFocus to null after firing a blur if the blur handler focused something. Bug 147927, r=blizzard, sr=jst, a=sspitzer
git-svn-id: svn://10.0.0.236/trunk@148446 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-27 19:52:49 +00:00
igor%mir2.org
fd515864f8 Added getAssociatedValue()/associateValue() to allow to connect arbitrary application-specific object with ScriptableObject.
git-svn-id: svn://10.0.0.236/trunk@148445 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-27 19:19:50 +00:00
brendan%mozilla.org
1280510f81 Don't under-malloc for short script filename entry (223810, r=shaver, a=dbaron).
git-svn-id: svn://10.0.0.236/trunk@148444 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-27 19:13:01 +00:00
igor%mir2.org
297cdb6e82 Added initHash which would put value into hashtable only if it is first. This is usable to ensure proper synchronization with lazy initialization.
git-svn-id: svn://10.0.0.236/trunk@148443 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-27 18:45:39 +00:00
igor%mir2.org
a40039476f If invoker master throws RuntimeException during creation of invoker, then disable invokerOptimization. It fixes regression when SecurityManager prevents InvokerMaster from creation of class loader.
git-svn-id: svn://10.0.0.236/trunk@148442 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-27 18:42:39 +00:00
mostafah%oeone.com
22ead87aef Added Slovenian language pack
git-svn-id: svn://10.0.0.236/trunk@148441 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-27 18:25:51 +00:00
mostafah%oeone.com
738a8f07db Fixed some white-space issues
git-svn-id: svn://10.0.0.236/trunk@148440 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-27 18:24:44 +00:00
pkw%us.ibm.com
16ca898227 Bug 222054 - mozilla-installer doesn't set LIBPATH.
r=dveditz+bmo@cruzio.com, sr=bryner@brianryner.com, a=asa@mozilla.org


git-svn-id: svn://10.0.0.236/trunk@148438 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-27 17:37:47 +00:00
bienvenu%nventure.com
ef255ce131 follow on patch for making ldap prefs migration happen at profile migration time 223560, fix building with disable_ldap, r/sr/a=sspitzer
git-svn-id: svn://10.0.0.236/trunk@148437 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-27 17:07:47 +00:00
tor%cs.brown.edu
1c0c1f182a Backout of bug 153586. a=asa
git-svn-id: svn://10.0.0.236/trunk@148436 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-27 17:00:38 +00:00
igor%mir2.org
05836ee5d7 Added addPush version taking long argument.
git-svn-id: svn://10.0.0.236/trunk@148431 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-27 15:47:05 +00:00
bryner%brianryner.com
f5bd560399 Fix unresolved references with static gtk2 build (bug 216022). The file containing NS_IMPL_NSGETMODULE for a library must be compiled from the Makefile that sets IS_COMPONENT in order for the entry point translation to work correctly. r=cls, not part of the default build.
git-svn-id: svn://10.0.0.236/trunk@148430 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-27 10:11:00 +00:00
bryner%brianryner.com
3396e1763c Only call gnome_program_init() if it hasn't already been called (bug 221012). r=blizzard, not part of the default build.
git-svn-id: svn://10.0.0.236/trunk@148429 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-27 10:08:10 +00:00
bzbarsky%mit.edu
69dd03fc39 Fix hang bug 218512. We don't want to be putting a frame into a framelist
twice, since that gives us a nice loop in the frame tree.  r+sr+a=dbaron


git-svn-id: svn://10.0.0.236/trunk@148428 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-27 05:58:23 +00:00
chanial%noos.fr
e5e936a2f1 use toolkit routines from printUtils.js to print and show the page setup dialog.
git-svn-id: svn://10.0.0.236/trunk@148427 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-27 04:36:20 +00:00
chanial%noos.fr
1d92551092 - fix two js warnings in printPreviewBindings.xml (redeclaration of var ifreq and total)
- remove useless class toolbarbutton-icon
- rename class last-arrow to left-arrow and next-arrow to right-arrow


git-svn-id: svn://10.0.0.236/trunk@148426 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-27 04:30:55 +00:00
chanial%noos.fr
357a81f846 bug 223763: home arrow icon not displayed in print preview. printing.css has to be preprocessed.
git-svn-id: svn://10.0.0.236/trunk@148425 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-27 04:21:20 +00:00
chanial%noos.fr
19c85e8fce fix js warning: redeclaration of var str. Some cleanup, untabify
git-svn-id: svn://10.0.0.236/trunk@148424 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-27 03:36:59 +00:00
chanial%noos.fr
ba4bee36c4 fix js warning: redeclaration of var target
git-svn-id: svn://10.0.0.236/trunk@148423 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-27 03:01:53 +00:00
pschwartau%netscape.com
5f45346624 Replacing "Copyright ©" by "Copyright (C)" in JS test suite sources. See bug 222759.
git-svn-id: svn://10.0.0.236/trunk@148422 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-27 01:49:27 +00:00
dbaron%dbaron.org
f126b158cf Remove some additional tests with form submission and with delays. Not part of build.
git-svn-id: svn://10.0.0.236/trunk@148419 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 22:27:02 +00:00
ben%bengoodger.com
fe3b36f972 Bug 223329 - relocate the nspr dylib so that address conflict does not occur in Firebird and prevent prebinding to occur. Patch by bryner, r=ben. a=asa
git-svn-id: svn://10.0.0.236/trunk@148415 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 22:14:03 +00:00
ben%bengoodger.com
368287d17b Bug 206936 - firebird shows an XML error when opening links from external apps, caused by bug 223197 - command line service on Mac should be using browser.chromeURL pref to locate main application XUL file, not hard coding to use navigator.xul. r=smfr/ccarlen, sr=smfr, a=asa
git-svn-id: svn://10.0.0.236/trunk@148414 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 22:11:49 +00:00
chanial%noos.fr
44e1c33569 bug 223757: fix customize charset bustage. patch by Steffen Wilberg <steffen.wilberg@web.de>
-------------


git-svn-id: svn://10.0.0.236/trunk@148413 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 21:10:16 +00:00
chanial%noos.fr
b743e1b4d5 Hook up Page Setup and Print to view source.
git-svn-id: svn://10.0.0.236/trunk@148412 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 20:24:17 +00:00
chanial%noos.fr
a25bd1dfdd Significantly rewrite the old printing.js:
- define an object PrintUtils that has two "public" methods: PrintUtils.print() to print the content and PrintUtils.showPageSetup() to launch the setup dialog.
- global variables gPrintSettings, gPrintSettingsAreGlobal and gSavePrintSettings are removed. These variables were not true cached variables since they were recalculated every time and only used as intermediary.


git-svn-id: svn://10.0.0.236/trunk@148411 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 20:13:55 +00:00
chanial%noos.fr
d13b02982d add printUtils.js to the toolkit (copied from printing.js)
git-svn-id: svn://10.0.0.236/trunk@148410 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 19:22:03 +00:00
dbaron%dbaron.org
c6ad19a5f1 Remove a few extras. Not part of build.
git-svn-id: svn://10.0.0.236/trunk@148409 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 19:17:33 +00:00
bzbarsky%mit.edu
b77b023779 Last patch was by kjh-5727@comcast.net (Kenneth Herron)
git-svn-id: svn://10.0.0.236/trunk@148408 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 19:15:37 +00:00
bzbarsky%mit.edu
1b233a2585 Fix landscape printing to work again. Bug 223625, r=tor, sr=bzbarsky, a=asa
git-svn-id: svn://10.0.0.236/trunk@148407 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 17:56:11 +00:00
rlk%trfenv.com
f42b89bb3d Bug 161740 - Remove obsolete help files from builds. r=neil@parkwaycc.co.uk a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@148406 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 17:45:18 +00:00
bienvenu%nventure.com
f7ce6afc73 fix password prompt when using authenticated smtp, r=ch.ey@gmx.net, sr/a=sspitzer 90507
git-svn-id: svn://10.0.0.236/trunk@148405 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 17:39:28 +00:00
bienvenu%nventure.com
547cca42d0 make profile upgrade from 4.x convert address books at upgrade time, r=mscott,sr/a=sspitzer 223560
git-svn-id: svn://10.0.0.236/trunk@148404 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 17:37:10 +00:00
bienvenu%nventure.com
d60c5151b8 prompt for starting up in offline mode, use network.online instead of network offline, r=neil@parkway.uk, sr=mscott, a=sspitzer 221734
git-svn-id: svn://10.0.0.236/trunk@148403 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 17:34:52 +00:00
chanial%noos.fr
97e1667f45 bug 223721 and 223728: fix view source and print preview bustage. patches by Steffen Wilberg <steffen.wilberg@web.de>
git-svn-id: svn://10.0.0.236/trunk@148402 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 16:10:59 +00:00
jocuri%softhome.net
956dea394f Bug 222204: A mailto: link for the reporter would be very useful; r=kiko; a=justdave.
git-svn-id: svn://10.0.0.236/trunk@148401 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 14:10:08 +00:00
jocuri%softhome.net
82648d036a Bug 221900: duplicates.cgi query fails if more than one product selected; patch by chaduv <caduvall@glue.umd.edu>; r=gerv; a=justdave.
git-svn-id: svn://10.0.0.236/trunk@148400 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 14:01:04 +00:00
bmlk%gmx.de
5922be7330 dont wrap urls at 80 chars limit not part of any build
git-svn-id: svn://10.0.0.236/trunk@148399 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 12:34:25 +00:00
ian%hixie.ch
be76d34cd6 eagerToHelp and ridiculouslyEagerToHelp modes. See bug 142371.
git-svn-id: svn://10.0.0.236/trunk@148398 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 12:14:39 +00:00
ian%hixie.ch
9d2f7235af Bug 141346: 'I am' wasn't learning correctly.
git-svn-id: svn://10.0.0.236/trunk@148397 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 11:58:06 +00:00
ian%hixie.ch
ff459ae97a Escape nicks in regular expressions so that they still work even if the bot is called something silly like '[bot]'. Bug 134599.
git-svn-id: svn://10.0.0.236/trunk@148396 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 11:30:09 +00:00
dbaron%dbaron.org
e6a407a99e URL updates. Not part of build, or even of regression tests.
git-svn-id: svn://10.0.0.236/trunk@148395 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 07:48:01 +00:00
justdave%syndicomm.com
5df98b5a95 Bug 223093: correcting the title on "perldoc Bugzilla::Auth::DB"
r= bbaetz, a= justdave


git-svn-id: svn://10.0.0.236/trunk@148394 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 05:43:29 +00:00
justdave%syndicomm.com
8cd1c855ae Bug 201294: showdependencygraph.cgi now uses the global IsOpenedState() sub instead of its own list of which states are open. This makes one less place to customize when sites change their statuses, and also includes UNCONFIRMED (which never got added when UNCONFIRMED was created).
r= gerv, a= justdave


git-svn-id: svn://10.0.0.236/trunk@148393 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 05:39:18 +00:00
justdave%syndicomm.com
4c3fe0b91d Bug 218386: add 'view-source:' to the link of URL protocols which automatcalyy get hyperlinked in comments.
r= timeless, a= justdave


git-svn-id: svn://10.0.0.236/trunk@148392 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 05:26:41 +00:00
chanial%noos.fr
f79c0ce7dd move printPreviewBindings.xml to the toolkit, fork printPreview.dtd
git-svn-id: svn://10.0.0.236/trunk@148391 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 05:00:15 +00:00
chanial%noos.fr
bda3a5efc1 fork the Print Page Setup
git-svn-id: svn://10.0.0.236/trunk@148390 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 04:28:25 +00:00
chanial%noos.fr
f541314594 add charset.dtd to the obsolete directory
git-svn-id: svn://10.0.0.236/trunk@148389 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 04:25:12 +00:00
chanial%noos.fr
b667e8b125 Bug 221597,221599: remove toolkit and browser dependencies to chrome://communicator/content/pref/pref-charset.xul by copying it to the toolkit and renaming it as customizeCharset.xul.
git-svn-id: svn://10.0.0.236/trunk@148388 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 04:03:29 +00:00
chanial%noos.fr
8bbc12d449 define classes to display arrows in menus (from communicator.css)
add hover state handling and left, right arrows


git-svn-id: svn://10.0.0.236/trunk@148387 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 03:59:30 +00:00
chanial%noos.fr
0430a4512a copied from pref-charset.dtd
git-svn-id: svn://10.0.0.236/trunk@148386 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 03:33:11 +00:00
chanial%noos.fr
caef985889 tri licencing
git-svn-id: svn://10.0.0.236/trunk@148385 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 03:28:11 +00:00
justdave%syndicomm.com
cf505a1184 Bug 208647: Fixes taint error in add new products code.
Patch by jpyeron@pyerotechnics.com (Jason Pyeron)
r= bbaetz, a= justdave


git-svn-id: svn://10.0.0.236/trunk@148384 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 02:37:48 +00:00
dwitte%stanford.edu
bf01efe92a er, for real this time...
git-svn-id: svn://10.0.0.236/trunk@148383 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 01:17:13 +00:00
dwitte%stanford.edu
46206d0d8d fix the domainwalking hashtable code to do a lookup for the toplevel domain. this fixes a regression where cookies for "localhost" weren't getting sent.
b=223365, r=mvl, sr=darin, a=asa.


git-svn-id: svn://10.0.0.236/trunk@148382 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-26 01:13:23 +00:00
darin%meer.net
c9254a5d8d fixes bug 221491 "crash [@ nsHostResolver::GetHostToLookup]" r=dougt sr=bzbarsky a=dbaron
git-svn-id: svn://10.0.0.236/trunk@148381 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-25 23:48:33 +00:00
chanial%noos.fr
96f6461c6a correct typo. no need to PP here. 80 column fix. untabify.
git-svn-id: svn://10.0.0.236/trunk@148380 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-25 20:16:48 +00:00
chanial%noos.fr
180b8d0969 bug 223534: alt+enter for opening URL in new tab doesn't work at all. Fix the problem by preventing Alt+Enter default action in the bubbling phase instead of the capturing one so that Alt+Enter can be handled and still doesn't beep on WinXP.
git-svn-id: svn://10.0.0.236/trunk@148379 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-25 19:31:07 +00:00
varga%nixcorp.com
8a9b707b9e Fixing a deadlock.
git-svn-id: svn://10.0.0.236/trunk@148378 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-25 19:17:55 +00:00
bienvenu%nventure.com
562c22d655 ignore ldap hosts after the first host (i.e., space delimited host lists) until we can make multiple hosts work r=mscott, sr=dmose,a=asa 223603
git-svn-id: svn://10.0.0.236/trunk@148377 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-25 15:34:39 +00:00
wchang0222%aol.com
107fc21aee Bugzilla bug 223624: declare pk11_FindAttrInTemplate before it is used.
r=nelsonb.


git-svn-id: svn://10.0.0.236/trunk@148376 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-25 14:10:11 +00:00
wchang0222%aol.com
b7e3459c22 Bugzilla bug 223624: use PR_MAX to avoid redefining MAX, a macro commonly
defined in system headers. r=nelsonb.


git-svn-id: svn://10.0.0.236/trunk@148375 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-25 14:08:31 +00:00
wchang0222%aol.com
e0cbb82e15 Bugzilla bug 223624: removed an extraneous format string for fprintf.
r=nelsonb.


git-svn-id: svn://10.0.0.236/trunk@148374 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-25 14:05:08 +00:00
wchang0222%aol.com
770b984788 Bugzilla bug 223624: node->error is a 'long', so it should match a %ld
format.  r=nelsonb.


git-svn-id: svn://10.0.0.236/trunk@148373 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-25 14:01:43 +00:00
igor%mir2.org
f6f9a54c3a Common logic to create and cache adapter class on demand is moved to the new method getAdapterClass
git-svn-id: svn://10.0.0.236/trunk@148372 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-25 11:46:18 +00:00
igor%mir2.org
6679f3936f In getApplicationClassLoader cache result of Thread.getContextClassLoader if it coincides with the loader that loaded Context class.
git-svn-id: svn://10.0.0.236/trunk@148371 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-25 11:42:34 +00:00
myk%mozilla.org
6d616e758d Fix for bug 183788: make request mail go out when a request is created and there's no requestee but there is a cc: list
git-svn-id: svn://10.0.0.236/trunk@148370 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-25 01:34:33 +00:00
jpierre%netscape.com
5743a7c990 Initialize crlHandle . r=wtc
git-svn-id: svn://10.0.0.236/trunk@148369 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-25 00:41:14 +00:00
nelsonb%netscape.com
f7fdb337d0 Require DES, DES2 and DES3 keys to have correct length in all cases.
Expand DES2 keys to be DES3 keys when used with DES3 mechanisms.
Bug 201521.


git-svn-id: svn://10.0.0.236/trunk@148368 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-25 00:12:34 +00:00
cmanske%jivamedia.com
0bb2275d67 Fixed crash in table editing, b=217717, r=mozeditor, sr=dbaron, a=asa
git-svn-id: svn://10.0.0.236/trunk@148367 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 23:01:30 +00:00
brendan%mozilla.org
6d358001c6 Hack to cope with input case (/|/, /x|/, etc.) not handled by recent rewrite (223535, r=timeless, sr=shaver, a=asa).
git-svn-id: svn://10.0.0.236/trunk@148366 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 22:23:36 +00:00
scott%scott-macgregor.org
5a19e728c4 remove dos line endings from this file. I don't know why they keep showing up here
git-svn-id: svn://10.0.0.236/trunk@148365 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 22:19:32 +00:00
ian%hixie.ch
5124c50966 Skip variables in -E that have weird names (environment shouldn't be able to cause fatal errors)
git-svn-id: svn://10.0.0.236/trunk@148364 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 22:17:32 +00:00
scott%scott-macgregor.org
2da204ff9f Port Bug #92726 to thunderbird --> Save As should default to the message subject
git-svn-id: svn://10.0.0.236/trunk@148363 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 21:42:29 +00:00
mostafah%oeone.com
803d09039c Added comments describing reason for each file
git-svn-id: svn://10.0.0.236/trunk@148362 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 20:40:32 +00:00
rginda%netscape.com
38a473935a bug 223247, unable to connect to irc servers: internal error dispatching
command “goto-url”
a=asa

js engine new returns empty array element for optional captures in regexps, we need to account for that.


git-svn-id: svn://10.0.0.236/trunk@148361 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 18:29:35 +00:00
darin%meer.net
20e799da95 follow-up patch for bug 117026 "bookmark properties dialog very slow to load" patch=alfredkayser@nl.ibm.com, r=p_ch@verizon.net, sr=bzbarsky@mit.edu
git-svn-id: svn://10.0.0.236/trunk@148360 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 18:24:13 +00:00
myk%mozilla.org
524a8b2a99 Updated README with better instructions and fixed Perl path at top of doctor.cgi not to be wierd now that we're on new server.
git-svn-id: svn://10.0.0.236/trunk@148359 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 18:03:10 +00:00
pschwartau%netscape.com
6b1196c6e9 Adding more cases.
git-svn-id: svn://10.0.0.236/trunk@148358 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 17:55:06 +00:00
pschwartau%netscape.com
a90a29db2f Initial add. Regression test for bug 223535.
git-svn-id: svn://10.0.0.236/trunk@148357 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 17:47:36 +00:00
pschwartau%netscape.com
9215aeea01 Follow Perl 5, not ECMA-262 Ed 3 on unescaped, unbalanced brackets and braces. See bug 223273.
git-svn-id: svn://10.0.0.236/trunk@148356 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 17:18:21 +00:00
wchang0222%aol.com
f8f6a925ea Bugzilla bug 173715: fixed a crash in OCSP. We incorrectly assumed that
'addr' was the last IP address of the host when PR_EnumerateHostEnt
returned 0 and attempted to connect to 'addr', resulting in an assertion
failure in PR_Connect. The fix is to not use 'addr' when
PR_EnumerateHostEnt returns 0.  r=relyea.


git-svn-id: svn://10.0.0.236/trunk@148355 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 17:17:37 +00:00
tor%cs.brown.edu
f653cc5dfa Bug 223551 - postscript output invalid in locales not using periods
for decimals.  Patch by kjh-5727@comcast.net,  r=tor, sr=bzbarsky, a=roc.


git-svn-id: svn://10.0.0.236/trunk@148354 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 16:27:11 +00:00
neil%parkwaycc.co.uk
8a835973d4 Bug 92726 Save As should default to the message subject r=me moa=glazou sr=bienvenu a=asa
git-svn-id: svn://10.0.0.236/trunk@148353 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 12:13:46 +00:00
ben%bengoodger.com
35330a41e4 Update static rules for Mac to ensure we link against Quicktime.
git-svn-id: svn://10.0.0.236/trunk@148352 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 07:44:34 +00:00
ben%bengoodger.com
fcfc68a829 MacOS X Firebird Updates:
- bug 222688 (tabbrowser.xml)
- downloads options panel is broken (pref-downloads.js)


git-svn-id: svn://10.0.0.236/trunk@148351 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 07:43:01 +00:00
ben%bengoodger.com
ed821d3d02 MacOS X Firebird updates:
- bug 217121 (contentAreaUtils.js)
- bug 223331 (browser.js)
- bug 223330 (all.js)


git-svn-id: svn://10.0.0.236/trunk@148350 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 07:41:43 +00:00
bzbarsky%mit.edu
af8a4e9beb Adding regression tests.
git-svn-id: svn://10.0.0.236/trunk@148347 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 07:36:06 +00:00
bzbarsky%mit.edu
a8b4c204ea Fix regression bug 223394 -- percent-height replaced inlines that only have
auto-height ancestors should get intrinsic height instead of 0, even in quirks
mode.  r+sr=roc, a=asa


git-svn-id: svn://10.0.0.236/trunk@148346 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 07:31:50 +00:00
chanial%noos.fr
12dd4fcc3e Bug 223277: real fix concerning the event chain + Band aid patch for an XBL bug.
git-svn-id: svn://10.0.0.236/trunk@148345 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 06:55:04 +00:00
wchang0222%aol.com
968ae899f4 Removed the nonexistent directory 'rngtest' from DIRS.
git-svn-id: svn://10.0.0.236/trunk@148343 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 06:22:58 +00:00
wchang0222%aol.com
3bd9e58d79 Removed nonexistent directory "crypto" from DIRS.
git-svn-id: svn://10.0.0.236/trunk@148342 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 05:29:08 +00:00
wchang0222%aol.com
4a499dd80b Bugzilla bug 223427: added a note section so that the linker knows we're
not executing off the stack.  This patch is received from Christopher
Blizzard of Red Hat <blizzard@redhat.com>.


git-svn-id: svn://10.0.0.236/trunk@148341 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 04:47:23 +00:00
wchang0222%aol.com
8e392fef5e Bugzilla bug 223427: added a note section so that the linker knows we are
not executing off the stack.  This patch is received from Christopher
Blizzard of Red Hat <blizzard@redhat.com>.


git-svn-id: svn://10.0.0.236/trunk@148340 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 04:12:54 +00:00
tor%cs.brown.edu
841b091318 Bug 222293 - gif crasher if animation overlay is offscreen in only one
direction.  r=paper, sr=blizzard, a=asa.


git-svn-id: svn://10.0.0.236/trunk@148339 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 02:58:03 +00:00
dean_tessman%hotmail.com
e92d91df8b 213250 - get middle click working properly in XML documents.
p=bugzilla@accessibleinter.net, r=me


git-svn-id: svn://10.0.0.236/trunk@148338 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 02:11:53 +00:00
wchang0222%aol.com
d4c2b98b27 Use a larger buffer.
git-svn-id: svn://10.0.0.236/trunk@148335 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 01:34:28 +00:00
wchang0222%aol.com
0198e54fd4 Added a missing printf statement.
git-svn-id: svn://10.0.0.236/trunk@148334 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 01:17:42 +00:00
wchang0222%aol.com
d723099aa8 Added formattm.c, a test program for PR_FormatTime and
PR_FormatTimeUSEnglish.


git-svn-id: svn://10.0.0.236/trunk@148333 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 01:02:40 +00:00
pschwartau%netscape.com
7bc0e7c6d1 Correcting a mistake: remember to escape the escape character inside eval strings!
git-svn-id: svn://10.0.0.236/trunk@148332 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 00:51:37 +00:00
wchang0222%aol.com
d9654c791b Bugzilla bug 217121: fixed a crash in strftime on Mac OS X. The patch is
contributed by Ben Goodger <bugs@bengoodger.com>.


git-svn-id: svn://10.0.0.236/trunk@148331 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 00:47:19 +00:00
brendan%mozilla.org
6a4d4696b5 Fix to error on extra ) in regexp rather than corrupt 'n' crash (223273, r=timeless, sr=shaver, a=asa).
git-svn-id: svn://10.0.0.236/trunk@148330 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 00:37:49 +00:00
uid502
adfec216b5 Bug 80190. Emit twips measurements into PS code and let the PS engine do the scaling. r=tor,sr=roc,a=roc. Thanks to kherron who did the patch.
git-svn-id: svn://10.0.0.236/trunk@148329 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-23 22:43:04 +00:00
sicking%bigfoot.com
ff5093b729 Bug 222667: Add newlines between root-nodes in serializer rather then encoder.
r=peterv sr=jst


git-svn-id: svn://10.0.0.236/trunk@148328 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-23 22:24:21 +00:00
nicolson%netscape.com
5f37bf9fe5 try forcing the bourne shell to execute the command line.
git-svn-id: svn://10.0.0.236/trunk@148327 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-23 22:01:55 +00:00
igor%mir2.org
39ec1b9a51 Added information on shared scopes
git-svn-id: svn://10.0.0.236/trunk@148326 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-23 21:49:23 +00:00
igor%mir2.org
0d52480bc1 Updated to remove NotAFunction exception handler which is not generated any more and was deprecated.
git-svn-id: svn://10.0.0.236/trunk@148325 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-23 21:48:45 +00:00
pschwartau%netscape.com
737d4d9af3 Whitespace fix.
git-svn-id: svn://10.0.0.236/trunk@148324 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-23 21:15:06 +00:00
pschwartau%netscape.com
99cfdc5fdc Fixing a comment.
git-svn-id: svn://10.0.0.236/trunk@148323 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-23 21:13:34 +00:00
pschwartau%netscape.com
deaebdb912 Added cases covering unbalanced brackets and braces.
git-svn-id: svn://10.0.0.236/trunk@148322 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-23 20:48:43 +00:00
pschwartau%netscape.com
f6dd1df088 Initial add. Regression test for bug 223273.
git-svn-id: svn://10.0.0.236/trunk@148321 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-23 20:27:32 +00:00
dbaron%dbaron.org
7887a751fa Not-so-automated update.
git-svn-id: svn://10.0.0.236/trunk@148320 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-23 19:47:31 +00:00
mcs%netscape.com
5a75e66856 Additional fix for 221694 - ber_get_next_buffer_ext() fails when
length or tag is split across buffers.
Improve backwards compatibility by setting *Bytes_Scanned to zero
when errors occur; use errno to report specific errors.


git-svn-id: svn://10.0.0.236/trunk@148318 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-23 19:35:02 +00:00
pinkerton%netscape.com
48880b3c48 add context menu to history items and change the icon to the normal
bookmark icon (bug 223417)


git-svn-id: svn://10.0.0.236/trunk@148317 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-23 19:30:58 +00:00
pinkerton%netscape.com
e56ad6c8b1 fix for special folder icons resetting to the default when losing the
blessing of being the dock menu (bug 223210)


git-svn-id: svn://10.0.0.236/trunk@148316 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-23 19:04:46 +00:00
sfraser%netscape.com
6e078b2fa7 Bug 223323: fix building under panther, where pbxbuild is replaced by xcodebuild. r=pink, sr=bryner.
git-svn-id: svn://10.0.0.236/trunk@148315 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-23 17:47:33 +00:00
mkaply%us.ibm.com
74ef1ed741 a=me - I completely horked this file when I checked it in' nsIDragSessionOS2.h
git-svn-id: svn://10.0.0.236/trunk@148309 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-23 13:49:12 +00:00
timeless%mozdev.org
c9c7dab5e9 MOZ_TIMELINE - Bug 222134
git-svn-id: svn://10.0.0.236/trunk@148306 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-23 10:23:30 +00:00
dbaron%dbaron.org
2ac935715c Incorrect test in previous checkin. b=220291
git-svn-id: svn://10.0.0.236/trunk@148305 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-23 02:29:47 +00:00
wchang0222%aol.com
0904e36810 Bugzilla bug 214411: fixed a bug introduced in the previous checkin.
threadid_key_destructor may get called on the primordial thread if the app
doesn't call PR_Cleanup and the assertion would fail.  Thanks to
Gerard Roos <gerard.roos@adnovum.ch> for contributing the patch.


git-svn-id: svn://10.0.0.236/trunk@148302 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-23 00:43:36 +00:00
dbaron%dbaron.org
4b423f3e78 Combine NSCAP_FEATURE_FACTOR_DESTRUCTOR and NSCAP_FEATURE_DEBUG_PTR_TYPES into NSCAP_FEATURE_USE_BASE to fix leaks when mixing builds compiled in different ways. b=220291 r=scc sr=bryner a=asa
git-svn-id: svn://10.0.0.236/trunk@148301 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 23:29:00 +00:00
mkaply%us.ibm.com
a1cadf9035 #218312
r=pedemont, sr=blizzard (platform specific), a=mkaply
Code from Rich Walsh - OS/2 drag drop improvements


git-svn-id: svn://10.0.0.236/trunk@148298 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 21:57:01 +00:00
tor%cs.brown.edu
9a66c4e76f Bug 205761 - some GIF files don't uncompress. r=paper, sr=bryner, a=asa
git-svn-id: svn://10.0.0.236/trunk@148297 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 21:12:36 +00:00
pkw%us.ibm.com
09ec6a6661 Backing out previous patch - didn't have drivers approval. Sorry.
git-svn-id: svn://10.0.0.236/trunk@148296 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 19:35:54 +00:00
pkw%us.ibm.com
549db2de71 Bug 222054 - mozilla-installer doesn't set LIBPATH.
r=dveditz+bmo@cruzio.com, sr=bryner@brianryner.com


git-svn-id: svn://10.0.0.236/trunk@148295 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 19:32:48 +00:00
bryner%brianryner.com
4f4a573f72 Persist size/position and column widths for password manager dialog. Bug 217147, patch by steffen.wilberg@web.de, r=me
git-svn-id: svn://10.0.0.236/trunk@148294 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 19:05:05 +00:00
tor%cs.brown.edu
d593d5786a Fixing build bustage from 153586. r+sr=jst, a=tor
git-svn-id: svn://10.0.0.236/trunk@148293 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 18:15:15 +00:00
chanial%noos.fr
0920161786 fixing bogus a dependency to comm.jar I just introduced. Thanks to Steffen Wilberg for noticing.
git-svn-id: svn://10.0.0.236/trunk@148292 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 18:10:25 +00:00
pinkerton%netscape.com
f3d6ce18c5 clean up decomtamination changes
git-svn-id: svn://10.0.0.236/trunk@148291 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 15:59:25 +00:00
pinkerton%netscape.com
0a87b57e3f remove "new files" folder left by accident
git-svn-id: svn://10.0.0.236/trunk@148290 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 15:59:07 +00:00
mostafah%oeone.com
866d283473 Added hour/minute increment/decrement functionality to timepicker
git-svn-id: svn://10.0.0.236/trunk@148289 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 14:59:44 +00:00
pinkerton%netscape.com
5bf2241b47 fix build bustage from decomification of nsIDocument
git-svn-id: svn://10.0.0.236/trunk@148288 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 14:56:07 +00:00
chanial%noos.fr
358be1e1e2 Adding viewSource.properties
git-svn-id: svn://10.0.0.236/trunk@148287 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 14:54:11 +00:00
mostafah%oeone.com
324a9b2ab2 Updated sunbird images
git-svn-id: svn://10.0.0.236/trunk@148286 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 14:22:06 +00:00
noririty%jcom.home.ne.jp
fede385ddb Fixing build failure (viewSource.properties doesn't exist) b=221599
git-svn-id: svn://10.0.0.236/trunk@148283 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 13:13:26 +00:00
timeless%mozdev.org
5988879102 requires bustage bug 222134
git-svn-id: svn://10.0.0.236/trunk@148279 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 09:12:14 +00:00
bzbarsky%mit.edu
954cd25eb9 More bustage fixing. Bug 222134
git-svn-id: svn://10.0.0.236/trunk@148278 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 08:46:56 +00:00
chanial%noos.fr
d65eba5ead complete rewrite of search.xml: more functionalities with less code :-)
add shortkeys to toggle the search engine (bug 200884), by using ctrl-arrow up and down in the search bar.
remove the pref browser.search.defaultengine. Now we rely on the local store so we can have several windows with different search engines.


git-svn-id: svn://10.0.0.236/trunk@148277 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 08:45:54 +00:00
igor%mir2.org
70a3b7fb36 The class is no longer used.
git-svn-id: svn://10.0.0.236/trunk@148276 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 08:02:37 +00:00
chanial%noos.fr
f8fea9e83b sync the source viewer with the suite
git-svn-id: svn://10.0.0.236/trunk@148275 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 08:02:23 +00:00
igor%mir2.org
f036da6b9b 1. Added Context.hideFromContextListeners() which makes invisible for listeners.
2. Made sure that ContextListener.contextCreated is called only once. After a resent change to call the method from Context.enter, not from Context constructor the method would be called each time on first enter which broke the debugger.

3. Using new listener utilities from Kit instead of ListenerArray methods that would create a special storage object only if there is more then one listener.


git-svn-id: svn://10.0.0.236/trunk@148274 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 08:01:46 +00:00
chanial%noos.fr
32ea2705a6 sync the console with the suite
git-svn-id: svn://10.0.0.236/trunk@148273 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 08:00:39 +00:00
igor%mir2.org
85c74441d5 Added JavaDoc for listener utilities
git-svn-id: svn://10.0.0.236/trunk@148272 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 07:57:49 +00:00
chanial%noos.fr
429ee9db25 - add new debug routine dumpDOM that writes the DOM tree under a given element.
- enhance dumpOBJ debug routine to deal with null and properties not accessible that trigger an error
- enclose all the debug routine by a #ifdef DEBUG


git-svn-id: svn://10.0.0.236/trunk@148271 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 07:57:34 +00:00
chanial%noos.fr
8c99328bf2 cvs remove browser/components/search (not built)
git-svn-id: svn://10.0.0.236/trunk@148270 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 07:46:00 +00:00
dbaron%dbaron.org
90621a0deb Convert CR-LF line endings to LF.
git-svn-id: svn://10.0.0.236/trunk@148269 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 07:30:52 +00:00
caillon%returnzero.com
d16d7bd5ac Fixing bustage -- bryner forgot to update this file
Bug 222134


git-svn-id: svn://10.0.0.236/trunk@148267 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 07:04:16 +00:00
brendan%mozilla.org
1ee2e4b28b Check in rogerl's big perf patch (85721).
git-svn-id: svn://10.0.0.236/trunk@148266 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 07:01:50 +00:00
bzbarsky%mit.edu
b668306972 Fix crash bug 223064. Patch by mats.palmgren@bredband.net (Mats Palmgren), r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@148265 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 07:01:35 +00:00
bryner%brianryner.com
8183b564fd fixing bustage
git-svn-id: svn://10.0.0.236/trunk@148264 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 07:01:13 +00:00
dwitte%stanford.edu
00018f0913 move cookies to use hashtables instead of a sorted list, and implement a sane notifications
system for cookies and permissions. this will improve perf a bunch, and also sets the stage
for a more performant and flexible cookiemanager UI by providing better notifications.

bugs 143939 and 221185, with r=bsmedberg+mvl, sr=darin and r=mvl, sr=bz respectively.


git-svn-id: svn://10.0.0.236/trunk@148263 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 06:53:19 +00:00
bzbarsky%mit.edu
2cab296f61 Fix bug 164816. Patch by biesi, r=bzbarsky, sr=darin
git-svn-id: svn://10.0.0.236/trunk@148262 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 06:46:52 +00:00
caillon%returnzero.com
f567463ff6 Fixing bustage -- bryner forgot to update these files
Bug 222134


git-svn-id: svn://10.0.0.236/trunk@148261 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 06:41:30 +00:00
darin%meer.net
b9579bc109 fixes bug 222588 "Mozilla creates too many threads and seems to never terminate them" r=timeless sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@148260 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 06:38:39 +00:00
chanial%noos.fr
09b6003c9e add tri-licence
git-svn-id: svn://10.0.0.236/trunk@148259 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 06:35:37 +00:00
brendan%mozilla.org
f5be31d9a8 Add __noSuchMethod__ handler support, and clean up js_ValueToFunction/js_ReportIsNotDefined error diagnosis hard cases (196097, r=sparky).
git-svn-id: svn://10.0.0.236/trunk@148258 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 06:26:03 +00:00
bryner%brianryner.com
eeddf02bde deCOMtaminate nsIDocument by changing methods to use return value instead of out-params, eliminating unused nsresult return values, moving some members to nsIDocument and inlining the getters/setters. Bug 222134, r=bzbarsky, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@148257 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 06:09:48 +00:00
timeless%mozdev.org
591ecd0363 Bug 223158 Crash searching from partially loaded bugzilla query with magnifier running [@ nsDocAccessible::HandleMutationEvent]
r=caillon sr=bz


git-svn-id: svn://10.0.0.236/trunk@148256 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 05:43:46 +00:00
pinkerton%netscape.com
12fff3a1cb turn on auto image resizing by default (bug 197323)
git-svn-id: svn://10.0.0.236/trunk@148255 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 04:29:17 +00:00
nicolson%netscape.com
91d3c9bfb8 more debugging info.
git-svn-id: svn://10.0.0.236/trunk@148254 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 04:08:17 +00:00
jake%bugzilla.org
de095264d8 Bug 178624 - checksetup.pl needs to be run after copying templates to the custom directory.
git-svn-id: svn://10.0.0.236/trunk@148252 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 02:29:07 +00:00
jake%bugzilla.org
06df6bfa51 Bug 215051 - Document the language auto-chooser.
git-svn-id: svn://10.0.0.236/trunk@148248 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 01:26:04 +00:00
pinkerton%netscape.com
ce254174b7 bookmark system rewrite. thanks to dave haas and simon woodside (bug 212630)
git-svn-id: svn://10.0.0.236/trunk@148247 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 01:08:55 +00:00
timeless%mozdev.org
d9e3ea4fb7 Bug 221586 install size can be reduced by removing unreferenced files
git-svn-id: svn://10.0.0.236/trunk@148246 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 01:00:57 +00:00
wchang0222%aol.com
2aff98abf2 Bugzilla bug 222065: fixed a bug (inside #ifdef WINNT) introduced in the
previous checkin.


git-svn-id: svn://10.0.0.236/trunk@148244 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 01:00:10 +00:00
mkaply%us.ibm.com
43a098ec74 OS/2 bustage - makefile patch went to wrong file
git-svn-id: svn://10.0.0.236/trunk@148243 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 00:45:29 +00:00
timeless%mozdev.org
08194e1fbc Bug 219979 remove unused variable and function
r=dveditz sr=dveditz


git-svn-id: svn://10.0.0.236/trunk@148242 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 00:30:33 +00:00
rlk%trfenv.com
f3a03f0662 bug 169550 - Help window must be <= 462px height by default. r=caillon@aillon.org.
git-svn-id: svn://10.0.0.236/trunk@148241 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 00:06:46 +00:00
rginda%netscape.com
00ff46f203 changes between 0.9.40 and 0.9.44:
* Revision 0.9.44 fixes some more charset related problems. The user description is now properly decoded for /query views, and the channel name for mode messages.

* Revision 0.9.43 fixes the ``unknown CTCP'' handler, so that it displays the correct diagnostic, instead of ``my_unkctcpMsg''.

* Revision 0.9.42 fixes charset problems with part reasons, and another charset problem with kick messages. It also deals with spaces in nicknames and usernames by replacing them with underscores, instead of just failing to log in. This revision also makes it so that you no longer need to restart ChatZilla after changing your description or username.

* Revision 0.9.41 adds an ``autoperform'' pref to networks that can be used to execute arbitrary ChatZilla commands when you connect to a network. These autoperform commands will be executed before any of your ``Open At Startup'' channels are processed. This release also makes ChatZilla recognize the optional ``reason'' parameter for PART messages. Many IRC servers do not yet support PART reasons, so don't be surprised if you don't see any.


git-svn-id: svn://10.0.0.236/trunk@148240 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 23:47:35 +00:00
scott%scott-macgregor.org
f9d4d13df9 Bug #214400 --> allow distributors to allow 4.x profile migration via a pref instead of forcing it to be off for thunderbird and firebird.
This removes a MOZ_XUL_APP ifdef

sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@148239 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 23:36:47 +00:00
rlk%trfenv.com
758fbce89f Bug 220424 - Need to distinguish between Web links and Help links in Mozilla Help. r=neil.parkwaycc.co.uk
git-svn-id: svn://10.0.0.236/trunk@148238 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 23:24:10 +00:00
timeless%mozdev.org
b73d2d1412 Bug 222542 delayed profile install fails
patch by mnyromyr@tprac.de r=bsmedberg sr=alecf


git-svn-id: svn://10.0.0.236/trunk@148237 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 23:05:21 +00:00
scott%scott-macgregor.org
2c22193594 Port Bug #222390 --> format toolbarbuttons' width is too large
thanks to stephen walker for the port


git-svn-id: svn://10.0.0.236/trunk@148236 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 23:03:45 +00:00
scott%scott-macgregor.org
c2c06a0f57 change jan varga's email address
git-svn-id: svn://10.0.0.236/trunk@148235 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 23:02:38 +00:00
neil%parkwaycc.co.uk
62eef7c6e5 Bug 222940 POP3 Server Settings does not fit in Account Manager p=stefan@borggraefe.com r=me sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@148234 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 22:48:06 +00:00
mkaply%us.ibm.com
9191e6d76e Forgot makefile change for OS/2 plugin idl - 215581
git-svn-id: svn://10.0.0.236/trunk@148233 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 22:38:22 +00:00
mkaply%us.ibm.com
3311d6ac71 #221651 - r=mkaply - new OS/2 drag drop code
git-svn-id: svn://10.0.0.236/trunk@148232 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 22:21:33 +00:00
mkaply%us.ibm.com
f755e264a0 221070
r=pedemonte
OS/2 only - remove lack of activation on minimized windows


git-svn-id: svn://10.0.0.236/trunk@148231 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 22:19:25 +00:00
bienvenu%nventure.com
64966aece5 add js component to handle starting up in last offline state, or prompting at startup, 221734, r/sr=mscott
git-svn-id: svn://10.0.0.236/trunk@148230 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 22:15:07 +00:00
caillon%returnzero.com
c1914505cb Re-land patch for bug 83536, merging principal objects.
Also includes fixes from bug 216041.
r=bzbarsky
sr=jst


git-svn-id: svn://10.0.0.236/trunk@148229 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 22:11:49 +00:00
mkaply%us.ibm.com
39817850bd #215581
r=mkaply
OS/2 only code to support VACPP Compiled plugins stuff in the new GCC build


git-svn-id: svn://10.0.0.236/trunk@148228 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 22:11:20 +00:00
mkaply%us.ibm.com
b81b4ee198 #215581
r=mkaply
OS/2 only code to support VACPP Compiled XPCOM stuff in the new GCC build


git-svn-id: svn://10.0.0.236/trunk@148227 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 22:07:19 +00:00
pinkerton%netscape.com
54771381e3 use sizeToFit instead of trying to measure the text ourselves (bug 220494)
git-svn-id: svn://10.0.0.236/trunk@148226 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 22:02:53 +00:00
mkaply%us.ibm.com
a886c2d91a Mispelling of SHORT_LIBNAME
git-svn-id: svn://10.0.0.236/trunk@148225 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 22:01:53 +00:00
pinkerton%netscape.com
e566c157b8 fix warnings (bug 173286)
git-svn-id: svn://10.0.0.236/trunk@148224 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 21:56:16 +00:00
bishakhabanerjee%netscape.com
fda018ebc0 NIST PKITS tests:first checkin, without CRLS:bug 177398:six sections implemented
git-svn-id: svn://10.0.0.236/trunk@148223 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 21:35:04 +00:00
rlk%trfenv.com
df24d8b769 Bug 180659 - No way to zoom Mozilla help content. r=neil@parkwaycc.co.uk. sr=alecf@flett.org
git-svn-id: svn://10.0.0.236/trunk@148222 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 21:06:57 +00:00
sicking%bigfoot.com
4ae76db4ec Bug 220703: return either error or return to avoid crashes and leaks
r/sr=peterv


git-svn-id: svn://10.0.0.236/trunk@148221 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 20:55:42 +00:00
sicking%bigfoot.com
7abb8a983f Bug 222342: Speed up txStylesheet::isStripSpaceAllowed by not filtering textnodes in the root of a document and by earlyreturning if there are no stripspace rules.
r=Pike sr=peterv


git-svn-id: svn://10.0.0.236/trunk@148220 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 19:55:53 +00:00
mkaply%us.ibm.com
8132ca090c #205138
r=mkaply, sr=bryner
Code from jblanco - always select a folder so the New Folder button works


git-svn-id: svn://10.0.0.236/trunk@148219 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 19:47:25 +00:00
bzbarsky%mit.edu
7be9c65dc4 removing extra semicolon
git-svn-id: svn://10.0.0.236/trunk@148218 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 19:37:48 +00:00
peter%propagandism.org
38b3b01586 Additional fix for bug 56764 (Document appendChild, insertBefore fail to throw HIERARCHY_REQUEST_ERR when inserting Text Nodes). r=sicking, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@148217 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 19:33:31 +00:00
bmlk%gmx.de
20c61ed232 fixed table layout add cellspacing only for columns where cells originate. bug 220653 r/sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@148216 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 19:29:14 +00:00
mostafah%oeone.com
0f0bf4eab6 Checked in patch for bug 222325: opening/closing sidebar doesn't redraw week view
git-svn-id: svn://10.0.0.236/trunk@148215 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 19:20:37 +00:00
mcs%netscape.com
2970e1ac67 Additional "bulletproofing" for bug # 221694 - ber_get_next_buffer_ext()
fails when length or tag is split across buffers.


git-svn-id: svn://10.0.0.236/trunk@148214 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 19:12:55 +00:00
tor%cs.brown.edu
f5770d0a62 Bug 153586 - add js callback to convert native string to unicode, use
for date.toLocale*String.  r=jst, sr=brendan


git-svn-id: svn://10.0.0.236/trunk@148213 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 18:03:04 +00:00
bienvenu%nventure.com
da20f06c21 more work on offline startup prompt, 221734, address Seth and Neil's comments, not part of build yet
git-svn-id: svn://10.0.0.236/trunk@148212 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 17:51:32 +00:00
timeless%mozdev.org
cc1e68f094 PRPackedBool takes too much effort
git-svn-id: svn://10.0.0.236/trunk@148211 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 17:20:28 +00:00
bienvenu%nventure.com
8387853e12 fix 90507 patch by ch.ey@gmx.net, r/sr=me, when using authenticated SMTP smtp username value has @{smtp server hostname} appended to it
git-svn-id: svn://10.0.0.236/trunk@148210 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 17:10:53 +00:00
timeless%mozdev.org
d3813da596 Bug 143687 Bring back site icons (favicons) in personal toolbar
patch by mozilla-bugs@nogin.org r=varga sr=alecf


git-svn-id: svn://10.0.0.236/trunk@148209 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 17:00:37 +00:00
bzbarsky%mit.edu
9864dac91d Make sure to include the border and padding in the frame size even in the
"0 width" case.  Bug 222990, r+sr=roc


git-svn-id: svn://10.0.0.236/trunk@148208 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 16:27:48 +00:00
bzbarsky%mit.edu
b94e1b9a14 Adding regression test
git-svn-id: svn://10.0.0.236/trunk@148207 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 16:24:53 +00:00
bzbarsky%mit.edu
377f61655d Treat BeginUpdate/EndUpdate pairs as a batch, instead of flushing tags on any
BeginUpdate call.  Bug 222864, r=peterv, sr=jst


git-svn-id: svn://10.0.0.236/trunk@148206 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 16:23:27 +00:00
bzbarsky%mit.edu
e081726408 Fix handling of id attrs to not assume that they are named "id" as much. Bug
208744, r=caillon, sr=peterv


git-svn-id: svn://10.0.0.236/trunk@148205 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 16:16:42 +00:00
varga%nixcorp.com
4743f00758 Changing my email address.
git-svn-id: svn://10.0.0.236/trunk@148204 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 15:35:57 +00:00
igor%mir2.org
b60677fa53 Introduction of org.mozilla.javascript.Kit to contain generic support utilities.
git-svn-id: svn://10.0.0.236/trunk@148203 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 13:43:22 +00:00
igor%mir2.org
201bdec01f Use getPrototype instead of explicit reference to this.prototype
git-svn-id: svn://10.0.0.236/trunk@148202 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 13:43:21 +00:00
peter%propagandism.org
23df54e8d3 Fix for bug 56764 (Document appendChild, insertBefore fail to throw HIERARCHY_REQUEST_ERR when inserting Text Nodes). r=sicking, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@148200 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 12:27:00 +00:00
neil%parkwaycc.co.uk
196fa7d286 Bug 211416 Fix some linux filepicker issues r=varga sr=jag
git-svn-id: svn://10.0.0.236/trunk@148199 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 12:00:49 +00:00
neil%parkwaycc.co.uk
9e7d84a57a Bug 195744 Fire command event after dragging or collapsing a splitter r=varga sr=bz
git-svn-id: svn://10.0.0.236/trunk@148198 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 11:43:40 +00:00
peter%propagandism.org
e11c60b7ec Fix instanceof for DOM objects (patch in unrelated bug 162927), r=caillon, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@148197 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 11:33:34 +00:00
igor%mir2.org
d813acd7f7 Added readUrl method to shell
git-svn-id: svn://10.0.0.236/trunk@148196 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 09:13:59 +00:00
bzbarsky%mit.edu
872fa423e1 Fix plugin crash on HP-UX due to not finding the Xt libs. Bug 164021, patc by
a.lange@home.se (Andreas Lange), r=peterl, sr=bzbarsky


git-svn-id: svn://10.0.0.236/trunk@148195 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 04:47:32 +00:00
bzbarsky%mit.edu
95633daa9b Adding regression test
git-svn-id: svn://10.0.0.236/trunk@148194 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 04:34:30 +00:00
bzbarsky%mit.edu
a8d0053450 Last checkin was actually for bug 222846
git-svn-id: svn://10.0.0.236/trunk@148193 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 04:32:57 +00:00
bzbarsky%mit.edu
aca03413bf Make style-change reflows on the table correctly reflow the caption. Bug
222864, r=bernd, sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@148192 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-21 04:30:10 +00:00
bienvenu%nventure.com
e07ad3ff86 initial checkin of offline startup prompt extension, NPOB 221734
git-svn-id: svn://10.0.0.236/trunk@148191 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 23:54:45 +00:00
timeless%mozdev.org
99af9d89c6 Bug 222997 Remove attach vCard from options menu
patch by bugzilla@arlen.demon.co.uk r=neil sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@148190 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 23:05:40 +00:00
technutz%netscape.net
cf1712729b Bug 222419. remove wallet.TutorialFromMenu key from all.js. r=neil, sr=bienvenu.
git-svn-id: svn://10.0.0.236/trunk@148188 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 22:23:09 +00:00
technutz%netscape.net
f60d9a5473 Bug 222419. remove wallet.TutorialFromMenu key from navigator.properties. r=neil, sr=bienvenu.
git-svn-id: svn://10.0.0.236/trunk@148187 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 22:22:15 +00:00
despotdaemon%netscape.com
13825cd6ad Pseudo-automatic update of changes made by myk@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148186 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 21:27:12 +00:00
despotdaemon%netscape.com
59b513ee13 Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148185 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 20:08:30 +00:00
despotdaemon%netscape.com
af578a98b9 Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148184 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 20:07:23 +00:00
ben%bengoodger.com
f55677fd4b Updates...
git-svn-id: svn://10.0.0.236/trunk@148183 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 19:59:49 +00:00
despotdaemon%netscape.com
c3462568b0 Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148182 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 19:57:09 +00:00
despotdaemon%netscape.com
8006eadfc4 Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148181 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 19:54:28 +00:00
despotdaemon%netscape.com
62b197d3f4 Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148180 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 19:50:29 +00:00
despotdaemon%netscape.com
d8e49333bd Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148179 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 19:49:02 +00:00
despotdaemon%netscape.com
7f2bb91225 Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148178 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 19:48:10 +00:00
despotdaemon%netscape.com
dc8bb5aba8 Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148177 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 19:46:10 +00:00
despotdaemon%netscape.com
1495bfa5a7 Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148176 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 19:45:53 +00:00
despotdaemon%netscape.com
0adc09d67c Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148175 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 19:45:50 +00:00
despotdaemon%netscape.com
a556b037f7 Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148174 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 19:44:12 +00:00
despotdaemon%netscape.com
c90423aeb1 Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148173 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 19:43:50 +00:00
despotdaemon%netscape.com
3e39ce8bd2 Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148172 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 19:43:38 +00:00
despotdaemon%netscape.com
196d797090 Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148171 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 19:41:45 +00:00
despotdaemon%netscape.com
dbc9a9a22f Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148170 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 19:38:13 +00:00
despotdaemon%netscape.com
56638c0f6d Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148169 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 19:36:14 +00:00
bzbarsky%mit.edu
cc56e6d3a9 Make XML prettyprinting work again. Bug 222539, r=sicking, sr=peterv
git-svn-id: svn://10.0.0.236/trunk@148168 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 19:33:46 +00:00
despotdaemon%netscape.com
58c8b84c57 Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148167 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 19:31:03 +00:00
despotdaemon%netscape.com
86549b31ba Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148166 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 19:25:56 +00:00
despotdaemon%netscape.com
fe82c7b8d1 Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148165 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 19:25:03 +00:00
despotdaemon%netscape.com
3872306249 Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148164 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 19:23:14 +00:00
despotdaemon%netscape.com
44fe142827 Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148163 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 19:22:29 +00:00
despotdaemon%netscape.com
41ac7ff8fb Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@148162 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 19:22:27 +00:00
pkw%us.ibm.com
43849d0cdb Bug 221422 - Unix builds after 2003/09/13 don't start when run with a
relative path.
r=darin@meer.net, sr=dougt@meer.net


git-svn-id: svn://10.0.0.236/trunk@148161 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 17:57:52 +00:00
scott%scott-macgregor.org
06e0ba0b58 effects thunderbird only until this ifdef gets properly removed. Bug #214764 --> 'Click here to download rest of message' feature does not work for thunderbird because we weren't running the pop url.
sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@148160 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 17:18:52 +00:00
scott%scott-macgregor.org
dbce9291be Port Bug #221472 to thunderbird: Move current attach items to submenu of File. Remove the vCard menu item from the Options menu since we have it under File / Attachments now.
git-svn-id: svn://10.0.0.236/trunk@148159 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 17:11:29 +00:00
scott%scott-macgregor.org
3ce308d13f Bug #68345--> Don't show Mail Start Page before Account Central loads
(Port Neil's fix to Thunderbird)


git-svn-id: svn://10.0.0.236/trunk@148158 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 16:57:28 +00:00
scott%scott-macgregor.org
0688124e4c udpate the locale to 1.6a to match the trunk.
fix account manager bustage caused by Bug #89212


git-svn-id: svn://10.0.0.236/trunk@148156 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 16:24:20 +00:00
danm-moz%comcast.net
a481c39b98 make the cached compose window always registered while visible. bug 222042 r=scott,sspitzer
git-svn-id: svn://10.0.0.236/trunk@148155 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 15:31:45 +00:00
danm-moz%comcast.net
3d86ce3cc7 error check repeated window registration. bug 222042 r=scott,sspitzer
git-svn-id: svn://10.0.0.236/trunk@148154 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 15:31:38 +00:00
bienvenu%nventure.com
4f6cb47d58 potential fix for imap urls spinning, r/sr=mscott 221023, and add more logging, whitespace cleanup
git-svn-id: svn://10.0.0.236/trunk@148153 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 15:06:43 +00:00
bienvenu%nventure.com
8ca5ad6258 fix 221329 add ability to add root certs from autoconfig js, r=misterSSL@aol.com, sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@148152 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 15:00:17 +00:00
igor%mir2.org
a0a77bbdd2 Reuse results of method.getParameterTypes() and better hash code for javaAdapterSignature.
git-svn-id: svn://10.0.0.236/trunk@148150 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 14:11:08 +00:00
igor%mir2.org
612b7b2cf9 Count syntax error in TokenStream directly instead of going through Context object so it would be possible to use TokenStream without instantiating Context.
git-svn-id: svn://10.0.0.236/trunk@148149 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 14:06:12 +00:00
igor%mir2.org
14d04091ad Cosmetics: indentation fixes
git-svn-id: svn://10.0.0.236/trunk@148148 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 14:02:53 +00:00
scott%scott-macgregor.org
59f17b869d fix for bug #221318
migrate vCards from 4.x

also fix some problems with pop account migration.

r/sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@148142 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-20 05:36:53 +00:00
ian%hixie.ch
eec4b7aad8 fix minor grammar error
git-svn-id: svn://10.0.0.236/trunk@148141 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-19 22:33:00 +00:00
ian%hixie.ch
9c8fcf4021 Homogenise the violence code a bit.
git-svn-id: svn://10.0.0.236/trunk@148140 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-19 22:13:42 +00:00
ian%hixie.ch
72e394934b Insult Generator. See bug 204356 for details.
git-svn-id: svn://10.0.0.236/trunk@148139 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-19 22:11:16 +00:00
bzbarsky%mit.edu
9613fc72bd Report a useful error when encountering a CFM app path in a Mach-o build. Bug
166369, patch by biesi, r=bzbarsky, sr=sfaser.


git-svn-id: svn://10.0.0.236/trunk@148138 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-19 21:36:39 +00:00
ian%hixie.ch
ef99ec1094 dumb bot
git-svn-id: svn://10.0.0.236/trunk@148137 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-19 21:06:56 +00:00
neil%parkwaycc.co.uk
ae882536a9 Bug 107150 Classic Navbar buttons need more spacing between text and icons p=mbockelcamp@web.de r+sr=jag
git-svn-id: svn://10.0.0.236/trunk@148136 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-19 20:14:44 +00:00
bmlk%gmx.de
94f16f07a5 reinitialize layout strategy in response to a style incr. reflow targeted at a table frame bug 222467 r/sr=bzbarsky
make debug statement more compact bug 220448 r/sr=jst


git-svn-id: svn://10.0.0.236/trunk@148135 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-19 19:23:11 +00:00
despotdaemon%netscape.com
5e37100525 Pseudo-automatic update of changes made by dwitte@stanford.edu.
git-svn-id: svn://10.0.0.236/trunk@148134 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-19 17:40:26 +00:00
ian%hixie.ch
a9657094d1 Improve the documentation for people troubleshooting connection problems.
git-svn-id: svn://10.0.0.236/trunk@148133 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-19 17:32:39 +00:00
ian%hixie.ch
20ee276b0d Undocumented (for now) feature: let the user override the bot's username from the config file by setting the 'username' configuration option to a true value (defaults to 0).
git-svn-id: svn://10.0.0.236/trunk@148132 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-19 17:02:07 +00:00
noririty%jcom.home.ne.jp
9b5be78a1a Fix b=170499 move visitLink() to toolkit for about dialog and thunderbird
git-svn-id: svn://10.0.0.236/trunk@148131 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-19 15:18:15 +00:00
daniel%glazman.org
b8725fde7d Standalone Composer 0.01
uses Firebird/Thunderbird's toolkit
customizable main toolbar
Orbit 3+1 buttons
Form button
limited dependencies to other Moz App Suite module
Calendar smart widget


git-svn-id: svn://10.0.0.236/trunk@148130 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-19 13:24:52 +00:00
daniel%glazman.org
ce337a163d Orbit 3+1 buttons for Standalone Composer
git-svn-id: svn://10.0.0.236/trunk@148129 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-19 13:13:27 +00:00
igor%mir2.org
072291c52d 1. Static hash table in JavaAdapter is replaced by a non-static fields in GlobalScope.
2. NativeObject implements just Serializable, not Externalizable interface to simplify serialization.


git-svn-id: svn://10.0.0.236/trunk@148128 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-19 09:59:52 +00:00
mvl%exedo.nl
7ca2ac5836 Ask before loading images is no more. Remove obsolete references to it from the prefs panel.
bug 161130, r=dwitte, sr=darin


git-svn-id: svn://10.0.0.236/trunk@148127 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-19 09:10:59 +00:00
bzbarsky%mit.edu
688ab27a2a Make sure we don't end up with a too-negative mIndex. Bug 218639, r=timeless, sr=jag
git-svn-id: svn://10.0.0.236/trunk@148126 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-19 09:05:28 +00:00
jocuri%softhome.net
312fe61923 Bug 218977: "Table 'namedqueries' was not locked with LOCK TABLES" on ThrowUserError('product_edit_denied'); r=bbaetz; a=justdave.
git-svn-id: svn://10.0.0.236/trunk@148125 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-19 08:46:39 +00:00
nelsonb%netscape.com
2800334777 Add new -N option, which completely suppresses the initialization and use
of the SSL server session ID cache.  Used to test the fix for bug 222726.


git-svn-id: svn://10.0.0.236/trunk@148121 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-19 05:18:11 +00:00
nelsonb%netscape.com
8e0aca0386 Put the NSS 3.9 block back in ASCII sorting order, AGAIN.
git-svn-id: svn://10.0.0.236/trunk@148120 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-19 04:41:20 +00:00
nelsonb%netscape.com
68ca5e8448 When the SSL_NO_CACHE option is set on an SSL server socket, don't touch
the server session cache AT ALL.  Bug 222726


git-svn-id: svn://10.0.0.236/trunk@148119 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-19 01:55:50 +00:00
nelsonb%netscape.com
3e437a3d4d Declare SSL_NO_STEP_DOWN option. Partial fix to bug 148452.
git-svn-id: svn://10.0.0.236/trunk@148118 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-19 01:31:41 +00:00
nelsonb%netscape.com
701f341286 SSL_ShutdownServerSessionIDCache no longer leaks the cache memory.
Bug 222065. r=wchang0222


git-svn-id: svn://10.0.0.236/trunk@148117 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-19 01:25:10 +00:00
wchang0222%aol.com
917c4d903b Bugzilla bug 179828: released plarena.h and plarena.c under the
MPL/GPL/LGPL tri-license. r=gerv,wtc.


git-svn-id: svn://10.0.0.236/trunk@148115 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-19 00:10:22 +00:00
rlk%trfenv.com
1a393d44b9 Bug 222784 - Reflect UI changes from Bug 89212 in Help. r=rlk@trfenv.com. Patch by Stefan Borggraefe (borggraefe@despammed.com)
git-svn-id: svn://10.0.0.236/trunk@148114 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-18 22:48:54 +00:00
jocuri%softhome.net
50fa526c2d Bug 221977: Insecure dependency in require while running with -T switch at Bugzilla/Auth.pm; patch by Dave Miller (justdave@bugzilla.org); r=gerv; a=justdave.
git-svn-id: svn://10.0.0.236/trunk@148113 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-18 22:46:22 +00:00
jocuri%softhome.net
1bd67db6f1 Bug 108528: knob is not a defined error message and it does not help a user find the error; patch by chaduv (caduvall@glue.umd.edu); r=justdave; a=justdave.
git-svn-id: svn://10.0.0.236/trunk@148112 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-18 22:37:29 +00:00
jocuri%softhome.net
439f2b7a87 Bug 222566: Fixing wording on enter_bug.cgi when using the create-guided template; patch by Gervase Markham (gerv@mozilla.org); r=justdave; a=justdave.
git-svn-id: svn://10.0.0.236/trunk@148111 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-18 22:24:51 +00:00
bzbarsky%mit.edu
7aac0db4a8 Remove limiting of the quirk containing block search to only one level. Bug
222730, also fixes bug 88035, r+sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@148110 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-18 20:22:22 +00:00
kairo%kairo.at
b88009d020 bug 154927 - automate localeVersion updates based on milestone.txt - we'll now create all those files during compile time from .in files, r=leaf, sr=bz
git-svn-id: svn://10.0.0.236/trunk@148108 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-18 17:54:07 +00:00
cls%seawood.org
4fc8d913e5 Removing lib/mac/MoreFiles/Makefile
git-svn-id: svn://10.0.0.236/trunk@148105 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-18 16:46:56 +00:00
noririty%jcom.home.ne.jp
75790de73a Fixing build failure b=221599
git-svn-id: svn://10.0.0.236/trunk@148103 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-18 12:40:05 +00:00
ian%hixie.ch
c839e3aa40 Support 'mozbot!' on its own.
git-svn-id: svn://10.0.0.236/trunk@148102 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-18 10:57:56 +00:00
bzbarsky%mit.edu
892c0cd889 Adding regression tests.
git-svn-id: svn://10.0.0.236/trunk@148101 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-18 08:07:01 +00:00
bzbarsky%mit.edu
169f5d5f1e Line up the hypothetical box for positioned frames with the _top_ of the line
box if there is nothing in the line before the positioned frame's placeholder.
When that happens, it means that the positioned frame's content actually came
before whatever content lives in the line box and thus the frame should not be
lined up with the line box's bottom.  Bug 94468, r+sr=roc


git-svn-id: svn://10.0.0.236/trunk@148100 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-18 08:04:37 +00:00
bzbarsky%mit.edu
b4923e2730 Undoing last change now that I have perf data.
git-svn-id: svn://10.0.0.236/trunk@148099 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-18 07:13:30 +00:00
ben%bengoodger.com
d0e5084972 New Cross Platform Options Dialog (getting started)
git-svn-id: svn://10.0.0.236/trunk@148098 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-18 07:10:33 +00:00
bzbarsky%mit.edu
0b57ccb01f Test performance impact of not limiting to the first level now that bug 222730
is fixed.  r=dbaron


git-svn-id: svn://10.0.0.236/trunk@148097 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-18 06:08:39 +00:00
bzbarsky%mit.edu
9998455a57 Only calc a quirk containing block if we have a percentage height. Bug 222730,
r+sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@148096 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-18 05:09:42 +00:00
bzbarsky%mit.edu
16cbc0284a Fix crash when an SVG <foreignobject> suddenly needs a space manager. Bug
220165, r=alex@croczilla.com, sr=roc


git-svn-id: svn://10.0.0.236/trunk@148095 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-18 03:19:33 +00:00
cls%seawood.org
ed346b14a9 Updating "standalone" build module dependency maps.
git-svn-id: svn://10.0.0.236/trunk@148094 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-18 03:10:08 +00:00
relyea%netscape.com
1a4caffe99 221067 NSS needs to be able to create token symkeys from unwrap and derive.
git-svn-id: svn://10.0.0.236/trunk@148092 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-18 00:38:04 +00:00
bzbarsky%mit.edu
877609ae83 Adding regression tests
git-svn-id: svn://10.0.0.236/trunk@148091 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-18 00:28:44 +00:00
bzbarsky%mit.edu
9d5216503f Stop walking up the tree looking for something to size against if we hit a
positioned frame.  Bug 221784, r+sr=roc


git-svn-id: svn://10.0.0.236/trunk@148090 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-18 00:24:28 +00:00
bienvenu%nventure.com
39dde875cc unescape urls inimap protocol logging to diagnose spinning problems 221023 r/sr=mscott
git-svn-id: svn://10.0.0.236/trunk@148089 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-18 00:19:59 +00:00
bienvenu%nventure.com
4dd11393d4 fix 206746 store labels on imap server if server lists label keywords, patch by gary.maths.tcd.ie, r/sr=me, and add more imap protocol logging to diagnose spinning problems 221023 and potential fix for crash destroying monitor in nsImapProtocol destructor 183497 r/sr=mscott
git-svn-id: svn://10.0.0.236/trunk@148088 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-18 00:13:15 +00:00
neil%parkwaycc.co.uk
188c3fa081 Bug 221988 Replace doesQI function with built-in instanceof operator r=peterv sr=alecf moa=caillon
git-svn-id: svn://10.0.0.236/trunk@148087 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 22:45:47 +00:00
mkaply%us.ibm.com
d81fdc2091 OS/2 bustage building tests
git-svn-id: svn://10.0.0.236/trunk@148086 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 21:42:29 +00:00
chanial%noos.fr
c8f2306a6b Bug 222585: dialogheader should crop p=neil, r=varga sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@148084 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 21:27:28 +00:00
cbiesinger%web.de
258c0c4806 fixing wrong comments. r+sr=darin
git-svn-id: svn://10.0.0.236/trunk@148083 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 21:21:45 +00:00
nelsonb%netscape.com
187cd7ce76 Detect buffer overruns caused by flawed application-supplied callbacks,
and avoid crashing due to them.  Bugscape bug 52528. r=wchang


git-svn-id: svn://10.0.0.236/trunk@148082 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 21:12:13 +00:00
cbiesinger%web.de
c7635a9ed1 removing obsolete comment, r+sr=darin
git-svn-id: svn://10.0.0.236/trunk@148081 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 20:56:44 +00:00
neil%parkwaycc.co.uk
63066fb64c Bug 89212 Account Settings should be fixed size p=stefan@borggraefe.com r=me sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@148078 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 20:02:31 +00:00
neil%parkwaycc.co.uk
edb932363f Bug 222585 dialogheader should crop r=varga sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@148077 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 19:58:12 +00:00
tor%cs.brown.edu
55797545dd Bug 219705 - fix java applet crash with Blackdown JVM. r=blizzard, sr=shaver
git-svn-id: svn://10.0.0.236/trunk@148075 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 19:32:28 +00:00
chanial%noos.fr
c9a1d6f171 Bug 221599: remove comm.jar dependencies in fontpackage.xul
use the PP for the licence


git-svn-id: svn://10.0.0.236/trunk@148074 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 19:31:11 +00:00
mkaply%us.ibm.com
28dd650c09 #220827
r=darin, sr=jst
Code from doronr@us.ibm.com - allow empty headers in SOAP to work around Axis bug


git-svn-id: svn://10.0.0.236/trunk@148073 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 19:26:14 +00:00
igor%mir2.org
ae238083fc Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=222635 :
Now activation is always properly removed under the debugger.


git-svn-id: svn://10.0.0.236/trunk@148070 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 18:24:29 +00:00
chanial%noos.fr
4f59b6c5fa Bug 221597: remove comm.jar dependencies in browser.js by forking metadata.xul (now: metaData.xul)
move pageInfo.css into skin.


git-svn-id: svn://10.0.0.236/trunk@148069 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 18:00:38 +00:00
relyea%netscape.com
4bbbf7ee2c Incorporate WTC's review comments..
git-svn-id: svn://10.0.0.236/trunk@148068 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 17:56:56 +00:00
chanial%noos.fr
1ecf1e3a33 remove #ifdef MOZ_PHOENIX that are no more relevent since we forked the bookmarks service.
correct typo in comment.


git-svn-id: svn://10.0.0.236/trunk@148067 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 16:27:55 +00:00
chanial%noos.fr
a2b76128ae bug 221078: unfork firebird/mozilla cookie prefs.
Initial patch by dwitte.
This patch migrates and removes the old cookie prefs. UI is not changed.


git-svn-id: svn://10.0.0.236/trunk@148066 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 15:21:48 +00:00
chanial%noos.fr
749c008f04 bug 221078: unfork firebird/mozilla cookie prefs.
Initial patch by dwitte.
This patch migrates and removes the old cookie prefs. UI is not changed.


git-svn-id: svn://10.0.0.236/trunk@148065 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 15:05:49 +00:00
chanial%noos.fr
32e93ea9f5 bug 222625: Default attribute for preferences should be "value"
bug 222030: useless use of wsm_attributes used in <data/> objects
and also remove some silly use of prefattribute


git-svn-id: svn://10.0.0.236/trunk@148064 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 14:56:39 +00:00
ian.mcgreer%sun.com
643e7f3374 missed SSL ECC test files in last checkin
git-svn-id: svn://10.0.0.236/trunk@148062 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 14:10:18 +00:00
uid502
f6c90d44da Bug 222468. Make nsLayoutUtils::CompareTreePosition work even if the aCommonAncestor parameter is not, in fact, a common ancestor.
git-svn-id: svn://10.0.0.236/trunk@148061 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 14:10:02 +00:00
ian.mcgreer%sun.com
decc84df49 ECC code landing.
Contributed by Sheuling Chang, Stephen Fung, Vipul Gupta, Nils Gura,
and Douglas Stebila of Sun Labs


git-svn-id: svn://10.0.0.236/trunk@148060 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 13:45:42 +00:00
ian%hixie.ch
7466d72fea Be silently compatible with Infobot's 'karma' syntax. Bug 142377
git-svn-id: svn://10.0.0.236/trunk@148059 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 09:47:53 +00:00
neil%parkwaycc.co.uk
297b2b194b Checking in reviewed attachment rather than obsolete attachment to bug 222524
git-svn-id: svn://10.0.0.236/trunk@148058 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 09:06:13 +00:00
neil%parkwaycc.co.uk
3f140c4849 Bug 222524 CompareRawSortKey should be null-safe r=smontagu sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@148057 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 08:19:58 +00:00
nelsonb%netscape.com
3d454f2360 Put the NSS 3.9 block in ASCII sorting order.
git-svn-id: svn://10.0.0.236/trunk@148056 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 05:45:19 +00:00
uid502
f97b0819f2 Bug 165149. More cleanup. Make nsStyleContext::GetPseudoType return a weak pointer. Also remove unnecessary arguments to nsHTMLContainerFrame::CreateViewForFrame. r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@148055 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 02:38:37 +00:00
bzbarsky%mit.edu
8cc6849383 Removing super-noisy debug printf. bug 220341, rs=blizzard
git-svn-id: svn://10.0.0.236/trunk@148054 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 02:13:30 +00:00
justdave%syndicomm.com
82642e719e Correcting the previous backout attempt, apparrently typoed a version number last time
git-svn-id: svn://10.0.0.236/trunk@148053 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 02:07:55 +00:00
bzbarsky%mit.edu
193af95510 Return a more useful error code. Partial fix for bug 222501, r=biesi, sr=darin
git-svn-id: svn://10.0.0.236/trunk@148051 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 23:53:45 +00:00
relyea%netscape.com
d93fbe9713 Bug 156770 When we do a file import and give a bad password we get wrong errors back
When we fail to decode based on a bad password, don't continue.

So once we've tried failed to decode a ANS.1 stream, don't continue collecting
more data.

On microsoft.pfx files, we would wind up decoding to the end of the encrypted
stream, then fail in the padding in PKCS #7. This code bypasses this problem by
making sure we don't continue to try to decode data once we've hit a bad
password failure.


git-svn-id: svn://10.0.0.236/trunk@148050 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 23:49:15 +00:00
scott%scott-macgregor.org
b2c5160bfd Bug #219204 --> posting news articles adds line break at its end. Patch by ch.ey@gmx.net (Christian Eyrich)
sr=mscott


git-svn-id: svn://10.0.0.236/trunk@148048 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 23:19:55 +00:00
scott%scott-macgregor.org
01de1f8fca Checking in Bug #163783 --> sending message adds line break at its end for ch.ey@gmx.net.
sr=mscott


git-svn-id: svn://10.0.0.236/trunk@148047 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 23:16:36 +00:00
darin%meer.net
2c01ef116f fixes bug 222023 "regression: pref parser should accept single-quote delimited strings" r=timeless sr=brendan
git-svn-id: svn://10.0.0.236/trunk@148043 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 22:33:02 +00:00
nicolson%netscape.com
3caf903f4b More debugging information.
git-svn-id: svn://10.0.0.236/trunk@148042 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 22:17:00 +00:00
scott%scott-macgregor.org
ae3c12418c Bug #222521 --> Auto Proxy URLs do not work in Thunderbird
git-svn-id: svn://10.0.0.236/trunk@148041 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 22:15:21 +00:00
rlk%trfenv.com
a3e3327f3d Bug 153789 - Navigator Preferences - Appearance - corrections. r=neil.parkwaycc.co.uk
git-svn-id: svn://10.0.0.236/trunk@148040 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 21:17:53 +00:00
ian%hixie.ch
55c7e90503 Support password protected servers. bug 222129.
git-svn-id: svn://10.0.0.236/trunk@148039 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 21:17:39 +00:00
dwitte%stanford.edu
aff25bf706 unfork the core cookie backend prefs, between mozilla & firebird. this makes the cookie backend GRE-friendly. it also breaks firebird, but that's their own fault. (a firebird fix will be landing shortly).
b=221078, r=caillon, sr=darin.


git-svn-id: svn://10.0.0.236/trunk@148038 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 20:54:29 +00:00
leaf%mozilla.org
558ea66786 add env var control to stub installer xpi url; version based on milestone,
and installer name based on config settings.


git-svn-id: svn://10.0.0.236/trunk@148037 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 20:06:23 +00:00
ian%hixie.ch
3211facbe9 implement 'lo' as a greeting
git-svn-id: svn://10.0.0.236/trunk@148036 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 19:42:34 +00:00
justdave%syndicomm.com
ec2098df1b Backing out patch from bug 108528 - failed to take i10n concerns into account
git-svn-id: svn://10.0.0.236/trunk@148034 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 18:26:09 +00:00
bzbarsky%mit.edu
3e2e83624b Create a mozAutoDocUpdate class to handle automatically calling
BeginUpdate/EndUpdate on documents.  Use this in a bunch of places to make sure
that EndUpdate is called in the face of early returns.  Bug 131775, also fixes
bug 211022, r=caillon, sr=jst


git-svn-id: svn://10.0.0.236/trunk@148033 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 18:14:25 +00:00
bryner%brianryner.com
a20f0c84b1 really fix bug 220067, and add license from nsWalletTreeUtils.js (the source of this code)
git-svn-id: svn://10.0.0.236/trunk@148032 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 18:09:55 +00:00
bryner%brianryner.com
b10c57a543 removing unused file
git-svn-id: svn://10.0.0.236/trunk@148031 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 18:07:21 +00:00
bzbarsky%mit.edu
7cc48fd0d4 Don't fire window.onerror for strict JS warnings. Bug 220603 (and bug 63672
and company), patch by brendan, r=jst, sr=bzbarsky


git-svn-id: svn://10.0.0.236/trunk@148029 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 17:54:24 +00:00
timeless%mozdev.org
3a46a343a6 Bug 215784 segmentation violation when clicking on Edit/Preferences/Appearance/Fonts
r=dwitte


git-svn-id: svn://10.0.0.236/trunk@148028 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 16:03:55 +00:00
timeless%mozdev.org
8af9844c8a Bug 220106 @mozilla.org/security/nsCertTree;1 doesn't null check mTreeArray
r=kaie sr=bz


git-svn-id: svn://10.0.0.236/trunk@148027 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 15:33:56 +00:00
timeless%mozdev.org
02ebf102e0 Bug 220230 Change PSM preferences windows behaviour to be more consistent with the rest of the Preference windows
patch by borggraefe@despammed.com r=kaie sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@148026 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 15:26:28 +00:00
igor%mir2.org
0d1464148a I changed FunctionObject and ScriptableObject to use MemberBox wrapper for native methods, getters and setters that allowed to get following:
1. Method serialization code in MemberBox takes care of all serialization so ScriptableObject and FunctionObject does not need anything on its own.

2. Invoker optimization is extended to getters and setters in ScriptableObject.

3. Recovery from IllegalAccessException is extended to all cases of method invocation via reflection.

4. All error wrapping happens in a single class so FunctionObject and ScriptableObject does not need to wary about it.


git-svn-id: svn://10.0.0.236/trunk@148024 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 14:27:53 +00:00
dwitte%stanford.edu
fdcedac1c9 make the cookie whitelist override the "limit cookie lifetime to session" pref. this allows the user to whitelist certain sites for setting permanent cookies, while non-whitelisted sites are downgraded to session cookies. also adds an "downgrade cookies from this site to session" permissionlist value, so now we have a whitelist/blacklist/sessionlist. (UI for this latter feature is not yet hooked up).
this also shifts a bunch of forked pref stuff out of the cookie backend and into an app-specific place, which is good for the GRE.

b=217286, r=mvl, sr=darin.


git-svn-id: svn://10.0.0.236/trunk@148021 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 13:17:12 +00:00
bryner%brianryner.com
10870340bf I meant to check for an empty string as well as a null string. Really. r=mozbot.
git-svn-id: svn://10.0.0.236/trunk@148020 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 10:04:14 +00:00
bryner%brianryner.com
5053cfdc53 port fix to sort strings case-insensitively, bug 220067
git-svn-id: svn://10.0.0.236/trunk@148019 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 09:44:52 +00:00
neil%parkwaycc.co.uk
f7f64c5a7e More help cleanup including fix to previous checkin to bug 219120 r=rlk sr=alecf
git-svn-id: svn://10.0.0.236/trunk@148018 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 08:17:06 +00:00
daniel%glazman.org
bab18e9dbc trivial fix for too wide buttons in Composer's format toolbar, classic theme; b=222390, rs=bz
git-svn-id: svn://10.0.0.236/trunk@148017 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 07:29:42 +00:00
bzbarsky%mit.edu
6f3cfeb0b5 Removing stray ^M. Patch by bernd, r/sr=me, bug 207401
git-svn-id: svn://10.0.0.236/trunk@148016 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 06:46:50 +00:00
justdave%syndicomm.com
afc49d5c5b removing references to my netscape.com address, since it no longer works.
git-svn-id: svn://10.0.0.236/trunk@148014 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 06:30:02 +00:00
pschwartau%netscape.com
f7ded9bac1 Skip new tests that use SpiderMonkey's f.caller property (non-ECMA).
git-svn-id: svn://10.0.0.236/trunk@148011 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 04:08:38 +00:00
brendan%mozilla.org
e26a2746d4 Fix f.call and f.apply so f.caller skips those natives, to match IE (222029, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@148010 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 03:30:18 +00:00
nicolson%netscape.com
f155d7db1f Try * instead of . to get zip to grab all the contents of a directory.
git-svn-id: svn://10.0.0.236/trunk@148009 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 03:28:19 +00:00
bzbarsky%mit.edu
2b84a18076 Adding support for DOM3 DOMStringList and DOMNameList. Bug 217159,
implementation by peterv, classinfo changes by me, r/sr=me on peterv's changes,
r/sr=peterv on my changes, r=caillon on the whole thing, sr=jst


git-svn-id: svn://10.0.0.236/trunk@148006 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-16 00:44:20 +00:00
timeless%mozdev.org
72f2fe28cc Bug 108528 - knob is not defined doesn't explain to 2001110503 users what to do
patch by caduvall@glue.umd.edu r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@148005 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-15 22:48:12 +00:00
kiko%async.com.br
b4fb59cdcd Add comment regarding detainting in showlog.pl
git-svn-id: svn://10.0.0.236/trunk@148002 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-15 21:30:10 +00:00
kiko%async.com.br
9b62fa71ff Detaint machine_id and logfile r=jkeiser
git-svn-id: svn://10.0.0.236/trunk@148001 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-15 21:04:11 +00:00
bryner%brianryner.com
ac89408a62 port fix to sort strings case-insensitively, bug 220067
git-svn-id: svn://10.0.0.236/trunk@148000 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-15 20:57:18 +00:00
bsmedberg%covad.net
f93f90d633 Bug 220095, Navigator->Languages is empty (win32 installer builds only, fallout from bug 179834) rs=darin
git-svn-id: svn://10.0.0.236/trunk@147999 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-15 20:38:58 +00:00
bsmedberg%covad.net
41433e969a Bug 207401 - linker /DEF flag used incorrectly during compiling - patch by steve@advance-software.co.uk r=adamlock moa=bryner
Bug 219362 - make chrome target recursive. Use "realchrome" if you don't want a recursive target. r=bryner (patch by me with parallel build correction by cls)


git-svn-id: svn://10.0.0.236/trunk@147998 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-15 20:30:59 +00:00
bryner%brianryner.com
cbec1fe055 bring over active link color default pref
git-svn-id: svn://10.0.0.236/trunk@147997 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-15 20:30:21 +00:00
bryner%brianryner.com
94b598dcf7 Fix two problems with the GNOME helper app code:
- Bail out correctly if we failed to open a library
- Open the soname of the library (i.e. foo.so.0 instead of foo.so)

Bug 221217, r=blizzard, sr=darin.


git-svn-id: svn://10.0.0.236/trunk@147996 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-15 20:24:45 +00:00
sicking%bigfoot.com
832241db81 Bug 199613: Don't put textnodes in the root of the document when parsing XML and XUL since the DOM doesn't allow that.
r=peterv sr=jst


git-svn-id: svn://10.0.0.236/trunk@147995 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-15 20:10:47 +00:00
bmlk%gmx.de
a9376139f8 layout regression test pain relief, bug 221598 r=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@147993 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-15 19:08:35 +00:00
pkw%us.ibm.com
b3e11f7283 Bug 220210 - Bookmarks root is always English "Bookmarks" if using one
profile named "default".
r=p_ch@verizon.net, sr=jag@tty.nl


git-svn-id: svn://10.0.0.236/trunk@147992 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-15 19:04:07 +00:00
bryner%brianryner.com
0cb89d2bfa fix thunderbird compose bustage from bug 142163 checkin
git-svn-id: svn://10.0.0.236/trunk@147991 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-15 18:33:08 +00:00
igor%mir2.org
39cb0605ae Updated ftp links to the download files due ftp server reorganization
git-svn-id: svn://10.0.0.236/trunk@147990 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-15 18:13:33 +00:00
mcs%netscape.com
17a1191dbb Additional fix for bug # 205419 - Relicense LDAP C SDK (directory/c-sdk).
Replace NPL/GPL/LGPL licenses with MPL/GPL/LGPL.


git-svn-id: svn://10.0.0.236/trunk@147988 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-15 17:26:10 +00:00
bienvenu%nventure.com
559af4cd73 more work on making palmsync a tbird extension, make palmsyncinstall.exe optionally take a path to mozabconduit.dll, r/sr=mscott 214407 not part of default build
git-svn-id: svn://10.0.0.236/trunk@147987 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-15 16:48:50 +00:00
mcs%netscape.com
4a7456e14e Fix bug # 221694 - ber_get_next_buffer_ext() fails when length or tag
is split across buffers.


git-svn-id: svn://10.0.0.236/trunk@147986 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-15 14:32:10 +00:00
dwitte%stanford.edu
ed3329810e move along, nothing to see here...
fix a bitwise & to a logical &&. nice catch bsmedberg!


git-svn-id: svn://10.0.0.236/trunk@147985 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-15 14:28:07 +00:00
mcs%netscape.com
cfd2489ce7 Improve the PRLDAP_OPT_IO_MAX_TIMEOUT related comment.
git-svn-id: svn://10.0.0.236/trunk@147984 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-15 13:19:01 +00:00
dwitte%stanford.edu
7b867335a4 make cookiemanager sort strings case-insensitively.
thanks to smanux@lfjr.net for the patch. r=dwitte, sr=darin, b=220067


git-svn-id: svn://10.0.0.236/trunk@147983 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-15 09:41:40 +00:00
bzbarsky%mit.edu
502d0ad799 More bug 214969 -- HTML nodes lie about their namespace, so check the
document's case-sensitivity instead.  r+sr=tor


git-svn-id: svn://10.0.0.236/trunk@147982 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-15 05:54:46 +00:00
bzbarsky%mit.edu
84b6b42418 Only propagate the body background to the canvas in HTML documents; don't do it
for XHTML.   Bug 214969, r+sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@147981 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-15 02:48:25 +00:00
simford.dong%sun.com
b06c35dcf2 Bugzilla Bug 168226 XPCOM Wrapper does not support ldap port numbers greater than 32k, r=Pete Zha, sr=Henry Jia
fixed by wind.li@sun.com
checked in by Simford.Dong@Sun.COM


git-svn-id: svn://10.0.0.236/trunk@147980 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-15 02:23:26 +00:00
bzbarsky%mit.edu
d43d8c0e1e Add pref for the default :active styling. Bug 142163, patch by
mats.palmgren@bredband.net (Mats Palmgren), r=bzbarsky/sr=dbaron on the
layout/xpfe parts of the patch, r=glazou/sr=bzbarsky on the editor part,
moa=neil on the prefwindow changes.


git-svn-id: svn://10.0.0.236/trunk@147979 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-15 01:56:12 +00:00
jpierre%netscape.com
e404142fda Fix for bug 222180 . remove redundant code
git-svn-id: svn://10.0.0.236/trunk@147978 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-15 01:40:10 +00:00
jpierre%netscape.com
e8edbab622 Fix for bug 222180 . Change to quick decoder . r=wtc
git-svn-id: svn://10.0.0.236/trunk@147977 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-15 01:34:22 +00:00
uid502
eed697cb68 Bug 217604. Ensure out-of-flow frames are ordered in content order. Ensure views are maintained in frame/content order.
git-svn-id: svn://10.0.0.236/trunk@147976 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-15 00:49:03 +00:00
dbaron%dbaron.org
6b49a6d2a7 Remove reflow callbacks from the list as they are processed, to avoid crashes when reentering HandlePostedReflowCallbacks. b=220126 Patch from Mats Palmgren <mats.palmgren@bredband.net>. r=dbaron sr=roc
git-svn-id: svn://10.0.0.236/trunk@147975 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 23:29:07 +00:00
chanial%noos.fr
4c64982499 Bug 221597: remove comm.jar references in pref-fonts.xul
git-svn-id: svn://10.0.0.236/trunk@147974 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 22:54:54 +00:00
chanial%noos.fr
0a9b3447d9 Bug 221597: remove comm.jar references in openLocation.xul
git-svn-id: svn://10.0.0.236/trunk@147973 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 22:36:58 +00:00
mkaply%us.ibm.com
be04dbef01 Up OS/2 stack size and remove OS/2 build options
git-svn-id: svn://10.0.0.236/trunk@147972 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 22:22:36 +00:00
bryner%brianryner.com
c4b62f5eb1 fall back to dynamic symbol table if no symbols were found in the symtab section. bug 222165, r=dbaron
git-svn-id: svn://10.0.0.236/trunk@147971 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 21:49:21 +00:00
bryner%brianryner.com
9079f3cefa No need to use threadsafe refcounting for rendering contexts, bug 110933. r+sr=dbaron.
git-svn-id: svn://10.0.0.236/trunk@147970 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 21:47:20 +00:00
chanial%noos.fr
6781f9ae91 Bug 221597: remove comm.jar references in pref-theme.*
git-svn-id: svn://10.0.0.236/trunk@147969 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 21:18:44 +00:00
dbaron%dbaron.org
f5465331af Forgot to address review comment. b=221531 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@147968 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 21:06:58 +00:00
bryner%brianryner.com
fe08239a4e Don't ignore libraries loaded at address 0x0, or we'll ignore libc. Bug 222158, r=dbaron.
git-svn-id: svn://10.0.0.236/trunk@147967 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 21:05:22 +00:00
rlk%trfenv.com
2659c96059 Bug 222127 - IP network/mask format for "No Proxy For" is not documented. r=rlk@trfenv.com. Patch by Iain Arnell (isarnell@xs4all.nl)
git-svn-id: svn://10.0.0.236/trunk@147966 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 20:54:27 +00:00
chanial%noos.fr
7a9d39ab65 bug 221597: remove comm.jar dependencies in pref-calibrate-screen.xul
git-svn-id: svn://10.0.0.236/trunk@147965 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 20:38:25 +00:00
chanial%noos.fr
ca65f999b3 on going work on bug 221597: move the close, restore and minimize icons to the toolkit.
git-svn-id: svn://10.0.0.236/trunk@147964 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 20:11:16 +00:00
pinkerton%netscape.com
c24c503ac6 fix build bustage (bug 221984, r=bryner/cls)
git-svn-id: svn://10.0.0.236/trunk@147963 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 19:55:18 +00:00
timeless%mozdev.org
bf60fd9724 English fix rs=mostafah
git-svn-id: svn://10.0.0.236/trunk@147962 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 18:52:48 +00:00
timeless%mozdev.org
478205ecbe Making the instructions from readme.txt noticable
git-svn-id: svn://10.0.0.236/trunk@147961 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 18:25:41 +00:00
bryner%brianryner.com
8240cad873 Remove timebomb references from allmakefiles.sh and modules.mk (bug 193740). Patch by sipaq, r=bryner.
git-svn-id: svn://10.0.0.236/trunk@147960 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 18:22:31 +00:00
bienvenu%nventure.com
d650c7b630 more palm sync ui, allow configuration of conduit through hot sync conduit ui 221413 patch by kteuscher@myrealbox.com, r/sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@147959 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 18:04:49 +00:00
nelsonb%netscape.com
8426542fcd Eliminate redundant function declarations. Bug 208854. r=wchang0222
git-svn-id: svn://10.0.0.236/trunk@147958 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 17:44:33 +00:00
bienvenu%nventure.com
dc7f1199c6 more palm sync ui, allow configuration of conduit through hot sync conduit ui 221413 patch by kteuscher@myrealbox.com, r/sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@147957 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 17:19:55 +00:00
neil%parkwaycc.co.uk
2a9e19d9cb Bug 68345 Don't show Mail Start Page before Account Central loads r=stephend sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@147956 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 16:17:32 +00:00
neil%parkwaycc.co.uk
39d7a0d45e Bug 221472 Collect the various attach items under a file submenu p=ian@arlen.demon.co.uk r=me sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@147955 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 15:43:44 +00:00
neil%parkwaycc.co.uk
98debf42d3 Fixing -kb
git-svn-id: svn://10.0.0.236/trunk@147954 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 12:17:10 +00:00
chanial%noos.fr
fe76346b07 Bug 221987 Don't create frames for XUL <script> p=neil, r=varga, sr=bz
git-svn-id: svn://10.0.0.236/trunk@147951 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 08:58:26 +00:00
neil%parkwaycc.co.uk
f3f33726cb Bug 221987 Don't create frames for XUL <script> r=varga sr=bz
git-svn-id: svn://10.0.0.236/trunk@147949 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 08:27:37 +00:00
chanial%noos.fr
642fd50a98 fix bustage in partial source viewer
git-svn-id: svn://10.0.0.236/trunk@147948 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 08:05:04 +00:00
chanial%noos.fr
d591e04d0f forgot to check in the modified jar list.
git-svn-id: svn://10.0.0.236/trunk@147947 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 05:42:40 +00:00
chanial%noos.fr
ab3ae1f503 adding overlay for edit menus
git-svn-id: svn://10.0.0.236/trunk@147946 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 05:26:36 +00:00
chanial%noos.fr
29b34a142a removing comm.jar dependencies in the bookmarks component. Escape close the window and fix for bug 168412.
Also remove the bookmark edit command (ex: cmd_bm_paste) and use the edit ones instead (ex: cmd_paste)


git-svn-id: svn://10.0.0.236/trunk@147945 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 05:20:35 +00:00
chanial%noos.fr
c39b3ca14a removing comm.jar dependencies in the source viewer.
(bug 221668 and bug 173879). Commands Find, Save As and Print still have to be hooked properly.


git-svn-id: svn://10.0.0.236/trunk@147944 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 05:13:34 +00:00
chanial%noos.fr
26db11121e adding overlay for edit menus
git-svn-id: svn://10.0.0.236/trunk@147943 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-14 05:09:24 +00:00
brendan%mozilla.org
ccc41df84a Fix comment bug reported by timeless (222055).
git-svn-id: svn://10.0.0.236/trunk@147932 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-13 23:25:48 +00:00
rlk%trfenv.com
004637e287 Fixing a checkin.
git-svn-id: svn://10.0.0.236/trunk@147931 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-13 23:07:09 +00:00
pschwartau%netscape.com
ded3bc4212 Initial add. Regression test for bug 222029.
git-svn-id: svn://10.0.0.236/trunk@147930 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-13 22:23:17 +00:00
228 changed files with 80011 additions and 5673 deletions

View File

@@ -0,0 +1,46 @@
<html>
<!--
- The contents of this file are subject to the Netscape Public
- License Version 1.1 (the "License"); you may not use this file
- except in compliance with the License. You may obtain a copy of
- the License at http://www.mozilla.org/NPL/
-
- Software distributed under the License is distributed on an "AS
- IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- implied. See the License for the specific language governing
- rights and limitations under the License.
-
- The Original Code is Rhino code, released
- May 6, 1999.
-
- The Initial Developer of the Original Code is Netscape
- Communications Corporation. Portions created by Netscape are
- Copyright (C) 1998-1999 Netscape Communications Corporation. All
- Rights Reserved.
-
- Contributor(s):
- Norris Boyd
-
- Alternatively, the contents of this file may be used under the
- terms of the GNU Public License (the "GPL"), in which case the
- provisions of the GPL are applicable instead of those above.
- If you wish to allow use of your version of this file only
- under the terms of the GPL and not to allow others to use your
- version of this file under the NPL, indicate your decision by
- deleting the provisions above and replace them with the notice
- and other provisions required by the GPL. If you do not delete
- the provisions above, a recipient may use your version of this
- file under either the NPL or the GPL.
-->
<body>
<h1>
<span CLASS=LXRSHORTDESC>
Rhino: JavaScript in Java<p>
</span>
</h1>
<span CLASS=LXRLONGDESC>
Rhino is an implementation of JavaScript in Java. Documentation can be found
<a href="http://www.mozilla.org/rhino/index.html">here</a>.
</span>
</body>
</html>

View File

@@ -0,0 +1,22 @@
apiClasses=\
src/org/mozilla/javascript/ClassCache.java,\
src/org/mozilla/javascript/ClassDefinitionException.java,\
src/org/mozilla/javascript/ClassShutter.java,\
src/org/mozilla/javascript/Context.java,\
src/org/mozilla/javascript/ContextListener.java,\
src/org/mozilla/javascript/EcmaError.java,\
src/org/mozilla/javascript/ErrorReporter.java,\
src/org/mozilla/javascript/Function.java,\
src/org/mozilla/javascript/FunctionObject.java,\
src/org/mozilla/javascript/ImporterTopLevel.java,\
src/org/mozilla/javascript/JavaScriptException.java,\
src/org/mozilla/javascript/PropertyException.java,\
src/org/mozilla/javascript/Script.java,\
src/org/mozilla/javascript/Scriptable.java,\
src/org/mozilla/javascript/ScriptableObject.java,\
src/org/mozilla/javascript/SecurityController.java,\
src/org/mozilla/javascript/WrapFactory.java,\
src/org/mozilla/javascript/Wrapper.java,\
src/org/mozilla/javascript/Synchronizer.java,\
src/org/mozilla/javascript/serialize/ScriptableInputStream.java,\
src/org/mozilla/javascript/serialize/ScriptableOutputStream.java

View File

@@ -0,0 +1 @@
This version was built on @datestamp@.

183
mozilla/js/rhino/build.xml Normal file
View File

@@ -0,0 +1,183 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Build file for Rhino using Ant (see http://jakarta.apache.org/ant/index.html)
Requires Ant version 1.2 or later
-->
<project name="Rhino" default="help" basedir=".">
<target name="properties">
<property name="name" value="rhino"/>
<property name="Name" value="Rhino"/>
<property name="version" value="1_5R5pre"/>
<property name="rhino.jar" value="js.jar"/>
<property name="small-rhino.jar" value="smalljs.jar"/>
<property name="jar-compression" value="true"/>
<property name="debug" value="on"/>
<property name="build.dir" value="./build"/>
<property name="classes" value="${build.dir}/classes"/>
<property name="dist.name" value="rhino${version}"/>
<property name="dist.dir" value="${build.dir}/${dist.name}"/>
<property name="dist.src" value="${dist.dir}/src"/>
<property name="dist.toolsrc" value="${dist.dir}/toolsrc"/>
<property name="dist.examples" value="${dist.dir}/examples"/>
<property name="dist.docs" value="${dist.dir}/docs"/>
<property name="dist.apidocs" value="${dist.docs}/apidocs"/>
<property name="dist.file" value="rhino${version}.zip"/>
<property name="dist.source-only-zip" value="rhino${version}-sources.zip"/>
<property file="apiClasses.properties"/>
<property name="docsrc.dir" value="docs"/>
<property name="dist.docsrc.dir" value="src/docs"/>
</target>
<target name="init" depends="properties">
<mkdir dir="${build.dir}"/>
<mkdir dir="${classes}"/>
<mkdir dir="${dist.dir}"/>
<mkdir dir="${dist.src}"/>
<mkdir dir="${dist.toolsrc}"/>
<mkdir dir="${dist.examples}"/>
<mkdir dir="${dist.docs}"/>
<mkdir dir="${dist.apidocs}"/>
</target>
<target name="compile" depends="init">
<ant dir="src" target="compile"/>
<ant dir="toolsrc" target="compile"/>
</target>
<target name="copy-source" depends="init">
<ant dir="src" target="copy-source"/>
<ant dir="toolsrc" target="copy-source"/>
<copy todir="${dist.dir}" file="build.xml"/>
<copy todir="${dist.dir}" file="apiClasses.properties"/>
</target>
<target name="jar" depends="compile">
<jar jarfile="${dist.dir}/${rhino.jar}"
basedir="${classes}"
manifest="src/manifest"
compress="${jar-compression}"
/>
</target>
<target name="smalljar" depends="compile">
<jar basedir="${classes}" destfile="${dist.dir}/${small-rhino.jar}"
compress="${jar-compression}">
<include name="org/mozilla/javascript/*.class"/>
<exclude name="org/mozilla/javascript/ClassNameHelper*.class"/>
<exclude name="org/mozilla/javascript/ClassRepository*.class"/>
<exclude name="org/mozilla/javascript/JavaAdapter*.class"/>
<exclude name="org/mozilla/javascript/NotAFunctionException*.class"/>
<exclude name="org/mozilla/javascript/Token.class"/>
<include name="org/mozilla/javascript/debug/*.class"/>
<include name="org/mozilla/javascript/resources/*.properties"/>
<include name="org/mozilla/javascript/regexp/*.class"
unless="no-regexp"/>
</jar>
</target>
<target name="copy-examples" depends="init">
<copy todir="${dist.examples}">
<fileset dir="examples" includes="*.java,*.js,*.html" />
</copy>
</target>
<target name="copy-misc" depends="init">
<tstamp/>
<filter token="datestamp" value="${TODAY}"/>
<copy todir="${dist.dir}" filtering="yes">
<fileset dir=".">
<patternset>
<include name="build-date"/>
</patternset>
</fileset>
</copy>
</target>
<target name="copy-all" depends="copy-source,copy-examples,copy-misc">
</target>
<target name="copy-docs" depends="init">
<echo message="copy from ${docsrc.dir}"/>
<copy todir="${dist.docs}">
<fileset dir="${docsrc.dir}"
includes="**/*.html,**/*.jpg,**/*.gif" />
</copy>
</target>
<target name="javadoc" depends="compile,copy-docs">
<javadoc sourcefiles="${apiClasses}"
sourcepath="src"
destdir="${dist.apidocs}"
overview="${dist.docs}/api.html"
version="true"
author="true"
public="true"
windowtitle="${Name}" />
</target>
<target name="dist" depends="deepclean,jar,copy-all,javadoc">
<delete file="${dist.file}" />
<zip zipfile="${dist.file}"
basedir="${build.dir}"
includes="**"
excludes="classes/**" />
</target>
<target name="source-zip" depends="copy-source">
<delete file="${dist.source-only-zip}" />
<zip zipfile="${dist.source-only-zip}" basedir="${build.dir}"
includes="${dist.name}/src/**,${dist.name}/toolsrc/**,${dist.name}/build.xml,${dist.name}/apiClasses.properties"/>
</target>
<target name="clean" depends="properties">
<delete quiet="true" file="${dist.dir}/${rhino.jar}"/>
<delete quiet="true" file="${dist.dir}/${small-rhino.jar}"/>
<delete quiet="true" dir="${classes}"/>
</target>
<target name="deepclean" depends="properties">
<delete quiet="true" dir="${build.dir}"/>
<delete quiet="true" file="${dist.file}"/>
<delete quiet="true" file="${dist.source-only-zip}"/>
</target>
<target name="help" depends="properties">
<echo>The following targets are available with this build file:
clean remove all compiled classes and copied property files
compile compile all classes and copy all property files
into ${classes} directory
deepclean remove all generated files and directories
dist create ${dist.file} with full Rhino distribution
help print this help
jar create ${rhino.jar} in ${dist.dir}
smalljar create ${small-rhino.jar} in ${dist.dir} with
minimalist set of Rhino classes. See footprint.html
from the doc directory for details.
javadoc generate generate Rhino API documentation
in ${dist.apidocs}
source-zip create ${dist.source-only-zip} with all Rhino
source files necessary to recreate ${rhino.jar}
</echo>
</target>
</project>

View File

@@ -0,0 +1,161 @@
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<META NAME="Generator" CONTENT="Microsoft Word 97">
<TITLE>1</TITLE>
</HEAD>
<BODY>
<OL>
<B><FONT FACE="Arial" SIZE=5 COLOR="#000080"><LI>Using the Rhino JavaScript Debugger</LI>
</B></FONT><FONT SIZE=2><P ALIGN="JUSTIFY">The Mozilla Rhino JavaScript engine includes a source-level debugger for debugging JavaScript scripts. The debugger is itself a Java program which you may run as</P>
</FONT><FONT FACE="Arial" SIZE=2><P ALIGN="JUSTIFY">java org.mozilla.javascript.tools.debugger.JSDebugger [options] [filename.js] [script-arguments]</P>
</FONT><FONT SIZE=2><P ALIGN="JUSTIFY">where the options are the same as the shell.</P>
<OL>
<LI><A NAME="_Toc502165108"></FONT><B><FONT FACE="Arial" SIZE=4 COLOR="#000080">Features</A></LI>
</B></FONT><FONT SIZE=2><P ALIGN="JUSTIFY">The Rhino JavaScript Debugger can debug scripts running in multiple threads and provides facilities to set and clear breakpoints, control execution, view variables, and evaluate arbitrary JavaScript code in the current scope of an executing script.</P>
<OL>
<LI><A NAME="_Toc502165109"></FONT><B><FONT FACE="Arial" COLOR="#000080">Console Window</A></LI>
</B></FONT><FONT SIZE=2><P ALIGN="JUSTIFY">The debugger redirects the </FONT><FONT FACE="Arial" SIZE=2>System.out</FONT><FONT SIZE=2>, </FONT><FONT FACE="Arial" SIZE=2>System.in</FONT><FONT SIZE=2>, and </FONT><FONT FACE="Arial" SIZE=2>System.err</FONT><FONT SIZE=2> streams to an internal JavaScript console window which provides an editable command line for you to enter JavaScript code and view system output. The console window maintains a history of the commands you have entered. You may move backward and forward through the history list by pressing the Up/Down arrow keys on the keyboard.</P>
<LI><A NAME="_Toc502165110"></FONT><B><FONT FACE="Arial" COLOR="#000080">Opening Scripts</A></LI>
</B></FONT><FONT SIZE=2><P ALIGN="JUSTIFY">You may select the <B><I>File-&gt;Open</B></I> menu item on the menu bar to load JavaScript scripts contained in files. This action will display a file-selection dialog box prompting you for the location of a script to load. The selected file will be compiled and displayed in a new window.</P>
</FONT><B><FONT FACE="Arial" COLOR="#000080"><LI>Running Scripts</LI>
</B></FONT><FONT SIZE=2><P ALIGN="JUSTIFY">You may select the <B><I>File-&gt;Run</B></I> menu item on the menu bar to execute JavaScript scripts contained in files. This action will display a file-selection dialog box prompting you for the location of a script to execute. The loaded script will be run in a new thread and control will be given to the debugger on its first instruction.</P>
<LI><A NAME="_Toc502165111"></FONT><B><FONT FACE="Arial" COLOR="#000080">Controlling Execution</A></LI>
</B></FONT><FONT SIZE=2><P ALIGN="JUSTIFY">The debugger provides the following facilities for you to control the execution of scripts you are debugging:</P>
<OL>
</FONT><B><FONT FACE="Arial" COLOR="#000080"><LI>Step Into</LI></OL>
</OL>
</OL>
</OL>
</B></FONT><FONT SIZE=2><P ALIGN="JUSTIFY">To single step entering any function calls, you may do any of the following:</P>
<UL>
<P ALIGN="JUSTIFY"><LI>Select the <B><I>Debug-&gt;Step Into </B></I>menu item on the menu bar</LI></P>
<P ALIGN="JUSTIFY"><LI>Press the <B><I>Step Into</B></I> button on the toolbar</LI></P>
<P ALIGN="JUSTIFY"><LI>Press the F11 key on the keyboard</LI></P></UL>
<P ALIGN="JUSTIFY">Execution will resume. If the current line in the script contains a function call control will return to the debugger upon entry into the function. Otherwise control will return to the debugger at the next line in the current function.</P>
<OL>
<OL>
<OL>
<OL>
</FONT><B><FONT FACE="Arial" COLOR="#000080"><LI>Step Over</LI></OL>
</OL>
</OL>
</OL>
</B></FONT><FONT SIZE=2><P ALIGN="JUSTIFY">To single step to the next line in the current function, you may do any of the following:</P>
<UL>
<P ALIGN="JUSTIFY"><LI>Select the <B><I>Debug-&gt;Step Over</B></I> menu item on the menu bar</LI></P>
<P ALIGN="JUSTIFY"><LI>Press the <B><I>Step Over</B></I> button on the toolbar</LI></P>
<P ALIGN="JUSTIFY"><LI>Press the F7 key on the keyboard</LI></P></UL>
<P ALIGN="JUSTIFY">Execution will resume but control will return to the debugger at the next line in the current function or top-level script.</P>
<OL>
<OL>
<OL>
<OL>
</FONT><B><FONT FACE="Arial" COLOR="#000080"><LI>Step Out</LI></OL>
</OL>
</OL>
</OL>
</B></FONT><FONT SIZE=2><P ALIGN="JUSTIFY">To continue execution until the current function returns you may do any of the following:</P>
<UL>
<P ALIGN="JUSTIFY"><LI>Select the <B><I>Debug-&gt;Step Out</B></I> menu item on the menu bar</LI></P>
<P ALIGN="JUSTIFY"><LI>Press the <B><I>Step Out</B></I> button on the toolbar</LI></P>
<P ALIGN="JUSTIFY"><LI>Press the F8 key on the keyboard</LI></P></UL>
<P ALIGN="JUSTIFY">Execution will resume until the current function returns or a breakpoint is hit.</P>
<OL>
<OL>
<OL>
<OL>
</FONT><B><FONT FACE="Arial" COLOR="#000080"><LI>Go</LI></OL>
</OL>
</OL>
</OL>
</B></FONT><FONT SIZE=2><P ALIGN="JUSTIFY">To resume execution of a script you may do any of the following:</P>
<UL>
<P ALIGN="JUSTIFY"><LI>Select the <B><I>Debug-&gt;Go</B></I> menu item on the menu bar</LI></P>
<P ALIGN="JUSTIFY"><LI>Press the <B><I>Go</B></I> button on the toolbar</LI></P>
<P ALIGN="JUSTIFY"><LI>Press the F5 key on the keyboard</LI></P></UL>
<P ALIGN="JUSTIFY">Execution will resume until a breakpoint is hit or the script completes.</P>
<P ALIGN="JUSTIFY">&nbsp;</P>
<OL>
<OL>
<OL>
<OL>
</FONT><B><FONT FACE="Arial" COLOR="#000080"><LI>Break</LI></OL>
</OL>
</OL>
</OL>
</B></FONT><FONT SIZE=2><P ALIGN="JUSTIFY">To stop all running scripts and give control to the debugger you may do any of the following:</P>
<UL>
<P ALIGN="JUSTIFY"><LI>Select the <B><I>Debug-&gt;Break</B></I> menu item on the menu bar</LI></P>
<P ALIGN="JUSTIFY"><LI>Press the <B><I>Break</B></I> button on the toolbar</LI></P>
<P ALIGN="JUSTIFY"><LI>Press the Pause/Break key on the keyboard</LI></P></UL>
<OL>
<OL>
<OL>
<LI><A NAME="_Toc502165112"></FONT><B><FONT FACE="Arial" COLOR="#000080">Moving Up and Down the Stack</A></LI>
</B></FONT><FONT SIZE=2><P ALIGN="JUSTIFY">The lower-left (dockable) pane in the debugger main window contains a combo-box labeled &quot;Context:&quot; which displays the current stack of the executing script. You may move up and down the stack by selecting an entry in the combo-box. When you select a stack frame the variables and watch windows are updated to reflect the names and values of the variables visible at that scope.</P>
<LI><A NAME="_Toc502165113"></FONT><B><FONT FACE="Arial" COLOR="#000080">Setting and Clearing Breakpoints</A></LI></OL>
</OL>
</OL>
</B></FONT><FONT SIZE=2><P ALIGN="JUSTIFY">The main desktop of the debugger contains file windows which display the contents of each script you are debugging. You may set a breakpoint in a script by doing one of the following:</P>
<UL>
<P ALIGN="JUSTIFY"><LI>Place the cursor on the line at which you want to set a breakpoint and right-click with the mouse. This action will display a pop-up menu. Select the <B><I>Set Breakpoint</B></I> menu item. </LI></P>
<P ALIGN="JUSTIFY"><LI>Simply single-click on the line number of the line at which you want to set a breakpoint.</LI></P></UL>
<P ALIGN="JUSTIFY">If the selected line contains executable code a red dot will appear next to the line number and a breakpoint will be set at that location.</P>
<P ALIGN="JUSTIFY">You may set clear breakpoint in a script by doing one of the following:</P>
<UL>
<P ALIGN="JUSTIFY"><LI>Place the cursor on the line at which you want to clear a breakpoint and right-click with the mouse. This action will display a pop-up menu. Select the <B><I>Clear Breakpoint</B></I> menu item. </LI></P>
<P ALIGN="JUSTIFY"><LI>Simply single-click on the red dot or the line number of the line at which you want to clear a breakpoint.</LI></P></UL>
<P ALIGN="JUSTIFY">The red dot will disappear and the breakpoint at that location will be cleared.</P>
<OL>
<OL>
<OL>
<LI><A NAME="_Toc502165114"></FONT><B><FONT FACE="Arial" COLOR="#000080">Viewing Variables</A></LI>
</B></FONT><FONT SIZE=2><P ALIGN="JUSTIFY">The lower-left (dockable) pane in the debugger main window contains a tab-pane with two tabs, labeled &quot;this&quot; and &quot;Locals&quot;. Each pane contains a tree-table which displays the properties of the current object and currently visible local variables, respectively. </P>
<OL>
</FONT><B><FONT FACE="Arial" COLOR="#000080"><LI>This</LI></OL>
</B></FONT><FONT SIZE=2><P ALIGN="JUSTIFY">The properties of the current object are displayed in the <B><I>this</B></I> table. If a property is itself a JavaScript object the property may be expanded to show its sub-properties. The <B><I>this</B></I> table is updated each time control returns to the debugger or when you change the stack location in the <B><I>Context:</B></I> window.</P>
<LI><A NAME="_Toc502165115"></FONT><B><FONT FACE="Arial" COLOR="#000080">Locals</A></LI>
</B></FONT><FONT SIZE=2><P ALIGN="JUSTIFY">The local variables of the current function are displayed in the <B><I>Locals</B></I> table. If a variable is itself a JavaScript object the variable may be expanded to show its sub-properties. The <B><I>Locals</B></I> table is updated each time control returns to the debugger or when you change the stack location in the <B><I>Context:</B></I> window</P>
<LI><A NAME="_Toc502165116"></FONT><B><FONT FACE="Arial" COLOR="#000080">Watch Window</A></LI>
</B></FONT><FONT SIZE=2><P ALIGN="JUSTIFY">You may enter arbitrary JavaScript expressions in the <B><I>Watch:</B></I> table located in the lower-right (dockable) pane in the debugger main window. The expressions you enter are reevaluated in the current scope and their current values displayed each time control returns to the debugger or when you change the stack location in the <B><I>Context:</B></I> window.</P>
<LI><A NAME="_Toc502165117"></FONT><B><FONT FACE="Arial" COLOR="#000080">Evaluation Window</A></LI></OL>
</OL>
</OL>
</B></FONT><FONT SIZE=2><P ALIGN="JUSTIFY">The <B><I>Evaluate</B></I> pane located in the lower-right (dockable) pane in the debugger main window contains an editable command line where you may enter arbitrary JavaScript code. The code is evaluated in the context of the current stack frame. The window maintains a history of the commands you have entered. You may move backward or forward through the history by pressing the Up/Down arrow keys on the keyboard. </P>
</FONT></BODY>
</HTML>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,142 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Norris Boyd">
<meta name="GENERATOR" content="Mozilla/4.7 [en] (WinNT; U) [Netscape]">
<title>JavaScript API</title>
</head>
<body bgcolor="#FFFFFF">
<h1 align="center">
Rhino API Reference.</h1>
<h4>
The Control API</h4>
These APIs provide methods for controlling the actions of JavaScript in
a host environment.
<ul>
<li>
<a href="org/mozilla/javascript/Context.html">Context</a> - Represents
the runtime context of an executing script. Has methods to associate the
JavaScript evaluation engine with a Java thread, set attributes of the
engine, and compile and evaluate scripts.</li>
<li>
<a href="org/mozilla/javascript/ContextListener.html">ContextListener</a>
- Allows embeddings to be notified of the creation, entering, exiting,
and releasing of Contexts. </li>
<li>
<a href="org/mozilla/javascript/Script.html">Script</a> - The result of
compiling a JavaScript script. Also encapsulates script execution.</li>
<li>
<a href="org/mozilla/javascript/ErrorReporter.html">ErrorReporter</a> -
This interface can be implemented to control the actions the JavaScript
engine takes when it encounters errors.</li>
<li>
<a href="org/mozilla/javascript/SecurityController.html">SecurityController</a>
- Optional support routines that must be provided by embeddings implementing
security controls on scripts.</li>
<li>
<a href="org/mozilla/javascript/ClassShutter.html">ClassShutter</a>
- Embeddings that wish to filter Java classes that are visible to scripts
through the LiveConnect, should implement this interface.</li>
<li>
<a href="org/mozilla/javascript/Wrapper.html">Wrapper</a> - Interface implemented
by objects wrapping other objects. Provides a method for recovering the
wrapped value.</li>
<li>
<a href="org/mozilla/javascript/WrapHandler.html">WrapHandler</a> - Interface
embedders can implement in order to control the way Java objects are wrapped
for use by JavaScript.</li>
<li>
<a href="org/mozilla/javascript/ClassOutput.html">ClassOutput</a> - Interface
embedders can implement in order to control the placement of generated
class bytecodes.</li>
<li>
<a href="org/mozilla/javascript/serialize/ScriptableOutputStream.html">ScriptableOutputStream</a> - This stream can be used to serialize JavaScript objects and functions.
</li>
<li>
<a href="org/mozilla/javascript/serialize/ScriptableInputStream.html">ScriptableInputStream</a> - This stream can be used to deserialize JavaScript objects and functions.
</li>
</ul>
<h4>
The Host Object API</h4>
These APIs provide support for adding objects specific to a particular
embedding of JavaScript in a host environment. Note that if you just want
to script existing Java classes, you should just use <a href="http://developer.netscape.com/library/documentation/communicator/jsguide4/livecon.htm">LiveConnect</a>.
It is also helpful to understand some of the implementation of the <a href="runtime.html">runtime</a>.
<ul>
<li>
<a href="org/mozilla/javascript/Scriptable.html">Scriptable</a> - All JavaScript
objects must implement this interface. Provides methods to access properties
and attributes of those properties, as well as other services required
of JavaScript objects.</li>
<li>
<a href="org/mozilla/javascript/Function.html">Function</a> - All JavaScript
functions must implement this interface. Extends Scriptable, adding methods
to support invocation.</li>
<li>
<a href="org/mozilla/javascript/ScriptableObject.html">ScriptableObject</a>
- A default implementation of Scriptable that may be extended. Implements
property and attribute storage and lookup and other default JavaScript
object behavior.</li>
<li>
<a href="org/mozilla/javascript/FunctionObject.html">FunctionObject</a>
- An implementation of Function that allows Java methods and constructors
to be used as JavaScript function objects.</li>
<li>
<a href="org/mozilla/javascript/ImporterTopLevel.html">ImporterTopLevel</a>
- Allows embeddings to use the importClass and importPackage functions.</li>
</ul>
<h4>
Exceptions</h4>
These exceptions are thrown by JavaScript.
<ul>
<li>
<a href="org/mozilla/javascript/JavaScriptException.html">JavaScriptException</a>
- Thrown from within JavaScript by the JavaScript 'throw' statement, or
by LiveConnect calls from JavaScript into Java. Wraps a JavaScript value.</li>
<li>
<a href="org/mozilla/javascript/ClassDefinitionException.html">ClassDefinitionException</a>
- Thrown if errors are detected while attempting to define a host object
from a Java class.</li>
<li>
<a href="org/mozilla/javascript/PropertyException.html">PropertyException</a>
- Thrown if errors are detected while attempting to define a property of
a host object from a Java class or method, or if a property is not found.</li>
<li>
<a href="org/mozilla/javascript/NotAFunctionException.html">NotAFunctionException</a>
- Thrown when attempting to call an object that is not a function.</li>
<li>
<a href="org/mozilla/javascript/EvaluatorException.html">EvaluatorException</a>
- An exception thrown when an error is detected during the execution of
a script. The default error reporter will throw EvaluatorExceptions when
an error is encountered.</li>
</ul>
<hr WIDTH="100%">
<br><a href="overview-summary.html">back to top</a>
</body>
</html>

View File

@@ -0,0 +1,43 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Norris Boyd">
<meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">
<meta name="KeyWords" content="Rhino, JavaScript, Java, BSF, Apache">
<title>Rhino and BSF</title>
</head>
<body bgcolor="#FFFFFF">
<script src="owner.js"></script>
<center>
<h1>
Using Rhino with BSF and Apache</h1></center>
<script>document.write(owner());</script>
<br><script>
var d = new Date(document.lastModified);
document.write((d.getMonth()+1)+"/"+d.getDate()+"/"+d.getFullYear());
document.write('<br>');
</script>
<hr WIDTH="100%">
<br>The <a href="http://oss.software.ibm.com/developerworks/projects/bsf">Bean
Scripting Framework</a> (or BSF) was originally developed by IBM and now
published as open source. It provides a framework for using a number of
scripting languages with Java. Rhino is one of the supported languages.
<p>This framework has been embedded in a number of open source projects,
including the XSL processor <a href="http://xml.apache.org/xalan-j/index.html">Xalan</a>
and the XML/Java build tool <a href="http://ant.apache.org/">Ant</a>.
<p>You can download a version of <tt>bsf.jar</tt> from <a href="http://oss.software.ibm.com/developerworks/projects/bsf">http://oss.software.ibm.com/developerworks/projects/bsf</a>
that includes the <tt>com.ibm.bsf.engines.javascript.JavaScriptEngine</tt>
class. The current version is 2.2 release candidate at the time of this
writing. This version thus supports JavaScript through Rhino when used
with the <tt>js.jar</tt> file from either <tt>rhino15R1.zip</tt> or <tt>rhinoTip.zip</tt>.
<p>See <a href="http://xml.apache.org/xalan/extensions.html#ex-basic">Xalan-Java
Extensions</a> for more information on adding JavaScript to XSL and the
<a href="http://jakarta.apache.org/ant/jakarta-ant/docs/#script">Script
task</a> for using scripting in Ant build files.
<p><a href="index.html">back to top</a>
</body>
</html>

View File

@@ -0,0 +1,21 @@
<!DOCTYPE doctype PUBLIC "-//w3c//dtd html 4.0 transitional//en">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Author" content="Norris Boyd">
<meta name="KeyWords" content="Rhino, JavaScript, Java">
<title>Change Log</title>
</head>
<body bgcolor="#ffffff">
<h1 align="center">
Change Log for Significant Rhino Changes</h1>
This is a log of significant changes since Rhino 1.5 Release 4.
<h3>Nothing significant yet!</h3>
<hr width="100%"><br>
<a href="index.html">back to top</a></h3>
</body></html>

View File

@@ -0,0 +1,249 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Norris Boyd">
<meta name="GENERATOR" content="Mozilla/4.7 [en] (WinNT; I) [Netscape]">
<meta name="KeyWords" content="Rhino, JavaScript, Java, Debugger">
<title>Rhino Debugger</title>
</head>
<body bgcolor="#FFFFFF">
<script src="owner.js">
</script>
<center>
<h1>
Rhino JavaScript Debugger</h1></center>
Christopher Oliver
<br><script>document.write(owner());</script>
<br>6/28/2001
<center>
<hr WIDTH="100%"></center>
The Rhino JavaScript debugger is a GUI that allows debugging of interpreted
JavaScript scripts run in Rhino. Note that this debugger <i>will not</i>
work with JavaScript scripts run in the mozilla browser since Rhino is
not the engine used in such environments.
<p><img SRC="jsdebug.jpg" height=460 width=600>
<p>Current limitations:
<ul>
<li>
Requires JDK 1.2 or greater</li>
<li>
Requires js.jar from rhinoTip.zip</li>
<li>
No breakpoint menu</li>
</ul>
<b><font face="Arial"><font color="#000080"><font size=+2>Using the Rhino
JavaScript Debugger</font></font></font></b>
<p><font size=-1>The Mozilla Rhino JavaScript engine includes a source-level
debugger for debugging JavaScript scripts. The debugger is itself a Java
program which you may run as</font>
<ol><font face="Arial"><font size=-1>java org.mozilla.javascript.tools.debugger.Main
[options] [filename.js] [script-arguments]</font></font></ol>
<font size=-1>where the options are the same as the shell.</font>
<p><font size=-1>The Rhino JavaScript Debugger can debug scripts running
in multiple threads and provides facilities to set and clear breakpoints,
control execution, view variables, and evaluate arbitrary JavaScript code
in the current scope of an executing script.</font>
<p><a NAME="_Toc502165109"></a><b><font face="Arial"><font color="#000080"><font size=-1>Console
Window</font></font></font></b>
<br><font size=-1>The debugger redirects the <font face="Arial">System.out</font>,
<font face="Arial">System.in</font>,
and <font face="Arial">System.err</font> streams to an internal JavaScript
console window which provides an editable command line for you to enter
JavaScript code and view system output. The console window maintains a
history of the commands you have entered. You may move backward and forward
through the history list by pressing the Up/Down arrow keys on the keyboard.</font>
<br><a NAME="_Toc502165110"></a><b><font face="Arial"><font color="#000080"><font size=-1>Opening
Scripts</font></font></font></b>
<br><font size=-1>You may select the <b><i>File->Open</i></b> menu item
on the menu bar to load JavaScript scripts contained in files. This action
will display a file-selection dialog box prompting you for the location
of a script to load. The selected file will be compiled and displayed in
a new window.</font>
<br><a NAME="_RunningScripts"></a><b><font face="Arial"><font color="#000080"><font size=-1>Running
Scripts</font></font></font></b>
<br><font size=-1>You may select the <b><i>File->Run</i></b> menu item
on the menu bar to execute JavaScript scripts contained in files. This
action will display a file-selection dialog box prompting you for the location
of a script to execute. The loaded script will be run in a new thread and
control will be given to the debugger on its first instruction.</font>
<p><a NAME="_Toc502165111"></a><b><font face="Arial"><font color="#000080"><font size=+1>Controlling
Execution</font></font></font></b>
<br><font size=-1>The debugger provides the following facilities for you
to control the execution of scripts you are debugging:</font>
<p><b><font face="Arial"><font color="#000080">Step Into</font></font></b>
<br><font size=-1>To single step entering any function calls, you may do
any of the following:</font>
<ul>
<li>
<font size=-1>Select the <b><i>Debug->Step Into </i></b>menu item on the
menu bar</font></li>
<li>
<font size=-1>Press the <b><i>Step Into</i></b> button on the toolbar</font></li>
<li>
<font size=-1>Press the F11 key on the keyboard</font></li>
</ul>
<font size=-1>Execution will resume. If the current line in the script
contains a function call control will return to the debugger upon entry
into the function. Otherwise control will return to the debugger at the
next line in the current function.</font>
<p><b><font face="Arial"><font color="#000080">Step Over</font></font></b>
<br><font size=-1>To single step to the next line in the current function,
you may do any of the following:</font>
<ul>
<li>
<font size=-1>Select the <b><i>Debug->Step Over</i></b> menu item on the
menu bar</font></li>
<li>
<font size=-1>Press the <b><i>Step Over</i></b> button on the toolbar</font></li>
<li>
<font size=-1>Press the F7 key on the keyboard</font></li>
</ul>
<font size=-1>Execution will resume but control will return to the debugger
at the next line in the current function or top-level script.</font>
<p><b><font face="Arial"><font color="#000080">Step Out</font></font></b>
<br><font size=-1>To continue execution until the current function returns
you may do any of the following:</font>
<ul>
<li>
<font size=-1>Select the <b><i>Debug->Step Out</i></b> menu item on the
menu bar</font></li>
<li>
<font size=-1>Press the <b><i>Step Out</i></b> button on the toolbar</font></li>
<li>
<font size=-1>Press the F8 key on the keyboard</font></li>
</ul>
<font size=-1>Execution will resume until the current function returns
or a breakpoint is hit.</font>
<p><b><font face="Arial"><font color="#000080">Go</font></font></b>
<br><font size=-1>To resume execution of a script you may do any of the
following:</font>
<ul>
<li>
<font size=-1>Select the <b><i>Debug->Go</i></b> menu item on the menu
bar</font></li>
<li>
<font size=-1>Press the <b><i>Go</i></b> button on the toolbar</font></li>
<li>
<font size=-1>Press the F5 key on the keyboard</font></li>
</ul>
<font size=-1>Execution will resume until a breakpoint is hit or the script
completes.</font>
<p><b><font face="Arial"><font color="#000080">Break</font></font></b>
<br><font size=-1>To stop all running scripts and give control to the debugger
you may do any of the following:</font>
<ul>
<li>
<font size=-1>Select the <b><i>Debug->Break</i></b> menu item on the menu
bar</font></li>
<li>
<font size=-1>Press the <b><i>Break</i></b> button on the toolbar</font></li>
<li>
<font size=-1>Press the Pause/Break key on the keyboard</font></li>
</ul>
<a NAME="_RunningScripts"></a><b><font face="Arial"><font color="#000080"><font size=-1>Break
on Exceptions</font></font></font></b>
<br><font size=-1>To give control to the debugger whenever a JavaScript
is exception is thrown select the <b><i>Debug->Break on Exceptions</i></b>
checkbox from the menu bar.&nbsp; Whenever a JavaScript exception is thrown
by a script a message dialog will be displayed and control will be given
to the debugger at the location the exception is raised.</font>
<p><a NAME="_BreakOnFunctionEnter"></a><b><font face="Arial"><font color="#000080"><font size=-1>Break on Function Enter</font></font></font></b>
<br><font size=-1>Selecting <b><i>Debug->Break on Function Enter</i></b> will give control to the debugger whenever the execution is entered into a function or script.</font>
<p><a NAME="_BreakOnFunctionExit"></a><b><font face="Arial"><font color="#000080"><font size=-1>Break on Function Exit</font></font></font></b>
<br><font size=-1>Selecting <b><i>Debug->Break on Function Return</i></b> will give control to the debugger whenever the execution is about to return from a function or script.</font>
<p><a NAME="_Toc502165112"></a><b><font face="Arial"><font color="#000080">Moving
Up and Down the Stack</font></font></b>
<br><font size=-1>The lower-left (dockable) pane in the debugger main window
contains a combo-box labeled "Context:" which displays the current stack
of the executing script. You may move up and down the stack by selecting
an entry in the combo-box. When you select a stack frame the variables
and watch windows are updated to reflect the names and values of the variables
visible at that scope.</font>
<p><a NAME="_Toc502165113"></a><b><font face="Arial"><font color="#000080">Setting
and Clearing Breakpoints</font></font></b>
<br><font size=-1>The main desktop of the debugger contains file windows
which display the contents of each script you are debugging. You may set
a breakpoint in a script by doing one of the following:</font>
<ul>
<li>
<font size=-1>Place the cursor on the line at which you want to set a breakpoint
and right-click with the mouse. This action will display a pop-up menu.
Select the <b><i>Set Breakpoint</i></b> menu item.</font></li>
<li>
<font size=-1>Simply single-click on the line number of the line at which
you want to set a breakpoint.</font></li>
</ul>
<font size=-1>If the selected line contains executable code a red dot will
appear next to the line number and a breakpoint will be set at that location.</font>
<p><font size=-1>You may clear breakpoint in a script by doing one of the
following:</font>
<ul>
<li>
<font size=-1>Place the cursor on the line at which you want to clear a
breakpoint and right-click with the mouse. This action will display a pop-up
menu. Select the <b><i>Clear Breakpoint</i></b> menu item.</font></li>
<li>
<font size=-1>Simply single-click on the red dot or the line number of
the line at which you want to clear a breakpoint.</font></li>
</ul>
<font size=-1>The red dot will disappear and the breakpoint at that location
will be cleared.</font>
<p><a NAME="_Toc502165114"></a><b><font face="Arial"><font color="#000080"><font size=+1>Viewing
Variables</font></font></font></b>
<br><font size=-1>The lower-left (dockable) pane in the debugger main window
contains a tab-pane with two tabs, labeled "this" and "Locals". Each pane
contains a tree-table which displays the properties of the current object
and currently visible local variables, respectively.</font>
<p><b><font face="Arial"><font color="#000080">This</font></font></b>
<br><font size=-1>The properties of the current object are displayed in
the
<b><i>this</i></b> table. If a property is itself a JavaScript object
the property may be expanded to show its sub-properties. The <b><i>this</i></b>
table is updated each time control returns to the debugger or when you
change the stack location in the <b><i>Context:</i></b> window.</font>
<p><b><font face="Arial"><font color="#000080">Locals</font></font></b>
<br><font size=-1>The local variables of the current function are displayed
in the <b><i>Locals</i></b> table. If a variable is itself a JavaScript
object the variable may be expanded to show its sub-properties. The <b><i>Locals</i></b>
table is updated each time control returns to the debugger or when you
change the stack location in the <b><i>Context:</i></b> window</font>
<p><a NAME="_Toc502165116"></a><b><font face="Arial"><font color="#000080">Watch
Window</font></font></b>
<br><font size=-1>You may enter arbitrary JavaScript expressions in the
<b><i>Watch:</i></b>
table located in the lower-right (dockable) pane in the debugger main window.
The expressions you enter are re-evaluated in the current scope and their
current values displayed each time control returns to the debugger or when
you change the stack location in the <b><i>Context:</i></b> window.</font>
<p><a NAME="_Toc502165117"></a><b><font face="Arial"><font color="#000080">Evaluation
Window</font></font></b>
<br><font size=-1>The <b><i>Evaluate</i></b> pane located in the lower-right
(dockable) pane in the debugger main window contains an editable command
line where you may enter arbitrary JavaScript code. The code is evaluated
in the context of the current stack frame. The window maintains a history
of the commands you have entered. You may move backward or forward through
the history by pressing the Up/Down arrow keys on the keyboard.</font>
</body>
</html>

View File

@@ -0,0 +1,171 @@
<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Norris Boyd">
<meta name="GENERATOR" content="Mozilla/4.75 [en] (Windows NT 5.0; U) [Netscape]">
<meta name="KeyWords" content="Rhino, JavaScript, Java">
<title>Rhino Documentation</title>
</head>
<body bgcolor="#ffffff">
<center>
<h1> Rhino Documentation</h1>
</center>
<b><i><font size="+1">General</font></i></b>
<table width="100%">
<tbody>
<tr>
<td><a href="overview.html">Overview</a>
</td>
<td>An overview of the JavaScript language and of Rhino.</td>
</tr>
<tr>
<td><a href="limits.html">Requirements and Limitations</a>
</td>
<td>What you must have to run Rhino; what Rhino cannot do.</td>
</tr>
<tr>
<td><a href="rhino15R4.html">What's new in 1.5R4</a>
</td>
<td>Changes since 1.5R3.</td>
</tr>
<tr>
<td><a href="debugger.html">Rhino Debugger</a>
</td>
<td>A debugger for debugging JavaScript running in Rhino.</td>
</tr>
<tr>
<td><a href="opt.html">Optimization</a>
</td>
<td>Details on the various optimization levels.</td>
</tr>
<tr>
<td><a href="http://sourceforge.net/projects/jscorba">JS/CORBA Adapter</a>
</td>
<td>Provides a mechanism for arbitrary JavaScript objects to interact
with each other transparently in a distributed JavaScript system using CORBA.</td>
</tr>
<tr>
<td><a href="bsf.html">Using Rhino with BSF and Apache</a>
</td>
<td>How to use Rhino with apps that support BSF.</td>
</tr>
<tr>
<td><a href="changes.html">Recent Changes</a>
</td>
<td>Describes recent changes to Rhino.</td>
</tr>
<tr>
<td><a href="faq.html">FAQ</a>
</td>
<td>Answers to frequently asked questions about Rhino.</td>
</tr>
<tr>
<td><a href="http://industry.java.sun.com/javaone/99/event/0,1768,629,00.html">
1999 JavaOne session on Rhino</a>
</td>
<td>A talk on Rhino with slides. Also see the <a href="javaone.html">followup</a>
.</td>
</tr>
<tr>
<td valign="Top"><a href="http://www.ociweb.com/jnb/archive/jnbMar2001.html">
Scripting Languages for Java</a>
<br>
</td>
<td valign="Top">An article comparing and contrasting Rhino and Jython.<br>
</td>
</tr>
</tbody>
</table>
<p><b><i><font size="+1">Writing Scripts</font></i></b>
<table width="100%">
<tbody>
<tr>
<td><a href="ScriptingJava.html">Scripting Java</a>
</td>
<td>How to use Rhino to script Java classes.</td>
</tr>
<tr>
<td><a href="scriptjava.html">Scripting Java</a>
</td>
<td>How to use Rhino to script Java classes (an older treatment).</td>
</tr>
<tr>
<td><a href="perf.html">Performance Hints</a>
</td>
<td>Some tips on writing faster JavaScript code.</td>
</tr>
<tr>
<td><a href="tools.html">Tools</a>
</td>
<td>Some tools for developing JavaScript scripts.</td>
</tr>
</tbody>
</table>
</p>
<p><b><i><font size="+1">Embedding Rhino</font></i></b>
<table width="100%">
<tbody>
<tr>
<td><a href="tutorial.html">Embedding tutorial</a>
</td>
<td>A short tutorial on how to embed Rhino into your application.</td>
</tr>
<tr>
<td><a href="apidocs/index.html">API javadoc Reference</a>
</td>
<td>An annotated outline of the programming interface to Rhino (tip only).</td>
</tr>
<tr>
<td><a href="scopes.html">Scopes and Contexts</a>
</td>
<td>Describes how to use scopes and contexts for the best performance
and flexibility, with an eye toward multithreaded environments.</td>
</tr>
<tr>
<td><a href="serialization.html">Serialization</a>
</td>
<td>How to serialize JavaScript objects and functions in Rhino.</td>
</tr>
<tr>
<td><a href="runtime.html">Runtime</a>
</td>
<td>A brief description of the JavaScript runtime.</td>
</tr>
<tr>
<td><a href="footprint.html">Small Footprint</a>
</td>
<td>Hints for those interested in small-footprint embeddings.</td>
</tr>
<tr>
<td><a href="examples.html">Examples</a>
</td>
<td>A set of examples showing how to control the JavaScript engine and
build JavaScript host objects.</td>
</tr>
<tr>
<td><font color="#000000"><a href="http://www.mozilla.org/js/tests/library.html">
Testing</a>
</font></td>
<td>How to run the JavaScript test suite.</td>
</tr>
</tbody>
</table>
</p>
<h3>
<hr width="100%"><a href="index.html">back to top</a>
</h3>
</body>
</html>

View File

@@ -0,0 +1,91 @@
<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Author" content="Igor Bukanov">
<meta name="KeyWords" content="Rhino, JavaScript, Java">
<title>Rhino Downloads</title>
</head>
<body>
<center><b><font size="+3">Rhino Downloads</font></b></center>
<p>Rhino is available for download both in source and compiled form. </p>
<h3> Binaries</h3>
You can download binaries (JAR files) from <a
href="ftp://ftp.mozilla.org/pub/mozilla.org/js/"> ftp://ftp.mozilla.org/pub/mozilla.org/js/</a>
. Rhino 1.5 Release 4.1 is the last qualified release. It is also possible
to download the latest rhino build that reflects newer features and bug
fixes, but has not been fully qualified. These zip files also include
the source.
<p>If you are looking for <tt>js.jar</tt> for XSLT or for IBM's Bean
Scripting Framework (BSF), download one of the zip files below and
unzip it. </p>
<ul>
<li> <a href="ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino15R41.zip">Rhino 1.5R4.1.</a>
<ul>
<li> <i><font size="-1"><a href="rhino15R41.html">Description of changes from 1.5R4.1</a> </font></i>.</li>
</ul>
</li>
<li> <a href="ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino15R4.zip">Rhino 1.5R4.</a>
<ul>
<li> <i><font size="-1"><a href="rhino15R4.html">Description of changes from 1.5R3</a> </font></i>.</li>
</ul>
</li>
<li><a href="ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino15R3.zip">Rhino 1.5R3.</a>
<ul>
<li> <i><font size="-1"><a href="rhino15R3.html">Description of
changes from 1.5R2</a> </font></i>.</li>
</ul>
</li>
<li> <a
href="ftp://ftp.mozilla.org/pub/mozilla.org/js/older-packages/rhino15R2.zip">Rhino
1.5R2.</a>
<ul>
<li> <i><font size="-1"><a href="rhino15R2.html">Description of
changes from 1.5R1</a> </font></i>.</li>
</ul>
</li>
<li><a
href="ftp://ftp.mozilla.org/pub/mozilla.org/js/older-packages/rhino15R1.zip">Rhino
1.5R1.</a>
<ul>
<li> <i><font size="-1"><a href="rhino15R1.html">Description of
changes from 1.4R3</a> </font></i>.</li>
</ul>
</li>
<li> <a
href="ftp://ftp.mozilla.org/pub/mozilla.org/js/older-packages/rhino14R3.zip"> Rhino
1.4 Release 3</a> .</li>
<li> <a href="ftp://ftp.mozilla.org/pub/mozilla.org/js/rhinoLatest.zip">Latest
Rhino builds</a> .
<ul>
<li> <i><font size="-1"><a href="changes.html">Description of
changes from 1.5R4</a> </font></i>.</li>
</ul>
</li>
</ul>
<h3> Source</h3>
The source code for Rhino is available under <a
href="http://www.mozilla.org/NPL/"> NPL 1.1</a> . In addition to getting
the source from the zip files above, the source code for Rhino can be
found in the CVS tree at mozilla/js/rhino. See&nbsp; <a
href="http://www.mozilla.org/cvs.html">source code via cvs</a> for
details on how to set up CVS, define your CVSROOT, and login. Once
you've done that, just execute the command
<pre>&nbsp;&nbsp;&nbsp; cvs co mozilla/js/rhino</pre>
to get the tip source.
<p>The current tip can also be viewed using LXR at <a
href="http://lxr.mozilla.org/mozilla/source/js/rhino/">
http://lxr.mozilla.org/mozilla/source/js/rhino/</a> . </p>
<p> </p>
<hr width="100%"><a href="index.html">back to top</a> <br>
&nbsp; <br>
</body>
</html>

View File

@@ -0,0 +1,278 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 97">
<meta name="GENERATOR" content="Mozilla/4.7 [en] (WinNT; U) [Netscape]">
<title>Embedding Scripting Host in Business Applications</title>
</head>
<body link="#0000FF">
<b><font face="Arial"><font size=-1>Embedding
Scripting Host in Business Applications</font></font></b>
<p><b><font face="Arial"><font size=-1>Madhukumar Seshadri, <a href="http://www.cognizant.com)/">www.cognizant.com</a></font></font></b>
<br>&nbsp;
<br>&nbsp;
<p><font face="Arial"><font size=-1>With web browsers, continuing to rule
the human interface for applications, creating value by being ubiquitous,
few adoptions of rich technology thats getting brewed underneath, will
help designing business applications even though most of the current ones
are made with birds eye of the underlying technologies.</font></font>
<p><font face="Arial"><font size=-1>JavaScript is a scripting language
invented and developed by Netscape. The language was primarily designed
for creating lightweight programming for web browser extensions by exposing
the Document Object Model of an HTML page to the scripts. JavaScript is
becoming object oriented and getting adopted for server-side scripting.</font></font>
<p><font face="Arial"><font size=-1>JavaScript is also becoming a standard
in the scripting world as Netscape is working closely with ECMA (European
Computer Manufacturers Association) to make it as a standard scripting
language for the script world. The standards are published as ECMA Script.</font></font>
<p><font face="Arial"><font size=-1>JavaScript originally designed for
exposing the DOM (Document Object Model) standardized by World Wide Web
consortium (W3C), to help web page designers to control and manipulate
the pages dynamically. JavaScript engines were embedded in the browsers
and they execute those portions of the code embedded in the HTML pages.</font></font>
<p><font face="Arial"><font size=-1>In short, JavaScript engine embedded
in the browser allowed extensions or manipulations for DOM Object run time
for the HTML page by executing the scripts associated with them. In other
words, browser exposes its DOM object for the page to scripts for extensions
and dynamic manipulations of the same, using a language that the script
interpreter understands.</font></font>
<p><font face="Arial"><font size=-1>Can I do the same for my application
by exposing my custom business objects written in my middle-tier? Can I
allow user to my write JavaScript extensions for my objects and also be
host for executing those scripts?</font></font>
<p><font face="Arial"><font size=-1>JavaScript host runs times are available
as binaries written in major languages. Check out <a href="http://www.mozilla.org/js">www.mozilla.org/js</a>.
Spider Monkey and Rhino are open source JavaScripting engines available
from mozilla.</font></font>
<p><font face="Arial"><font size=-1>Microsoft implementation of ECMA Script
(ECMA Script is based on core JavaScript, created by Netscape) is called
JScript. Microsoft binaries of jscript engine can be downloaded from http://msdn.microsoft.com/scripting/.</font></font>
<p><font face="Arial"><font size=-1>This document doesnt explain the JavaScript
language in detail but explains how these scripting engines can be used
as host to expose business objects in the middle-tier and how the user
of these applications can extend it if needed using JavaScript.</font></font>
<p><font face="Arial"><font size=-1>The scripting engine Rhino (<a href="http://www.mozilla.org/js)">www.mozilla.org/rhino)</a>,
a javascript engine purely written in Java is one that I am going to use
for the testing the above.</font></font>
<p><font face="Arial"><font size=-1>Let us set some simple goals,</font></font>
<ul>
<li>
<font face="Arial"><font size=-1>Execute a plain JavaScript code and
use static Java object</font></font></li>
<li>
<font face="Arial"><font size=-1>Instantiate external objects (written
in Java) from the script and use them within the script</font></font></li>
</ul>
<br>&nbsp;
<br>&nbsp;
<p><font face="Arial"><font size=-1>Let us write a simple Javscript to
test the above set goals,</font></font>
<p><font face="Arial"><font size=-1><b>Fig 1</b> jshosttest.js</font></font>
<p><b><i><font face="Arial"><font size=-1>/* Test 1 */</font></font></i></b>
<br><b><i><font face="Arial"><font size=-1>/* Use a static Java Object
in the script */</font></font></i></b>
<p><font face="Arial"><font size=-1>function test1() {</font></font>
<br><font face="Arial"><font size=-1>&nbsp;&nbsp;&nbsp; var str;</font></font>
<br><font face="Arial"><font size=-1>&nbsp;&nbsp;&nbsp; str = '"Hello World";</font></font>
<br><font face="Arial"><font size=-1>&nbsp;&nbsp;&nbsp; return str;</font></font>
<br><font face="Arial"><font size=-1>}</font></font>
<p><font face="Arial"><font size=-1>var str = test1( );</font></font>
<br><font face="Arial"><font size=-1>//out is expected to be Java Object
exposed to the script scope</font></font>
<br><font face="Arial"><font size=-1>out.println ("JavaScript - Test 1
- " + str);</font></font>
<p><b><i><font face="Arial"><font size=-1>/* Test 2 */</font></font></i></b>
<p><b><i><font face="Arial"><font size=-1>/* Instantiate a Javaobject for
this scope and use it */</font></font></i></b>
<p><font face="Arial"><font size=-1>function test2(){</font></font>
<br><font face="Arial"><font size=-1>&nbsp;&nbsp;&nbsp; // create a Java
string buffer object from JavaScript and use its java instance</font></font>
<br><font face="Arial"><font size=-1>&nbsp;&nbsp;&nbsp; // This uses an
another Java object created for creating new objects within Java and</font></font>
<br><font face="Arial"><font size=-1>&nbsp;&nbsp;&nbsp; // brings the same
for JavaScript execution scope</font></font>
<br><font face="Arial"><font size=-1>&nbsp;&nbsp;&nbsp; // Refer _create.java
for more information</font></font>
<br><font face="Arial"><font size=-1>&nbsp;&nbsp;&nbsp; create.getInstance("java.lang.StringBuffer","buffer");</font></font>
<br><font face="Arial"><font size=-1>&nbsp;&nbsp;&nbsp; //JavaScript refers
the java object instance as buffer</font></font>
<br><font face="Arial"><font size=-1>&nbsp;&nbsp;&nbsp; out.println(buffer.toString());</font></font>
<br>&nbsp;&nbsp;&nbsp; <font face="Arial"><font size=-1>buffer.append("I
am a javaobject dynamically created and executed in JavaScript");</font></font>
<br>&nbsp;&nbsp;&nbsp; <font face="Arial"><font size=-1>return buffer.toString();</font></font>
<br><font face="Arial"><font size=-1>}</font></font>
<p><font face="Arial"><font size=-1>var str = test2();</font></font>
<br><font face="Arial"><font size=-1>out.println("From JavaScript - Test
2 " + str);</font></font>
<p><font face="Arial"><font size=-1>Let us write a simple Javahost Object
using the Rhino engine to execute the above script,</font></font>
<p><b><font face="Arial"><font size=-1>Fig 2.1 - JSHost.java</font></font></b>
<p><font face="Arial"><font size=-1>/**</font></font>
<br><font face="Arial"><font size=-1>* @author Madhukumar Seshadri</font></font>
<br><font face="Arial"><font size=-1>* @version</font></font>
<br><font face="Arial"><font size=-1>*/</font></font>
<p><font face="Arial"><font size=-1>import org.mozilla.javascript.*;</font></font>
<br><font face="Arial"><font size=-1>import java.io.*;</font></font>
<br><font face="Arial"><font size=-1>import java.lang.*;</font></font>
<br><i><font face="Arial"><font size=-1>// import com.xxx.xxx.*;</font></font></i>
<p><font face="Arial"><font size=-1>public class JSHost extends Object
{</font></font>
<br><font face="Arial"><font size=-1>&nbsp;&nbsp;&nbsp; /** Creates new
JSHost */</font></font>
<br><font face="Arial"><font size=-1>&nbsp;&nbsp;&nbsp; public JSHost()
{</font></font>
<br><font face="Arial"><font size=-1>&nbsp;&nbsp;&nbsp; }</font></font>
<p><i><font face="Arial"><font size=-1>&nbsp;&nbsp;&nbsp; /*** Executes
.js file ***/</font></font></i>
<br><font face="Arial"><font size=-1>&nbsp;&nbsp;&nbsp; public Object executeJS
(String jsfname){</font></font>
<br><font face="Arial"><font size=-1>&nbsp;&nbsp;&nbsp; //You can also
use evaluateReader</font></font>
<br><font face="Arial"><font size=-1>&nbsp;&nbsp;&nbsp; File fp = new File(jsfname);</font></font>
<br><font face="Arial"><font size=-1>&nbsp;&nbsp;&nbsp; String str_buff
=null;</font></font>
<br><font face="Arial"><font size=-1>&nbsp;&nbsp;&nbsp; try {</font></font>
<br><font face="Arial"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
FileReader fr = new FileReader(jsfname);</font></font>
<br><font face="Arial"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
int length = (int) fp.length();</font></font>
<br><font face="Arial"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
char cbuff[] = new char[(char)length];</font></font>
<br><font face="Arial"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
fr.read(cbuff);</font></font>
<br><font face="Arial"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
str_buff = new String(cbuff);</font></font>
<br><font face="Arial"><font size=-1>&nbsp;&nbsp;&nbsp; } catch(Exception
e) {</font></font>
<br><font face="Arial"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
e.printStackTrace();</font></font>
<br><font face="Arial"><font size=-1>&nbsp;&nbsp;&nbsp; }</font></font>
<p><font face="Arial"><font size=-1>&nbsp;&nbsp;&nbsp; //Execute the .js
file content</font></font>
<br><font face="Arial"><font size=-1>&nbsp;&nbsp;&nbsp; return executeJSSource(str_buff);</font></font>
<br><font face="Arial"><font size=-1>}</font></font>
<p><i><font face="Arial"><font size=-1>/*** Executes javascript source
***/</font></font></i>
<br><font face="Arial"><font size=-1>public Object executeJSSource (String
jsbuff){</font></font>
<br><font face="Arial"><font size=-1>Object any=null;</font></font>
<br><font face="Arial"><font size=-1>try{</font></font>
<br><i><font face="Arial"><font size=-1>//Enter the Context</font></font></i>
<br><font face="Arial"><font size=-1><i>// Refer </i><u><font color="#0000FF">http://www.mozilla.org/js/rhino/tutorial.html</font></u></font></font>
<br><font face="Arial"><font size=-1>Context context = Context.enter();</font></font>
<br><i><font face="Arial"><font size=-1>// Get the execution scope</font></font></i>
<br><font face="Arial"><font size=-1>Scriptable scope = context.initStandardObjects();</font></font>
<p><i><font face="Arial"><font size=-1>//----------- For Test 1 - Get System.out
in scope</font></font></i>
<br><font face="Arial"><font size=-1>//Scriptable jObj1 = Context.toObject(System.out,
scope);</font></font>
<br><font face="Arial"><font size=-1>scope.put("out", scope, jObj1);</font></font>
<p><i><font face="Arial"><font size=-1>//------------ For Test 2 - Instantiate
Create Object and get that in scope</font></font></i>
<br><i><font face="Arial"><font size=-1>//Allow JScript to create Java
Objects</font></font></i>
<br><i><font face="Arial"><font size=-1>//Bring the _create object to context</font></font></i>
<br><font face="Arial"><font size=-1>_create create = new _create( );</font></font>
<br><i><font face="Arial"><font size=-1>//Register this context and scope
to this create object instance</font></font></i>
<br><font face="Arial"><font size=-1>create.registerContext(context,scope);</font></font>
<br><font face="Arial"><font size=-1>//Scriptable jObj2 = Context.toObject(_create,
scope);</font></font>
<br><font face="Arial"><font size=-1>scope.put("create",scope,create);</font></font>
<br><i><font face="Arial"><font size=-1>//Evaluate (or execute js)</font></font></i>
<br><font face="Arial"><font size=-1><i>//Refer </i><u><font color="#0000FF">http://www.mozilla.org/js/rhino/tutorial.html</font></u></font></font>
<br><font face="Arial"><font size=-1>any = context.evaluateString(scope,
jsbuff, "", 1, null);</font></font>
<br><i><font face="Arial"><font size=-1>//Exit the Context</font></font></i>
<br><font face="Arial"><font size=-1>context.exit( );</font></font>
<br><font face="Arial"><font size=-1>}</font></font>
<p><font face="Arial"><font size=-1>catch ( JavaScriptException jse) {</font></font>
<br><font face="Arial"><font size=-1>jse.printStackTrace();</font></font>
<br><font face="Arial"><font size=-1>}</font></font>
<p><font face="Arial"><font size=-1>return any;</font></font>
<p><font face="Arial"><font size=-1>}</font></font>
<p><font face="Arial"><font size=-1>}</font></font>
<br>&nbsp;
<br>&nbsp;
<p><font face="Arial"><font size=-1>Let us write a class for creating new
Java objects and bringing them to this script execution scope,</font></font>
<p><b><font face="Arial"><font size=-1>Fig 2.2 _create.java</font></font></b>
<p><i><font face="Arial"><font size=-1>/**</font></font></i>
<p><i><font face="Arial"><font size=-1>* @author Madhukumar</font></font></i>
<p><i><font face="Arial"><font size=-1>*/</font></font></i>
<p><font face="Arial"><font size=-1>import java.lang.Class;</font></font>
<p><font face="Arial"><font size=-1>import org.mozilla.javascript.*;</font></font>
<p><font face="Arial"><font size=-1>public class _create extends Object
{</font></font>
<p><font face="Arial"><font size=-1>static Context ptr = null;</font></font>
<p><font face="Arial"><font size=-1>static Scriptable scope =null;</font></font>
<p><font face="Arial"><font size=-1>public _create () { }</font></font>
<p><font face="Arial"><font size=-1>public void registerContext(Context
cptr, Scriptable sc){</font></font>
<p><font face="Arial"><font size=-1>ptr = cptr;</font></font>
<p><font face="Arial"><font size=-1>scope = sc;</font></font>
<p><font face="Arial"><font size=-1>}</font></font>
<p><font face="Arial"><font size=-1>public void getInstance(String classname,String
jsclassname) {</font></font>
<p><font face="Arial"><font size=-1>Object any=null;</font></font>
<p><font face="Arial"><font size=-1>try {</font></font>
<p><font face="Arial"><font size=-1>Class thisclass = Class.forName(classname);</font></font>
<p><font face="Arial"><font size=-1>any = thisclass.newInstance();</font></font>
<p><font face="Arial"><font size=-1>}</font></font>
<p><font face="Arial"><font size=-1>catch(Exception e){</font></font>
<p><font face="Arial"><font size=-1>e.printStackTrace();</font></font>
<p><font face="Arial"><font size=-1>}</font></font>
<p><font face="Arial"><font size=-1>if( ptr != null) {</font></font>
<p><font face="Arial"><font size=-1>if (scope !=null) {</font></font>
<p><i><font face="Arial"><font size=-1>//register created object for this
execution scope</font></font></i>
<p><font face="Arial"><font size=-1>scope.put(jsclassname,scope,any);</font></font>
<p><font face="Arial"><font size=-1>}</font></font>
<p><font face="Arial"><font size=-1>}</font></font>
<p><font face="Arial"><font size=-1>}</font></font>
<p><font face="Arial"><font size=-1>}</font></font>
<br>&nbsp;
<br>&nbsp;
<p><font face="Arial"><font size=-1>It is time to test the code, so let
us write a small object that will use the JSHost object,</font></font>
<p><b><font face="Arial"><font size=-1>Fig 3 - JSHosttest.java</font></font></b>
<p><font face="Arial"><font size=-1>/**</font></font>
<p><font face="Arial"><font size=-1>* @author Madhukumar</font></font>
<p><font face="Arial"><font size=-1>* @version</font></font>
<p><font face="Arial"><font size=-1>*/</font></font>
<p><font face="Arial"><font size=-1>public class JSHosttest extends Object
{</font></font>
<p><font face="Arial"><font size=-1>/** Creates new JSHostTest*/</font></font>
<p><font face="Arial"><font size=-1>public JSHosttest() {</font></font>
<p><font face="Arial"><font size=-1>}</font></font>
<p><font face="Arial"><font size=-1>public static void main (String args[]){</font></font>
<p><font face="Arial"><font size=-1>if (args.length &lt; 1) {</font></font>
<p><font face="Arial"><font size=-1>System.out.println("Usage - Java JSHosttest.class
&lt;js source file>");</font></font>
<p><font face="Arial"><font size=-1>return;</font></font>
<p><font face="Arial"><font size=-1>}</font></font>
<p><font face="Arial"><font size=-1>JSHost jsh = new JSHost();</font></font>
<p><font face="Arial"><font size=-1>System.out.println("Executing JavaScript
file - " + args[0]);</font></font>
<p><font face="Arial"><font size=-1>Object result = jsh.executeJS(args[0]);</font></font>
<p><font face="Arial"><font size=-1>if (result instanceof String){</font></font>
<p><font face="Arial"><font size=-1>System.out.println("Results - " + result);</font></font>
<p><font face="Arial"><font size=-1>}</font></font>
<p><font face="Arial"><font size=-1>}</font></font>
<p><font face="Arial"><font size=-1>}</font></font>
<br>&nbsp;
<br>&nbsp;
<p><font face="Arial"><font size=-1>For more explanations on the code execution,
please refer embedding tutorial <a href="http://www.mozilla.org/js/rhino/tutorial.html">http://www.mozilla.org/js/rhino/tutorial.html</a>
and for all documentation and examples on Rhino visit <a href="http://www.mozilla.org/rhino/doc.html">http://www.mozilla.org/rhino/doc.html</a>.</font></font>
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
</body>
</html>

View File

@@ -0,0 +1,94 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Norris Boyd">
<meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">
<title>Rhino Examples</title>
</head>
<body bgcolor="#FFFFFF">
<center>
<h1>
Rhino Examples</h1></center>
Examples have been provided that show how to control the JavaScript engine
and to implement scriptable host objects. All the examples are in the cvs
tree at <tt><a href="http://lxr.mozilla.org/mozilla/source/js/rhino/examples/">mozilla/js/rhino/examples</a></tt>.
<br>&nbsp;
<h2>
Sample Scripts</h2>
The <tt><a href="http://lxr.mozilla.org/mozilla/source/js/rhino/examples/unique.js">unique.js</a></tt>
script allows printing unique lines from a file.
<p>The <tt><a href="http://lxr.mozilla.org/mozilla/source/js/rhino/examples/liveConnect.js">liveConnect.js</a></tt>
script shows a sample usage of LiveConnect (Java-to-JavaScript connectivity).
<p>The <tt><a href="http://lxr.mozilla.org/mozilla/source/js/rhino/examples/jsdoc.js">jsdoc.js</a></tt>
script is a JavaScript analog to Java's <tt>javadoc</tt>. It makes heavy
use of regular expressions.
<p>The <tt><a href="http://lxr.mozilla.org/mozilla/source/js/rhino/examples/checkParam.js">checkParam.js</a></tt>
script is a useful tool to check that <tt>@param</tt> tags in Java documentation
comments match the parameters in the corresponding Java method.
<p>The <tt><a href="http://lxr.mozilla.org/mozilla/source/js/rhino/examples/enum.js">enum.js</a></tt>
script is a good example of using a JavaAdapter to implement a Java interface
using a JavaScript object.
<p>The <a href="http://lxr.mozilla.org/mozilla/source/js/rhino/examples/NervousText.js">NervousText.js</a>
script is a JavaScript implementation of the famous NervousText applet
using JavaScript compiled to Java classes using <a href="jsc.html">jsc</a>.
It can be run in the HTML page <a href="http://lxr.mozilla.org/mozilla/source/js/rhino/examples/NervousText.html">NervousText.html</a>.
<br>&nbsp;
<h2>
Controlling the JavaScript Engine</h2>
<h4>
The RunScript class</h4>
<tt><a href="http://lxr.mozilla.org/mozilla/source/js/rhino/examples/RunScript.java">RunScript.java</a></tt>
is a simple program that executes a script from the command line.
<h4>
The Control class</h4>
<tt><a href="http://lxr.mozilla.org/mozilla/source/js/rhino/examples/Control.java">Control.java</a></tt>
is a program that executes a simple script and then manipulates the result.
<h4>
JavaScript Shell</h4>
<tt><a href="http://lxr.mozilla.org/mozilla/source/js/rhino/examples/Shell.java">Shell.java</a></tt>
is a program that executes JavaScript programs; it is a simplified version
of the shell in the <tt>tools</tt> package. The programs may be specified
as files on the command line or by typing interactively while the shell
is running.
<h4>PrimitiveWrapFactory</h4>
<a href="http://lxr.mozilla.org/mozilla/source/js/rhino/examples/PrimitiveWrap
Factory.java">PrimitiveWrapFactory.java</a> is an example of a WrapFactory that
can be used to control the wrapping behavior of the Rhino engine on calls to Jav
a methods.<br>
<h4>
<b>Multithreaded Script Execution</b></h4>
<tt><a href="http://lxr.mozilla.org/mozilla/source/js/rhino/examples/DynamicScopes.java">DynamicScopes.java</a></tt>
is a program that creates a single global scope object and then shares
it across multiple threads. Sharing the global scope allows both information
to be shared across threads, and amortizes the cost of Context.initStandardObjects
by only performing that expensive operation once.
<br>&nbsp;
<h2>
Implementing Host Objects</h2>
First check out the <a href="http://www.mozilla.org/rhino/tutorial.html">tutorial</a>
if you haven't already.
<h4>
The Foo class - Extending ScriptableObject</h4>
<tt><a href="http://lxr.mozilla.org/mozilla/source/js/rhino/examples/Foo.java">Foo.java</a></tt>
is a simple JavaScript host object that includes a property with an associated
action and a variable argument method.
<br>&nbsp;
<h4>
The Matrix class - Implementing Scriptable</h4>
<tt><a href="http://lxr.mozilla.org/mozilla/source/js/rhino/examples/Matrix.java">Matrix.java</a></tt>
provides a simple multidimensional array by implementing the Scriptable
interface.
<br>&nbsp;
<h4>
The File class - An advanced example</h4>
<tt><a href="http://lxr.mozilla.org/mozilla/source/js/rhino/examples/File.java">File.java</a></tt>
extends ScriptableObject to provide a means of reading and writing files
from JavaScript. A more involved example of host object definition.
<p>
<hr WIDTH="100%">
<br><a href="index.html">back to top</a>
</body>
</html>

View File

@@ -0,0 +1,52 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Norris Boyd">
<meta name="GENERATOR" content="Mozilla/4.75 [en] (Windows NT 5.0; U) [Netscape]">
<meta name="KeyWords" content="Rhino, JavaScript, Java">
<title>Rhino FAQ</title>
</head>
<body bgcolor="#FFFFFF">
<script src="owner.js"></script>
<center>
<h1>
Frequently Asked Questions about Rhino</h1></center>
<script>document.write(owner());</script>
<br><script>
var d = new Date(document.lastModified);
document.write((d.getMonth()+1)+"/"+d.getDate()+"/"+d.getFullYear());
document.write('<br>');
</script>
<center>
<hr WIDTH="100%"></center>
<p><b><font size=+2>Q</font>.</b> <i>How do I create a Java array from
JavaScript?</i>
<p><b><font size=+2>A.</font></b> You must use Java reflection. For instance,
to create an array of java.lang.String of length five, do
<blockquote><tt>var stringArray = java.lang.reflect.Array.newInstance(java.lang.String,
5);</tt></blockquote>
Then if you wish to assign the string "hi" to the first element, simply
execute <tt>stringArray[0] = "hi"</tt>.
<p>Creating arrays of primitive types is slightly different: you must use
the TYPE field. For example, creating an array of seven ints can be done
with the code
<blockquote><tt>var intArray = java.lang.reflect.Array.newInstance(java.lang.Integer.TYPE,
7);</tt></blockquote>
<p><br><b><font size=+2>Q</font>.</b> <i>When I try to execute a script
I get the exception </i><tt>Required security context missing</tt><i>.
What's going on?</i>
<p><b><font size=+2>A.</font></b> You've likely missed placing the <tt>Security.properties</tt>
file in your class path at <tt>org.mozilla.javascript.resources</tt>.
<h3>
<hr WIDTH="100%"><br>
<a href="index.html">back to top</a></h3>
</body>
</html>

View File

@@ -0,0 +1,60 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Norris Boyd">
<meta name="GENERATOR" content="Mozilla/4.51 [en] (WinNT; U) [Netscape]">
<title>Small Footprint</title>
</head>
<body bgcolor="#FFFFFF">
<center>
<h1>
Small Footprint</h1></center>
A few changes can be made to reduce the footprint of Rhino for embeddings
where space is at a premium. On a recent build, the length of js.jar was 603,127 bytes corresponding to 1,171,708 bytes of all uncompressed Rhino classes with debug information included.
With various changes js.jar size can be reduced to 204,689 bytes corresponding to 424,774 bytes of uncompressed classes.
<h3>Tools</h3>
<p>
Most embeddings won't need any of the classes in <tt>org.mozilla.javascript.tools</tt> or any of its sub-packages.
<h3>
Optimizer</h3>
<p>
It is possible to run Rhino with interpreter mode only, allowing you to remove
classes for classfile generation that include all the classes from
<tt>org.mozilla.javascript.optimizer</tt> package and <tt>ClassNameHelper</tt>, <tt>ClassRepository</tt> classes from <tt>org.mozilla.javascript</tt> package.
<h3>JavaAdapter</h3>
<p>
Implementing the JavaAdapter functionality requires the ability to generate
classes on the fly. Removing <tt>org.mozilla.javascript.JavaAdapter</tt> will disable this functionality, but Rhino will otherwise run correctly.
<h3>Class generation library</h3>
<p>
If you do not include Optimizer or JavaAdapter, then you do not need Rhino library for class file generation and you can remove all the classes from in <tt>org.mozilla.classfile</tt> package.
<h3>Regular Expressions</h3>
<p>
The package <tt>org.mozilla.javascript.regexp</tt> can be removed. Rhino
will continue to run, although it will not be able to execute any regular
expression matches. This change saves 47,984 bytes of class files.
<h3>Debug information</h3>
<p>
Debug information in Rhino classes consumes about 25% of code size and if you can live without that, you can recompile Rhino to remove it.
<h2>smalljs.jar</h2>
Ant build script in Rhino supports smalljar target that will generate smalljs.jar that does not include Tools, Optimizer, JavaAdapter and Class generation library, Regular Expressions and deprecated files. To build such minimalist jar without debug information, run the following command from the top directory of Rhino distribution:
<pre>
ant clean
ant -Ddebug=off -Dno-regexp=true smalljar
</pre>
If you omit <tt>-Dno-regexp=true</tt>, then the resulting smalljs.jar will include Regular Expression support.
<p>
<hr WIDTH="100%">
<br><a href="index.html">back to top</a>
</body>
</html>

View File

@@ -0,0 +1,44 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Norris Boyd">
<meta name="GENERATOR" content="Mozilla/4.75 [en] (Windows NT 5.0; U) [Netscape]">
<title>Help with Rhino</title>
</head>
<body>
<center><b><font size=+3>Help with Rhino</font></b></center>
<script src="owner.js"></script>
<p>Have a question that you can't find answer to in the <a href="doc.html">documentation</a>?
Here are some additional resources for help:
<br>&nbsp;
<h3>
<font size=+1>Newsgroup and Mail Gateway</font></h3>
The <a href="news:netscape.public.mozilla.jseng">netscape.public.mozilla.jseng</a>
newsgroup answers questions about both Rhino and the C implementation of
JavaScript. You can get to the newsgroup through a mail gateway. Send a
message with the subject "subscribe" to <a href="mailto:mozilla-jseng-request@mozilla.org?subject=subscribe">mozilla-jseng-request@mozilla.org</a>.
To post messages, send mail to <a href="mailto:mozilla-jseng@mozilla.org">mozilla-jseng@mozilla.org</a>.
To unsubscribe, mail with "unsubscribe" in the subject to <a href="mailto:mozilla-jseng-request@mozilla.org?subject=unsubscribe">mozilla-jseng-request@mozilla.org</a>.
<p>
To view archived messages, try <a href="http://groups.google.com/groups?q=netscape.public.mozilla.jseng&hl=en&lr=&safe=off&site=groups">Google groups</a> or
other newsgroup services.
<h3>
Bug System</h3>
Use <a href="http://bugzilla.mozilla.org/enter_bug.cgi?product=Rhino">Bugzilla</a>
to enter bugs against Rhino. Note that Rhino has its own product category.
<br>&nbsp;
<h3>
Module Owner</h3>
The module owner,&nbsp;<script>document.write(owner());</script>
, can
be mailed for help as well, although he may copy his response to the newsgroup
to help others.
<p>
<hr WIDTH="100%"><a href="index.html">back to top</a>
<br>&nbsp;
<br>&nbsp;
</body>
</html>

View File

@@ -0,0 +1,45 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Norris Boyd">
<meta name="GENERATOR" content="Mozilla/4.72 [en]C-NSCP (WinNT; U) [Netscape]">
<title>Rhino History</title>
</head>
<body>
<center><b><font size=+3>Rhino History</font></b></center>
<p>Rhino gets its name from the animal on the cover of the <a href="http://www.ora.com/">O'Reilly</a>
book about JavaScript.
<p>The Rhino project was started at Netscape in Fall 1997. At the time,
Netscape was planning to produce a version of Navigator written entirely
in Java and so it needed an implementation of JavaScript written in Java.
When Netscape stopped work on "Javagator", as it was called, somehow Rhino
escaped the axe (rumor had it that the executives "forgot" it existed).
Since then, a couple of major companies (including Sun) have licensed Rhino
for use in their products and paid Netscape to do so, allowing us to continue
work on it. Now Rhino is planned to be part of several server products
from Netscape as well.
<p>Originally, Rhino compiled all JavaScript code to Java bytecodes in
generated classfiles. This produced the best performance (often beating
the C implementation of JavaScript when run on a JIT), but suffered from
two faults. First, compilation time was long since generating Java bytecodes
and loading the generated classes was a heavyweight process. Also, the
implementation effectively leaked memory since most JVMs don't really collect
unused classes or the strings that are interned as a result of loading
a class file.
<p>So in Fall of 1998, Rhino added an interpretive mode. The classfile
generation code was moved to an optional, dynamically-loaded package. Compilation
is faster and when scripts are no longer in use they can be collected like
any other Java object.
<p>Rhino was released to mozilla.org in April of 1998. Originally Rhino
classfile generation had been held back from release. However the licensees
of Rhino have now agreed to release all of Rhino to open source, including
class file generation. Since its release to open source, Rhino has found
a variety of <a href="users.html">uses</a> and an increasing
number of people have contributed to the code.
<p>
<hr WIDTH="100%"><a href="index.html">back to top</a>
</body>
</html>

View File

@@ -0,0 +1,75 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Norris Boyd">
<meta name="GENERATOR" content="Mozilla/4.7 [en] (WinNT; U) [Netscape]">
<meta name="KeyWords" content="Rhino, JavaScript, Java, Mozilla">
<title>Rhino - JavaScript for Java</title>
</head>
<body>
<center>
<h1>
Rhino: JavaScript for Java</h1></center>
<center><img SRC="rhino50.jpg" height=200 width=398></center>
<hr WIDTH="100%">Rhino is an open-source implementation of JavaScript written
entirely in Java. It is typically embedded into Java applications to provide
scripting to end users.
<table WIDTH="100%" >
<tr>
<td>
<div align=right><b><a href="download.html">Downloads</a></b></div>
</td>
<td>How to get source and binaries.</td>
</tr>
<tr>
<td>
<div align=right><b><a href="doc.html">Documentation</a></b></div>
</td>
<td>Information on Rhino for script writers and embedders.</td>
</tr>
<!--
<tr>
<td>
<div align=right><b><a href="users.html">Users</a></b></div>
</td>
<td>How people are using Rhino.</td>
</tr>
-->
<tr>
<td>
<div align=right><b><a href="history.html">History</a></b></div>
</td>
<td>The ancestry of the beast.</td>
</tr>
<tr>
<td>
<div align=right><b><a href="help.html">Help</a></b></div>
</td>
<td>Some resources if you get stuck.</td>
</tr>
</table>
<hr WIDTH="100%"><font size=-1>Module owner&nbsp;</font><script src="owner.js"></script>
<script>document.write(owner());</script>
<br><font size=-1>Rhino image courtesy of Paul Houle.</font><!---
Add reference to
http://www.javaworld.com/jw-08-1999/jw-08-howto.html
and
http://www.javaworld.com/javaworld/jw-09-1999/jw-09-howto.html
--->
</body>
</html>

View File

@@ -0,0 +1,66 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Norris Boyd">
<meta name="GENERATOR" content="Mozilla/4.6 [en] (WinNT; U) [Netscape]">
<meta name="KeyWords" content="Rhino, JavaScript, Java">
<title>Followup to JavaOne</title>
</head>
<body bgcolor="#FFFFFF">
<center>
<h1>
Followup to JavaOne session on Rhino</h1></center>
This page is intended to follow up on the <a href="http://www.javasoft.com/javaone/">JavaOne</a>
session on <a href="http://industry.java.sun.com/javaone/99/event/0,1768,629,00.html">"Rhino:
JavaScript for the Java Platform"</a>. I hope it will be useful whether
or not you actually attended the talk.
<br>&nbsp;
<h2>
Slides</h2>
<a href="http://industry.java.sun.com/javaone/99/pdfs/e629.pdf">Slides</a>
(PDF file, 1112246 bytes)&nbsp; can be downloaded from Sun's site.
<br>&nbsp;
<br>&nbsp;
<h2>
More on Q &amp; A</h2>
Following the talk there was an excellent question and answer session where
many attendees asked good questions and offered useful suggestions. I'll
follow up on some of those here. I'll start a thread on the newsgroup <a href="news://news.mozilla.org/netscape.public.mozilla.jseng">netscape.public.mozilla.jseng</a>
so people can ask addition questions or comments there.
<h3>
Java classes visible to scripts</h3>
One attendee raised the point that many embeddings may not want scripts
to be able to access all Java classes. This is an excellent point, and
I've implemented an addition to the <a href="../js/rhino/org/mozilla/javascript/SecuritySupport.html">SecuritySupport</a>
class that allows embedders to choose which classes are exposed to scripts.
<h3>
Easier "importing" of Java classes</h3>
Another attendee suggested that the current method of referring to Java
classes (like <tt>java.lang.String</tt> or <tt>Packages.org.mozilla.javascript.Context</tt>)
could be improved. I've implemented a set of changes that make importing
easier, but I'm not convinced that adding them is the right thing to do
due to some drawbacks.
<p>To see what I've done, take a look at the javadoc for the <a href="../js/rhino/org/mozilla/javascript/ImporterTopLevel.html">ImporterTopLevel</a>
class. You'll see that it's now possible to make function calls to "import"
Java classes so that they can be referred to without qualification. I didn't
use the word "import" because that's a keyword in JavaScript.
<p>There are a few drawbacks to this implemenation. First, there is a runtime
cost associated with every lookup of a top-level variable. The problem
is that it's not possible to use the Java runtime to determine the set
of classes from a given package. Instead, importing the package "java.util"
saves the package name in a special list and every access to the global
scope that fails to find a matching variable causes the runtime to see
if there is a class by that name in the "java.util" package. Even for lookups
that succeed there is an additional method call.
<p>Another drawback to this implementation is namespace pollution: now
"importClass" and "importPackage" have special meaning. It's still possible
to substitute your own variables for these functions, but it's still possible
that program behavior could change.
<p>So I'm interested in people's opinion: Is this benefit worth the costs?
<p>
<hr WIDTH="100%">
<br><a href="index.html">back to top</a>
</body>
</html>

View File

@@ -0,0 +1,82 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Norris Boyd">
<meta name="GENERATOR" content="Mozilla/4.7 [en] (WinNT; U) [Netscape]">
<title>JavaScript Compiler</title>
</head>
<body bgcolor="#FFFFFF">
<center>
<h1>
JavaScript Compiler</h1></center>
The JavaScript compiler translates JavaScript source into Java class files.
The resulting Java class files can then be loaded and executed at another
time, providing a convenient method for transfering JavaScript, and for
avoiding translation cost.
<p>Note that the top-level functions available to the shell (such as <tt>print</tt>)
are <i>not</i> available to compiled scripts when they are run outside
the shell.
<br>&nbsp;
<h2>
Invoking the Compiler</h2>
<tt>java org.mozilla.javascript.tools.jsc.Main</tt> [<i>options</i>] <i>file1</i><tt>.js</tt>
[<i>file2</i><tt>.js</tt>...]
<p>where <i>options</i> are:
<p><tt>-extends <i>java-class-name</i></tt>
<blockquote>Specifies that a java class extending the Java class <i>java-class-name</i>
should be generated from the incoming JavaScript source file. Each global
function in the source file is made a method of the generated class, overriding
any methods in the base class by the same name.</blockquote>
<tt>-implements <i>java-intf-name</i></tt>
<blockquote>Specifies that a java class implementing the Java interface
<i><tt>java-intf-name</tt></i>
should be generated from the incoming JavaScript source file. Each global
function in the source file is made a method of the generated class, implementing
any methods in the interface by the same name.</blockquote>
<tt>-debug</tt>
<br><tt>-g</tt>
<ul>Specifies that debug information should be generated. May not be combined
with optimization at an <i>optLevel</i> greater than zero.</ul>
<tt>-nosource</tt>
<ul>Does not save the source in the class file. Functions and scripts compiled
this way cannot be decompiled. This option can be used to avoid distributing
source or simply to save space in the resulting class file.</ul>
<tt>-o </tt><i>outputFile</i>
<ul>Writes the class file to the given file (which should end in <tt>.class</tt>).
The string <i>outputFile</i> must be a writable filename.</ul>
<tt>-opt </tt><i>optLevel</i>
<br><tt>-O</tt> <i>optLevel</i>
<ul>Optimizes at level <i>optLevel</i>, which must be an integer between
-1 and 9. See <a href="opt.html">Optimization</a> for more details. If
<i>optLevel</i>
is greater than zero, <tt>-debug</tt> may not be specified.</ul>
<tt>-package</tt> <i>packageName</i>
<ul>Specifies the package to generate the class into. The string <i>packageName</i>
must be composed of valid identifier characters optionally separated by
periods.</ul>
<tt>-version </tt><i>versionNumber</i>
<ul>Specifies the language version to compile with. The string <i>versionNumber</i>
must be one of <tt>100</tt>, <tt>110</tt>, <tt>120</tt>, <tt>130</tt>,
or <tt>140</tt>. See <a href="overview.html#versions">JavaScript Language
Versions</a> for more information on language versions.</ul>
<h2>
Examples</h2>
<tt>$ cat test.js</tt>
<br><tt>java.lang.System.out.println("hi, mom!");</tt>
<br><tt>$ java org.mozilla.javascript.tools.jsc.Main test.js</tt>
<br><tt>$ ls *.class</tt>
<br><tt>test.class</tt>
<br><tt>$ java test</tt>
<br><tt>hi, mom!</tt>
<p><tt>$ java org.mozilla.javascript.tools.jsc.Main -extends java.applet.Applet
\</tt>
<br><tt>&nbsp;&nbsp;&nbsp; -implements java.lang.Runnable NervousText.js</tt>
<br>&nbsp;
<p>
<hr WIDTH="100%">
<br><a href="index.html">back to top</a>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

View File

@@ -0,0 +1,86 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Norris Boyd">
<meta name="GENERATOR" content="Mozilla/4.72 [en]C-NSCP (WinNT; U) [Netscape]">
<title>JavaScript Requirements and Limitations</title>
</head>
<body bgcolor="#FFFFFF">
<center>
<h1>
Requirements and Limitations</h1></center>
<h2>
<b>Requirements</b></h2>
Rhino requires version 1.1 or greater of Java.
<p>To use the JavaAdapter feature or an optimization level of 0 or greater,
Rhino must be running under a security manager that allows the definition
of class loaders.
<p>
<hr WIDTH="100%">
<h2>
<b>Limitations</b></h2>
<h3>
<b>Platforms and </b>JITs</h3>
Many platforms and JREs have problems converting decimal numbers to and
from strings. These errors are usually boundary case errors and will show
up as test failures in section 7.7.3.
<p>Windows versions of the Symantec JIT prior to 3.00.029(i) will report
internal errors for some generated class files.
<p>On the Symantec JIT and the AIX JVM, accessing a static field of a class
that has not yet loaded may not give the correct value of the field. For
example, accessing
<tt>java.io.File.separatorChar</tt> before <tt>java.io.File</tt>
has been loaded will return a value of 0. (This is a bug in the JIT; accessing
the field should cause the class to be loaded.)
<p>The AIX Java version "JDK 1.1.6 IBM build a116-19980924 (JIT enabled:
jitc)" core dumps running several classes generated by Rhino. It also has
errors in java.lang.Math.pow that are reflected as failures in the JavaScript
Math object's pow method.
<p>IBM Java for Linux version "JDK 1.1.8 IBM build l118-19991013 (JIT enabled:
jitc)" has errors in java.lang.Math.pow that are reflected as test failures
in the JavaScript Math object's pow method.
<p>Solaris JDK 1.1.6 has errors in java.lang.Math.atan2 that are reflected
as test failures in the JavaScript Math object's atan2 method.
<br>&nbsp;
<h3>
<b>LiveConnect</b></h3>
If a JavaObject's field's name collides with that of a method, the value
of that field is retrieved lazily, and can be counter-intuitively affected
by later assignments:
<blockquote><tt>javaObj.fieldAndMethod = 5;</tt>
<br><tt>var field = javaObj.fieldAndMethod;</tt>
<br><tt>javaObj.fieldAndMethod = 7;</tt>
<br><tt>// now, field == 7</tt></blockquote>
You can work around this by forcing the field value to be converted to
a JavaScript type when you take its value:
<blockquote><tt>javaObj.fieldAndMethod = 5;</tt>
<br><tt>var field = javaObj.fieldAndMethod + 0; // force conversion now</tt>
<br><tt>javaObj.fieldAndMethod = 7;</tt>
<br><tt>// now, field == 5</tt></blockquote>
<h3>
<b>JSObject</b></h3>
Rhino does NOT support the <tt>netscape.javascript.JSObject</tt> class.
<br>&nbsp;
<h3>
<b>Date object</b></h3>
The JavaScript Date object depends on time facilities of the underlying
Java runtime to determine daylight savings time dates. Earlier JRE versions
may report a date for the daylight savings changeover that is a week off.
JRE 1.1.6 reports the correct date.
<p>Under the 1.1.6 JRE, evaluating <tt>(new Date(1998, 9, 25, 2)).toString()</tt>
returns:
<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Sun Oct 25 02:00:00 GMT-0800 (PST) 1998</pre>
Earlier versions may return:
<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Sun Oct 25 02:00:00 GMT-0700 (PDT) 1998</pre>
(the JRE doesn't report the changeover until Nov. 1.)
<p>The Microsoft SDK 3.1 for Java also exhibits this problem.
<p>
<hr WIDTH="100%">
<br><a href="rhino.html">back to top</a>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -0,0 +1,68 @@
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Author" CONTENT="Norris Boyd">
<META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (WinNT; U) [Netscape]">
<TITLE>Optimization</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<H1>
Optimization</H1></CENTER>
<H2>
Optimization settings</H2>
<P>The currently supported optimization settings are:</P>
<P><B>-1</B>
<P><B></B>Interpretive mode is always
used. The compilation time is minimized at the expense of runtime performance.
No class files are generated, which may improve memory usage depending on your
system.
<p>
If the optimization package is not available, then optimization acts as if it is always -1.
</P>
<P><B>0</B>
<P><B></B>No optimizations are
performed. The bytecode compiler runs fastest in this mode, but the generated byte code
is less efficient.</P>
<P><B>1-9</B>
<P>All optimizations are performed. Simple data &amp; type
flow analysis is performed to determine which JavaScript variables can be
allocated to Java VM registers, and which variables are used only as Numbers.
Local common sub-expressions are collapsed (currently this only happens for
property lookup, but in the future more expressions may be optimized). All local
variables and parameters are allocated to Java VM registers. Function call
targets are speculatively pre-cached (based on the name used in the source) so
that dispatching can be direct, pending runtime confirmation of the actual
target. Arguments are passed as Object/Number pairs to reduce conversion
overhead.</P>
<P>Note:
<OL>
<LI>
Some language features (indirect calls to eval, use
of the arguments property of function objects) were previously not supported
in higher optimization levels. These features have been removed from the
language in ECMA, so higher optimization levels are now conformant.
<LI>
Future versions may allocate more aggressive
optimizations to higher optimization levels. For compatibility with future
versions, use level 1. For maximal optimization, use level 9, but retest
your application when upgrading to new versions.</LI>
</OL>
<P>
<HR WIDTH="100%">
<BR><A HREF="index.html">back to top</A>
<br>
</BODY>
</HTML>

View File

@@ -0,0 +1,148 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Norris Boyd">
<meta name="GENERATOR" content="Mozilla/4.72 [en]C-NSCP (WinNT; U) [Netscape]">
<title>JavaScript Overview</title>
</head>
<body bgcolor="#FFFFFF">
<center>
<h1>
Rhino Overview</h1></center>
<h3>
Overview of Rhino</h3>
Most people who have used JavaScript before have done so by adding scripts
to their HTML web pages. However, Rhino is an implementation of the core
language only and doesn't contain objects or methods for manipulating HTML
documents.
<p>Rhino contains
<ul>
<li>
All the features of JavaScript 1.5</li>
<li>
Allows direct scripting of Java</li>
<li>
A JavaScript shell for executing JavaScript scripts</li>
<li>
A JavaScript compiler to transform JavaScript source files into Java class
files</li>
</ul>
<h3>
Language</h3>
The JavaScript language itself is standardized by Standard ECMA-262 <i>ECMAScript:
A general purpose, cross-platform programming language</i>. Rhino 1.5 implements
JavaScript 1.5, which conforms to Edition 3 of the Standard. The Standard
may be <a href="http://www.ecma.ch/ecma1/STAND/ECMA-262.HTM">downloaded</a> or
obtained by mail from ECMA, 114 Rue du Rh&ocirc;ne, CH1204 Geneva, Switzerland.
<p>In addition, Rhino has implemented JavaAdapters, which allows JavaScript
to implement any Java interface or extend any Java class with a JavaScript
object. See the <tt>enum.js</tt> example for more information.
<p>Numerous books and tutorials on JavaScript are available.
<br>&nbsp;
<br>&nbsp;
<h3>
Deprecated Language Features</h3>
Several language features introduced in JavaScript 1.2 are now deprecated.
These features allow "computational reflection": that is, the ability for
a script to determine and influence aspects of the way it is evaluated.
These features are generally not broadly useful, yet they impose significant
constraints on implementations that hamper or prevent optimization. The
deprecated features are the <tt>__proto__</tt> and <tt>__parent__</tt>
properties, and the constructors <tt>With</tt>, <tt>Closure</tt>, and <tt>Call</tt>.
Attempts to invoke these constructors with the language version 1.4 will
result in an error. For other versions, a warning will be generated.
<br>&nbsp;
<br>&nbsp;
<h3>
Internationalization</h3>
The messages reported by the JavaScript engine are by default retrieved
from the property file <tt>org/mozilla/javascript/resources/Messages.properties</tt>.
If other properties files with extensions corresponding to the current
locale exist, they will be used instead.
<br>&nbsp;
<br>&nbsp;
<h3>
<a NAME="versions"></a>JavaScript Language Versions</h3>
Some behavior in the JavaScript engine is dependent on the language version.
In browser embeddings, this language version is selected using the LANGUAGE
attribute of the SCRIPT tag with values such as "JavaScript1.2".
<p>Version 1.3 and greater are ECMA conformant.
<p><b>Operators <tt>==</tt> and <tt>!=</tt></b>
<p>Version 1.2 only uses strict equality for the == and != operators. In
version 1.3 and greater, == and != have the same meanings as ECMA. The
operators === and !== use strict equality in all versions.
<p><b>ToBoolean</b>
<p><tt>Boolean(new Boolean(false))</tt> is false for all versions before
1.3. It is true (and thus ECMA conformant) for version 1.3 and greater.
<p><b>Array.prototype.toString and Object.prototype.toString</b>
<p>Version 1.2 only returns array or object literal notation ("[1,2,3]"
or "{a:1, b:2}" for example). In version 1.3 and greater these functions
are ECMA conformant.
<p><b>Array constructor</b>
<p><tt>Array(i)</tt> for a number argument <tt>i</tt> constructs an array
with a single element equal to <tt>i</tt> for version 1.2 only. Otherwise
the ECMA conformant version is used (an array is constructed with no elements
but with length property equal to <tt>i</tt>).
<p><b>String.prototype.substring</b>
<p>For version 1.2 only, the two arguments are not swapped if the first
argument is less than the second one. All other versions are ECMA compliant.
<p><b>String.prototype.split</b>
<p>For version 1.2 only, split performs the Perl4 special case when given
a single space character as an argument (skips leading whitespace, and
splits on whitespace). All other versions split on the space character
proper as specified by ECMA.
<br>&nbsp;
<br>&nbsp;
<h3>
Security</h3>
The security features in Rhino provide the ability to track the origin
of a piece of code (and any pieces of code that it may in turn generate).
These features allow for the implementation of a traditional URL-based
security policy for JavaScript as in Netscape Navigator. Embeddings that
trust the JavaScript code they execute may ignore the security features.
<p>Embeddings that run untrusted JavaScript code must do two things to
enable the security features. First, every <tt>Context</tt> that is created
must be supplied an instance of an object that implements the <tt>SecuritySupport</tt>
interface. This will provide Rhino the support functionality it needs to
perform security-related tasks.
<p>Second, the value of the property <tt>security.requireSecurityDomain</tt>
should be changed to <tt>true</tt> in the resource bundle <tt>org.mozilla.javascript.resources.Security</tt>.
The value of this property can be determined at runtime by calling the
<tt>isSecurityDomainRequired</tt>
method of <tt>Context</tt>. Setting this property to true requires that
any calls that compile or evaluate JavaScript must supply a security domain
object of any object type that will be used to identify JavaScript code.
In a typical client embedding, this object might be a string with the URL
of the server that supplied the script, or an object that contains a representation
of the signers of a piece of code for certificate-based security policies.
<p>When JavaScript code attempts a restricted action, the security domain
can be retrieved in the following manner. The class context should be obtained
from the security manager (see <tt>java.lang.SecurityManager.getClassContext()</tt>).
Then, the class of the code that called to request the restricted action
can be obtained by looking an appropriate index into the class context
array. If the caller is JavaScript the class obtained may be one of two
types. First, it may be the class of the interpreter if interpretive mode
is in effect. Second, it may be a generated class if classfile generation
is supported. An embedding can distinguish the two cases by calling <tt>isInterpreterClass()</tt>
in the <tt>Context</tt> class. If it is the interpreter class, call the
getInterpreterSecurityDomain() method of Context to obtain the security
domain of the currently executing interpreted script or function. Otherwise,
it must be a generated class, and an embedding can call <tt>getSecurityDomain()</tt>
in the class implementing
<tt>SecuritySupport</tt>. When the class was
defined and loaded, the appropriate security domain was associated with
it, and can be retrieved by calling this method. Once the security domain
has been determined, an embedding can perform whatever checks are appropriate
to determine whether access should be allowed.
<p>
<hr WIDTH="100%">
<br><a href="index.html">back to top</a>
</body>
</html>

View File

@@ -0,0 +1,3 @@
function owner() {
return '<a href="mailto:nboyd'+'@'+ 'atg.com">Norris Boyd</a>'
}

View File

@@ -0,0 +1,83 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Norris Boyd">
<meta name="GENERATOR" content="Mozilla/4.5 [en]C-NSCP (WinNT; I) [Netscape]">
<title>Performance Hints</title>
</head>
<body bgcolor="#FFFFFF">
<center>
<h1>
Performance Hints</h1></center>&nbsp;
<h3>
<tt>var</tt> Statements</h3>Use <tt>var</tt> statements when possible. Not only is it good
programming practice, it can speed up your code by allowing the compiler to
generate special code to access the variables. For example, you could rewrite
<p><tt>function sum(a) {</tt>
<br><tt>&nbsp;&nbsp;&nbsp; result = 0;</tt>
<br><tt>&nbsp;&nbsp;&nbsp; for (i=0; i &lt;
a.length; i++)</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; result += a[i];</tt>
<br><tt>&nbsp;&nbsp;&nbsp; return result;</tt>
<br><tt>}</tt>
<p>as
<p><tt>function sum(a) {</tt>
<br><tt>&nbsp;&nbsp;&nbsp; var result = 0;</tt>
<br><tt>&nbsp;&nbsp;&nbsp; for (var i=0; i
&lt; a.length; i++)</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; result += a[i];</tt>
<br><tt>&nbsp;&nbsp;&nbsp; return result;</tt>
<br><tt>}</tt>
<p>This is not equivalent code because the second version does
not modify global variables <tt>result</tt> and <tt>i</tt>. However, if you don't intend for any other function to
access these variables, then storing them globally is probably wrong anyway
(what if you called another function that had a loop like the one in <tt>sum</tt>!).
<br>&nbsp;
<h3>
Arrays</h3>Use the forms of the Array constructor that
specify a size or take a list of initial elements. For example, the code
<p><tt>var a = new Array();</tt>
<br><tt>for (var i=0; i &lt; n; i++)</tt>
<br><tt>&nbsp;&nbsp;&nbsp; a[i] = i;</tt>
<p>could be sped up by changing the constructor call to <tt>new Array(n)</tt>. A constructor call like that indicates to
the runtime that a Java array should be used for the first <i>n</i> entries of the array. Similarly,
<tt>new
Array(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;)</tt> or <tt>[&quot;a&quot;, &quot;b&quot;, &quot;c&quot;]</tt> will cause a 3-element
Java array to be allocated to hold the contents of the JavaScript array.
<br>&nbsp;
<br>&nbsp;
<h3>
<tt>eval</tt> and <tt>new Function</tt></h3>Avoid calling <tt>eval</tt> when
possible. Calls to <tt>eval</tt> are slow because the script
being executed must be compiled. Constructing a new function object can be slow
for the same reason, while function expressions are more efficient because the
function can be compiled. For example, the code
<p><tt>function MyObject(a) {</tt>
<br><tt>&nbsp;&nbsp;&nbsp; this.s = a;</tt>
<br><tt>&nbsp;&nbsp;&nbsp; this.toString = new
Function(&quot;return this.s&quot;);</tt>
<br><tt>}</tt>
<p>could be written more efficiently as
<p><tt>function MyObject(a) {</tt>
<br><tt>&nbsp;&nbsp;&nbsp; this.s = a;</tt>
<br><tt>&nbsp;&nbsp;&nbsp; this.toString =
function () { return this.s }</tt>
<br><tt>}</tt>
<p>Beginning with Rhino 1.4 Release 2, code
passed to eval and new Function will be interpreted rather than compiled to
class files.
<br>&nbsp;</p>
<h3>
with</h3>Using the <tt>with</tt>
statement prevents the compiler from generating code for fast access to local
variables. You're probably better off explicitly accessing any properties of the
object.
<br>&nbsp;
<p>
<hr WIDTH="100%">
<br><a href="index.html">back to top</a>
<br>
</body>
</html>

View File

@@ -0,0 +1,162 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Norris Boyd">
<meta name="GENERATOR" content="Mozilla/4.75 [en] (Windows NT 5.0; U) [Netscape]">
<meta name="KeyWords" content="Rhino, JavaScript, Java">
<title>What's New in Rhino 1.5</title>
</head>
<body bgcolor="#FFFFFF">
<center>
<h1>
What's New in Rhino 1.5 Release 1</h1></center>
<h2>
ECMA 262 Edition 3 Conformance</h2>
Rhino 1.5 implements JavaScript 1.5, which conforms to ECMA 262 Edition
3 (sometimes referred to as "ECMAScript"). Edition 3 standardized several
features of JavaScript that were present in JavaScript 1.4, including:
<ul>
<li>
regular expressions</li>
<li>
<tt>switch</tt> statements</li>
<li>
<tt>do</tt>...<tt>while</tt> loops</li>
<li>
statement labels and labelled <tt>break</tt> and <tt>continue</tt></li>
<li>
object literals</li>
<li>
nested functions</li>
<li>
exception handling</li>
<li>
the <tt>instanceof</tt> operator</li>
<li>
the <tt>in</tt> operator</li>
</ul>
In addition, new features were added to Edition 3 and JavaScript 1.5, including:
<ul>
<li>
Perl 5 regular expressions, including operators like greedy quantifiers</li>
<li>
errors as exceptions</li>
<li>
number formatting (<tt>Number.prototype.toFixed</tt>, <tt>Number.prototype.toExponential</tt>,
and <tt>Number.prototype.toGeneral</tt>)</li>
</ul>
<h2>
Changes since Rhino 1.4 Release 3</h2>
Other significant changes to Rhino since the initial release to open source
(1.4 Release 3) are listed below. Bug fixes won't be mentioned here, just
API changes or significant functionality changes.
<h3>
Compilation mode</h3>
Rhino has two modes of execution available. Interpretive mode has an interpreter
loop implemented in Java. Compilation mode compiles JavaScript code to
Java bytecodes in class files. This compilation can be done as part of
script evaluation using the same APIs already available for the interpreter,
or in a separate compile-time step. The code for the interpreter is located
in the <tt>org.mozilla.javascript.optimizer</tt> package.
<br>&nbsp;
<h3>
JavaScript Compiler</h3>
The distribution now contains an extra class that can be invoked from the
command line. This is <tt>jsc</tt>, the JavaScript compiler. This tool
can be used to create Java classes from JavaScript. Options exist to allow
creation of Java classes that implement arbitrary interfaces and extend
arbitrary base classes, allowing JavaScript scripts to implement important
protocols like applets and servlets. See <a href="http://www.mozilla.org/rhino/jsc.html">http://www.mozilla.org/rhino/jsc.html</a>.
<br>&nbsp;
<h3>
LiveConnect 3</h3>
Rhino now supports the LiveConnect 3 specification, or LC3. The most notable
change is support for overloaded method resolution. See <a href="http://www.mozilla.org/js/liveconnect/lc3_proposal.html">LiveConnect
Release 3 Goals/Features</a>.
<br>&nbsp;
<h3>
JavaBeans properties reflected as Java properties</h3>
Java classes with getFoo/setFoo methods will have a "foo" property in the
JavaScript reflection. Boolean methods are also reflected.
<br>&nbsp;
<h3>
Dynamic scope support</h3>
Rhino 1.5 implements support for dynamic scopes, which are particularly
useful for multithreaded environments like server embeddings.
<br>&nbsp;
<h3>
New semantics for <tt>ScriptableObject.defineClass</tt></h3>
The old rules for defining JavaScript objects using a Java class were getting
baroque. Those rules are still supported, but a cleaner definition is now
supported. See the <a href="http://www.mozilla.org/js/rhino/org/mozilla/javascript/ScriptableObject.html#defineClass(org.mozilla.javascript.Scriptable, java.lang.Class)">javadoc</a>
for details.
<br>&nbsp;
<h3>
Support for the Java 2 <tt>-jar</tt> option</h3>
It's now possible to start the shell using the new <tt>-jar</tt> option
in Java 2.
<br>&nbsp;
<h3>
Shell changes</h3>
Two changes here: addition of the "environment" and "history" top-level
variables.
<br>&nbsp;
<h3>
Java classes visible to scripts</h3>
An attendee at JavaOne raised the point that many embeddings may not want
scripts to be able to access all Java classes. This is an excellent point,
and I've implemented an addition to the <a href="../js/rhino/org/mozilla/javascript/SecuritySupport.html">SecuritySupport</a>
interface that allows embedders to choose which classes are exposed to
scripts.
<br>&nbsp;
<h3>
SecuritySupport and JavaAdapter</h3>
Andrew Wason pointed a problem with the new JavaAdapter feature (which
allows JavaScript objects to implement arbitrary Java interfaces by generating
class files). It didn't support the <a href="../js/rhino/org/mozilla/javascript/SecuritySupport.html">SecuritySupport</a>
interface, which allows Rhino to delegate the creation of classes from
byte arrays to a routine provided by the embedding. This ability is important
from a security standpoint because class creation is considered a privileged
action.
<p>I've checked in changes that fix this problem. If a SecuritySupport
class is specified when a Context is created, uses of JavaAdapter will
will delegate class creation to the SecuritySupport class.
<br>&nbsp;
<h3>
Context.exit()</h3>
Context.exit() has been changed from an instance method to a static method.
This makes it match the Context.enter() method, which is also static. See
the <a href="http://www.mozilla.org/js/rhino/org/mozilla/javascript/Context.html#exit()">javadoc</a>
for more information on its operation.
<br>&nbsp;
<h3>
Context.enter(Context)</h3>
A new overloaded form of Context.enter has been added. Without the addition
of this method it was not possible to attach an existing context to a thread.
See the <a href="http://www.mozilla.org/js/rhino/org/mozilla/javascript/Context.html#enter(org.mozilla.javascript.Context)">javadoc</a>
for more information on its operation.
<br>&nbsp;
<h3>
Listeners for Context</h3>
Context now supports property change listeners for a couple of its properties.
<h3>
<hr WIDTH="100%"><br>
<a href="index.html">back to top</a></h3>
</body>
</html>

View File

@@ -0,0 +1,84 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Norris Boyd">
<meta name="GENERATOR" content="Mozilla/4.75 [en] (Windows NT 5.0; U) [Netscape]">
<meta name="KeyWords" content="Rhino, JavaScript, Java">
<title>Rhino 1.5 Release 2</title>
</head>
<body bgcolor="#FFFFFF">
<center>
<h1>
What's New in Rhino 1.5 Release 2</h1></center>
This is a log of significant changes since the release of Rhino 1.5 Release
1.
<br>&nbsp;
<h2>
Graphical debugger</h2>
Thanks to a contribution by Christopher Oliver, Rhino now has a graphical
debugger. See <a href="debugger.html">Rhino Debugger</a> for more details.
<br>&nbsp;
<h2>
Footprint reductions</h2>
Igor Bukanov has provided a wealth of changes to reduce the number and
size of objects required by Rhino. In particular, he introduced a new way
to represent the built-in objects like Date and RegExp that reduces the
amount of memory required and speeds up <tt>Context.initStandardObjects</tt>.
<br>&nbsp;
<h2>
Interpreted mode performance improvements</h2>
Igor Bukanov also made a number of improvements to interpreter mode performance.
<br>&nbsp;
<h2>
JS/CORBA Adapter</h2>
Matthias Radestock wrote a module that allows JavaScript code to interact
with CORBA. See <a href="http://sourceforge.net/projects/jscorba">http://sourceforge.net/projects/jscorba</a>
for more details.
<br>&nbsp;
<h2>
Directory restructuring and Ant buildfile</h2>
I've restructured the the Rhino directory and written an <a href="http://jakarta.apache.org/ant/index.html">Ant</a>
buildfile. This should make building easier and more consistent with other
open source Java projects.
<br>&nbsp;
<h2>
FlattenedObject deprecated</h2>
I wrote FlattenedObject to provide a means for dealing with JavaScript
<br>objects in prototype chains. Where Scriptable defines the primitive
<br>operations, FlattenedObject defines the aggregate operations of
<br>manipulating properties that may be defined in an object or in an object
<br>reachable by a succession of getPrototype calls.
<p>However, I now believe that I designed FlattenedObject poorly. Perhaps
<br>it should have been a clue that I was never satisfied with the name:
if
<br>it's hard to express the name of the object it may mean the function
the
<br>object is supposed to fulfill is not well defined either. The problem
is
<br>that it is inefficient since it requires an extra object creation,
and
<br>balky because of that extra level of wrapping.
<p>So I've checked in changes that deprecate FlattenedObject. I've
<br>introduced new static methods in ScriptableObject (thanks to
<br>beard@netscape.com for the idea) that replace the functionality. These
<br>methods perform the get, put, and delete operations on a Scriptable
<br>object passed in without the overhead of creating a new object.
<h2>
WrapHandler interface</h2>
Embeddings that wish to provide their own custom wrappings for Java objects
may implement this interface and
<br>call Context.setWrapHandler. See WrapHandler javadoc.
<br>&nbsp;
<h2>
ClassOutput interface</h2>
An interface embedders can implement in order to control the placement
of generated class bytecodes. See the javadoc.
<h3>
<hr WIDTH="100%"><br>
<a href="index.html">back to top</a></h3>
</body>
</html>

View File

@@ -0,0 +1,63 @@
<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Norris Boyd">
<meta name="GENERATOR" content="Mozilla/4.75 [en] (Windows NT 5.0; U) [Netscape]">
<meta name="KeyWords" content="Rhino, JavaScript, Java">
<title>Change Log</title>
</head>
<body bgcolor="#ffffff">
<center>
<h1> Change Log for Significant Rhino Changes</h1>
</center>
This is a log of significant changes since the release of Rhino 1.5 Release
2.
<p> </p>
<h3> </h3>
<h3>Serialization</h3>
See the <a href="serialization.html">serialization documentation</a>
.<br>
<br>
<h3>Class writer API changes</h3>
Courtesy of Kemal Bayram.<br>
<br>
"The biggest change I've made is the replacement of ClassOutput with<br>
ClassRepository that has the single method:<br>
<br>
&nbsp;&nbsp;&nbsp; public boolean storeClass(String className, byte[] classBytes,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
boolean isTopLevel) throws IOException;<br>
<br>
This interface allows any arbitary storage method, such as a<br>
Hashtable/Map. In addition it also allows you to specify whether a<br>
class should be loaded, via returning true or false.&nbsp; You can still
use<br>
ClassOutput as I've coded an internal wrapper.<br>
<br>
With this interface it has also been possible to strip out the file<br>
saving code from Codegen and OptClassNameHelper.&nbsp; The file<br>
saving code is now an inner class FileClassRepository in Context. As<br>
a consequence of this&nbsp; I've stripped out some methods from ClassNameHelper.<br>
The resulting code is much more cleaner then before hand and everything<br>
still works as per usual.<br>
<br>
Other small additions are:<br>
&nbsp; o&nbsp; Annonymous functions are now named class$1 instead of class1<br>
&nbsp; o&nbsp; get/setClassName added to ClassNameHelper exposed in Context.
"<br>
<br>
<h3>Bunches of bug fixes and optimizations from Igor Bukanov and others</h3>
See the CVS logs<br>
<h3>
<hr width="100%"><br>
<a href="index.html">back to top</a>
</h3>
</body>
</html>

View File

@@ -0,0 +1,201 @@
<!DOCTYPE doctype PUBLIC "-//w3c//dtd html 4.0 transitional//en">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Igor Bukanov">
<meta name="KeyWords" content="Rhino, JavaScript, Java">
<title>Debug API changes</title>
</head>
<body bgcolor="#ffffff">
<h2 align="center">Debug API changes in Rhino 1.5 Release 4</h2>
<p>
The main difference between the old and new API is that the application needs to implement both org.mozilla.javascript.debugger.Debugger and
org.mozilla.javascript.debugger.DebugFrame interfaces to receive debug
information during script execution. See the API documentation for these
classes for details:
<br>
<tt><a href="http://lxr.mozilla.org/mozilla/source/js/rhino/src/org/mozilla/javascript/debug/DebugFrame.java">http://lxr.mozilla.org/mozilla/source/js/rhino/src/org/mozilla/javascript/debug/DebugFrame.java</a>
<br><a href="http://lxr.mozilla.org/mozilla/source/js/rhino/src/org/mozilla/javascript/debug/Debugger.java">http://lxr.mozilla.org/mozilla/source/js/rhino/src/org/mozilla/javascript/debug/Debugger.java</a>
</tt>
<p>
In addition the org.mozilla.javascript.debugger.DebuggableEngine interface and the getDebuggableEngine method in org.mozilla.javascript.Context are replaced by 3 Context methods: setDebugger, getDebugger and getDebuggerContextData to set/get debugger and its Context data in the current thread Context:<br>
<tt><a href="http://lxr.mozilla.org/mozilla/source/js/rhino/src/org/mozilla/javascript/Context.java">http://lxr.mozilla.org/mozilla/source/js/rhino/src/org/mozilla/javascript/Context.java</a></tt>
<p>The following gives few examples how to update your current application to the new API.
<p>
1. Setting and querying a Debugger implementation
<p>
Old API:
<pre>
cx.getDebuggableEngine.setDebugger(debugger);
cx.getDebuggableEngine.getDebugger();
</pre>
New API:
<pre>
cx.setDebugger(debugger);
cx.getDebugger();
</pre>
<p>
2. Monitoring execution of each line in the script
<p>
Old implementation:
<pre>
public MyDebugger implement Debugger {
public void handleCompilationDone(Context cx,
DebuggableScript fnOrScript,
StringBuffer source)
{
}
void handleBreakpointHit(Context cx)
{
DebugFrame frame = cx.getDebuggableEngine().getFrame(0);
System.out.println("New line:" + frame.getLineNumber());
}
void handleExceptionThrown(Context cx, Object exception)
{
}
}
...
cx.getDebuggableEngine.setDebugger(new MyDebugger());
cx.getDebuggableEngine.setBreakNextLine(true);
</pre>
New implementation:
<pre>
public MyDebugger implement Debugger
{
public void handleCompilationDone(Context cx,
DebuggableScript fnOrScript,
StringBuffer source)
{
}
public DebugFrame getFrame(Context cx, DebuggableScript fnOrScript)
{
return new MyDebugFrame();
}
}
class MyDebugFrame implements DebugFrame
{
public void onEnter(Context cx, Scriptable activation,
Scriptable thisObj, Object[] args)
{
}
public void onExceptionThrown(Context cx, Throwable ex)
{
}
public void onExit(Context cx, boolean byThrow,
Object resultOrException)
{
}
public void onLineChange(Context cx, int lineNumber)
{
System.out.println("New line:" + frame.getLineNumber());
}
}
...
cx.setDebugger(new MyDebugger());
</pre>
Note the in the new implementation the application can monitor function enter/exit by customizing enterFrame and onExit in the above code.
<p>
3. Breakpoint handling
<p>
Old implementation:
<pre>
public MyDebugger implement Debugger {
public void handleCompilationDone(Context cx, DebuggableScript fnOrScript,
StringBuffer source)
{
int breakpointLine = ...;
fnOrScript.placeBreakpoint(breakpointLine);
}
void handleBreakpointHit(Context cx) {
DebugFrame frame = cx.getDebuggableEngine().getFrame(0);
System.out.println("Breakpoint hit: "+frame.getSourceName()+":"+frame.getLineNumber());
}
void handleExceptionThrown(Context cx, Object exception)
{
}
}
...
cx.getDebuggableEngine.setDebugger(new MyDebugger());
</pre>
New implementation:
<pre>
public MyDebugger implement Debugger
{
public void handleCompilationDone(Context cx,
DebuggableScript fnOrScript,
StringBuffer source)
{
}
public DebugFrame getFrame(Context cx, DebuggableScript fnOrScript)
{
return new MyDebugFrame(fnOrScript);
}
}
class MyDebugFrame implements DebugFrame
{
DebuggableScript fnOrScript;
MyDebugFrame(DebuggableScript fnOrScript)
{
this.fnOrScript = fnOrScript;
}
public void onEnter(Context cx, Scriptable activation,
Scriptable thisObj, Object[] args)
{
System.out.println("Frame entered");
}
public void onLineChange(Context cx, int lineNumber)
{
if (isBreakpoint(lineNumber)) {
System.out.println("Breakpoint hit: "+fnOrScript.getSourceName()+":"+lineNumber);
}
}
public void onExceptionThrown(Context cx, Throwable ex)
{
}
public void onExit(Context cx, boolean byThrow,
Object resultOrException)
{
System.out.println("Frame exit, result="+resultOrException);
}
private boolean isBreakpoint(int lineNumber)
{
...
}
}
...
cx.setDebugger(new MyDebugger());
</pre>
Here debugger during execution needs to decide if a particular line has breakpoint on it set or not during script execution, not at the moment of script initialization.
<p>See also Rhino Debugger that fully explore the new API:<br><tt><a href="http://lxr.mozilla.org/mozilla/source/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/Main.java">http://lxr.mozilla.org/mozilla/source/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/Main.java</a></tt>. The debugger changes includes support for debugging eval and Function scripts and loading script sources from their URL if debugger was not installed during scripts initialization.
<hr width="100%"><br>
<a href="index.html">back to top</a></h3>
</body></html>

View File

@@ -0,0 +1,217 @@
<!DOCTYPE doctype PUBLIC "-//w3c//dtd html 4.0 transitional//en"><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Norris Boyd">
<meta name="GENERATOR" content="Mozilla/4.75 [en] (Windows NT 5.0; U) [Netscape]">
<meta name="KeyWords" content="Rhino, JavaScript, Java"><title>Change Log</title></head>
<body bgcolor="#ffffff">
<h1 align="center">
Rhino Change Log</h1>
This is a log of changes since the release of Rhino 1.5 Release 3.
<h3>Rhino debug API changes</h3>
A new, incompatible Rhino debug API gives an option to monitor
entering/leaving of script functions while decreasing the amount of code to
implement the API in the Rhino core. Details are available <a href="rhino15R4-debugger.html">here</a>. With the new API <a href="debugger.html">Rhino Debugger</a> provides options to break on function enter/exit, can debug scripts defined by eval and Function construction and scripts loaded prior the debugger were started.
<h3>WrapFactory introduced, WrapHandler deprecated</h3>
A design flaw in the WrapHandler interface (a call to a Java contructor from
JavaScript would result in a call to wrap the result, which would then be
cast to a Scriptable) inspired the deprecation of that interface and the
introduction of a new class, WrapFactory, that contains a new method called
on the result of a constructor call and can be customized by application if necessary.
<p>
In addition, WrapFactory has the new <tt>setJavaPrimitiveWrap</tt> method to control if instances of Java <tt>String</tt> and <tt>Number</tt> class should be wrapped to special script objects as any other Java objects so a script can access any method <tt>String</tt> and <tt>Number</tt>, or they should be converted to JavaScript primitive strings and numbers.
<h3>New security interfaces</h3>
<p>
Igor Bukanov contributed a new security implementation that allows integration with Java2 security model and prevents scripts to escape the security sandbox via eval/Function schemes.
<p>
Due to this changes SecuritySupport interface is replaced by ClassShutter and SecurityController, where ClassShutter controls which classes are visible to scripts via LiveConnect and SecurityController provides permission management. For compatibility SecuritySupport is still available as a deprecated interface but only its visibleToScripts method is used as an alias for ClassShutter.visibleToScripts. See API documentation for new classes for details.
<p>
An implementation of SecurityController that uses java policy settings to restrict script permissions based on its URL is available with Rhino shell. See the <a href="http://lxr.mozilla.org/mozilla/source/js/rhino/toolsrc/org/mozilla/javascript/tools/shell/JavaPolicySecurity.java">JavaPolicySecurity</a> source for details. To activate it, set the <tt>rhino.use_java_policy_security</tt> system property to true when invoking Rhino shell together with installing a security manager.
<h3>Serialization chages</h3>
Due to changes in Rhino implementation and bug fixes in serialization support runtime data serialized in Rhino 1.5 Release 3 can not be read back in the Release 4.
<h3>Regular expressions improvements</h3>
Roger Lawrence provided new regular expressions implementation which fully confirms to EcmaScript 262 standard and faster.
<h3>Scripting of classes from any class loader</h3>
Christopher Oliver contributed code to allow to use the <tt>Packages</tt> object as a constructor taking a class loader argument so a script can access classes defined by that class loader. For example, to access classes from foo.jar file in the current directory, the following can be used:
<pre>
// create class loader
var loader = new java.net.URLClassLoader([new java.net.URL("file:./foo.jar")]);
// create its LiveConnect wrapper
var fooJar = new Packages(loader);
// create an instance of the class For from foo.jar
var obj = new fooJar.Foo(1, 2, 3);
obj.someMethod();
</pre>
<h3>Shell function to run external processes.</h3>
A new <tt>runCommand</tt> function is added to <a href="shell.html">Rhino Shell</a> to run external priocesses. For details, see JavaDoc for <a href="http://lxr.mozilla.org/mozilla/source/js/rhino/toolsrc/org/mozilla/javascript/tools/shell/Global.java">org.mozilla.javascript.tools.shell.Global#runCommand</a>.
<h3>Resolved Bugzilla reports</h3>
The following Rhino reports in <a href="http://bugzilla.mozilla.org/">Bugzilla</a> where resolved for Rhino 1.5 Release 4.
<p>
<a href="http://bugzilla.mozilla.org/show_bug.cgi?id=61579">61579</a> -
context.decompileScript doesn't work.
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=72021">72021</a> -
The ScriptRuntime class tries to convert even the String values to JavaNativeObject
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=83051">83051</a> -
A function defined under a with block can't be invoked outside it
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=104089">104089</a> -
Cannot reattach context to its thread because of the bug in Context class
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=105438">105438</a> -
SourceName and lineNumbers of syntax errors in Javascript files not dispalyed.
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=106548">106548</a> -
/^.*?$/ will not match anything
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=114583">114583</a> -
script compile/decompile bug
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=114969">114969</a> -
[], [^] are valid RegExp conditions
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=115717">115717</a> -
java.lang.ArrayIndexOutOfBoundsException on with/try/finally
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=120194">120194</a> -
JS toInt32(x) conversion doesn't match ECMAScript definition
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=122167">122167</a> -
string.replace() placeholder '$1' not working
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=123439">123439</a> -
Backreferences /(a)? etc./ must hold |undefined| if not used
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=124508">124508</a> -
regexp.lastIndex should be integer-valued double, not uint32
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=124900">124900</a> -
arguments object storing duplicate parameter values
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=125562">125562</a> -
Regexp performance improvement
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=126317">126317</a> -
Crash on re.exec(str) if re.lastIndex set to certain values
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=126722">126722</a> -
(undefined === null) evaluating to true in Rhino compiled mode
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=128468">128468</a> -
java.io.NotSerializableException: org.mozilla.javascript.NativeError
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=129365">129365</a> -
Incorrect licensing in dtoa.java
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=132217">132217</a> -
delete on global function should not delete the function
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=136893">136893</a> -
Rhino treatment of |for(i in undefined)|, |for(i in null)|
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=137181">137181</a> -
delete on an arguments[i] not working correctly
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=145791">145791</a> -
ECMA conformance: Function.prototype.apply(), Function.prototype.call()
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=149285">149285</a> -
Complier does not report the correct line number on SyntaxError:Invalid assignment left-hand side.
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=151337">151337</a> -
EcmaError.getLineSource() returns 0x0 characters.
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=153223">153223</a> -
New RegExp engine in Rhino
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=154693">154693</a> -
Interpreted mode doesn't grok different functions on different objects
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=156510">156510</a> -
for (i in undefined) {} should not throw TypeError
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=157196">157196</a> -
ScriptableObject needs custom serialization implementation
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=157509">157509</a> -
No error on invalid usage of \ in identifiers
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=158159">158159</a> -
Should Rhino support octal escape sequences in regexps?
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=159334">159334</a> -
The javascript functions size is limited by a bug
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=164947">164947</a> -
Debugging unique.js produce a stack trace and erratic results
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=166530">166530</a> -
ClassCostException in FunctionObject static initializer
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=169830">169830</a> -
Array.concat(function) doesn't add function to the array
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=173180">173180</a> -
Rhino UTF-8 decoder accepts overlong sequences
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=173906">173906</a> -
Dynamic scope not working correctly with optimzation level >= 1
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=175383">175383</a> -
ArrayIndexOutOfBoundsException in string.replace()
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=177314">177314</a> -
Rhino should allow '\400' to mean ' 0'
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=179068">179068</a> -
String literals in Rhino are limited to 64K
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=179366">179366</a> -
--&gt; after whitespace after line start should mean comments to line end
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=181654">181654</a> -
Calling toString for an object derived from the Error class throws TypeError
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=181834">181834</a> -
wrong scope used for inner functions when compiling functions with dynamic scopes (interpreted only)
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=181909">181909</a> -
some regression tests for Error invalid
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=182028">182028</a> -
Calling has() in get() of a ScriptableObject causes getter function to not be called
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=184107">184107</a> -
with(...) { function f ...} should set f in the global scope
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=184111">184111</a> -
ArrayOutOfBounds Exception thrown when using Rhino Javascript Debugger
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=185165">185165</a> -
Decompilation of "\\" gives broken "\"
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=189183">189183</a> -
Debugger source frame window layering fix
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=189898">189898</a> -
Broken String.replace: "XaXY".replace("XY", "--") gives --aXY
<hr width="100%"><br>
<a href="index.html">back to top</a></h3>
</body></html>

View File

@@ -0,0 +1,41 @@
<!DOCTYPE doctype PUBLIC "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Igor Bukanov">
<meta name="KeyWords" content="Rhino, JavaScript, Java">
<title>Rhino 1.5 Release 4.1 Change Log</title>
</head>
<body bgcolor="#ffffff">
<h1 align="center">Rhino 1.5 Release 4.1 Change Log</h1>
1.5R4.1 is a bug fix release to address mostly regressions from 1.5R3 found in 1.5R4. The only visible API change compared with 1.5R4 is two new methods in <tt>org.mozilla.javascript.Context</tt>, <tt>getApplicationClassLoader()</tt> and <tt>setApplicationClassLoader(ClasssLoader)</tt>. They allow to control the class loader Rhino uses when accessing application classes.
<p>
For differences between 1.5R4 and 1.5R3, see <a href="rhino15R4.html">1.5R4 change log</a>.
<h3>Resolved Bugzilla reports</h3>
The following Rhino reports in <a href="http://bugzilla.mozilla.org/">Bugzilla</a> where resolved for Rhino 1.5 Release 4.
<p>
<a href="http://bugzilla.mozilla.org/show_bug.cgi?id=96270">96270</a> -
Unable to create java objects from within a javascript.
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=193168">193168</a> -
Rhino debugger in v1.5R4 fails to update script source when a script is reloaded.
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=193555">193555</a> -
1.5R4 regression: function expression has no access to its name.
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=196017">196017</a> -
1.5R4 regression: script can not find classes on some versions of JDK.
<br><a href="http://bugzilla.mozilla.org/show_bug.cgi?id=200551">200551</a> -
JavaAdapter not loading a class if js.jar installed in jre/lib/ext directory.
<hr width="100%"><br>
<a href="index.html">back to top</a></h3>
</body></html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@@ -0,0 +1,138 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Norris Boyd">
<meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">
<title>JavaScript Runtime</title>
</head>
<body bgcolor="#FFFFFF">
<center>
<h1>
The JavaScript Runtime</h1></center>
<h3>
Interpretation</h3>
Beginning with Rhino 1.4 Release 2, an interpretive mode is supported.
When scripts are compiled in interpretive mode, an internal representation
of the compiled form is created and stored rather than generating a Java
class. Execution proceeds by evaluating this compiled form using support
routines in Rhino.
<h3>
Compilation to Java Bytecodes</h3>
For improved performance, Rhino may compile JavaScript scripts to Java
bytecodes. The generated bytecodes in turn depend upon runtime support
routines. Each JavaScript script or function is compiled to a separate
class.
<p>Compilation of JavaScript source to class files is supported. It is
possible to specify the class files as well as the packages to generate
into.
<h3>
Types and Values</h3>
There are six fundamental types in JavaScript. These types are implemented
with the following Java types and values:
<br>&nbsp;
<br>&nbsp;
<center><table BORDER COLS=2 WIDTH="75%" >
<tr>
<td><i>JavaScript fundamental type</i></td>
<td><i>Java type</i></td>
</tr>
<tr>
<td>Undefined</td>
<td>A singleton object defined by <tt>Context.getUndefinedType()</tt></td>
</tr>
<tr>
<td>Null</td>
<td><tt>null</tt></td>
</tr>
<tr>
<td>Boolean</td>
<td><tt>java.lang.Boolean</tt></td>
</tr>
<tr>
<td>Number</td>
<td><tt>java.lang.Number</tt>, that is, any of <tt>java.lang.Byte</tt>,<tt>
java.lang.Short</tt>,<tt> java.lang.Integer</tt>,<tt> java.lang.Float</tt>,
or <tt>java.lang.Double. Not java.lang.Long, since a double representation
of a long may lose precision.</tt></td>
</tr>
<tr>
<td>String</td>
<td><tt>java.lang.String</tt></td>
</tr>
<tr>
<td>Object</td>
<td><tt>org.mozilla.javascript.Scriptable</tt></td>
</tr>
</table></center>
<p>In addition, ECMA refers to objects that implement [[Call]] as functions.
These object types are represented by implementing the Function interface.
<p>Since JavaScript is a dynamically typed language, the static Java type
of a JavaScript value is <tt>java.lang.Object</tt>.
<p>The behavior of the JavaScript engine is undefined if a value of any
type other than the ones described above is introduced into JavaScript.
(This caveat does not apply to scripts that use LiveConnect; the Java values
are wrapped and unwrapped as appropriate to conform to the above type constraints.)
<br>&nbsp;
<h3>
Property Access</h3>
Properties in JavaScript objects may be accessed using either string or
numeric identifiers. Conceptually, all accessors are converted to strings
in order to perform the lookup of the property in the object. However,
this is not the implementation used in practice because a number to string
conversion is too expensive to be performed on every array access.
<p>Instead, every property accessor method in <a href="org/mozilla/javascript/Scriptable.html">Scriptable</a>
(<tt>has</tt>, <tt>get</tt>, <tt>set</tt>, <tt>remove</tt>, <tt>getAttributes</tt>,
and <tt>setAttributes</tt>) has overloaded forms that take either a <tt>String</tt>
or an <tt>int</tt> argument. It is the responsibility of the caller to
invoke the appropriate overloaded form. For example, evaluating the expression
<tt>obj["3"]</tt>
will invoke the get(int, Scriptable) method even though the property name
was presented in the script as a string. Similarly, values of numbers that
do not fix in integers (like 1.1 and 0x100000000) must be converted to
strings.
<br>&nbsp;
<h3>
Defining Host Objects</h3>
Host objects are JavaScript objects that provide special access to the
host environment. For example, in a browser environment, the Window and
Document objects are host objects.
<p>The easiest way to define new host objects is by using <a href="org/mozilla/javascript/ScriptableObject.html#defineClass(org.mozilla.javascript.Scriptable, java.lang.Class)">ScriptableObject.defineClass()</a>.
This method defines a set of JavaScript objects using a Java class. Several
of the <a href="examples.html">examples</a> define host objects this way.
<p>If the services provided by defineClass are insufficient, try other
methods of
<a href="org/mozilla/javascript/ScriptableObject.html">ScriptableObject</a>
and
<a href="org/mozilla/javascript/FunctionObject.html">FunctionObject</a>,
such as <tt>defineProperty</tt> and <tt>defineFunctionProperties</tt>.
<br>&nbsp;
<br>&nbsp;
<h3>
Contexts and Threads</h3>
Every thread that executes JavaScript must have an associated Context.
Multiple threads (with multiple associated Contexts) may act upon the same
set of objects. Any host objects that are defined are responsible for any
sychronization required to run safely from multiple threads.
<br>&nbsp;
<p>
<hr WIDTH="100%">
<br><a href="index.html">back to top</a>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

View File

@@ -0,0 +1,194 @@
<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Norris Boyd">
<meta name="GENERATOR" content="Mozilla/4.72 [en]C-NSCP (WinNT; U) [Netscape]">
<meta name="KeyWords" content="Rhino, JavaScript, Java">
<title>Scopes and Contexts</title>
</head>
<body bgcolor="#ffffff">
<script src="owner.js"></script>
<center>
<h1> Scopes and Contexts</h1>
</center>
<script>document.write(owner());</script> <br>
<script>
var d = new Date(document.lastModified);
document.write((d.getMonth()+1)+"/"+d.getDate()+"/"+d.getFullYear());
document.write('<br>');
</script>
<center>
<hr width="100%"></center>
<p>Before using Rhino in a concurrent environment, it is important to understand
the distinction between Contexts and scopes. Both are required to execute
scripts, but they play different roles. Simple embeddings of Rhino probably
won't need any of the information here, but more complicated embeddings can
gain performance and flexibility from the techniques described below. <br>
&nbsp; </p>
<h2> Contexts</h2>
The Rhino Context object is used to store thread-specific information about
the execution environment. There should be one and only one Context associated
with each thread that will be executing JavaScript.
<p>To associate the current thread with a Context, simply call the <tt>enter</tt>
method of Context: </p>
<pre>
Context cx = Context.enter();
</pre>
Once you are done with execution, simply exit the Context:
<pre>
Context.exit();
</pre>
These calls will work properly even if there is already a Context associated
with the current thread. That context will be returned and an internal counter
incremented. Only when the counter reaches zero will it be disassociated from
the thread.
<p>Remember to put the <tt>exit()</tt> call in a <tt>finally</tt> block if
you're executing code that could throw an exception. <br>
&nbsp; </p>
<h2> Scopes</h2>
A scope is a set of JavaScript objects. Execution of scripts requires a scope
for top-level script variable storage as well as a place to find standard
objects like <tt>Function</tt> and <tt>Object</tt>.
<p>It's important to understand that a scope is independent of the Context
that created it. You can create a scope using one Context and then evaluate
a script using that scope and another Context (either by exiting the current
context and entering another, or by executing on a different thread). You
can even execute scripts on multiple threads simultaneously in the same scope.
Rhino guarantees that accesses to properties of JavaScript objects are atomic
across threads, but doesn't make any more guarantees for scripts executing
in the same scope at the same time. If two scripts use the same scope simultaneously,
the scripts are responsible for coordinating any accesses to shared variables.
</p>
<p>A top-level scope is created by calling <tt>Context.initStandardObjects</tt>
to create all the standard objects: </p>
<pre>
ScriptableObject scope = cx.initStandardObjects();
</pre>
The easiest way to embed Rhino is just to create a new scope this way whenever
you need one. However, <tt>initStandardObjects</tt> is an expensive method
to call and it allocates a fair amount of memory. We'll see below that there
are ways to share a scope created this way among multiple scopes and threads.
<br>
&nbsp;
<h2> Name Lookup</h2>
So how are scopes used to look up names? In general, variables are looked
up by starting at the current variable object (which is different depending
on what code is being executed in the program), traversing its prototype chain,
and then traversing the parent chain. In the diagram below, the order in
which the six objects are traversed is indicated.
<center>
<p><img src="lookup.gif" height="194" width="500">
<br>
<i><font size="-1">Order of lookups in a two-deep scope chain with prototypes.</font></i></p>
</center>
<p>For a more concrete example, let's consider the following script: </p>
<blockquote><tt>var g = 7;</tt> <br>
<tt>function f(a) {</tt> <br>
<tt>&nbsp;&nbsp;&nbsp; var v = 8;</tt> <br>
<tt>&nbsp;&nbsp;&nbsp; x = v + a;</tt> <br>
<tt>}</tt> <br>
<tt>f(6);</tt></blockquote>
We have a top-level variable <tt>g</tt>, and the call to <tt>f</tt> will
create a new top-level variable <tt>x</tt>. All top-level variables are properties
of the scope object. When we start executing <tt>f</tt>, the scope chain
will start with the function's activation object and will end with the top-level
scope (see diagram below). The activation object has two properties, 'a'
for the argument, and 'v' for the variable. The top-level scope has properties
for the variable <tt>g</tt> and the function <tt>f</tt>.
<center>
<p><img src="scopes.gif" height="496" width="820">
<br>
<i><font size="-1">An example scope chain for a simple script.</font></i></p>
</center>
<p>When the statement <tt>x = v + a;</tt> is executed, the scope chain is
traversed looking for a 'x' property. When none is found, a new property 'x'
is created in the top-level scope. </p>
<h2> Sharing Scopes</h2>
JavaScript is a language that uses delegation rather than traditional class-based inheritance. This is a large topic in itself, but for our purposes it gives us an easy way to share a set of read-only variables across multiple scopes.
To do this we set an object's prototype. When accessing a property of an object
in JavaScript, the object is first searched for a property with the given
name. If none is found, the object's prototype is searched. This continues
until either the object is found or the end of the prototype chain is reached.
<p>So to share information across multiple scopes, we first create the object
we wish to share. Typically this object will have been created with <tt>initStandardObjects</tt>
and may also have additional objects specific to the embedding. Then all
we need to do is create a new object and call its <tt>setPrototype</tt> method
to set the prototype to the shared object, and the parent of the new scope
to null:
<pre> Scriptable newScope = cx.newObject(sharedScope);
newScope.setPrototype(sharedScope);
newScope.setParentScope(null);
</pre>
The call to <tt>newObject</tt> simply creates a new JavaScript object with
no properties. It uses the <tt>sharedScope</tt> passed in to initialize the
prototype with the standard <tt>Object.prototype</tt> value.
<p>We can now use <tt>newScope</tt> as a scope for calls to evaluate scripts.
Let's call this scope the <i>instance scope</i>. Any top-level functions or
variables defined in the script will end up as properties of the instance
scope. Uses of standard objects like <tt>Function</tt>, <tt>String</tt>, or
<tt>RegExp</tt> will find the definitions in the shared scope. Multiple
instance scopes can be defined and have their own variables for scripts yet
share the definitions in the shared scope. These multiple instance scopes
can be used concurrently. <br>
&nbsp; </p>
<h2>Sealed shared scopes</h2>
<p>The ECMAScript standard defines that scripts can add properties to all standard library objects and in many cases it is also possible to change or delete their properties as well. Such behavior may not be suitable with shared scopes since if a script by mistake adds a property to a library object from the shared scope, that object would not be garbage collected until there re active references to the shared scope potentially leading to memory leaks. In addition if a script alters some of the standard objects, the library may not work properly for other scripts. Such bugs are hard to debug and to remove a possibility for them to occur one can use seal the shared scope and all its objects.
<p>
A notion of a sealed object is a JavaScript extension supported by Rhino and it means that properties can not be added/deleted to the object and the existing object properties can not be changed. Any attempt to modify sealed object throws an exception. To seal all objects in the standard library pass <tt>true</tt> for the sealed argument when calling <tt>Context.initStandardObjects(ScriptableObject, boolean)</tt>:
<pre> ScriptableObject sealedSharedScope = cx.initStandardObjects(null, true);</pre>
This seals only all standard library objects, it does not seal the shared scope itself thus after calling <tt>initStandardObjects</tt>, <tt>sealedSharedScope</tt> cab be farther populated with application-specific objects and functions. Then after a custom initialization is done, one can seal the shared scope by calling <tt>ScriptableObject.sealObject()</tt>:
<pre> sealedSharedScope.sealObject();</pre>
Note that currently one needs to explicitly seal any additional properties he adds to the sealed shared scope since although after calling <tt>sealedSharedScope.sealObject();</tt> it would no be possible to set the additional properties to different values, one still would be able to alter the objects themselves.
<h2> Dynamic Scopes</h2>
There's one problem with the setup outlined above. Calls to functions in
JavaScript use <i>static scope</i>, which means that variables are first looked
up in the function and then, if not found there, in the lexically enclosing
scope. This causes problems if functions you define in your shared scope
need access to variables you define in your instance scope.
<p>With Rhino 1.5, it is possible to compile functions to use <i>dynamic
scope</i>. With dynamic scope, functions look at the top-level scope of the
calling function rather than their lexical scope. So we can store information
that varies across scopes in the instance scope yet still share functions
that manipulate that information reside in the shared scope. </p>
<p>The <a href="http://lxr.mozilla.org/mozilla/source/js/rhino/examples/DynamicScopes.java">
DynamicScopes example</a>
illustrates all the points discussed above. <br>
&nbsp; <br>
&nbsp; </p>
<h2> More on Scopes</h2>
The key things to determine in setting up scopes for your application are
<br>
(1) What scope should global variables be created in when your script executes
an assignment to an undefined variable, and <br>
(2) What variables should your script have access to when it references a
variable?
<p>The answer to (1) determines which scope should be the ultimate parent
scope: Rhino follows the parent chain up to the top and places the variable
there. After you've constructed your parent scope chain, the answer to question
(2) may indicate that there are additional scopes that need to be searched
that are not in your parent scope chain. You can add these as prototypes
of scopes in your parent scope chain. When Rhino looks up a variable, it
starts in the current scope, walks the prototype chain, then goes to the
parent scope and its prototype chain, until there are no more parent scopes
left. <br>
&nbsp; </p>
<h3>
<hr width="100%"><br>
<a href="index.html">back to top</a>
</h3>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 B

View File

@@ -0,0 +1,219 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Norris Boyd">
<meta name="GENERATOR" content="Mozilla/4.7 [en] (WinNT; U) [Netscape]">
<meta name="KeyWords" content="Rhino, JavaScript, Java">
<title>Scripting Java</title>
</head>
<body bgcolor="#FFFFFF">
<script src="owner.js"></script>
<center>
<h1>
Scripting Java</h1></center>
<script>document.write(owner());</script>
<br><script>
var d = new Date(document.lastModified);
document.write((d.getMonth()+1)+"/"+d.getDate()+"/"+d.getFullYear());
document.write('<br>');
</script>
<center>
<hr WIDTH="100%"></center>
<p>It's possible to use Rhino just for scripting Java. You don't have to
write any additional Java code; just use the existing Rhino shell and then
make calls into Java.
<br>&nbsp;
<h2>
Rhino Shell</h2>
The Rhino shell allows you to run scripts from files or interactively at
a command line.
<p>If you download the zip file for rhino, it will contain a single JAR
file, <tt>js.jar</tt>. If you add the JAR file to your class path, you
can start the Rhino shell using the command
<pre>&nbsp;&nbsp;&nbsp; java org.mozilla.javascript.tools.shell.Main</pre>
or if you have Java 2 (JDK 1.2 or greater), you can avoid changing your classpath
and simply use the command
<pre>&nbsp;&nbsp;&nbsp; java -jar js.jar</pre>
Unfortunately the <tt>-jar</tt> option to <tt>java</tt> will overwrite
your existing classpath. The shell's interactive mode is a good way to
begin exploring Rhino.
<p><i>Note: Earlier versions of Rhino have two JAR files, js.jar and jstools.jar,
and don't support the -jar option. Both JAR files must be added to the
class path to start the shell</i>.
<p>You can execute a JavaScript file by putting the file name as an argument
to the shell class:
<pre>&nbsp;&nbsp;&nbsp; java org.mozilla.javascript.tools.shell.Main myScript.js</pre>
There are a number of options for evaluating scripts using the shell. See
the <a href="http://www.mozilla.org/rhino/shell.html">command description</a>
for more information.
<br>&nbsp;
<h2>
LiveConnect: Communicating with Java from JavaScript</h2>
If you are planning to script Java using Rhino, you'll want to use LiveConnect,
which allows you to create Java classes and call Java methods from within
JavaScript. For example, here's a log from an interactive session. If you
type it in, you'll see a window with a button filling it.
<center>
<p><img SRC="scriptjavaframe.jpg" height=100 width=200>
<br><i><font size=-1>A Java frame created from the Rhino shell.</font></i></center>
<pre>$ java org.mozilla.javascript.tools.shell.Main
js> importPackage(java.awt);
js> frame = new Frame("JavaScript")
java.awt.Frame[frame0,0,0,0x0,invalid,hidden,layout=java.awt.BorderLayout,resizable,title=JavaScript]
js> frame.show()
js> frame.setSize(new Dimension(200,100))
js> button = new Button("OK")
java.awt.Button[button0,0,0,0x0,invalid,label=OK]
js> frame.add(button)
java.awt.Button[button0,0,0,0x0,invalid,label=OK]
js> frame.show()
js> quit()
$</pre>
If you wish to load classes from JavaScript that aren't in the <tt>java</tt>
package, you'll need to prefix the package name with "<tt>Packages.</tt>".
For example:
<pre>$ java org.mozilla.javascript.tools.shell.Main
js> cx = Packages.org.mozilla.javascript.Context.enter()
org.mozilla.javascript.Context@25980b44
js> cx.evaluateString(this, "3+2", null, 0, null)
5.0
js> quit()
$</pre>
<h2>
Accessing JavaBean Properties</h2>
Java classes can define JavaBean properties using getter and setter methods.
For example, the following class defines two properties:
<p><tt>public class Me {</tt>
<br><tt>&nbsp;&nbsp;&nbsp; public int getAge() { return age; }</tt>
<br><tt>&nbsp;&nbsp;&nbsp; public void setAge(int anAge) { age = anAge;
}</tt>
<br><tt>&nbsp;&nbsp;&nbsp; public String getSex() { return "male"; }</tt>
<br><tt>&nbsp;&nbsp;&nbsp; private int age;</tt>
<br><tt>};</tt>
<p>The two properties defined are <i>age</i> and <i>sex</i>. The <i>sex</i>
property is read-only: it has no setter.
<p>Using Rhino we can access the bean properties as if they where JavaScript
properties. We can also continue to call the methods that define the property.
<p><tt>js> me = new Packages.Me();</tt>
<br><tt>Me@93</tt>
<br><tt>js> me.getSex()</tt>
<br><tt>male</tt>
<br><tt>js> me.sex</tt>
<br><tt>male</tt>
<br><tt>js> me.age = 33;</tt>
<br><tt>33</tt>
<br><tt>js> me.age</tt>
<br><tt>33</tt>
<br><tt>js> me.getAge()</tt>
<br><tt>33</tt>
<br><tt>js></tt>
<p>Since the <i>sex</i> property is read-only, we are not allowed to write
to it.
<p><i>Note: JavaBean reflection is not available in versions of Rhino before
1.5.</i>
<br><tt></tt>&nbsp;
<h2>
Importing Java Classes and Packages</h2>
Above we saw the use of the <tt>importPackage</tt> function to import all
the classes from a particular Java package. There is also <tt>importClass</tt>,
which imports a single class:
<pre>$ java org.mozilla.javascript.tools.shell.Main
js> importClass(Packages.org.mozilla.javascript.Context)
js> cx = Context.enter()
org.mozilla.javascript.Context@25980d62
js> cx.evaluateString(this, "3+2", null, 0, null)
5.0
js> quit()
$</pre>
<h2>
Extending Java Classes and Implementing Java Interfaces with JavaScript</h2>
Starting from the example above of creating a Java frame using JavaScript,
we can add a listener for the button. Once we call <tt>addActionListener</tt>
we can then click on the button to get the current date printed out:
<pre>$ java org.mozilla.javascript.tools.shell.Main
js> importPackage(java.awt);
js> frame = new Frame("JavaScript")
java.awt.Frame[frame0,0,0,0x0,invalid,hidden,layout=java.awt.BorderLayout,resizable,title=JavaScript]
js> button = new Button("OK")
java.awt.Button[button0,0,0,0x0,invalid,label=OK]
js> frame.setSize(new Dimension(200,100))
js> frame.add(button)
java.awt.Button[button0,0,0,0x0,invalid,label=OK]
js> frame.show()
js> function printDate() { print(new Date()) }
js> printDate()
Wed Mar 15 15:42:20 GMT-0800 (PST) 2000
js> o = { actionPerformed: printDate }
[object Object]
js> o.actionPerformed()
Wed Mar 15 15:42:39 GMT-0800 (PST) 2000
js> buttonListener = java.awt.event.ActionListener(o)
adapter0@6acc0f66
js>&nbsp; button.addActionListener(buttonListener)
js> Wed Mar 15 15:43:05 GMT-0800 (PST) 2000
Wed Mar 15 15:43:05 GMT-0800 (PST) 2000
Wed Mar 15 15:43:08 GMT-0800 (PST) 2000
quit()
$</pre>
When we type <tt>buttonListener = java.awt.event.ActionListener(o)</tt>,
Rhino actually creates a new Java class that implements <tt>ActionListener</tt>
and forwards calls from that class to the JavaScript object. So when you
click on the button, the <tt>printDate</tt> method is called.
<p>
Starting from the release 1.5R5 Rhino allows to pass JavaScript functions directly to Java methods if the corresponding argument is Java interface with single method. It allows to pass <tt>printDate</tt> directly to <tt>addActionListener</tt> and simplifies example:
<pre>$ java org.mozilla.javascript.tools.shell.Main
js> importPackage(java.awt);
js> frame = new Frame("JavaScript")
java.awt.Frame[frame0,0,0,0x0,invalid,hidden,layout=java.awt.BorderLayout,title=JavaScript,resizable,normal]
js> button = new Button("OK")
java.awt.Button[button0,0,0,0x0,invalid,label=OK]
js> frame.setSize(new Dimension(200,100))
js> frame.add(button)
java.awt.Button[button0,0,0,0x0,invalid,label=OK]
js> frame.show()
js> function printDate() { print(new Date()) }
js> printDate()
Mon Oct 27 2003 10:35:44 GMT+0100 (CET)
js> button.addActionListener(printDate)
js> Mon Oct 27 2003 10:36:09 GMT+0100 (CET)
Mon Oct 27 2003 10:36:10 GMT+0100 (CET)
quit()
$</pre>
<h2>
JavaAdapter constructor</h2>
Another way to create a JavaAdapter is to call the JavaAdapter constructor
explicitly. Using the JavaAdapter constructor gives you additional features
that cannot be had by "constructing" a Java interface as was done above.
<p>Instead of writing
<pre>&nbsp;&nbsp;&nbsp; buttonListener = java.awt.event.ActionListener(o)</pre>
above we can also write
<pre>&nbsp;&nbsp;&nbsp; buttonListener = new JavaAdapter(java.awt.event.ActionListener, o)</pre>
which is equivalent. If we also wanted to extend class <tt>Foo</tt>, while
also implementing <tt>java.lang.Runnable</tt>, we would write
<pre>&nbsp;&nbsp;&nbsp; buttonListener = new JavaAdapter(Packages.Foo,&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; java.awt.event.ActionListener,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; java.lang.Runnable, o)</pre>
In general the syntax is
<p>&nbsp;&nbsp;&nbsp; <tt>new JavaAdapter(</tt><i>java-class</i>, [<i>java-class</i>,
...] <i>javascript-object</i><tt>)</tt>
<p>where at most one <i>java-class</i> is a Java class and the remaining
<i>java-class</i>es
are interfaces. The result will be a Java adapter that extends any specified
Java class, implements the Java interfaces, and forwards any calls to the
methods of the <i>javascript-object</i>.
<h3>
<hr WIDTH="100%"><br>
<a href="index.html">back to top</a></h3>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -0,0 +1,122 @@
<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Norris Boyd">
<meta name="GENERATOR" content="Mozilla/4.72 [en]C-NSCP (WinNT; U) [Netscape]">
<meta name="KeyWords" content="Rhino, JavaScript, Java">
<title>Serialization</title>
</head>
<body bgcolor="#ffffff">
<script src="owner.js"></script>
<center>
<h1>Serialization</h1>
</center>
<script>document.write(owner());</script> <br>
<script>
var d = new Date(document.lastModified);
document.write((d.getMonth()+1)+"/"+d.getDate()+"/"+d.getFullYear());
document.write('<br>');
</script>
<center>
<hr width="100%"></center>
<p>Beginning with Rhino 1.5 Release 3 it is possible to serialize JavaScript
objects, including functions and scripts. However, &nbsp;serialization of
code in compilation mode has some significant limitations.. Serialization
provides a way to save the state of an object and write it out to a file
or send it across a network connection. <br>
&nbsp; </p>
<h2>Simple serialization example</h2>
The Rhino shell has two new top-level functions, serialize and deserialize.
They're intended mainly as examples of the use of serialization:<br>
<pre>$&nbsp;java org.mozilla.javascript.tools.shell.Main<br>js&gt; function f() { return 3; }<br>js&gt; serialize(f, "f.ser")<br>js&gt; quit()<br><br>$&nbsp;java org.mozilla.javascript.tools.shell.Main<br>js&gt; f = deserialize("f.ser")<br><br>function f() {<br> return 3;<br>}<br><br>js&gt; f()<br>3<br>js&gt;</pre>
<pre></pre>
<pre></pre>
<pre></pre>
<pre></pre>
<pre></pre>
<pre></pre>
<pre></pre>
<pre></pre>
<pre></pre>
Here we see a simple case of a function being serialized to a file and then
read into a new instance of Rhino and called. <br>
<br>
<h2>Rhino serialization APIs</h2>
Two new classes, ScriptableOutputStream and ScriptableInputStream, were introduced
to handle serialization of Rhino classes. These classes extend ObjectOutputStream
and ObjectInputStream respectively. Writing an object to a file can be done
in a few lines of Java code:<br>
<pre>FileOutputStream fos = new FileOutputStream(filename);<br>ScriptableOutputStream out = new ScriptableOutputStream(fos, scope);<br>out.writeObject(obj);<br>out.close();</pre>
<p>Here filename is the file to write to, obj is the object or function to
write, and scope is the top-level scope containing obj.&nbsp;</p>
<p>Reading the serialized object back into memory is similarly simple:</p>
<pre>FileInputStream fis = new FileInputStream(filename);<br>ObjectInputStream in = new ScriptableInputStream(fis, scope);<br>Object deserialized = in.readObject();<br>in.close();<br></pre>
<p>Again, we need the scope to create our serialization stream class. </p>
<p>So why do we need these specialized stream classes instead of simply using
ObjectOutputStream and ObjectInputStream? To understand the answer we must
know what goes on behind the scenes when Rhino serializes objects. </p>
<h2>How Rhino serialization works</h2>
By default, Java serialization of an object also serializes objects that
are referred to by that object. Upon deserialization the initial object and
the objects it refers to are all created and the references between the objects
are resolved. <br>
<br>
However, for JavaScript this creates a problem. JavaScript objects contain
references to prototypes and to parent scopes. Default serialization would
serialize the object or function we desired but would also serialize Object.prototype
or even possibly the entire top-level scope and everything it refers to!
We want to be able to serialize a JavaScript object and then deserialize
it into a new scope and have all of the references from the deserialized
object to prototypes and parent scopes resolved correctly to refer to objects
in the new scope. <br>
<br>
ScriptableOutputStream takes a scope as a parameter to its constructor. If
in the process of serialization it encounters a reference to the scope it
will serialize a marker that will be resolved to the new scope upon deserialization.
It is also possible to add names of objects to a list in the ScriptableOutputStream
object. These objects will also be saved as markers upon serialization and
resolved in the new scope upon deserialization. Use the addExcludedName method
of ScriptableOutputStream to add new names. By default, ScriptableOutputStream
excludes all the names defined using Context.initStandardObjects.<br>
<br>
If you are using Rhino serialization in an environment where you always define,
say, a constructor "Foo", you should add the following code before calling
writeObject:<br>
<pre>out.addExcludedName("Foo");<br>out.addExcludedName("Foo.prototype");<br></pre>
This code will prevent Foo and Foo.prototype from being serialized and will
cause references to Foo or Foo.prototype to be resolved to the objects in
the new scope upon deserialization. Exceptions will be thrown if Foo or Foo.prototype
cannot be found the scopes used in either ScriptableOutputStream or ScriptableInputStream.<br>
<br>
<h2>Rhino serialization in compilation mode</h2>
Serialization works well with objects and with functions and scripts in
interpretive mode. However, you can run into problems with serialization
of compiled functions and scripts:<br>
<pre>$&nbsp;cat test.js<br>function f() { return 3; }<br>serialize(f, "f.ser");<br>g = deserialize("f.ser");<br>print(g());<br>$&nbsp;java&nbsp;org.mozilla.javascript.tools.shell.Main -opt -1 test.js<br>3<br>$&nbsp;java&nbsp;org.mozilla.javascript.tools.shell.Main test.js<br>js: uncaught JavaScript exception: java.lang.ClassNotFoundException: c1<br></pre>
<p>The problem is that Java serialization has no built-in way to serialize
Java classes themselves. (It might be possible to save the Java bytecodes
in an array and then load the class upon deserialization, but at best that
would eat up a lot of memory for just this feature.) One way around this
is to compile the functions using the jsc tool: </p>
<pre>$&nbsp;cat f.js<br>function f() { return 3; }<br>$&nbsp;java -classpath js.jar org.mozilla.javascript.tools.jsc.Main f.js<br>$&nbsp;cat test2.js<br>loadClass("f");<br>serialize(f, "f.ser");<br>g = deserialize("f.ser");<br>print(g());<br>$&nbsp;java -classpath 'js.jar;.' org.mozilla.javascript.tools.shell.Main test2.js<br>3<br></pre>
<p>&nbsp;Now the function f is compiled to a Java class, but that class is
then made available in the classpath so serialization works. This isn't that
interesting an example since compiling a function to a class and then loading
it accomplishes the same as serializing an interpreted function, but it becomes
more relevant if you wish to serialize JavaScript objects that have references
to compiled functions. </p>
<h3>
<hr width="100%"><br>
<a href="index.html">back to top</a>
</h3>
</body>
</html>

View File

@@ -0,0 +1,234 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Norris Boyd">
<meta name="GENERATOR" content="Mozilla/4.7 [en]C-NSCP (WinNT; U) [Netscape]">
<title>JavaScript Shell</title>
</head>
<body bgcolor="#FFFFFF">
<center>
<h1>
JavaScript Shell</h1></center>
The JavaScript shell provides a simple way to run scripts in batch mode
or an interactive environment for exploratory programming.
<h2>
Invoking the Shell</h2>
<tt>java org.mozilla.javascript.tools.shell.Main [<i>options</i>]
<i>script-filename-or-url</i> [<i>script-arguments</i>]</tt>
<p>where <tt><i>options</i></tt> are:
<p><tt>-e <i>script-source</i></tt>
<blockquote>Executes <i>script-source</i> as a JavaScript script.</blockquote>
<tt>-f <i>script-filename-or-url</i></tt>
<blockquote>Reads <i>script-filename-or-url</i> content and execute it as a JavaScript script.</blockquote>
<tt>-opt <i>optLevel</i></tt>
<br><tt>-O <i>optLevel</i></tt>
<ul>Optimizes at level <i>optLevel</i>, which must be an integer between
0 and 9. See <a href="opt.html">Optimization</a> for more details.</ul>
<tt>-version <i>versionNumber</i></tt>
<ul>Specifies the language version to compile with. The string <i>versionNumber</i>
must be one of <tt>100</tt>, <tt>110</tt>, <tt>120</tt>, <tt>130</tt>,
or <tt>140</tt>. See <a href="overview.html#versions">JavaScript Language
Versions</a> for more information on language versions.</ul>
If the shell is invoked with the system property rhino.use_java_policy_security set to true and with a security manager installed, the shell restricts scripts permissions based on their URLs according to Java policy settings. This is available only if JVM implements Java2 security model.
<h2>
Predefined Properties</h2>
Scripts executing in the shell have access to some additional properties
of the top-level object.
<br>&nbsp;
<h4>
arguments</h4>
<blockquote>The <tt>arguments</tt> object is an array containing the strings
of all the arguments given at the command line when the shell was invoked.</blockquote>
<h4>
help()</h4>
<blockquote>Executing the help function will print usage and help messages.</blockquote>
<h4>
defineClass(<i>className</i>)</h4>
<blockquote>Define an extension using the Java class named with the string
argument <i>className</i>. Uses ScriptableObject.defineClass() to define
the extension.</blockquote>
<h4>
deserialize(<i>filename</i>)</h4>
<blockquote>Restore from the specified file an object previously written by a call to <tt>serialize</tt>.</blockquote>
<h4>
load([<i>filename</i>, ...])</h4>
<blockquote>Load JavaScript source files named by string arguments. If
multiple arguments are given, each file is read in and executed in turn.</blockquote>
<h4>
loadClass(<i>className</i>)</h4>
<blockquote>Load and execute the class named by the string argument <i>className</i>.
The class must be a class that implements the Script interface, as will
any script compiled by <a href="jsc.html">jsc</a>.</blockquote>
<h4>
print([<i>expr</i> ...])</h4>
<blockquote>Evaluate and print expressions. Evaluates each expression,
converts the result to a string, and prints it.</blockquote>
<h4>
readFile(<i>path</i> [, <i>characterCoding</i>)</h4>
<blockquote>Read given file and convert its bytes to a string using the
specified character coding or default character coding if explicit coding
argument is not given.</blockquote>
<h4>
readUrl(<i>url</i> [, <i>characterCoding</i>)</h4>
<blockquote>Open an input connection to the given string url, read all its
bytes and convert them to a string using the specified character coding or
default character coding if explicit coding argument is not given.</blockquote>
<h4>
runCommand(<i>commandName</i>, [<i>arg</i>, ...] [<i>options</i>])</h4>
<blockquote>Execute the specified command with the given argument and options
as a separate process and return the exit status of the process. For details, see JavaDoc for <a href="http://lxr.mozilla.org/mozilla/source/js/rhino/toolsrc/org/mozilla/javascript/tools/shell/Global.java">org.mozilla.javascript.tools.shell.Global#runCommand</a>.</blockquote>
<h4>
serialize(<i>object</i>, <i>filename</i>)</h4>
<blockquote>Serialize the given object to the specified file.</blockquote>
<h4>
spawn(<i>functionOrScript</i>)</h4>
<blockquote>Run the given function or script in a different thread.</blockquote>
<h4>
sync(<i>function</i>)</h4>
<blockquote>creates a synchronized function (in the sense of a Java synchronized method) from an existing function. The new function synchronizes on the <code>this</code> object of its invocation.</blockquote>
<h4>
quit()</h4>
<blockquote>Quit shell. The shell will also quit in interactive mode if
an end-of-file character is typed at the prompt.</blockquote>
<h4>
version([<i>number</i>])</h4>
<blockquote>Get or set JavaScript version number. If no argument is supplied,
the current version number is returned. If an argument is supplied, it
is expected to be one of <tt>100</tt>, <tt>110</tt>, <tt>120</tt>, <tt>130,</tt>
or <tt>140</tt> to indicate JavaScript version 1.0, 1.1, 1.2, 1.3, or 1.4
respectively.</blockquote>
<h2>
Example</h2>
<h4>Invocation</h4>
Here the shell is invoked three times from the command line. (The system
command prompt is shown as <tt>$</tt>.) The first invocation executes a
script specified on the command line itself. The next invocation has no
arguments, so the shell goes into interactive mode, reading and evaluating
each line as it is typed in. Finally, the last invocation executes a script
from a file and accesses arguments to the script itself.
<pre>
$ java org.mozilla.javascript.tools.shell.Main -e print('hi')
hi
$ java org.mozilla.javascript.tools.shell.Main
js> print('hi')
hi
js> 6*7
42
js> function f() {
return a;
}
js> var a = 34;
js> f()
34
js> quit()
$ cat echo.js
for (i in arguments) {
print(arguments[i])
}
$ java org.mozilla.javascript.tools.shell.Main echo.js foo bar
foo
bar
$
</pre>
<h4>spawn and sync</h4>
The following example creates 2 threads via <tt>spawn</tt> and uses <tt>sync</tt> to create a synchronized version of the function <tt>test</tt>.
<pre>
js> function test(x) {
print("entry");
java.lang.Thread.sleep(x*1000);
print("exit");
}
js> var o = { f : sync(test) };
js> spawn(function() {o.f(5);});
Thread[Thread-0,5,main]
entry
js> spawn(function() {o.f(5);});
Thread[Thread-1,5,main]
js>
exit
entry
exit
</pre>
<h4>runCommand</h4>
Here is few examples of invoking <tt>runCommand</tt> under Linux.
<pre>
js> runCommand('date')
Thu Jan 23 16:49:36 CET 2003
0
// Using input option to provide process input
js> runCommand("sort", {input: "c\na\nb"})
a
b
c
0
js> // Demo of output and err options
js> var opt={input: "c\na\nb", output: 'Sort Output:\n'}
js> runCommand("sort", opt)
0
js> print(opt.output)
Sort Output:
a
b
c
js> var opt={input: "c\na\nb", output: 'Sort Output:\n', err: ''}
js> runCommand("sort", "--bad-arg", opt)
2
js> print(opt.err)
/bin/sort: unrecognized option `--bad-arg'
Try `/bin/sort --help' for more information.
js> runCommand("bad_command", "--bad-arg", opt)
js: "<stdin>", line 18: uncaught JavaScript exception: java.io.IOException: bad_command: not found
js> // Passing explicit environment to the system shell
js> runCommand("sh", "-c", "echo $env1 $env2", { env: {env1: 100, env2: 200}})
100 200
0
js> // Use args option to provide additional command arguments
js> var arg_array = [1, 2, 3, 4];
js> runCommand("echo", { args: arg_array})
1 2 3 4
0
</pre>
<hr WIDTH="100%">
<br><a href="index.html">back to top</a>
</body>
</html>

View File

@@ -0,0 +1,31 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Norris Boyd">
<meta name="GENERATOR" content="Mozilla/4.7 [en]C-NSCP (WinNT; U) [Netscape]">
<title>JavaScript Tools</title>
</head>
<body bgcolor="#FFFFFF">
<center>
<h1>
JavaScript Tools</h1></center>
<h2>
JavaScript shell</h2>
The <a href="shell.html">JavaScript shell</a> allows for interactive and
batch execution of JavaScript scripts.
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<h2>
JavaScript compiler</h2>
The <a href="jsc.html">JavaScript compiler</a> translates JavaScript source
into Java class files.
<br>&nbsp;
<p>
<hr WIDTH="100%">
<br><a href="index.html">back to top</a>
</body>
</html>

View File

@@ -0,0 +1,357 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 97">
<meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">
<title>Embedding Rhino</title>
</head>
<body>
<center><font size=+4>Tutorial: Embedding Rhino</font></center>
<p>Embedding Rhino can be done simply with good results. With more effort
on the part of the embedder, the objects exposed to scripts can be customized
further.
<p>This tutorial leads you through the steps from a simple embedding to
more customized, complex embeddings. Fully compilable examples are provided
along the way.
<p>The examples live in the <tt>rhino/examples</tt> directory in the distribution
and in <tt>mozilla/js/rhino/examples</tt> in cvs. This document will link
to them using <a href="http://lxr.mozilla.org/">lxr</a>.
<p>In this document, JavaScript code will be in <font color="#006600">green</font>,
Java code will be in <font color="#006600">green</font>, and shell logs
will be in <font color="#663366">purple</font>.
<h3>
<font size=+3>Contents</font></h3>
<ul>
<li>
<font size=+1><a href="#RunScript">RunScript: A simple embedding</a></font></li>
<ul>
<li>
<font size=+1><a href="#EnteringContext">Entering a Context</a></font></li>
<li>
<font size=+1><a href="#initializing">Initializing standard objects</a></font></li>
<li>
<font size=+1><a href="#Collecting">Collecting the arguments</a></font></li>
<li>
<font size=+1><a href="#Evaluating">Evaluating a script</a></font></li>
<li>
<font size=+1><a href="#Print">Print the result</a></font></li>
<li>
<font size=+1><a href="#Exit">Exit the Context</a></font></li>
</ul>
<li>
<font size=+1><a href="#Expose">Expose Java APIs</a></font></li>
<ul>
<li>
<font size=+1><a href="#UseJava">Use Java APIs</a></font></li>
<li>
<font size=+1><a href="#ImplementingInterfaces">Implementing interfaces</a></font></li>
<li>
<font size=+1><a href="#AddJava">Add Java objects</a></font></li>
</ul>
<li>
<font size=+1><a href="#UsingJSObjs">Using JavaScript objects from Java</a></font></li>
<ul>
<li>
<font size=+1><a href="#UsingJSvars">Using JavaScript variables</a></font></li>
<li>
<font size=+1><a href="#CallingJSfuns">Calling JavaScript functions</a></font></li>
</ul>
<li>
<font size=+1><a href="#JavaScriptHostObjects">JavaScript host objects</a></font></li>
<ul>
<li>
<font size=+1><a href="#DefiningHostObjects">Defining Host Objects</a></font></li>
<li>
<font size=+1><a href="#Counter">Counter example</a></font></li>
<ul>
<li>
<font size=+1><a href="#CounterCtors">Counter's constructors</a></font></li>
<li>
<font size=+1><a href="#classname">Class name</a></font></li>
<li>
<font size=+1><a href="#Dynamic">Dynamic properties</a></font></li>
<li>
<font size=+1><a href="#DefiningMethods">Defining JavaScript "methods"</a></font></li>
<li>
<font size=+1><a href="#AddingCounter">Adding Counter to RunScript</a></font></li>
</ul>
</ul>
</ul>
<hr WIDTH="100%">
<br><a NAME="RunScript"></a><font size=+3>RunScript: A simple embedding</font>
<p>About the simplest embedding of Rhino possible is the <a href="http://lxr.mozilla.org/mozilla/source/js/rhino/examples/RunScript.java">RunScript
example</a>. All it does it read a script from the command line, execute
it, and print a result.
<p>Here's an example use of RunScript from a shell command line:
<blockquote>
<pre><font color="#663366">$ java RunScript "Math.cos(Math.PI)"
-1
$ java RunScript 'function f(x){return x+1} f(7)'
8</font></pre>
</blockquote>
Note that you'll have to have both the Rhino classes and the RunScript
example class file in the classpath. Let's step through the body of <tt>main</tt>
one line at time.
<p><a NAME="EnteringContext"></a><font size=+2>Entering a Context</font>
<p>The code
<blockquote>
<pre><font color="#006600">Context cx = Context.enter();</font></pre>
</blockquote>
Creates and enters a <tt>Context. </tt>A <tt>Context</tt> stores information
about the execution environment of a script.
<br>&nbsp;
<p><a NAME="initializing"></a><font size=+2>Initializing standard objects</font>
<p>The code
<blockquote>
<pre><font color="#006600">Scriptable scope = cx.initStandardObjects();</font></pre>
</blockquote>
Initializes the standard objects (<tt>Object</tt>,
<tt>Function</tt>, etc.)
This must be done before scripts can be executed. The <tt>null</tt> parameter
tells <tt>initStandardObjects</tt> to create and return a scope object
that we use in later calls.
<p><a NAME="Collecting"></a><font size=+2>Collecting the arguments</font>
<p>This code is standard Java and not specific to Rhino. It just collects
all the arguments and concatenates them together.
<blockquote>
<pre style="color: #006600">
String s = "";
for (int i=0; i &lt; args.length; i++) {
s += args[i];
}
</pre>
</blockquote>
<p><br><a NAME="Evaluating"></a><font size=+2>Evaluating a script</font>
<p>The code
<blockquote>
<pre><font color="#006600">Object result = cx.evaluateString(scope, s, "&lt;cmd>", 1, null);</font></pre>
</blockquote>
uses the Context <tt>cx</tt> to evaluate a string. Evaluation of the script
looks up variables in <tt>scope</tt>, and errors will be reported with
the filename <tt>&lt;cmd></tt> and line number 1.
<br>&nbsp;
<p><a NAME="Print"></a><font size=+2>Print the result</font>
<p>The code
<blockquote>
<pre><font color="#006600">System.out.println(cx.toString(result));</font></pre>
</blockquote>
prints the result of evaluating the script (contained in the variable <tt>result</tt>).
<tt>result</tt>
could be a string, JavaScript object, or other values..The
<tt>toString</tt>
method converts any JavaScript value to a string.
<br>&nbsp;
<p><a NAME="Exit"></a><font size=+2>Exit the Context</font>
<p>The code
<blockquote>
<pre style="color: #006600">
} finally {
Context.exit();
}
</pre>
</blockquote>
exits the Context. This removes the association between the Context and
the current thread and is an essential cleanup action. There should be
a call to <tt>exit</tt> for every call to <tt>enter</tt>. To make sure that it is called even if an exception is thrown, it is put into the finally block corresponding to the try block starting after <tt>Context.enter()</tt>.
<br>&nbsp;
<dir>&nbsp;</dir>
<a NAME="Expose"></a><font size=+3>Expose Java APIs</font>
<p><a NAME="UseJava"></a><font size=+2>Use Java APIs</font>
<p>No additional code in the embedding needed! The JavaScript feature called
<i>LiveConnect</i>
allows JavaScript programs to interact with Java objects:
<dir><tt><font color="#663366">$ java RunScript 'java.lang.System.out.println(3)'</font></tt>
<br><tt><font color="#663366">3.0</font></tt>
<br><tt><font color="#663366">undefined</font></tt></dir>
<a NAME="ImplementingInterfaces"></a><font size=+2>Implementing interfaces</font>
<p>Using Rhino, JavaScript objects can implement arbitrary Java interfaces.
There's no Java code to write--it's part of Rhino's LiveConnect implementation.
For example, we can see how to implement java.lang.Runnable in a Rhino
shell session:
<blockquote>
<pre><font color="#663366">js> obj = { run: function() { print('hi'); } }
[object Object]
js> obj.run()
hi
js> r = new java.lang.Runnable(obj);
[object Object]
js> t = new java.lang.Thread(r)
Thread[Thread-0,5,main]
js> t.start()
hi</font></pre>
</blockquote>
<a NAME="AddJava"></a><font size=+2>Add Java objects</font>
<p>The next example is <a href="http://lxr.mozilla.org/mozilla/source/js/rhino/examples/RunScript2.java">RunScript2</a>.
This is the same as RunScript, but with the addition of two extra lines
of code:
<dir><tt><font color="#006600">Scriptable jsArgs = Context.toObject(System.out,
scope);</font></tt>
<br><tt><font color="#006600">scope.put("out", scope, jsArgs);</font></tt></dir>
These lines add a global variable <tt>out</tt> that is a JavaScript reflection
of the <tt>System.out</tt> variable:
<dir><tt><font color="#663366">$ java RunScript2 'out.println(42)'</font></tt>
<br><tt><font color="#663366">42.0</font></tt>
<br><tt><font color="#663366">undefined</font></tt></dir>
<p><br><a NAME="UsingJSObjs"></a><font size=+3>Using JavaScript objects
from Java</font>
<p>After evaluating a script it's possible to query the scope for variables
and functions, extracting values and calling JavaScript functions. This
is illustrated in the <a href="http://lxr.mozilla.org/mozilla/source/js/rhino/examples/RunScript3.java">RunScript3</a>
example. This example adds the ability to print the value of variable <tt>x</tt>
and the result of calling function <tt>f</tt>. Both <tt>x</tt> and <tt>f</tt>
are expected to be defined by the evaluated script. For example,
<blockquote>
<pre style="color: #663366">
$ java RunScript3 'x = 7'
x = 7
f is undefined or not a function.
$ java RunScript3 'function f(a) { return a; }'
x is not defined.
f('my args') = my arg
</pre>
</blockquote>
<a NAME="UsingJSvars"></a><font size=+2>Using JavaScript variables</font>
<p>To print out the value of <tt>x</tt>, we add the following code.
<blockquote>
<pre style="color: #006600">
Object x = scope.get("x", scope);
if (x == Scriptable.NOT_FOUND) {
System.out.println("x is not defined.");
} else {
System.out.println("x = " + Context.toString(x));
}
</pre>
</blockquote>
<a NAME="CallingJSfuns"></a><font size=+2>Calling JavaScript functions</font>
<p>To get the function <tt>f</tt>, call it, and print the result, we add
this code:
<blockquote>
<pre style="color: #006600">
Object fObj = scope.get("f", scope);
if (!(fObj instanceof Function)) {
System.out.println("f is undefined or not a function.");
} else {
Object functionArgs[] = { "my arg" };
Function f = (Function)fObj;
Object result = f.call(cx, scope, scope, functionArgs);
String report = "f('my args') = " + Context.toString(result);
System.out.println(report);
}
</pre>
</blockquote>
<p><br><a NAME="JavaScriptHostObjects"></a><font size=+3>JavaScript host
objects</font>
<p><a NAME="DefiningHostObjects"></a><font size=+2>Defining Host Objects</font>
<p>Custom host objects can implement special JavaScript features like dynamic
properties.
<p><a NAME="Counter"></a><font size=+2>Counter example</font>
<p>The <a href="http://lxr.mozilla.org/mozilla/source/js/rhino/examples/Counter.java">Counter
example</a> is a simple host object. We'll go through it method by method
below.
<p>It's easy to try out new host object classes in the shell using its
built-in <tt>defineClass</tt> function. We'll see how to add it to RunScript
later. (Note that because the <tt>java -jar</tt> option preempts the rest
of the classpath, we can't use that and access the <tt>Counter</tt> class.)
<blockquote>
<pre style="color: #663366">
$ java -cp 'js.jar;examples' org.mozilla.javascript.tools.shell.Main
js> defineClass("Counter")
js> c = new Counter(7)
[object Counter]
js> c.count
7
js> c.count
8
js> c.count
9
js> c.resetCount()
js> c.count
0
</pre>
</blockquote>
<a NAME="CounterCtors"></a><font size=+2>Counter's constructors</font>
<p>The zero-argument constructor is used by Rhino runtime to create instances.
For the counter example, no initialization work is needed, so the implementation
is empty.
<dir><tt><font color="#006600">public Counter () { }</font></tt></dir>
The method <tt>jsConstructor</tt> defines the JavaScript constructor that
was called with the expression <tt>new Counter(7)</tt> in the JavaScript
code above.
<dir><tt><font color="#006600">public void jsConstructor(int a) { count
= a; }</font></tt></dir>
<a NAME="classname"></a><font size=+2>Class name</font>
<p>The class name is defined by the <tt>getClassName</tt> method. This
is used to determine the name of the constructor.
<dir><tt><font color="#006600">public String getClassName() { return "Counter";
}</font></tt></dir>
<a NAME="Dynamic"></a><font size=+2>Dynamic properties</font>
<p>Dynamic properties are defined by methods beginning with <tt>jsGet_</tt>
or <tt>jsSet_</tt>. The method <tt>jsGet_count</tt> defines the <i>count</i>
property.
<dir><tt><font color="#006600">public int jsGet_count() { return count++;
}</font></tt></dir>
The expression <tt>c.count</tt> in the JavaScript code above results in
a call to this method.
<p><a NAME="DefiningMethods"></a><font size=+2>Defining JavaScript "methods"</font>
<p>Methods can be defined using the <tt>jsFunction_ prefix</tt>. Here we
define <tt>resetCount</tt> for JavaScript.
<dir><tt><font color="#006600">public void jsFunction_resetCount() { count
= 0; }</font></tt></dir>
The call <tt>c.resetCount()</tt> above calls this method.
<p><a NAME="AddingCounter"></a><font size=+2>Adding Counter to RunScript</font>
<p>Now take a look at the <a href="http://lxr.mozilla.org/mozilla/source/js/rhino/examples/RunScript4.java">RunScript4
example</a>. It's the same as RunScript except for two additions. The method
<tt>ScriptableObject.defineClass</tt>
uses a Java class to define the Counter "class" in the top-level scope:
<dir><tt><font color="#006600">ScriptableObject.defineClass(scope, Counter.class);</font></tt></dir>
Now we can reference the <tt>Counter</tt> object from our script:
<dir><tt><font color="#663366">$ java RunScript4 'c = new Counter(3); c.count;
c.count;'</font></tt>
<br><tt><font color="#663366">4</font></tt></dir>
It also creates a new instance of the <tt>Counter</tt> object from within
our Java code, constructing it with the value 7, and assigning it to the
top-level variable <tt>myCounter</tt>:
<blockquote>
<pre style="color: #006600">
Object[] arg = { new Integer(7) };
Scriptable myCounter = cx.newObject(scope, "Counter", arg);
scope.put("myCounter", scope, myCounter);
</pre>
</blockquote>
Now we can reference the <tt>myCounter</tt> object from our script:
<blockquote>
<pre style="color: #663366">
$ java RunScript3 'RunScript4 'myCounter.count; myCounter.count'
8
</pre>
</blockquote>
</body>
</html>

View File

@@ -0,0 +1,77 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Norris Boyd">
<meta name="GENERATOR" content="Mozilla/4.72 [en]C-NSCP (WinNT; U) [Netscape]">
<meta name="KeyWords" content="Rhino, JavaScript, Java">
<title>Using Rhino</title>
</head>
<body bgcolor="#FFFFFF">
<script src="owner.js"></script>
<center>
<h1>
How are people using Rhino?</h1></center>
Here's a partial list of the ways people are using Rhino in their projects.
The initial list was collected by Netscape marketing, so Rhino is referred
to as Netscape Java-based JavaScript. We'd love to hear how you're using
Rhino--just mail&nbsp;<script>document.write(owner());</script>
.
<p><a href="http://www.attachmate.com">Attachmate</a>
<br>"Netscape JavaScript 1.5 with Java implementation was a perfect solution
for developing our MacroRecorder because it made our development process
faster and better, and our customers get a more efficient, reliable, and
standards based product as a result," said Rob Clark, Director of Product
Development at Attachmate. Attachmate integrates Netscape's Java-based
JavaScript 1.5 Interpreter into its 100% Pure Java certified web-to-host
thin clients, called e-Vantage Viewers. The Netscape Java-based JavaScript
interpreter is used in a MacroRecorder feature that allows browser-based
users to efficiently navigate host applications on mainframe and midrange
systems.
<p><a href="http://www.bristowhill.com/">Bristow Hill Software</a>
<br>"We thought it would require lots of work to add scripting capability
to Bristow Hill Server Pages, but we were delighted to find that Netscape
JavaScript 1.5 with Java implementation fit right in with only a couple
of lines of initialization code and one line of code to export our standard
objects by name. Also, we were pleased to find we could take embedded scripting
and compile it down to Java classes which could be used directly for greater
speed in production. Netscape's JavaScript engine is rock solid and standards
compliant, and my only regret is that we didn't start using it sooner,"
said Don Anderson, President of Bristow Hill Software.
<p><a href="http://www.icesoft.com/">ICEsoft Technologies</a>
<br>ICEsoft Technologies adds JavaScript support to their <a href="http://www.icesoft.com/ps_browser_overview.html">ICEbrowser</a> using Rhino.
<p><a href="http://homepage.mac.com/pcbeard/JShell/">JShell</a>
<br>Rhino is used as the scripting language for the open source command
shell JShell written by Patrick Beard.
<p><a href="http://www.softcom.com">Softcom</a>
<br>The tight integration of Netscape's Java-based JavaScript 1.5 with
Softcom's Java-based RealPlayer plugin, RJ, enables Softcom to quickly
produce dynamic interactive video applications for our media/entertainment,
retail and professional education clients, helping us to synchronize the
full interactivity of the Web and e-commerce with streaming video, said
Chris O'Brien, president and COO of Softcom. For the enhanced Oscarcast
recently produced for E! Online during the Academy Awards, Softcom used
RJ to embed Netscape's JavaScript 1.5 in the RealPlayer, successfully integrating
interactive chat and Java games, along with streaming video, within the
RealPlayer.
<p><a href="http://www.tdiinc.com/">Technology Deployment International</a>
<br>"Technology Deployment International selected the Java-based Netscape
JavaScript engine to incorporate into the workflow module of our eBusiness
Management System (eBMS) allowing our customers to integrate business logic
into any workstep of their application," said Dr. Kelvin Liu, VP eBMS Development,
Technology Deployment International. "It has been easy to embed, the support
we received from the engineering team has been outstanding, and the performance
of the JavaScript code is almost identical to the equivalent Java."
<p><a href="http://www.xypoint.com/">XYPOINT</a>
<br>XYPOINT uses Rhino for automating test cases of their Java classes
used in their service <a href="http://www.webwirelessnow.com/">WebWirelessNow</a>.
Abraham Backus says that he's happy with Rhino because "I've always wanted
this kind of JavaScript support."
<h3>
<hr WIDTH="100%"><br>
<a href="index.html">back to top</a></h3>
</body>
</html>

View File

@@ -0,0 +1,105 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
import org.mozilla.javascript.*;
/**
* Example of controlling the JavaScript execution engine.
*
* We evaluate a script and then manipulate the result.
*
*/
public class Control {
/**
* Main entry point.
*
* Process arguments as would a normal Java program. Also
* create a new Context and associate it with the current thread.
* Then set up the execution environment and begin to
* execute scripts.
*/
public static void main(String[] args) {
Context cx = Context.enter();
// Set version to JavaScript1.2 so that we get object-literal style
// printing instead of "[object Object]"
cx.setLanguageVersion(Context.VERSION_1_2);
// Initialize the standard objects (Object, Function, etc.)
// This must be done before scripts can be executed.
Scriptable scope = cx.initStandardObjects();
// Now we can evaluate a script. Let's create a new object
// using the object literal notation.
Object result = null;
try {
result = cx.evaluateString(scope, "obj = {a:1, b:['x','y']}",
"MySource", 1, null);
}
catch (JavaScriptException jse) {
// ignore
}
Scriptable obj = (Scriptable) scope.get("obj", scope);
// Should print "obj == result" (Since the result of an assignment
// expression is the value that was assigned)
System.out.println("obj " + (obj == result ? "==" : "!=") +
" result");
// Should print "obj.a == 1"
System.out.println("obj.a == " + obj.get("a", obj));
Scriptable b = (Scriptable) obj.get("b", obj);
// Should print "obj.b[0] == x"
System.out.println("obj.b[0] == " + b.get(0, b));
// Should print "obj.b[1] == y"
System.out.println("obj.b[1] == " + b.get(1, b));
try {
// Should print {a:1, b:["x", "y"]}
Function fn = (Function) ScriptableObject.getProperty(obj, "toString");
System.out.println(fn.call(cx, scope, obj, new Object[0]));
} catch (JavaScriptException e) {
// ignore
}
cx.exit();
}
}

View File

@@ -0,0 +1,56 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
import org.mozilla.javascript.*;
public class Counter extends ScriptableObject {
// The zero-argument constructor used by Rhino runtime to create instances
public Counter() { }
// Method jsConstructor defines the JavaScript constructor
public void jsConstructor(int a) { count = a; }
// The class name is defined by the getClassName method
public String getClassName() { return "Counter"; }
// The method jsGet_count defines the count property.
public int jsGet_count() { return count++; }
// Methods can be defined using the jsFunction_ prefix. Here we define
// resetCount for JavaScript.
public void jsFunction_resetCount() { count = 0; }
private int count;
}

View File

@@ -0,0 +1,79 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
import org.mozilla.javascript.*;
/**
* An example illustrating how to create a JavaScript object and retrieve
* properties and call methods.
* <p>
* Output should be:
* <pre>
* count = 0
* count = 1
* resetCount
* count = 0
* </pre>
*/
public class CounterTest {
public static void main(String[] args) throws Exception
{
Context cx = Context.enter();
try {
Scriptable scope = cx.initStandardObjects();
ScriptableObject.defineClass(scope, Counter.class);
Scriptable testCounter = cx.newObject(scope, "Counter");
Object count = ScriptableObject.getProperty(testCounter, "count");
System.out.println("count = " + count);
count = ScriptableObject.getProperty(testCounter, "count");
System.out.println("count = " + count);
ScriptableObject.callMethod(testCounter,
"resetCount",
new Object[0]);
System.out.println("resetCount");
count = ScriptableObject.getProperty(testCounter, "count");
System.out.println("count = " + count);
} finally {
Context.exit();
}
}
}

View File

@@ -0,0 +1,172 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
import org.mozilla.javascript.*;
/**
* Example of controlling the JavaScript with multiple scopes and threads.
*/
public class DynamicScopes {
/**
* Main entry point.
*
* Set up the shared scope and then spawn new threads that execute
* relative to that shared scope. Try compiling functions with and
* without dynamic scope to see the effect.
*
* The expected output is
* <pre>
* sharedScope
* sharedScope
* sharedScope
* thread0
* thread1
* thread2
* </pre>
* The final three lines may be permuted in any order depending on
* thread scheduling.
*/
public static void main(String[] args)
throws JavaScriptException
{
Context cx = Context.enter();
try {
cx.setCompileFunctionsWithDynamicScope(false);
runScripts(cx);
cx.setCompileFunctionsWithDynamicScope(true);
runScripts(cx);
} finally {
cx.exit();
}
}
static void runScripts(Context cx)
throws JavaScriptException
{
// Initialize the standard objects (Object, Function, etc.)
// This must be done before scripts can be executed. The call
// returns a new scope that we will share.
ScriptableObject scope = cx.initStandardObjects(null, true);
// Now we can evaluate a script and functions will be compiled to
// use dynamic scope if the Context is so initialized.
String source = "var x = 'sharedScope';" +
"function f() { return x; }";
cx.evaluateString(scope, source, "MySource", 1, null);
// Now we spawn some threads that execute a script that calls the
// function 'f'. The scope chain looks like this:
// <pre>
// ------------------
// | shared scope |
// ------------------
// ^
// |
// ------------------
// | per-thread scope |
// ------------------
// ^
// |
// ------------------
// | f's activation |
// ------------------
// </pre>
// Both the shared scope and the per-thread scope have variables 'x'
// defined in them. If 'f' is compiled with dynamic scope enabled,
// the 'x' from the per-thread scope will be used. Otherwise, the 'x'
// from the shared scope will be used. The 'x' defined in 'g' (which
// calls 'f') should not be seen by 'f'.
final int threadCount = 3;
Thread[] t = new Thread[threadCount];
for (int i=0; i < threadCount; i++) {
String script = "function g() { var x = 'local'; return f(); }" +
"java.lang.System.out.println(g());";
t[i] = new Thread(new PerThread(scope, script,
"thread" + i));
}
for (int i=0; i < threadCount; i++)
t[i].start();
// Don't return in this thread until all the spawned threads have
// completed.
for (int i=0; i < threadCount; i++) {
try {
t[i].join();
} catch (InterruptedException e) {
}
}
}
static class PerThread implements Runnable {
PerThread(Scriptable scope, String script, String x) {
this.scope = scope;
this.script = script;
this.x = x;
}
public void run() {
// We need a new Context for this thread.
Context cx = Context.enter();
try {
// We can share the scope.
Scriptable threadScope = cx.newObject(scope);
threadScope.setPrototype(scope);
// We want "threadScope" to be a new top-level
// scope, so set its parent scope to null. This
// means that any variables created by assignments
// will be properties of "threadScope".
threadScope.setParentScope(null);
// Create a JavaScript property of the thread scope named
// 'x' and save a value for it.
threadScope.put("x", threadScope, x);
cx.evaluateString(threadScope, script, "threadScript", 1, null);
}
catch (JavaScriptException jse) {
// ignore
}
finally {
Context.exit();
}
}
private Scriptable scope;
private String script;
private String x;
}
}

View File

@@ -0,0 +1,347 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
import org.mozilla.javascript.*;
import java.io.*;
import java.util.Vector;
/**
* Define a simple JavaScript File object.
*
* This isn't intended to be any sort of definitive attempt at a
* standard File object for JavaScript, but instead is an example
* of a more involved definition of a host object.
*
* Example of use of the File object:
* <pre>
* js> defineClass("File")
* js> file = new File("myfile.txt");
* [object File]
* js> file.writeLine("one"); <i>only now is file actually opened</i>
* js> file.writeLine("two");
* js> file.writeLine("thr", "ee");
* js> file.close(); <i>must close file before we can reopen for reading</i>
* js> var a = file.readLines(); <i>creates and fills an array with the contents of the file</i>
* js> a;
* one,two,three
* js>
* </pre>
*
*
* File errors or end-of-file signaled by thrown Java exceptions will
* be wrapped as JavaScript exceptions when called from JavaScript,
* and may be caught within JavaScript.
*
* @author Norris Boyd
*/
public class File extends ScriptableObject {
/**
* The zero-parameter constructor.
*
* When Context.defineClass is called with this class, it will
* construct File.prototype using this constructor.
*/
public File() {
}
/**
* The Java method defining the JavaScript File constructor.
*
* If the constructor has one or more arguments, and the
* first argument is not undefined, the argument is converted
* to a string as used as the filename.<p>
*
* Otherwise System.in or System.out is assumed as appropriate
* to the use.
*/
public static Scriptable jsConstructor(Context cx, Object[] args,
Function ctorObj,
boolean inNewExpr)
{
File result = new File();
if (args.length == 0 || args[0] == Context.getUndefinedValue()) {
result.name = "";
result.file = null;
} else {
result.name = Context.toString(args[0]);
result.file = new java.io.File(result.name);
}
return result;
}
/**
* Returns the name of this JavaScript class, "File".
*/
public String getClassName() {
return "File";
}
/**
* Get the name of the file.
*
* Used to define the "name" property.
*/
public String jsGet_name() {
return name;
}
/**
* Read the remaining lines in the file and return them in an array.
*
* Implements a JavaScript function.<p>
*
* This is a good example of creating a new array and setting
* elements in that array.
*
* @exception IOException if an error occurred while accessing the file
* associated with this object
* @exception JavaScriptException if a JavaScript exception occurred
* while creating the result array
*/
public Object jsFunction_readLines()
throws IOException, JavaScriptException
{
Vector v = new Vector();
String s;
while ((s = jsFunction_readLine()) != null) {
v.addElement(s);
}
Object[] lines = new Object[v.size()];
v.copyInto(lines);
Scriptable scope = ScriptableObject.getTopLevelScope(this);
Context cx = Context.getCurrentContext();
return cx.newObject(scope, "Array", lines);
}
/**
* Read a line.
*
* Implements a JavaScript function.
* @exception IOException if an error occurred while accessing the file
* associated with this object, or EOFException if the object
* reached the end of the file
*/
public String jsFunction_readLine() throws IOException {
return getReader().readLine();
}
/**
* Read a character.
*
* @exception IOException if an error occurred while accessing the file
* associated with this object, or EOFException if the object
* reached the end of the file
*/
public String jsFunction_readChar() throws IOException {
int i = getReader().read();
if (i == -1)
return null;
char[] charArray = { (char) i };
return new String(charArray);
}
/**
* Write strings.
*
* Implements a JavaScript function. <p>
*
* This function takes a variable number of arguments, converts
* each argument to a string, and writes that string to the file.
* @exception IOException if an error occurred while accessing the file
* associated with this object
*/
public static void jsFunction_write(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
throws IOException
{
write0(thisObj, args, false);
}
/**
* Write strings and a newline.
*
* Implements a JavaScript function.
* @exception IOException if an error occurred while accessing the file
* associated with this object
*
*/
public static void jsFunction_writeLine(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
throws IOException
{
write0(thisObj, args, true);
}
public int jsGet_lineNumber()
throws FileNotFoundException
{
return getReader().getLineNumber();
}
/**
* Close the file. It may be reopened.
*
* Implements a JavaScript function.
* @exception IOException if an error occurred while accessing the file
* associated with this object
*/
public void jsFunction_close() throws IOException {
if (reader != null) {
reader.close();
reader = null;
} else if (writer != null) {
writer.close();
writer = null;
}
}
/**
* Finalizer.
*
* Close the file when this object is collected.
*/
public void finalize() {
try {
jsFunction_close();
}
catch (IOException e) {
}
}
/**
* Get the Java reader.
*/
public Object jsFunction_getReader() {
if (reader == null)
return null;
// Here we use toObject() to "wrap" the BufferedReader object
// in a Scriptable object so that it can be manipulated by
// JavaScript.
Scriptable parent = ScriptableObject.getTopLevelScope(this);
return Context.toObject(reader, parent);
}
/**
* Get the Java writer.
*
* @see File#jsFunction_getReader
*
*/
public Object jsFunction_getWriter() {
if (writer == null)
return null;
Scriptable parent = ScriptableObject.getTopLevelScope(this);
return Context.toObject(writer, parent);
}
/**
* Get the reader, checking that we're not already writing this file.
*/
private LineNumberReader getReader() throws FileNotFoundException {
if (writer != null) {
throw Context.reportRuntimeError("already writing file \""
+ name
+ "\"");
}
if (reader == null)
reader = new LineNumberReader(file == null
? new InputStreamReader(System.in)
: new FileReader(file));
return reader;
}
/**
* Perform the guts of write and writeLine.
*
* Since the two functions differ only in whether they write a
* newline character, move the code into a common subroutine.
*
*/
private static void write0(Scriptable thisObj, Object[] args, boolean eol)
throws IOException
{
File thisFile = checkInstance(thisObj);
if (thisFile.reader != null) {
throw Context.reportRuntimeError("already writing file \""
+ thisFile.name
+ "\"");
}
if (thisFile.writer == null)
thisFile.writer = new BufferedWriter(
thisFile.file == null ? new OutputStreamWriter(System.out)
: new FileWriter(thisFile.file));
for (int i=0; i < args.length; i++) {
String s = Context.toString(args[i]);
thisFile.writer.write(s, 0, s.length());
}
if (eol)
thisFile.writer.newLine();
}
/**
* Perform the instanceof check and return the downcasted File object.
*
* This is necessary since methods may reside in the File.prototype
* object and scripts can dynamically alter prototype chains. For example:
* <pre>
* js> defineClass("File");
* js> o = {};
* [object Object]
* js> o.__proto__ = File.prototype;
* [object File]
* js> o.write("hi");
* js: called on incompatible object
* </pre>
* The runtime will take care of such checks when non-static Java methods
* are defined as JavaScript functions.
*/
private static File checkInstance(Scriptable obj) {
if (obj == null || !(obj instanceof File)) {
throw Context.reportRuntimeError("called on incompatible object");
}
return (File) obj;
}
/**
* Some private data for this class.
*/
private String name;
private java.io.File file; // may be null, meaning to use System.out or .in
private LineNumberReader reader;
private BufferedWriter writer;
}

View File

@@ -0,0 +1,168 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
import org.mozilla.javascript.*;
/**
* An example host object class.
*
* Here's a shell session showing the Foo object in action:
* <pre>
* js> defineClass("Foo")
* js> foo = new Foo(); <i>A constructor call, see <a href="#Foo">Foo</a> below.</i>
* [object Foo] <i>The "Foo" here comes from <a href"#getClassName">getClassName</a>.</i>
* js> foo.counter; <i>The counter property is defined by the <code>defineProperty</code></i>
* 0 <i>call below and implemented by the <a href="#getCounter">getCounter</a></i>
* js> foo.counter; <i>method below.</i>
* 1
* js> foo.counter;
* 2
* js> foo.resetCounter(); <i>Results in a call to <a href="#resetCounter">resetCounter</a>.</i>
* js> foo.counter; <i>Now the counter has been reset.</i>
* 0
* js> foo.counter;
* 1
* js> bar = new Foo(37); <i>Create a new instance.</i>
* [object Foo]
* js> bar.counter; <i>This instance's counter is distinct from</i>
* 37 <i>the other instance's counter.</i>
* js> foo.varargs(3, "hi"); <i>Calls <a href="#varargs">varargs</a>.</i>
* this = [object Foo]; args = [3, hi]
* js> foo[7] = 34; <i>Since we extended ScriptableObject, we get</i>
* 34 <i>all the behavior of a JavaScript object</i>
* js> foo.a = 23; <i>for free.</i>
* 23
* js> foo.a + foo[7];
* 57
* js>
* </pre>
*
* @see org.mozilla.javascript.Context
* @see org.mozilla.javascript.Scriptable
* @see org.mozilla.javascript.ScriptableObject
*
* @author Norris Boyd
*/
public class Foo extends ScriptableObject {
/**
* The zero-parameter constructor.
*
* When Context.defineClass is called with this class, it will
* construct Foo.prototype using this constructor.
*/
public Foo() {
}
/**
* The Java method defining the JavaScript Foo constructor.
*
* Takes an initial value for the counter property.
* Note that in the example Shell session above, we didn't
* supply a argument to the Foo constructor. This means that
* the Undefined value is used as the value of the argument,
* and when the argument is converted to an integer, Undefined
* becomes 0.
*/
public Foo(int counterStart) {
counter = counterStart;
}
/**
* Returns the name of this JavaScript class, "Foo".
*/
public String getClassName() {
return "Foo";
}
/**
* The Java method defining the JavaScript resetCounter function.
*
* Resets the counter to 0.
*/
public void jsFunction_resetCounter() {
counter = 0;
}
/**
* The Java method implementing the getter for the counter property.
* <p>
* If "setCounter" had been defined in this class, the runtime would
* call the setter when the property is assigned to.
*/
public int jsGet_counter() {
return counter++;
}
/**
* An example of a variable-arguments method.
*
* All variable arguments methods must have the same number and
* types of parameters, and must be static. <p>
* @param cx the Context of the current thread
* @param thisObj the JavaScript 'this' value.
* @param args the array of arguments for this call
* @param funObj the function object of the invoked JavaScript function
* This value is useful to compute a scope using
* Context.getTopLevelScope().
* @return computes the string values and types of 'this' and
* of each of the supplied arguments and returns them in a string.
*
* @exception ThreadAssociationException if the current
* thread is not associated with a Context
* @see org.mozilla.javascript.ScriptableObject#getTopLevelScope
*/
public static Object jsFunction_varargs(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
StringBuffer buf = new StringBuffer();
buf.append("this = ");
buf.append(Context.toString(thisObj));
buf.append("; args = [");
for (int i=0; i < args.length; i++) {
buf.append(Context.toString(args[i]));
if (i+1 != args.length)
buf.append(", ");
}
buf.append("]");
return buf.toString();
}
/**
* A piece of private data for this class.
*/
private int counter;
}

View File

@@ -0,0 +1,276 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
import org.mozilla.javascript.*;
import java.util.Vector;
/**
* Matrix: An example host object class that implements the Scriptable interface.
*
* Built-in JavaScript arrays don't handle multiple dimensions gracefully: the
* script writer must create every array in an array of arrays. The Matrix class
* takes care of that by automatically allocating arrays for every index that
* is accessed. What's more, the Matrix constructor takes a integer argument
* that specifies the dimension of the Matrix. If m is a Matrix with dimension 3,
* then m[0] will be a Matrix with dimension 1, and m[0][0] will be an Array.
*
* Here's a shell session showing the Matrix object in action:
* <pre>
* js> defineClass("Matrix")
* js> m = new Matrix(2); <i>A constructor call, see <a href="#Matrix">Matrix</a> below.</i>
* [object Matrix] <i>The "Matrix" here comes from <a href"#getClassName">getClassName</a>.</i>
* js> version(120); <i>switch to JavaScript1.2 to see arrays better</i>
* 0
* js> m[0][0] = 3;
* 3
* js> m[0]; <i>an array was created automatically!</i>
* [3]
* js> m[1]; <i>array is created even if we don't set a value</i>
* []
* js> m.dim; <i>we can access the "dim" property</i>
* 2
* js> m.dim = 3;
* 3
* js> m.dim; <i>but not modify it</i>
* 2
* </pre>
*
* @see org.mozilla.javascript.Context
* @see org.mozilla.javascript.Scriptable
*
* @author Norris Boyd
*/
public class Matrix implements Scriptable {
/**
* The zero-parameter constructor.
*
* When ScriptableObject.defineClass is called with this class, it will
* construct Matrix.prototype using this constructor.
*/
public Matrix() {
}
/**
* The Java constructor, also used to define the JavaScript constructor.
*/
public Matrix(int dimension) {
if (dimension <= 0) {
throw Context.reportRuntimeError(
"Dimension of Matrix must be greater than zero");
}
dim = dimension;
v = new Vector();
}
/**
* Returns the name of this JavaScript class, "Matrix".
*/
public String getClassName() {
return "Matrix";
}
/**
* Defines the "dim" property by returning true if name is
* equal to "dim".
* <p>
* Defines no other properties, i.e., returns false for
* all other names.
*
* @param name the name of the property
* @param start the object where lookup began
*/
public boolean has(String name, Scriptable start) {
return name.equals("dim");
}
/**
* Defines all numeric properties by returning true.
*
* @param index the index of the property
* @param start the object where lookup began
*/
public boolean has(int index, Scriptable start) {
return true;
}
/**
* Get the named property.
* <p>
* Handles the "dim" property and returns NOT_FOUND for all
* other names.
* @param name the property name
* @param start the object where the lookup began
*/
public Object get(String name, Scriptable start) {
if (name.equals("dim"))
return new Integer(dim);
return NOT_FOUND;
}
/**
* Get the indexed property.
* <p>
* Look up the element in the associated vector and return
* it if it exists. If it doesn't exist, create it.<p>
* @param index the index of the integral property
* @param start the object where the lookup began
*/
public Object get(int index, Scriptable start) {
if (index >= v.size())
v.setSize(index+1);
Object result = v.elementAt(index);
if (result != null)
return result;
if (dim > 2) {
Matrix m = new Matrix(dim-1);
m.setParentScope(getParentScope());
m.setPrototype(getPrototype());
result = m;
} else {
Context cx = Context.getCurrentContext();
Scriptable scope = ScriptableObject.getTopLevelScope(start);
result = cx.newArray(scope, 0);
}
v.setElementAt(result, index);
return result;
}
/**
* Set a named property.
*
* We do nothing here, so all properties are effectively read-only.
*/
public void put(String name, Scriptable start, Object value) {
}
/**
* Set an indexed property.
*
* We do nothing here, so all properties are effectively read-only.
*/
public void put(int index, Scriptable start, Object value) {
}
/**
* Remove a named property.
*
* This method shouldn't even be called since we define all properties
* as PERMANENT.
*/
public void delete(String id) {
}
/**
* Remove an indexed property.
*
* This method shouldn't even be called since we define all properties
* as PERMANENT.
*/
public void delete(int index) {
}
/**
* Get prototype.
*/
public Scriptable getPrototype() {
return prototype;
}
/**
* Set prototype.
*/
public void setPrototype(Scriptable prototype) {
this.prototype = prototype;
}
/**
* Get parent.
*/
public Scriptable getParentScope() {
return parent;
}
/**
* Set parent.
*/
public void setParentScope(Scriptable parent) {
this.parent = parent;
}
/**
* Get properties.
*
* We return an empty array since we define all properties to be DONTENUM.
*/
public Object[] getIds() {
return new Object[0];
}
/**
* Default value.
*
* Use the convenience method from Context that takes care of calling
* toString, etc.
*/
public Object getDefaultValue(Class typeHint) {
return "[object Matrix]";
}
/**
* instanceof operator.
*
* We mimick the normal JavaScript instanceof semantics, returning
* true if <code>this</code> appears in <code>value</code>'s prototype
* chain.
*/
public boolean hasInstance(Scriptable value) {
Scriptable proto = value.getPrototype();
while (proto != null) {
if (proto.equals(this))
return true;
proto = proto.getPrototype();
}
return false;
}
/**
* Some private data for this class.
*/
private int dim;
private Vector v;
private Scriptable prototype, parent;
}

View File

@@ -0,0 +1,19 @@
<html>
<body>
This is the NervousText applet in javascript:
<applet archive="js.jar" code=NervousText width=200 height=50 >
</applet>
<hr>
The test assumes that applet code is generated with:
<pre>
java -classpath js.jar org.mozilla.javascript.tools.jsc.Main \
-extends java.applet.Applet \
-implements java.lang.Runnable \
NervousText.js
</pre>
and the resulting 2 classes, NervousText.class extending java.applet.Applet and implementing java.lang.Runnable and NervousText1.class which represents compiled JavaScript code, are placed in the same directory as NervousText.html.
<p>
The test also assumes that js.jar from Rhino distribution is available in the same directory.
</body>
</html>

View File

@@ -0,0 +1,75 @@
// The Java "NervousText" example ported to JavaScript.
// Compile using java org.mozilla.javascript.tools.jsc.Main -extends java.applet.Applet -implements java.lang.Runnable NervousText.js
/*
Adapted from Java code by
Daniel Wyszynski
Center for Applied Large-Scale Computing (CALC)
04-12-95
Test of text animation.
kwalrath: Changed string; added thread suspension. 5-9-95
*/
var Font = java.awt.Font;
var Thread = java.lang.Thread;
var separated;
var s = null;
var killme = null;
var i;
var x_coord = 0, y_coord = 0;
var num;
var speed=35;
var counter =0;
var threadSuspended = false; //added by kwalrath
function init() {
this.resize(150,50);
this.setFont(new Font("TimesRoman",Font.BOLD,36));
s = this.getParameter("text");
if (s == null) {
s = "Rhino";
}
separated = s.split('');
}
function start() {
if(killme == null)
{
killme = new java.lang.Thread(java.lang.Runnable(this));
killme.start();
}
}
function stop() {
killme = null;
}
function run() {
while (killme != null) {
try {Thread.sleep(100);} catch (e){}
this.repaint();
}
killme = null;
}
function paint(g) {
for(i=0;i<separated.length;i++)
{
x_coord = Math.random()*10+15*i;
y_coord = Math.random()*10+36;
g.drawChars(separated, i,1,x_coord,y_coord);
}
}
/* Added by kwalrath. */
function mouseDown(evt, x, y) {
if (threadSuspended) {
killme.resume();
}
else {
killme.suspend();
}
threadSuspended = !threadSuspended;
return true;
}

View File

@@ -0,0 +1,69 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
import org.mozilla.javascript.*;
/**
* An example WrapFactory that can be used to avoid wrapping of Java types
* that can be converted to ECMA primitive values.
* So java.lang.String is mapped to ECMA string, all java.lang.Numbers are
* mapped to ECMA numbers, and java.lang.Booleans are mapped to ECMA booleans
* instead of being wrapped as objects. Additionally java.lang.Character is
* converted to ECMA string with length 1.
* Other types have the default behavior.
* <p>
* Note that calling "new java.lang.String('foo')" in JavaScript with this
* wrap factory enabled will still produce a wrapped Java object since the
* WrapFactory.wrapNewObject method is not overridden.
* <p>
* The PrimitiveWrapFactory is enabled on a Context by calling setWrapFactory
* on that context.
*/
public class PrimitiveWrapFactory extends WrapFactory {
public Object wrap(Context cx, Scriptable scope, Object obj,
Class staticType)
{
if (obj instanceof String || obj instanceof Number ||
obj instanceof Boolean)
{
return obj;
} else if (obj instanceof Character) {
char[] a = { ((Character)obj).charValue() };
return new String(a);
}
return super.wrap(cx, scope, obj, staticType);
}
}

View File

@@ -0,0 +1,76 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
import org.mozilla.javascript.*;
/**
* RunScript: simplest example of controlling execution of Rhino.
*
* Collects its arguments from the command line, executes the
* script, and prints the result.
*
* @author Norris Boyd
*/
public class RunScript {
public static void main(String args[])
throws JavaScriptException
{
// Creates and enters a Context. The Context stores information
// about the execution environment of a script.
Context cx = Context.enter();
try {
// Initialize the standard objects (Object, Function, etc.)
// This must be done before scripts can be executed. Returns
// a scope object that we use in later calls.
Scriptable scope = cx.initStandardObjects();
// Collect the arguments into a single string.
String s = "";
for (int i=0; i < args.length; i++) {
s += args[i];
}
// Now evaluate the string we've colected.
Object result = cx.evaluateString(scope, s, "<cmd>", 1, null);
// Convert the result to a string and print it.
System.err.println(cx.toString(result));
} finally {
// Exit from the context.
Context.exit();
}
}
}

View File

@@ -0,0 +1,67 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
import org.mozilla.javascript.*;
/**
* RunScript2: Like RunScript, but reflects the System.out into JavaScript.
*
* @author Norris Boyd
*/
public class RunScript2 {
public static void main(String args[])
throws JavaScriptException
{
Context cx = Context.enter();
try {
Scriptable scope = cx.initStandardObjects();
// Add a global variable "out" that is a JavaScript reflection
// of System.out
Scriptable jsArgs = Context.toObject(System.out, scope);
scope.put("out", scope, jsArgs);
String s = "";
for (int i=0; i < args.length; i++) {
s += args[i];
}
Object result = cx.evaluateString(scope, s, "<cmd>", 1, null);
System.err.println(cx.toString(result));
} finally {
Context.exit();
}
}
}

View File

@@ -0,0 +1,86 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
import org.mozilla.javascript.*;
/**
* RunScript3: Example of using JavaScript objects
*
* Collects its arguments from the command line, executes the
* script, and then ...
*
* @author Norris Boyd
*/
public class RunScript3 {
public static void main(String args[])
throws JavaScriptException
{
Context cx = Context.enter();
try {
Scriptable scope = cx.initStandardObjects();
// Collect the arguments into a single string.
String s = "";
for (int i=0; i < args.length; i++) {
s += args[i];
}
// Now evaluate the string we've colected. We'll ignore the result.
cx.evaluateString(scope, s, "<cmd>", 1, null);
// Print the value of variable "x"
Object x = scope.get("x", scope);
if (x == Scriptable.NOT_FOUND) {
System.out.println("x is not defined.");
} else {
System.out.println("x = " + Context.toString(x));
}
// Call function "f('my arg')" and print its result.
Object fObj = scope.get("f", scope);
if (!(fObj instanceof Function)) {
System.out.println("f is undefined or not a function.");
} else {
Object functionArgs[] = { "my arg" };
Function f = (Function)fObj;
Object result = f.call(cx, scope, scope, functionArgs);
String report = "f('my args') = " + Context.toString(result);
System.out.println(report);
}
} finally {
Context.exit();
}
}
}

View File

@@ -0,0 +1,75 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
import org.mozilla.javascript.*;
/**
* RunScript4: Execute scripts in an environment that includes the
* example Counter class.
*
* @author Norris Boyd
*/
public class RunScript4 {
public static void main(String args[])
throws Exception
{
Context cx = Context.enter();
try {
Scriptable scope = cx.initStandardObjects();
// Use the Counter class to define a Counter constructor
// and prototype in JavaScript.
ScriptableObject.defineClass(scope, Counter.class);
// Create an instance of Counter and assign it to
// the top-level variable "myCounter". This is
// equivalent to the JavaScript code
// myCounter = new Counter(7);
Object[] arg = { new Integer(7) };
Scriptable myCounter = cx.newObject(scope, "Counter", arg);
scope.put("myCounter", scope, myCounter);
String s = "";
for (int i=0; i < args.length; i++) {
s += args[i];
}
Object result = cx.evaluateString(scope, s, "<cmd>", 1, null);
System.err.println(cx.toString(result));
} finally {
Context.exit();
}
}
}

View File

@@ -0,0 +1,345 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
import org.mozilla.javascript.*;
import java.io.*;
/**
* The shell program.
*
* Can execute scripts interactively or in batch mode at the command line.
* An example of controlling the JavaScript engine.
*
* @author Norris Boyd
*/
public class Shell extends ScriptableObject
{
public String getClassName()
{
return "global";
}
/**
* Main entry point.
*
* Process arguments as would a normal Java program. Also
* create a new Context and associate it with the current thread.
* Then set up the execution environment and begin to
* execute scripts.
*/
public static void main(String args[]) {
// Associate a new Context with this thread
Context cx = Context.enter();
try {
// Initialize the standard objects (Object, Function, etc.)
// This must be done before scripts can be executed.
Shell shell = new Shell();
cx.initStandardObjects(shell);
// Define some global functions particular to the shell. Note
// that these functions are not part of ECMA.
String[] names = { "print", "quit", "version", "load", "help" };
try {
shell.defineFunctionProperties(names, Shell.class,
ScriptableObject.DONTENUM);
} catch (PropertyException e) {
throw new Error(e.getMessage());
}
args = processOptions(cx, args);
// Set up "arguments" in the global scope to contain the command
// line arguments after the name of the script to execute
Object[] array = args;
if (args.length > 0) {
int length = args.length - 1;
array = new Object[length];
System.arraycopy(args, 1, array, 0, length);
}
Scriptable argsObj = cx.newArray(shell, array);
shell.defineProperty("arguments", argsObj,
ScriptableObject.DONTENUM);
shell.processSource(cx, args.length == 0 ? null : args[0]);
} finally {
Context.exit();
}
}
/**
* Parse arguments.
*/
public static String[] processOptions(Context cx, String args[]) {
for (int i=0; i < args.length; i++) {
String arg = args[i];
if (!arg.startsWith("-")) {
String[] result = new String[args.length - i];
for (int j=i; j < args.length; j++)
result[j-i] = args[j];
return result;
}
if (arg.equals("-version")) {
if (++i == args.length)
usage(arg);
double d = cx.toNumber(args[i]);
if (d != d)
usage(arg);
cx.setLanguageVersion((int) d);
continue;
}
usage(arg);
}
return new String[0];
}
/**
* Print a usage message.
*/
private static void usage(String s) {
p("Didn't understand \"" + s + "\".");
p("Valid arguments are:");
p("-version 100|110|120|130|140|150");
System.exit(1);
}
/**
* Print a help message.
*
* This method is defined as a JavaScript function.
*/
public void help() {
p("");
p("Command Description");
p("======= ===========");
p("help() Display usage and help messages. ");
p("defineClass(className) Define an extension using the Java class");
p(" named with the string argument. ");
p(" Uses ScriptableObject.defineClass(). ");
p("load(['foo.js', ...]) Load JavaScript source files named by ");
p(" string arguments. ");
p("loadClass(className) Load a class named by a string argument.");
p(" The class must be a script compiled to a");
p(" class file. ");
p("print([expr ...]) Evaluate and print expressions. ");
p("quit() Quit the shell. ");
p("version([number]) Get or set the JavaScript version number.");
p("");
}
/**
* Print the string values of its arguments.
*
* This method is defined as a JavaScript function.
* Note that its arguments are of the "varargs" form, which
* allows it to handle an arbitrary number of arguments
* supplied to the JavaScript function.
*
*/
public static void print(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
for (int i=0; i < args.length; i++) {
if (i > 0)
System.out.print(" ");
// Convert the arbitrary JavaScript value into a string form.
String s = Context.toString(args[i]);
System.out.print(s);
}
System.out.println();
}
/**
* Quit the shell.
*
* This only affects the interactive mode.
*
* This method is defined as a JavaScript function.
*/
public void quit()
{
quitting = true;
}
/**
* Get and set the language version.
*
* This method is defined as a JavaScript function.
*/
public static double version(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
double result = (double) cx.getLanguageVersion();
if (args.length > 0) {
double d = cx.toNumber(args[0]);
cx.setLanguageVersion((int) d);
}
return result;
}
/**
* Load and execute a set of JavaScript source files.
*
* This method is defined as a JavaScript function.
*
*/
public static void load(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
Shell shell = (Shell)getTopLevelScope(thisObj);
for (int i = 0; i < args.length; i++) {
shell.processSource(cx, cx.toString(args[i]));
}
}
/**
* Evaluate JavaScript source.
*
* @param cx the current context
* @param filename the name of the file to compile, or null
* for interactive mode.
*/
private void processSource(Context cx, String filename)
{
if (filename == null) {
BufferedReader in = new BufferedReader
(new InputStreamReader(System.in));
String sourceName = "<stdin>";
int lineno = 1;
boolean hitEOF = false;
do {
int startline = lineno;
System.err.print("js> ");
System.err.flush();
try {
String source = "";
// Collect lines of source to compile.
while(true) {
String newline;
newline = in.readLine();
if (newline == null) {
hitEOF = true;
break;
}
source = source + newline + "\n";
lineno++;
// Continue collecting as long as more lines
// are needed to complete the current
// statement. stringIsCompilableUnit is also
// true if the source statement will result in
// any error other than one that might be
// resolved by appending more source.
if (cx.stringIsCompilableUnit(source))
break;
}
Object result = cx.evaluateString(this, source,
sourceName, startline,
null);
if (result != cx.getUndefinedValue()) {
System.err.println(cx.toString(result));
}
}
catch (WrappedException we) {
// Some form of exception was caught by JavaScript and
// propagated up.
System.err.println(we.getWrappedException().toString());
we.printStackTrace();
}
catch (EvaluatorException ee) {
// Some form of JavaScript error.
System.err.println("js: " + ee.getMessage());
}
catch (JavaScriptException jse) {
// Some form of JavaScript error.
System.err.println("js: " + jse.getMessage());
}
catch (IOException ioe) {
System.err.println(ioe.toString());
}
if (quitting) {
// The user executed the quit() function.
break;
}
} while (!hitEOF);
System.err.println();
} else {
FileReader in = null;
try {
in = new FileReader(filename);
}
catch (FileNotFoundException ex) {
Context.reportError("Couldn't open file \"" + filename + "\".");
return;
}
try {
// Here we evalute the entire contents of the file as
// a script. Text is printed only if the print() function
// is called.
cx.evaluateReader(this, in, filename, 1, null);
}
catch (WrappedException we) {
System.err.println(we.getWrappedException().toString());
we.printStackTrace();
}
catch (EvaluatorException ee) {
System.err.println("js: " + ee.getMessage());
}
catch (JavaScriptException jse) {
System.err.println("js: " + jse.getMessage());
}
catch (IOException ioe) {
System.err.println(ioe.toString());
}
finally {
try {
in.close();
}
catch (IOException ioe) {
System.err.println(ioe.toString());
}
}
}
System.gc();
}
private static void p(String s) {
System.out.println(s);
}
private boolean quitting;
}

View File

@@ -0,0 +1,61 @@
/*
* SwingApplication.js - a translation into JavaScript of
* SwingApplication.java, a java.sun.com Swing example.
*
* @author Roger E Critchlow, Jr.
*/
importPackage(Packages.javax.swing);
importPackage(Packages.java.awt);
importPackage(Packages.java.awt.event);
function createComponents() {
var labelPrefix = "Number of button clicks: ";
var numClicks = 0;
var label = new JLabel(labelPrefix + numClicks);
var button = new JButton("I'm a Swing button!");
button.mnemonic = KeyEvent.VK_I;
// Since Rhino 1.5R5 JS functions can be passed to Java method if
// corresponding argument type is Java interface with single method.
button.addActionListener(function() {
numClicks += 1;
label.setText(labelPrefix + numClicks);
});
label.setLabelFor(button);
/*
* An easy way to put space between a top-level container
* and its contents is to put the contents in a JPanel
* that has an "empty" border.
*/
var pane = new JPanel();
pane.border = BorderFactory.createEmptyBorder(30, //top
30, //left
10, //bottom
30); //right
pane.setLayout(new GridLayout(0, 1));
pane.add(button);
pane.add(label);
return pane;
}
try {
UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
} catch (e) { }
//Create the top-level container and add contents to it.
var frame = new JFrame("SwingApplication");
frame.getContentPane().add(createComponents(), BorderLayout.CENTER);
//Finish setting up the frame, and show it.
frame.addWindowListener(new WindowAdapter({
windowClosing : function() {
java.lang.System.exit(0);
}
}) );
frame.pack();
frame.setVisible(true);

View File

@@ -0,0 +1,134 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
/**
* checkParam.js
*
* The files given as arguments on the command line are assumed to be
* Java source code files. This program checks to see that the @param
* tags in the documentation comments match with the parameters for
* the associated Java methods.
* <p>
* Any errors found are reported.
*
*/
defineClass("File")
// Return true if "str" ends with "suffix".
function stringEndsWith(str, suffix) {
return str.substring(str.length - suffix.length) == suffix;
}
/**
* Perform processing once the end of a documentation comment is seen.
*
* Look for a parameter list following the end of the comment and
* collect the parameters and compare to the @param entries.
* Report any discrepancies.
* @param f the current file
* @param a an array of parameters from @param comments
* @param line the string containing the comment end (in case the
* parameters are on the same line)
*/
function processCommentEnd(f, a, line) {
while (line != null && !line.match(/\(/))
line = f.readLine();
while (line != null && !line.match(/\)/))
line += f.readLine();
if (line === null)
return;
var m = line.match(/\(([^\)]+)\)/);
var args = m ? m[1].split(",") : [];
if (a.length != args.length) {
print('"' + f.name +
'"; line ' + f.lineNumber +
' mismatch: had a different number' +
' of @param entries and parameters.');
} else {
for (var i=0; i < a.length; i++) {
if (!stringEndsWith(args[i], a[i])) {
print('"' + f.name +
'"; line ' + f.lineNumber +
' mismatch: had "' + a[i] +
'" and "' + args[i] + '".');
break;
}
}
}
}
/**
* Process the given file, looking for mismatched @param lists and
* parameter lists.
* @param f the file to process
*/
function processFile(f) {
var line;
var m;
var i = 0;
var a = [];
outer:
while ((line = f.readLine()) != null) {
if (line.match(/@param/)) {
while (m = line.match(/@param[ ]+([^ ]+)/)) {
a[i++] = m[1];
line = f.readLine();
if (line == null)
break outer;
}
}
if (i != 0 && line.match(/\*\//)) {
processCommentEnd(f, a, line);
i = 0;
a = [];
}
}
if (i != 0) {
print('"' + f.name +
'"; line ' + f.lineNumber +
' missing parameters at end of file.');
}
}
// main script: process each file in arguments list
for (var i=0; i < arguments.length; i++) {
var filename = String(arguments[i]);
print("Checking " + filename + "...");
var f = new File(filename);
processFile(f);
}
print("done.");

View File

@@ -0,0 +1,70 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Patrick Beard
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
/*
enum.js
Implementing the interface java.util.Enumeration using the new syntax.
Note that this syntax is experimental only, and hasn't been approved
by ECMA.
The same functionality can be had without the new syntax using the
uglier syntax:
var elements = new JavaAdapter(java.util.Enumeration, {
index: 0, elements: array,
hasMoreElements: function ...
nextElement: function ...
});
by Patrick C. Beard.
*/
// an array to enumerate.
var array = [0, 1, 2];
// create an array enumeration.
var elements = new java.util.Enumeration() {
index: 0, elements: array,
hasMoreElements: function() {
return (this.index < this.elements.length);
},
nextElement: function() {
return this.elements[this.index++];
}
};
// now print out the array by enumerating through the Enumeration
while (elements.hasMoreElements())
print(elements.nextElement());

View File

@@ -0,0 +1,553 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Roland Pennings
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
/**
* Process a JavaScript source file and process special comments
* to produce an HTML file of documentation, similar to javadoc.
* @author Norris Boyd
* @see rhinotip.jar
* @lastmodified xx
* @version 1.2 Roland Pennings: Allow multiple files for a function.
* @version 1.3 Roland Pennings: Removes ../.. from the input directory name
*/
defineClass("File")
var functionDocArray = [];
var inputDirName = "";
var indexFileArray = [];
var indexFile = "";
var indexFileName = "index_files";
var indexFunctionArray = [];
var indexFunction = "";
var indexFunctionName = "index_functions";
var FileList = [];
var DirList = [];
var outputdir = null;
var debug = 0;
/**
* Process JavaScript source file <code>f</code>, writing jsdoc to
* file <code>out</code>.
* @param f input file
* @param fname name of the input file (without the path)
* @param inputdir directory of the input file
* @param out output file
*/
function processFile(f, fname, inputdir, out) {
var s;
var firstLine = true;
indexFileArray[fname] = "";
// write the header of the output file
out.writeLine('<HTML><HEADER><TITLE>' + fname + '</TITLE><BODY>');
if (inputdir != null) {
outstr = '<a name=\"_top_\"></a><pre><a href=\"' + indexFile + '\">Index Files</a> ';
outstr += '<a href=\"' + indexFunction + '\">Index Functions</a></pre><hr>';
out.writeLine(outstr);
}
// process the input file
var comment = "";
while ((s = f.readLine()) != null) {
var m = s.match(/\/\*\*(.*)/);
if (m != null) {
// Found a comment start.
s = "*" + m[1];
do {
m = s.match(/(.*)\*\//);
if (m != null) {
// Found end of comment.
comment += m[1];
break;
}
// Strip leading whitespace and "*".
comment += s.replace(/^\s*\*/, "");
s = f.readLine();
} while (s != null);
if (debug)
print("Found comment " + comment);
if (firstLine) {
// We have a comment for the whole file.
out.writeLine('<H1>File ' + fname + '</H1>');
out.writeLine(processComment(comment,firstLine,fname));
out.writeLine('<HR>');
firstLine = false;
comment = "";
continue;
}
}
// match the beginning of the function
// NB we also match functions without a comment!
// if we have two comments one after another only the last one will be taken
m = s.match(/^\s*function\s+((\w+)|(\w+)(\s+))\(([^)]*)\)/);
if (m != null)
{
// Found a function start
var htmlText = processFunction(m[1], m[5], comment); // sjm changed from 2nd to 5th arg
// Save the text in a global variable, so we
// can write out a table of contents first.
functionDocArray[functionDocArray.length] = {name:m[1], text:htmlText};
// Store the function also in the indexFunctionArray
// so we can have a seperate file with the function table of contents
if (indexFunctionArray[m[1]]) {
// print("ERROR: function: " + m[1] + " is defined more than once!");
// Allow multiple files for a function
with (indexFunctionArray[m[1]]) {
filename = filename + "|" + fname;
// print("filename = " + filename);
}
}
else {
indexFunctionArray[m[1]] = {filename:fname};
}
//reset comment
comment = "";
}
// match a method being bound to a prototype
m = s.match(/^\s*(\w*)\.prototype\.(\w*)\s*=\s*function\s*\(([^)]*)\)/);
if (m != null)
{
// Found a method being bound to a prototype.
var htmlText = processPrototypeMethod(m[1], m[2], m[3], comment);
// Save the text in a global variable, so we
// can write out a table of contents first.
functionDocArray[functionDocArray.length] = {name:m[1]+".prototype."+m[2], text:htmlText};
// Store the function also in the indexFunctionArray
// so we can have a seperate file with the function table of contents
if (indexFunctionArray[m[1]]) {
// print("ERROR: function: " + m[1] + " is defined more than once!");
// Allow multiple files for a function
with (indexFunctionArray[m[1]]) {
filename = filename + "|" + fname;
// print("filename = " + filename);
}
}
else {
indexFunctionArray[m[1]] = {filename:fname};
}
//reset comment
comment = "";
}
firstLine = false;
}
// Write table of contents.
for (var i=0; i < functionDocArray.length; i++) {
with (functionDocArray[i]) {
out.writeLine('function <A HREF=#' + name +
'>' + name + '</A><BR>');
}
}
out.writeLine('<HR>');
// Now write the saved function documentation.
for (i=0; i < functionDocArray.length; i++) {
with (functionDocArray[i]) {
out.writeLine('<A NAME=' + name + '>');
out.writeLine(text);
}
}
out.writeLine('</BODY></HTML>');
// Now clean up the doc array
functionDocArray = [];
}
/**
* Process function and associated comment.
* @param name the name of the function
* @param args the args of the function as a single string
* @param comment the text of the comment
* @return a string for the HTML text of the documentation
*/
function processFunction(name, args, comment) {
if (debug)
print("Processing " + name + " " + args + " " + comment);
return "<H2>Function " + name + "</H2>" +
"<PRE>" +
"function " + name + "(" + args + ")" +
"</PRE>" +
processComment(comment,0,name) +
"<P><BR><BR>";
}
/**
* Process a method being bound to a prototype.
* @param proto the name of the prototype
* @param name the name of the function
* @param args the args of the function as a single string
* @param comment the text of the comment
* @return a string for the HTML text of the documentation
*/
function processPrototypeMethod(proto, name, args, comment) {
if (debug)
print("Processing " + proto + ".prototype." + name + " " + args + " " + comment);
return "<H2> Method " + proto + ".prototype." + name + "</H2>" +
"<PRE>" +
proto + ".prototype." + name + " = function(" + args + ")" +
"</PRE>" +
processComment(comment,0,name) +
"<P><BR><BR>";
}
/**
* Process comment.
* @param comment the text of the comment
* @param firstLine shows if comment is at the beginning of the file
* @param fname name of the file (without path)
* @return a string for the HTML text of the documentation
*/
function processComment(comment,firstLine,fname) {
var tags = {};
// Use the "lambda" form of regular expression replace,
// where the replacement object is a function rather
// than a string. The function is called with the
// matched text and any parenthetical matches as
// arguments, and the result of the function used as the
// replacement text.
// Here we use the function to build up the "tags" object,
// which has a property for each "@" tag that is the name
// of the tag, and whose value is an array of the
// text following that tag.
comment = comment.replace(/@(\w+)\s+([^@]*)/g,
function (s, name, text) {
var a = tags[name] || [];
a.push(text);
tags[name] = a;
return "";
});
// if we have a comment at the beginning of a file
// store the comment for the index file
if (firstLine) {
indexFileArray[fname] = comment;
}
var out = comment + '<P>';
if (tags["param"]) {
// Create a table of parameters and their descriptions.
var array = tags["param"];
var params = "";
for (var i=0; i < array.length; i++) {
var m = array[i].match(/(\w+)\s+(.*)/);
params += '<TR><TD><I>'+m[1]+'</I></TD>' +
'<TD>'+m[2]+'</TD></TR>';
}
out += '<TABLE WIDTH="90%" BORDER=1>';
out += '<TR BGCOLOR=0xdddddddd>';
out += '<TD><B>Parameter</B></TD>';
out += '<TD><B>Description</B></TD></TR>';
out += params;
out += '</TABLE><P>';
}
if (tags["return"]) {
out += "<DT><B>Returns:</B><DD>";
out += tags["return"][0] + "</DL><P>";
}
if (tags["author"]) {
// List the authors together, separated by commas.
out += '<DT><B>Author:</B><DD>';
var array = tags["author"];
for (var i=0; i < array.length; i++) {
out += array[i];
if (i+1 < array.length)
out += ", ";
}
out += '</DL><P>';
}
if (tags["version"]) {
// Show the version.
out += '<DT><B>Version:</B><DD>';
var array = tags["version"];
for (var i=0; i < array.length; i++) {
out += array[i];
if (i+1 < array.length)
out += "<BR><DD>";
}
out += '</DL><P>';
}
if (tags["see"]) {
// List the see modules together, separated by <BR>.
out += '<DT><B>Dependencies:</B><DD>';
var array = tags["see"];
for (var i=0; i < array.length; i++) {
out += array[i];
if (i+1 < array.length)
out += "<BR><DD>";
}
out += '</DL><P>';
}
if (tags["lastmodified"]) {
// Shows a last modified description with client-side js.
out += '<DT><B>Last modified:</B><DD>';
out += '<script><!--\n';
out += 'document.writeln(document.lastModified);\n';
out += '// ---></script>\n';
out += '</DL><P>';
}
// additional tags can be added here (i.e., "if (tags["see"])...")
return out;
}
/**
* Create an html output file
* @param outputdir directory to put the file
* @param htmlfile name of the file
*/
function CreateOutputFile(outputdir,htmlfile)
{
if (outputdir==null)
{
var outname = htmlfile;
}
else
{
var separator = Packages.java.io.File.separator;
var outname = outputdir + separator + htmlfile.substring(htmlfile.lastIndexOf(separator),htmlfile.length);
}
print("output file: " + outname);
return new File(outname);
}
/**
* Process a javascript file. Puts the generated HTML file in the outdir
* @param filename name of the javascript file
* @inputdir input directory of the file (default null)
*/
function processJSFile(filename,inputdir)
{
if (debug) print("filename = " + filename + " inputdir = " + inputdir);
if (!filename.match(/\.js$/)) {
print("Expected filename to end in '.js'; had instead " +
filename + ". I don't treat the file.");
} else {
if (inputdir==null)
{
var inname = filename;
}
else
{
var separator = Packages.java.io.File.separator;
var inname = inputdir + separator + filename;
}
print("Processing file " + inname);
var f = new File(inname);
// create the output file
var htmlfile = filename.replace(/\.js$/, ".html");
var out = CreateOutputFile(outputdir,htmlfile);
processFile(f, filename, inputdir, out);
out.close();
}
}
/**
* Generate index files containing links to the processed javascript files
* and the generated functions
*/
function GenerateIndex(dirname)
{
// construct the files index file
var out = CreateOutputFile(outputdir,indexFile);
// write the beginning of the file
out.writeLine('<HTML><HEADER><TITLE>File Index - directory: ' + dirname + '</TITLE><BODY>');
out.writeLine('<H1>File Index - directory: ' + dirname + '</H1>\n');
out.writeLine('<TABLE WIDTH="90%" BORDER=1>');
out.writeLine('<TR BGCOLOR=0xdddddddd>');
out.writeLine('<TD><B>File</B></TD>');
out.writeLine('<TD><B>Description</B></TD></TR>');
var separator = Packages.java.io.File.separator;
// sort the index file array
var SortedFileArray = [];
for (var fname in indexFileArray)
SortedFileArray.push(fname);
SortedFileArray.sort();
for (var i=0; i < SortedFileArray.length; i++) {
var fname = SortedFileArray[i];
var htmlfile = fname.replace(/\.js$/, ".html");
out.writeLine('<TR><TD><A HREF=\"' + htmlfile + '\">' + fname + '</A></TD></TD><TD>');
if (indexFileArray[fname])
out.writeLine(indexFileArray[fname]);
else
out.writeLine('No comments');
out.writeLine('</TD></TR>\n');
}
out.writeLine('</TABLE></BODY></HTML>');
out.close();
// construct the functions index file
var out = CreateOutputFile(outputdir,indexFunction);
// write the beginning of the file
out.writeLine('<HTML><HEADER><TITLE>Function Index - directory: ' + dirname + '</TITLE><BODY>');
out.writeLine('<H1>Function Index - directory: ' + dirname + '</H1>\n');
out.writeLine('<TABLE WIDTH="90%" BORDER=1>');
out.writeLine('<TR BGCOLOR=0xdddddddd>');
out.writeLine('<TD><B>Function</B></TD>');
out.writeLine('<TD><B>Files</B></TD></TR>');
// sort the function array
var SortedFunctionArray = [];
for (var functionname in indexFunctionArray)
SortedFunctionArray.push(functionname);
SortedFunctionArray.sort();
for (var j=0; j < SortedFunctionArray.length; j++) {
var funcname = SortedFunctionArray[j];
with (indexFunctionArray[funcname]) {
var outstr = '<TR><TD>' + funcname + '</TD><TD>';
var filelst = filename.split("|");
for (var i in filelst) {
var htmlfile = filelst[i].replace(/\.js$/, ".html");
outstr += '<A HREF=\"' + htmlfile + '#' + funcname + '\">' + filelst[i] + '</A>&nbsp;';
}
outstr += '</TD></TR>';
out.writeLine(outstr);
}
}
out.writeLine('</TABLE></BODY></HTML>');
out.close();
}
/**
* prints the options for JSDoc
*/
function PrintOptions()
{
print("You can use the following options:\n");
print("-d: specify an output directory for the generated html files\n");
print("-i: processes all files in an input directory (you can specify several directories)\n");
quit();
}
// Main Script
// first read the arguments
if (! arguments)
PrintOptions();
for (var i=0; i < arguments.length; i++) {
if (debug) print("argument: + \'" + arguments[i] + "\'");
if (arguments[i].match(/^\-/)) {
if (String(arguments[i])=="-d"){
// output directory for the generated html files
outputdir = String(arguments[i+1]);
if (debug) print("outputdir: + \'" + outputdir + "\'");
i++;
}
else if (String(arguments[i])=="-i"){
// process all files in an input directory
DirList.push(String(arguments[i+1]));
if (debug) print("inputdir: + \'" + arguments[i+1] + "\'");
i++;
}
else {
print("Unknown option: " + arguments[i] + "\n");
PrintOptions();
}
}
else
{
// we have a single file
if (debug) print("file: + \'" + arguments[i] + "\'");
FileList.push(String(arguments[i]));
}
}
// first handle the single files
for (var i in FileList)
processJSFile(FileList[i],null);
// then handle the input directories
for (var j in DirList) {
var inputdir = String(DirList[j]);
print("Process input directory: " + inputdir);
// clean up index arrays
var indexFileArray = [];
var indexFunctionArray = [];
// for the directory name get rid of ../../ or ..\..\
inputDirName = inputdir.replace(/\.\.\/|\.\.\\/g,"");
indexFile = indexFileName + "_" + inputDirName + ".html";
indexFunction = indexFunctionName + "_" + inputDirName + ".html";
print("indexFile = " + indexFile);
print("indexFunction = " + indexFunction);
// read the files in the directory
var DirFile = new java.io.File(inputdir);
var lst = DirFile.list();
var separator = Packages.java.io.File.separator;
for (var i=0; i < lst.length; i++)
{
processJSFile(String(lst[i]),inputdir);
}
// generate the index files for the input directory
GenerateIndex(inputDirName);
}

View File

@@ -0,0 +1,54 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
/**
* liveConnect.js: a simple demonstration of JavaScript-to-Java connectivity
*/
// Create a new StringBuffer. Note that the class name must be fully qualified
// by its package. Packages other than "java" must start with "Packages", i.e.,
// "Packages.javax.servlet...".
var sb = new java.lang.StringBuffer();
// Now add some stuff to the buffer.
sb.append("hi, mom");
sb.append(3); // this will add "3.0" to the buffer since all JS numbers
// are doubles by default
sb.append(true);
// Now print it out. (The toString() method of sb is automatically called
// to convert the buffer to a string.)
// Should print "hi, mom3.0true".
print(sb);

View File

@@ -0,0 +1,53 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
// unique.js: read the contents of a file and print out the unique lines
defineClass("File")
// "arguments[0]" refers to the first argument at the command line to the
// script, if present. If not present, "arguments[0]" will be undefined,
// which will cause f to read from System.in.
var f = new File(arguments[0]);
var o = {}
var line;
while ((line = f.readLine()) != null) {
// Use JavaScript objects' inherent nature as an associative
// array to provide uniqueness
o[line] = true;
}
for (i in o) {
print(i);
}

View File

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Build file for Rhino using Ant (see http://jakarta.apache.org/ant/index.html)
Requires Ant version 1.2
-->
<project name="src" default="compile" basedir=".">
<target name="properties">
<property name="nest" value=".."/>
<property name="build.dir" value="./build"/>
<property name="classes" value="${build.dir}/classes"/>
</target>
<target name="compile" depends="properties">
<javac srcdir="."
destdir="${nest}/${classes}"
includes="org/**/*.java"
deprecation="on"
debug="${debug}">
</javac>
<copy todir="${nest}/${classes}">
<fileset dir="." includes="org/**/*.properties" />
</copy>
</target>
<target name="copy-source" depends="properties">
<copy todir="${nest}/${dist.src}">
<fileset dir="."
includes="org/**/*.java,org/**/*.properties,build.xml,manifest"/>
</copy>
</target>
<target name="clean" depends="properties">
<delete includeEmptyDirs="true">
<fileset dir="${nest}/${classes}"
excludes="org/mozilla/javascript/tools/**"/>
</delete>
</target>
</project>

View File

@@ -0,0 +1,2 @@
Manifest-Version: 1.0
Main-Class: org.mozilla.javascript.tools.shell.Main

View File

@@ -0,0 +1,271 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Roger Lawrence
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.classfile;
/**
* This class provides opcode values expected by the JVM in Java class files.
*
* It also provides tables for internal use by the ClassFileWriter.
*
* @author Roger Lawrence
*/
public class ByteCode {
/**
* The byte opcodes defined by the Java Virtual Machine.
*/
public static final byte
NOP = 0x00,
ACONST_NULL = 0x01,
ICONST_M1 = 0x02,
ICONST_0 = 0x03,
ICONST_1 = 0x04,
ICONST_2 = 0x05,
ICONST_3 = 0x06,
ICONST_4 = 0x07,
ICONST_5 = 0x08,
LCONST_0 = 0x09,
LCONST_1 = 0x0A,
FCONST_0 = 0x0B,
FCONST_1 = 0x0C,
FCONST_2 = 0x0D,
DCONST_0 = 0x0E,
DCONST_1 = 0x0F,
BIPUSH = 0x10,
SIPUSH = 0x11,
LDC = 0x12,
LDC_W = 0x13,
LDC2_W = 0x14,
ILOAD = 0x15,
LLOAD = 0x16,
FLOAD = 0x17,
DLOAD = 0x18,
ALOAD = 0x19,
ILOAD_0 = 0x1A,
ILOAD_1 = 0x1B,
ILOAD_2 = 0x1C,
ILOAD_3 = 0x1D,
LLOAD_0 = 0x1E,
LLOAD_1 = 0x1F,
LLOAD_2 = 0x20,
LLOAD_3 = 0x21,
FLOAD_0 = 0x22,
FLOAD_1 = 0x23,
FLOAD_2 = 0x24,
FLOAD_3 = 0x25,
DLOAD_0 = 0x26,
DLOAD_1 = 0x27,
DLOAD_2 = 0x28,
DLOAD_3 = 0x29,
ALOAD_0 = 0x2A,
ALOAD_1 = 0x2B,
ALOAD_2 = 0x2C,
ALOAD_3 = 0x2D,
IALOAD = 0x2E,
LALOAD = 0x2F,
FALOAD = 0x30,
DALOAD = 0x31,
AALOAD = 0x32,
BALOAD = 0x33,
CALOAD = 0x34,
SALOAD = 0x35,
ISTORE = 0x36,
LSTORE = 0x37,
FSTORE = 0x38,
DSTORE = 0x39,
ASTORE = 0x3A,
ISTORE_0 = 0x3B,
ISTORE_1 = 0x3C,
ISTORE_2 = 0x3D,
ISTORE_3 = 0x3E,
LSTORE_0 = 0x3F,
LSTORE_1 = 0x40,
LSTORE_2 = 0x41,
LSTORE_3 = 0x42,
FSTORE_0 = 0x43,
FSTORE_1 = 0x44,
FSTORE_2 = 0x45,
FSTORE_3 = 0x46,
DSTORE_0 = 0x47,
DSTORE_1 = 0x48,
DSTORE_2 = 0x49,
DSTORE_3 = 0x4A,
ASTORE_0 = 0x4B,
ASTORE_1 = 0x4C,
ASTORE_2 = 0x4D,
ASTORE_3 = 0x4E,
IASTORE = 0x4F,
LASTORE = 0x50,
FASTORE = 0x51,
DASTORE = 0x52,
AASTORE = 0x53,
BASTORE = 0x54,
CASTORE = 0x55,
SASTORE = 0x56,
POP = 0x57,
POP2 = 0x58,
DUP = 0x59,
DUP_X1 = 0x5A,
DUP_X2 = 0x5B,
DUP2 = 0x5C,
DUP2_X1 = 0x5D,
DUP2_X2 = 0x5E,
SWAP = 0x5F,
IADD = 0x60,
LADD = 0x61,
FADD = 0x62,
DADD = 0x63,
ISUB = 0x64,
LSUB = 0x65,
FSUB = 0x66,
DSUB = 0x67,
IMUL = 0x68,
LMUL = 0x69,
FMUL = 0x6A,
DMUL = 0x6B,
IDIV = 0x6C,
LDIV = 0x6D,
FDIV = 0x6E,
DDIV = 0x6F,
IREM = 0x70,
LREM = 0x71,
FREM = 0x72,
DREM = 0x73,
INEG = 0x74,
LNEG = 0x75,
FNEG = 0x76,
DNEG = 0x77,
ISHL = 0x78,
LSHL = 0x79,
ISHR = 0x7A,
LSHR = 0x7B,
IUSHR = 0x7C,
LUSHR = 0x7D,
IAND = 0x7E,
LAND = 0x7F,
IOR = (byte)0x80,
LOR = (byte)0x81,
IXOR = (byte)0x82,
LXOR = (byte)0x83,
IINC = (byte)0x84,
I2L = (byte)0x85,
I2F = (byte)0x86,
I2D = (byte)0x87,
L2I = (byte)0x88,
L2F = (byte)0x89,
L2D = (byte)0x8A,
F2I = (byte)0x8B,
F2L = (byte)0x8C,
F2D = (byte)0x8D,
D2I = (byte)0x8E,
D2L = (byte)0x8F,
D2F = (byte)0x90,
I2B = (byte)0x91,
I2C = (byte)0x92,
I2S = (byte)0x93,
LCMP = (byte)0x94,
FCMPL = (byte)0x95,
FCMPG = (byte)0x96,
DCMPL = (byte)0x97,
DCMPG = (byte)0x98,
IFEQ = (byte)0x99,
IFNE = (byte)0x9A,
IFLT = (byte)0x9B,
IFGE = (byte)0x9C,
IFGT = (byte)0x9D,
IFLE = (byte)0x9E,
IF_ICMPEQ = (byte)0x9F,
IF_ICMPNE = (byte)0xA0,
IF_ICMPLT = (byte)0xA1,
IF_ICMPGE = (byte)0xA2,
IF_ICMPGT = (byte)0xA3,
IF_ICMPLE = (byte)0xA4,
IF_ACMPEQ = (byte)0xA5,
IF_ACMPNE = (byte)0xA6,
GOTO = (byte)0xA7,
JSR = (byte)0xA8,
RET = (byte)0xA9,
TABLESWITCH = (byte)0xAA,
LOOKUPSWITCH = (byte)0xAB,
IRETURN = (byte)0xAC,
LRETURN = (byte)0xAD,
FRETURN = (byte)0xAE,
DRETURN = (byte)0xAF,
ARETURN = (byte)0xB0,
RETURN = (byte)0xB1,
GETSTATIC = (byte)0xB2,
PUTSTATIC = (byte)0xB3,
GETFIELD = (byte)0xB4,
PUTFIELD = (byte)0xB5,
INVOKEVIRTUAL = (byte)0xB6,
INVOKESPECIAL = (byte)0xB7,
INVOKESTATIC = (byte)0xB8,
INVOKEINTERFACE = (byte)0xB9,
NEW = (byte)0xBB,
NEWARRAY = (byte)0xBC,
ANEWARRAY = (byte)0xBD,
ARRAYLENGTH = (byte)0xBE,
ATHROW = (byte)0xBF,
CHECKCAST = (byte)0xC0,
INSTANCEOF = (byte)0xC1,
MONITORENTER = (byte)0xC2,
MONITOREXIT = (byte)0xC3,
WIDE = (byte)0xC4,
MULTIANEWARRAY = (byte)0xC5,
IFNULL = (byte)0xC6,
IFNONNULL = (byte)0xC7,
GOTO_W = (byte)0xC8,
JSR_W = (byte)0xC9,
BREAKPOINT = (byte)0xCA,
IMPDEP1 = (byte)0xFE,
IMPDEP2 = (byte)0xFF;
/**
* Types for the NEWARRAY opcode.
*/
public static final byte
T_BOOLEAN = 4,
T_CHAR = 5,
T_FLOAT = 6,
T_DOUBLE = 7,
T_BYTE = 8,
T_SHORT = 9,
T_INT = 10,
T_LONG = 11;
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,66 @@
/*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Roger Lawrence
* Igor Bukanov
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.classfile;
/**
* Information about java variable to use when generating the local
* variable table.
*/
public interface JavaVariable {
/**
* Variable name
*/
public String getName();
/**
* Return variable type as bytecode descriptor string
*/
public String getTypeDescriptor();
/**
* Return the starting bytecode PC where this variable is live, or -1
* if it is not a Java register.
*/
public int getStartPC();
/**
* Return the Java register number or -1 if it is not a Java register.
*/
public short getJRegister();
}

View File

@@ -0,0 +1,276 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Igor Bukanov
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
/**
* This class implements the "arguments" object.
*
* See ECMA 10.1.8
*
* @see org.mozilla.javascript.NativeCall
* @author Norris Boyd
*/
class Arguments extends IdScriptable {
public Arguments(NativeCall activation) {
this.activation = activation;
Scriptable parent = activation.getParentScope();
setParentScope(parent);
setPrototype(ScriptableObject.getObjectPrototype(parent));
args = activation.getOriginalArguments();
lengthObj = new Integer(args.length);
NativeFunction funObj = activation.funObj;
calleeObj = funObj;
if (funObj.version <= Context.VERSION_1_3
&& funObj.version != Context.VERSION_DEFAULT)
{
callerObj = null;
}else {
callerObj = NOT_FOUND;
}
}
public String getClassName() {
return "Arguments";
}
public boolean has(int index, Scriptable start) {
if (0 <= index && index < args.length) {
if (args[index] != NOT_FOUND) {
return true;
}
}
return super.has(index, start);
}
public Object get(int index, Scriptable start) {
if (0 <= index && index < args.length) {
Object value = args[index];
if (value != NOT_FOUND) {
if (sharedWithActivation(index)) {
String argName = activation.funObj.argNames[index];
value = activation.get(argName, activation);
if (value == NOT_FOUND) Kit.codeBug();
}
return value;
}
}
return super.get(index, start);
}
private boolean sharedWithActivation(int index) {
NativeFunction f = activation.funObj;
int definedCount = f.argCount;
if (index < definedCount) {
// Check if argument is not hidden by later argument with the same
// name as hidden arguments are not shared with activation
if (index < definedCount - 1) {
String argName = f.argNames[index];
for (int i = index + 1; i < definedCount; i++) {
if (argName.equals(f.argNames[i])) {
return false;
}
}
}
return true;
}
return false;
}
public void put(int index, Scriptable start, Object value) {
if (0 <= index && index < args.length) {
if (args[index] != NOT_FOUND) {
if (sharedWithActivation(index)) {
String argName = activation.funObj.argNames[index];
activation.put(argName, activation, value);
return;
}
synchronized (this) {
if (args[index] != NOT_FOUND) {
if (args == activation.getOriginalArguments()) {
args = (Object[])args.clone();
}
args[index] = value;
return;
}
}
}
}
super.put(index, start, value);
}
public void delete(int index) {
if (0 <= index && index < args.length) {
synchronized (this) {
if (args[index] != NOT_FOUND) {
if (args == activation.getOriginalArguments()) {
args = (Object[])args.clone();
}
args[index] = NOT_FOUND;
return;
}
}
}
super.delete(index);
}
protected int getIdAttributes(int id)
{
switch (id) {
case Id_callee:
case Id_caller:
case Id_length:
return DONTENUM;
}
return super.getIdAttributes(id);
}
protected boolean hasIdValue(int id)
{
switch (id) {
case Id_callee: return calleeObj != NOT_FOUND;
case Id_length: return lengthObj != NOT_FOUND;
case Id_caller: return callerObj != NOT_FOUND;
}
return super.hasIdValue(id);
}
protected Object getIdValue(int id)
{
switch (id) {
case Id_callee: return calleeObj;
case Id_length: return lengthObj;
case Id_caller: {
Object value = callerObj;
if (value == UniqueTag.NULL_VALUE) { value = null; }
else if (value == null) {
NativeCall caller = activation.caller;
if (caller == null) {
value = null;
}else {
value = caller.get("arguments", caller);
}
}
return value;
}
}
return super.getIdValue(id);
}
protected void setIdValue(int id, Object value)
{
switch (id) {
case Id_callee: calleeObj = value; return;
case Id_length: lengthObj = value; return;
case Id_caller:
callerObj = (value != null) ? value : UniqueTag.NULL_VALUE;
return;
}
super.setIdValue(id, value);
}
protected void deleteIdValue(int id)
{
switch (id) {
case Id_callee: calleeObj = NOT_FOUND; return;
case Id_length: lengthObj = NOT_FOUND; return;
case Id_caller: callerObj = NOT_FOUND; return;
}
super.deleteIdValue(id);
}
protected String getIdName(int id)
{
switch (id) {
case Id_callee: return "callee";
case Id_length: return "length";
case Id_caller: return "caller";
}
return null;
}
// #string_id_map#
private static final int
Id_callee = 1,
Id_length = 2,
Id_caller = 3,
MAX_INSTANCE_ID = 3;
{ setMaxId(MAX_INSTANCE_ID); }
protected int mapNameToId(String s)
{
int id;
// #generated# Last update: 2002-04-09 20:46:33 CEST
L0: { id = 0; String X = null; int c;
if (s.length()==6) {
c=s.charAt(5);
if (c=='e') { X="callee";id=Id_callee; }
else if (c=='h') { X="length";id=Id_length; }
else if (c=='r') { X="caller";id=Id_caller; }
}
if (X!=null && X!=s && !X.equals(s)) id = 0;
}
// #/generated#
return id;
}
// #/string_id_map#
// Fields to hold caller, callee and length properties,
// where NOT_FOUND value tags deleted properties.
// In addition if callerObj == NULL_VALUE, it tags null for scripts, as
// initial callerObj == null means access to caller arguments available
// only in JS <= 1.3 scripts
private Object callerObj;
private Object calleeObj;
private Object lengthObj;
private NativeCall activation;
// Initially args holds activation.getOriginalArgs(), but any modification
// of its elements triggers creation of a copy. If its element holds NOT_FOUND,
// it indicates deleted index, in which case super class is queried.
private Object[] args;
}

View File

@@ -0,0 +1,585 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Igor Bukanov
* Roger Lawrence
* Mike McCabe
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
/**
* The base class for Function objects
* See ECMA 15.3.
* @author Norris Boyd
*/
public class BaseFunction extends IdScriptable implements Function {
static void init(Context cx, Scriptable scope, boolean sealed) {
BaseFunction obj = new BaseFunction();
obj.prototypeFlag = true;
obj.functionName = "";
obj.isPrototypePropertyImmune = true;
obj.addAsPrototype(MAX_PROTOTYPE_ID, cx, scope, sealed);
}
protected void fillConstructorProperties
(Context cx, IdFunction ctor, boolean sealed)
{
// Fix up bootstrapping problem: getPrototype of the IdFunction
// can not return Function.prototype because Function object is not
// yet defined.
ctor.setPrototype(this);
}
public String getClassName() {
return "Function";
}
/**
* Implements the instanceof operator for JavaScript Function objects.
* <p>
* <code>
* foo = new Foo();<br>
* foo instanceof Foo; // true<br>
* </code>
*
* @param instance The value that appeared on the LHS of the instanceof
* operator
* @return true if the "prototype" property of "this" appears in
* value's prototype chain
*
*/
public boolean hasInstance(Scriptable instance)
{
Object protoProp = ScriptableObject.getProperty(this, "prototype");
if (protoProp instanceof Scriptable && protoProp != Undefined.instance)
{
return ScriptRuntime.jsDelegatesTo(instance, (Scriptable)protoProp);
}
throw ScriptRuntime.typeError1("msg.instanceof.bad.prototype",
functionName);
}
protected String toSource(Context cx, Scriptable scope, Object[] args)
{
int indent = 0;
int flags = Decompiler.TO_SOURCE_FLAG;
if (args.length != 0) {
indent = ScriptRuntime.toInt32(args[0]);
if (indent >= 0) {
flags = 0;
} else {
indent = 0;
}
}
return decompile(cx, indent, flags);
}
protected int getIdAttributes(int id)
{
switch (id) {
case Id_length:
case Id_arity:
case Id_name:
return DONTENUM | READONLY | PERMANENT;
case Id_prototype:
return isPrototypePropertyImmune
? DONTENUM | READONLY | PERMANENT
: DONTENUM;
case Id_arguments:
return EMPTY;
}
return super.getIdAttributes(id);
}
protected boolean hasIdValue(int id)
{
if (id == Id_prototype) {
return prototypeProperty != NOT_FOUND;
}
else if (id == Id_arguments) {
// Should after delete Function.arguments its activation still
// be available during Function call?
// This code assumes it should not: after default set/deleteIdValue
// hasIdValue/getIdValue would not be called again
// To handle the opposite case, set/deleteIdValue should be
// overwritten as well
return null != getActivation(Context.getContext());
}
return super.hasIdValue(id);
}
protected Object getIdValue(int id)
{
switch (id) {
case Id_length: return wrap_int(getLength());
case Id_arity: return wrap_int(getArity());
case Id_name: return getFunctionName();
case Id_prototype: return getPrototypeProperty();
case Id_arguments: return getArguments();
}
return super.getIdValue(id);
}
protected void setIdValue(int id, Object value)
{
if (id == Id_prototype) {
prototypeProperty = (value != null) ? value : UniqueTag.NULL_VALUE;
return;
}
super.setIdValue(id, value);
}
protected void deleteIdValue(int id)
{
if (id == Id_prototype) {
prototypeProperty = NOT_FOUND;
return;
}
super.deleteIdValue(id);
}
public int methodArity(int methodId)
{
if (prototypeFlag) {
switch (methodId) {
case Id_constructor: return 1;
case Id_toString: return 1;
case Id_apply: return 2;
case Id_call: return 1;
}
}
return super.methodArity(methodId);
}
public Object execMethod(int methodId, IdFunction f, Context cx,
Scriptable scope, Scriptable thisObj,
Object[] args)
throws JavaScriptException
{
if (prototypeFlag) {
switch (methodId) {
case Id_constructor:
return jsConstructor(cx, scope, args);
case Id_toString: {
int indent = ScriptRuntime.toInt32(args, 0);
Object x = thisObj.getDefaultValue(ScriptRuntime.FunctionClass);
if (x instanceof BaseFunction) {
return ((BaseFunction)x).decompile(cx, indent, 0);
}
throw ScriptRuntime.typeError1("msg.incompat.call", "toString");
}
case Id_apply:
case Id_call:
return applyOrCall(methodId == Id_apply, cx, scope,
thisObj, args);
}
}
return super.execMethod(methodId, f, cx, scope, thisObj, args);
}
/**
* Make value as DontEnum, DontDelete, ReadOnly
* prototype property of this Function object
*/
public void setImmunePrototypeProperty(Object value)
{
prototypeProperty = (value != null) ? value : UniqueTag.NULL_VALUE;
isPrototypePropertyImmune = true;
}
protected Scriptable getClassPrototype()
{
Object protoVal = getPrototypeProperty();
if (protoVal instanceof Scriptable && protoVal != Undefined.instance) {
return (Scriptable) protoVal;
}
return getClassPrototype(this, "Object");
}
/**
* Should be overridden.
*/
public Object call(Context cx, Scriptable scope, Scriptable thisObj,
Object[] args)
throws JavaScriptException
{
return Undefined.instance;
}
public Scriptable construct(Context cx, Scriptable scope, Object[] args)
throws JavaScriptException
{
Scriptable result = createObject(cx, scope);
if (result != null) {
Object val = call(cx, scope, result, args);
if (val instanceof Scriptable && val != Undefined.instance) {
result = (Scriptable)val;
}
} else {
Object val = call(cx, scope, null, args);
if (!(val instanceof Scriptable && val != Undefined.instance)) {
// It is program error not to return Scriptable from
// the call method if createObject returns null.
throw new IllegalStateException(
"Bad implementaion of call as constructor, name="
+functionName+" in "+getClass().getName());
}
result = (Scriptable)val;
if (result.getPrototype() == null) {
result.setPrototype(getClassPrototype());
}
if (result.getParentScope() == null) {
Scriptable parent = getParentScope();
if (result != parent) {
result.setParentScope(parent);
}
}
}
return result;
}
/**
* Creates new script object.
* The default implementation of {@link #construct} uses the method to
* to get the value for <tt>thisObj</tt> argument when invoking
* {@link #call}.
* The methos is allowed to return <tt>null</tt> to indicate that
* {@link #call} will create a new object itself. In this case
* {@link #construct} will set scope and prototype on the result
* {@link #call} unless they are already set.
*/
public Scriptable createObject(Context cx, Scriptable scope)
{
Scriptable newInstance = new NativeObject();
newInstance.setPrototype(getClassPrototype());
newInstance.setParentScope(getParentScope());
return newInstance;
}
/**
* Decompile the source information associated with this js
* function/script back into a string.
*
* @param cx Current context.
*
* @param indent How much to indent the decompiled result.
*
* @param flags Flags specifying format of decompilation output.
*/
public String decompile(Context cx, int indent, int flags)
{
StringBuffer sb = new StringBuffer();
boolean justbody = (0 != (flags & Decompiler.ONLY_BODY_FLAG));
if (!justbody) {
sb.append("function ");
sb.append(getFunctionName());
sb.append("() {\n\t");
}
sb.append("[native code, arity=");
sb.append(getArity());
sb.append("]\n");
if (!justbody) {
sb.append("}\n");
}
return sb.toString();
}
public int getArity() { return 0; }
public int getLength() { return 0; }
public String getFunctionName() {
if (functionName == null)
return "";
return functionName;
}
private Object getPrototypeProperty() {
Object result = prototypeProperty;
if (result == null) {
synchronized (this) {
result = prototypeProperty;
if (result == null) {
setupDefaultPrototype();
result = prototypeProperty;
}
}
}
else if (result == UniqueTag.NULL_VALUE) { result = null; }
return result;
}
private void setupDefaultPrototype()
{
NativeObject obj = new NativeObject();
final int attr = ScriptableObject.DONTENUM |
ScriptableObject.READONLY |
ScriptableObject.PERMANENT;
obj.defineProperty("constructor", this, attr);
// put the prototype property into the object now, then in the
// wacky case of a user defining a function Object(), we don't
// get an infinite loop trying to find the prototype.
prototypeProperty = obj;
Scriptable proto = getObjectPrototype(this);
if (proto != obj) {
// not the one we just made, it must remain grounded
obj.setPrototype(proto);
}
}
private Object getArguments()
{
// <Function name>.arguments is deprecated, so we use a slow
// way of getting it that doesn't add to the invocation cost.
// TODO: add warning, error based on version
NativeCall activation = getActivation(Context.getContext());
return activation == null
? null
: activation.get("arguments", activation);
}
NativeCall getActivation(Context cx)
{
NativeCall activation = cx.currentActivation;
while (activation != null) {
if (activation.getFunctionObject() == this)
return activation;
activation = activation.caller;
}
return null;
}
private static Object jsConstructor(Context cx, Scriptable scope,
Object[] args)
{
int arglen = args.length;
StringBuffer sourceBuf = new StringBuffer();
sourceBuf.append("function ");
/* version != 1.2 Function constructor behavior -
* print 'anonymous' as the function name if the
* version (under which the function was compiled) is
* less than 1.2... or if it's greater than 1.2, because
* we need to be closer to ECMA.
*/
if (cx.getLanguageVersion() != Context.VERSION_1_2) {
sourceBuf.append("anonymous");
}
sourceBuf.append('(');
// Append arguments as coma separated strings
for (int i = 0; i < arglen - 1; i++) {
if (i > 0) {
sourceBuf.append(',');
}
sourceBuf.append(ScriptRuntime.toString(args[i]));
}
sourceBuf.append(") {");
if (arglen != 0) {
// append function body
String funBody = ScriptRuntime.toString(args[arglen - 1]);
sourceBuf.append(funBody);
}
sourceBuf.append('}');
String source = sourceBuf.toString();
int[] linep = new int[1];
String filename = Context.getSourcePositionFromStack(linep);
if (filename == null) {
filename = "<eval'ed string>";
linep[0] = 1;
}
String sourceName = ScriptRuntime.
makeUrlForGeneratedScript(false, filename, linep[0]);
Scriptable global = ScriptableObject.getTopLevelScope(scope);
// Compile the function with opt level of -1 to force interpreter
// mode.
int oldOptLevel = cx.getOptimizationLevel();
cx.setOptimizationLevel(-1);
NativeFunction fn;
try {
fn = (NativeFunction) cx.compileFunction(global, source,
sourceName, 1,
null);
}
finally { cx.setOptimizationLevel(oldOptLevel); }
ScriptRuntime.setFunctionProtoAndParent(global, fn);
return fn;
}
/**
* Function.prototype.apply and Function.prototype.call
*
* See Ecma 15.3.4.[34]
*/
private static Object applyOrCall(boolean isApply,
Context cx, Scriptable scope,
Scriptable thisObj, Object[] args)
throws JavaScriptException
{
int L = args.length;
Object function = thisObj.getDefaultValue(ScriptRuntime.FunctionClass);
Object callThis;
if (L == 0 || args[0] == null || args[0] == Undefined.instance) {
callThis = ScriptableObject.getTopLevelScope(scope);
} else {
callThis = ScriptRuntime.toObject(cx, scope, args[0]);
}
Object[] callArgs;
if (isApply) {
// Follow Ecma 15.3.4.3
if (L <= 1) {
callArgs = ScriptRuntime.emptyArgs;
} else {
Object arg1 = args[1];
if (arg1 == null || arg1 == Undefined.instance) {
callArgs = ScriptRuntime.emptyArgs;
} else if (arg1 instanceof NativeArray
|| arg1 instanceof Arguments)
{
callArgs = cx.getElements((Scriptable) arg1);
} else {
throw ScriptRuntime.typeError0("msg.arg.isnt.array");
}
}
} else {
// Follow Ecma 15.3.4.4
if (L <= 1) {
callArgs = ScriptRuntime.emptyArgs;
} else {
callArgs = new Object[L - 1];
System.arraycopy(args, 1, callArgs, 0, L - 1);
}
}
return ScriptRuntime.call(cx, function, callThis, callArgs, scope);
}
protected String getIdName(int id)
{
switch (id) {
case Id_length: return "length";
case Id_arity: return "arity";
case Id_name: return "name";
case Id_prototype: return "prototype";
case Id_arguments: return "arguments";
}
if (prototypeFlag) {
switch (id) {
case Id_constructor: return "constructor";
case Id_toString: return "toString";
case Id_apply: return "apply";
case Id_call: return "call";
}
}
return null;
}
// #string_id_map#
private static final int
Id_length = 1,
Id_arity = 2,
Id_name = 3,
Id_prototype = 4,
Id_arguments = 5,
MAX_INSTANCE_ID = 5;
{ setMaxId(MAX_INSTANCE_ID); }
protected int mapNameToId(String s)
{
int id;
// #generated# Last update: 2001-05-20 00:12:12 GMT+02:00
L0: { id = 0; String X = null; int c;
L: switch (s.length()) {
case 4: X="name";id=Id_name; break L;
case 5: X="arity";id=Id_arity; break L;
case 6: X="length";id=Id_length; break L;
case 9: c=s.charAt(0);
if (c=='a') { X="arguments";id=Id_arguments; }
else if (c=='p') { X="prototype";id=Id_prototype; }
break L;
}
if (X!=null && X!=s && !X.equals(s)) id = 0;
}
// #/generated#
// #/string_id_map#
if (id != 0 || !prototypeFlag) { return id; }
// #string_id_map#
// #generated# Last update: 2001-05-20 00:12:12 GMT+02:00
L0: { id = 0; String X = null;
L: switch (s.length()) {
case 4: X="call";id=Id_call; break L;
case 5: X="apply";id=Id_apply; break L;
case 8: X="toString";id=Id_toString; break L;
case 11: X="constructor";id=Id_constructor; break L;
}
if (X!=null && X!=s && !X.equals(s)) id = 0;
}
// #/generated#
return id;
}
private static final int
Id_constructor = MAX_INSTANCE_ID + 1,
Id_toString = MAX_INSTANCE_ID + 2,
Id_apply = MAX_INSTANCE_ID + 3,
Id_call = MAX_INSTANCE_ID + 4,
MAX_PROTOTYPE_ID = MAX_INSTANCE_ID + 4;
// #/string_id_map#
protected String functionName;
private Object prototypeProperty;
private boolean isPrototypePropertyImmune;
private boolean prototypeFlag;
}

View File

@@ -0,0 +1,63 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is interface specifiing callable object to execute script
* related code on demand.
*
* The Initial Developer of the Original Code is
* RUnit Software AS.
* Portions created by the Initial Developer are Copyright (C) 2003
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Igor Bukanov, igor@fastmail.fm
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
package org.mozilla.javascript;
/**
* Generic notion of callable object that can execute some script-related code
* upon request with specified values for script scope and this objects.
*/
public interface Callable
{
/**
* Perform the call.
*
* @param cx the current Context for this thread
* @param scope the scope to use to resolve properties.
* @param thisObj the JavaScript <code>this</code> object
* @param args the array of arguments
* @return the result of the call
* @exception JavaScriptException if an uncaught exception
* occurred while executing the function
*/
public Object call(Context cx, Scriptable scope, Scriptable thisObj,
Object[] args)
throws JavaScriptException;
}

View File

@@ -0,0 +1,199 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is cache holder of generated code for Java reflection
*
* The Initial Developer of the Original Code is
* RUnit Software AS.
* Portions created by the Initial Developer are Copyright (C) 2003
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Igor Bukanov, igor@fastmail.fm
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
package org.mozilla.javascript;
import java.io.*;
import java.util.Hashtable;
/**
* Cache of generated classes and data structures to access Java runtime
* from JavaScript.
*
* @author Igor Bukanov
*
* @since Rhino 1.5 Release 5
*/
public class ClassCache
{
private static final Object AKEY = new Object();
private volatile boolean cachingIsEnabled = true;
Hashtable classTable = new Hashtable();
boolean invokerOptimization = true;
Invoker invokerMaster;
Hashtable javaAdapterGeneratedClasses = new Hashtable();
Hashtable javaAdapterIFGlueMasters = new Hashtable();
private int generatedClassSerial;
/**
* Search for ClassCache object in the given scope.
* The method first calls
* {@link ScriptableObject#getTopLevelScope(Scriptable scope)}
* to get the top most scope and then tries to locate associated
* ClassCache object in the prototype chain of the top scope.
*
* @param scope scope to search for ClassCache object.
* @return previously associated ClassCache object or a new instance of
* ClassCache if no ClassCache object was found.
*
* @see #associate(ScriptableObject topScope)
*/
public static ClassCache get(Scriptable scope)
{
scope = ScriptableObject.getTopLevelScope(scope);
Scriptable obj = scope;
do {
if (obj instanceof ScriptableObject) {
ScriptableObject so = (ScriptableObject)obj;
ClassCache lc = (ClassCache)so.getAssociatedValue(AKEY);
if (lc != null) {
return lc;
}
}
obj = obj.getPrototype();
} while (obj != null);
// ALERT: warn somehow about wrong cache usage ?
return new ClassCache();
}
/**
* Associate ClassCache object with the given top-level scope.
* The ClassCache object can only be associated with the given scope once.
*
* @param topScope scope to associate this ClassCache object with.
* @return true if no prevous ClassCache objects were embedded into
* the scope and this ClassCache were successfully associated
* or false otherwise.
*
* @see #get(Scriptable scope)
*/
public boolean associate(ScriptableObject topScope)
{
if (topScope.getParentScope() != null) {
// Can only associate cache with top level scope
throw new IllegalArgumentException();
}
return this != topScope.associateValue(AKEY, this);
}
/**
* Empty caches of generated Java classes and Java reflection information.
*/
public synchronized void clearCaches()
{
classTable = new Hashtable();
javaAdapterGeneratedClasses = new Hashtable();
javaAdapterIFGlueMasters = new Hashtable();
Invoker im = invokerMaster;
if (im != null) {
im.clearMasterCaches();
}
}
/**
* Check if generated Java classes and Java reflection information
* is cached.
*/
public final boolean isCachingEnabled()
{
return cachingIsEnabled;
}
/**
* Set whether to cache some values.
* <p>
* By default, the engine will cache generated classes and
* results of <tt>Class.getMethods()</tt> and similar calls.
* This can speed execution dramatically, but increases the memory
* footprint. Also, with caching enabled, references may be held to
* objects past the lifetime of any real usage.
* <p>
* If caching is enabled and this method is called with a
* <code>false</code> argument, the caches will be emptied.
* <p>
* Caching is enabled by default.
*
* @param cachingEnabled if true, caching is enabled
*
* @see #clearCaches()
*/
public synchronized void setCachingEnabled(boolean enabled)
{
if (enabled == cachingIsEnabled)
return;
if (!enabled)
clearCaches();
cachingIsEnabled = enabled;
}
/**
* To optimize invocation of reflected Java methods, the engine generates
* special glue classes that will call the methods directly. By default
* the optimization is enabled since it allows to speedup method invocation
* compared with calling <tt>Method.invoke</tt> by factor 2-2.5 under JDK
* 1.4.2 and by factor 10-15 under JDK 1.3.1. If increase memory
* consumption is too high or the optimization brings no benefits in a
* particular VM, then the optimization can be disabled.
*
* @param enabled if true, invoke optimization is enabled.
*/
public synchronized void setInvokerOptimizationEnabled(boolean enabled)
{
if (invokerOptimization == enabled)
return;
if (!enabled)
invokerMaster = null;
invokerOptimization = enabled;
}
/**
* Internal engine method to return serial number for generated classes
* to ensure name uniqueness.
*/
public final synchronized int newClassSerialNumber()
{
return ++generatedClassSerial;
}
}

View File

@@ -0,0 +1,48 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
// API class
package org.mozilla.javascript;
/**
* Thrown if errors are detected while attempting to define a host object
* from a Java class.
*/
public class ClassDefinitionException extends Exception {
public ClassDefinitionException(String detail) {
super(detail);
}
}

View File

@@ -0,0 +1,142 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Roger Lawrence
* Andi Vajda
* Kemal Bayram
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.io.*;
public abstract class ClassNameHelper {
public static ClassNameHelper get(Context cx) {
ClassNameHelper helper = savedNameHelper;
if (helper == null && !helperNotAvailable) {
Class nameHelperClass = Kit.classOrNull(
"org.mozilla.javascript.optimizer.OptClassNameHelper");
// nameHelperClass == null if running lite
if (nameHelperClass != null) {
helper = (ClassNameHelper)Kit.newInstanceOrNull(
nameHelperClass);
}
if (helper != null) {
savedNameHelper = helper;
} else {
helperNotAvailable = true;
}
}
return helper;
}
/**
* Get the current target class file name.
* <p>
* If nonnull, requests to compile source will result in one or
* more class files being generated.
*
* @since 1.5 Release 4
*/
public abstract String getTargetClassFileName();
/**
* Set the current target class file name.
* <p>
* If nonnull, requests to compile source will result in one or
* more class files being generated. If null, classes will only
* be generated in memory.
*
* @since 1.5 Release 4
*/
public abstract void setTargetClassFileName(String classFileName);
/**
* Get the current package to generate classes into.
*/
public abstract String getTargetPackage();
/**
* Set the package to generate classes into.
*/
public abstract void setTargetPackage(String targetPackage);
/**
* Set the class that the generated target will extend.
*
* @param extendsClass the class it extends
*/
public abstract void setTargetExtends(Class extendsClass);
/**
* Set the interfaces that the generated target will implement.
*
* @param implementsClasses an array of Class objects, one for each
* interface the target will extend
*/
public abstract void setTargetImplements(Class[] implementsClasses);
/**
* Get the current class repository.
*
* @see ClassRepository
* @since 30/10/01 tip + patch (Kemal Bayram)
*/
public abstract ClassRepository getClassRepository();
/**
* Set the current class repository.
*
* @see ClassRepository
* @since 30/10/01 tip + patch (Kemal Bayram)
*/
public abstract void setClassRepository(ClassRepository repository);
/**
* Get the current class name.
*
* @since 30/10/01 tip + patch (Kemal Bayram)
*/
public abstract String getClassName();
/**
* Set the current class name.
*
* @since 30/10/01 tip + patch (Kemal Bayram)
*/
public abstract void setClassName(String initialName);
private static ClassNameHelper savedNameHelper;
private static boolean helperNotAvailable;
}

View File

@@ -0,0 +1,55 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Kemal Bayram
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.io.*;
/**
* This interface provides a means to store generated class and to
* allow selective class loading.
*
* @see ClassNameHelper
* @author Kemal Bayram
*/
public interface ClassRepository {
/**
* @param className the name of the class.
* @param classBytes a byte array of the generated class.
* @param isTopLevel if true, represents the top-level script being compiled.
* @return true if the class should be loaded, false otherwise.
*/
public boolean storeClass(String className, byte[] classBytes,
boolean isTopLevel) throws IOException;
}

View File

@@ -0,0 +1,86 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Igor Bukanov
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
// API class
package org.mozilla.javascript;
/**
Embeddings that wish to filter Java classes that are visible to scripts
through the LiveConnect, should implement this interface.
@see Context#setClassShutter(ClassShutter)
@since 1.5 Release 4
@author Norris Boyd
*/
public interface ClassShutter {
/**
* Return true iff the Java class with the given name should be exposed
* to scripts.
* <p>
* An embedding may filter which Java classes are exposed through
* LiveConnect to JavaScript scripts.
* <p>
* Due to the fact that there is no package reflection in Java,
* this method will also be called with package names. There
* is no way for Rhino to tell if "Packages.a.b" is a package name
* or a class that doesn't exist. What Rhino does is attempt
* to load each segment of "Packages.a.b.c": It first attempts to
* load class "a", then attempts to load class "a.b", then
* finally attempts to load class "a.b.c". On a Rhino installation
* without any ClassShutter set, and without any of the
* above classes, the expression "Packages.a.b.c" will result in
* a [JavaPackage a.b.c] and not an error.
* <p>
* With ClassShutter supplied, Rhino will first call
* visibleToScripts before attempting to look up the class name. If
* visibleToScripts returns false, the class name lookup is not
* performed and subsequent Rhino execution assumes the class is
* not present. So for "java.lang.System.out.println" the lookup
* of "java.lang.System" is skipped and thus Rhino assumes that
* "java.lang.System" doesn't exist. So then for "java.lang.System.out",
* Rhino attempts to load the class "java.lang.System.out" because
* it assumes that "java.lang.System" is a package name.
* <p>
* @param fullClassName the full name of the class (including the package
* name, with '.' as a delimiter). For example the
* standard string class is "java.lang.String"
* @return whether or not to reveal this class to scripts
*/
public boolean visibleToScripts(String fullClassName);
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,53 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
// API class
package org.mozilla.javascript;
/**
* Embeddings that wish to
* @see org.mozilla.javascript.Context#addContextListener
*/
public interface ContextListener {
public void contextCreated(Context cx);
public void contextEntered(Context cx);
public void contextExited(Context cx);
public void contextReleased(Context cx);
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,892 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Mike Ang
* Igor Bukanov
* Mike McCabe
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
/**
* The following class save decompilation information about the source.
* Source information is returned from the parser as a String
* associated with function nodes and with the toplevel script. When
* saved in the constant pool of a class, this string will be UTF-8
* encoded, and token values will occupy a single byte.
* Source is saved (mostly) as token numbers. The tokens saved pretty
* much correspond to the token stream of a 'canonical' representation
* of the input program, as directed by the parser. (There were a few
* cases where tokens could have been left out where decompiler could
* easily reconstruct them, but I left them in for clarity). (I also
* looked adding source collection to TokenStream instead, where I
* could have limited the changes to a few lines in getToken... but
* this wouldn't have saved any space in the resulting source
* representation, and would have meant that I'd have to duplicate
* parser logic in the decompiler to disambiguate situations where
* newlines are important.) The function decompile expands the
* tokens back into their string representations, using simple
* lookahead to correct spacing and indentation.
*
* Assignments are saved as two-token pairs (Token.ASSIGN, op). Number tokens
* are stored inline, as a NUMBER token, a character representing the type, and
* either 1 or 4 characters representing the bit-encoding of the number. String
* types NAME, STRING and OBJECT are currently stored as a token type,
* followed by a character giving the length of the string (assumed to
* be less than 2^16), followed by the characters of the string
* inlined into the source string. Changing this to some reference to
* to the string in the compiled class' constant pool would probably
* save a lot of space... but would require some method of deriving
* the final constant pool entry from information available at parse
* time.
*/
public class Decompiler
{
/**
* Flag to indicate that the decompilation should omit the
* function header and trailing brace.
*/
public static final int ONLY_BODY_FLAG = 1 << 0;
/**
* Flag to indicate that the decompilation generates toSource result.
*/
public static final int TO_SOURCE_FLAG = 1 << 1;
/**
* Decompilation property to specify initial ident value.
*/
public static final int INITIAL_INDENT_PROP = 1;
/**
* Decompilation property to specify default identation offset.
*/
public static final int INDENT_GAP_PROP = 2;
/**
* Decompilation property to specify identation offset for case labels.
*/
public static final int CASE_GAP_PROP = 3;
// Marker to denote the last RC of function so it can be distinguished from
// the last RC of object literals in case of function expressions
private static final int FUNCTION_END = Token.LAST_TOKEN + 1;
String getEncodedSource()
{
return sourceToString(0);
}
int getCurrentOffset()
{
return sourceTop;
}
int markFunctionStart(int functionType, String name)
{
int savedOffset = getCurrentOffset();
addToken(Token.FUNCTION);
append((char)functionType);
if (name.length() != 0) {
addName(name);
}
return savedOffset;
}
int markFunctionEnd(int functionStart)
{
int offset = getCurrentOffset();
append((char)FUNCTION_END);
return offset;
}
void addToken(int token)
{
if (!(0 <= token && token <= Token.LAST_TOKEN))
throw new IllegalArgumentException();
append((char)token);
}
void addEOL(int token)
{
if (!(0 <= token && token <= Token.LAST_TOKEN))
throw new IllegalArgumentException();
append((char)token);
append((char)Token.EOL);
}
void addAssignOp(int op)
{
if (!(0 <= op && op <= Token.LAST_TOKEN))
throw new IllegalArgumentException();
append((char)Token.ASSIGNOP);
append((char)op);
}
void addName(String str)
{
addToken(Token.NAME);
appendString(str);
}
void addString(String str)
{
addToken(Token.STRING);
appendString(str);
}
void addRegexp(String regexp, String flags)
{
addToken(Token.REGEXP);
appendString('/' + regexp + '/' + flags);
}
void addNumber(double n)
{
addToken(Token.NUMBER);
/* encode the number in the source stream.
* Save as NUMBER type (char | char char char char)
* where type is
* 'D' - double, 'S' - short, 'J' - long.
* We need to retain float vs. integer type info to keep the
* behavior of liveconnect type-guessing the same after
* decompilation. (Liveconnect tries to present 1.0 to Java
* as a float/double)
* OPT: This is no longer true. We could compress the format.
* This may not be the most space-efficient encoding;
* the chars created below may take up to 3 bytes in
* constant pool UTF-8 encoding, so a Double could take
* up to 12 bytes.
*/
long lbits = (long)n;
if (lbits != n) {
// if it's floating point, save as a Double bit pattern.
// (12/15/97 our scanner only returns Double for f.p.)
lbits = Double.doubleToLongBits(n);
append('D');
append((char)(lbits >> 48));
append((char)(lbits >> 32));
append((char)(lbits >> 16));
append((char)lbits);
}
else {
// we can ignore negative values, bc they're already prefixed
// by NEG
if (lbits < 0) Kit.codeBug();
// will it fit in a char?
// this gives a short encoding for integer values up to 2^16.
if (lbits <= Character.MAX_VALUE) {
append('S');
append((char)lbits);
}
else { // Integral, but won't fit in a char. Store as a long.
append('J');
append((char)(lbits >> 48));
append((char)(lbits >> 32));
append((char)(lbits >> 16));
append((char)lbits);
}
}
}
private void appendString(String str)
{
int L = str.length();
int lengthEncodingSize = 1;
if (L >= 0x8000) {
lengthEncodingSize = 2;
}
int nextTop = sourceTop + lengthEncodingSize + L;
if (nextTop > sourceBuffer.length) {
increaseSourceCapacity(nextTop);
}
if (L >= 0x8000) {
// Use 2 chars to encode strings exceeding 32K, were the highest
// bit in the first char indicates presence of the next byte
sourceBuffer[sourceTop] = (char)(0x8000 | (L >>> 16));
++sourceTop;
}
sourceBuffer[sourceTop] = (char)L;
++sourceTop;
str.getChars(0, L, sourceBuffer, sourceTop);
sourceTop = nextTop;
}
private void append(char c)
{
if (sourceTop == sourceBuffer.length) {
increaseSourceCapacity(sourceTop + 1);
}
sourceBuffer[sourceTop] = c;
++sourceTop;
}
private void increaseSourceCapacity(int minimalCapacity)
{
// Call this only when capacity increase is must
if (minimalCapacity <= sourceBuffer.length) Kit.codeBug();
int newCapacity = sourceBuffer.length * 2;
if (newCapacity < minimalCapacity) {
newCapacity = minimalCapacity;
}
char[] tmp = new char[newCapacity];
System.arraycopy(sourceBuffer, 0, tmp, 0, sourceTop);
sourceBuffer = tmp;
}
private String sourceToString(int offset)
{
if (offset < 0 || sourceTop < offset) Kit.codeBug();
return new String(sourceBuffer, offset, sourceTop - offset);
}
/**
* Decompile the source information associated with this js
* function/script back into a string. For the most part, this
* just means translating tokens back to their string
* representations; there's a little bit of lookahead logic to
* decide the proper spacing/indentation. Most of the work in
* mapping the original source to the prettyprinted decompiled
* version is done by the parser.
*
* @param source encoded source tree presentation
*
* @param flags flags to select output format
*
* @param properties indentation properties
*
*/
public static String decompile(String source, int flags,
UintMap properties)
{
int length = source.length();
if (length == 0) { return ""; }
int indent = properties.getInt(INITIAL_INDENT_PROP, 0);
if (indent < 0) Kit.badArg();
int indentGap = properties.getInt(INDENT_GAP_PROP, 4);
if (indentGap < 0) Kit.badArg();
int caseGap = properties.getInt(CASE_GAP_PROP, 2);
if (caseGap < 0) Kit.badArg();
StringBuffer result = new StringBuffer();
boolean justFunctionBody = (0 != (flags & Decompiler.ONLY_BODY_FLAG));
boolean toSource = (0 != (flags & Decompiler.TO_SOURCE_FLAG));
// Spew tokens in source, for debugging.
// as TYPE number char
if (printSource) {
System.err.println("length:" + length);
for (int i = 0; i < length; ++i) {
// Note that tokenToName will fail unless Context.printTrees
// is true.
String tokenname = null;
if (Token.printNames) {
tokenname = Token.name(source.charAt(i));
}
if (tokenname == null) {
tokenname = "---";
}
String pad = tokenname.length() > 7
? "\t"
: "\t\t";
System.err.println
(tokenname
+ pad + (int)source.charAt(i)
+ "\t'" + ScriptRuntime.escapeString
(source.substring(i, i+1))
+ "'");
}
System.err.println();
}
int braceNesting = 0;
boolean afterFirstEOL = false;
int i = 0;
int topFunctionType;
if (source.charAt(i) == Token.SCRIPT) {
++i;
topFunctionType = -1;
} else {
topFunctionType = source.charAt(i + 1);
}
if (!toSource) {
// add an initial newline to exactly match js.
result.append('\n');
for (int j = 0; j < indent; j++)
result.append(' ');
} else {
if (topFunctionType == FunctionNode.FUNCTION_EXPRESSION) {
result.append('(');
}
}
while (i < length) {
switch(source.charAt(i)) {
case Token.NAME:
case Token.REGEXP: // re-wrapped in '/'s in parser...
i = printSourceString(source, i + 1, false, result);
continue;
case Token.STRING:
i = printSourceString(source, i + 1, true, result);
continue;
case Token.NUMBER:
i = printSourceNumber(source, i + 1, result);
continue;
case Token.TRUE:
result.append("true");
break;
case Token.FALSE:
result.append("false");
break;
case Token.NULL:
result.append("null");
break;
case Token.THIS:
result.append("this");
break;
case Token.FUNCTION:
++i; // skip function type
result.append("function ");
break;
case FUNCTION_END:
// Do nothing
break;
case Token.COMMA:
result.append(", ");
break;
case Token.LC:
++braceNesting;
if (Token.EOL == getNext(source, length, i))
indent += indentGap;
result.append('{');
break;
case Token.RC: {
--braceNesting;
/* don't print the closing RC if it closes the
* toplevel function and we're called from
* decompileFunctionBody.
*/
if (justFunctionBody && braceNesting == 0)
break;
result.append('}');
switch (getNext(source, length, i)) {
case Token.EOL:
case FUNCTION_END:
indent -= indentGap;
break;
case Token.WHILE:
case Token.ELSE:
indent -= indentGap;
result.append(' ');
break;
}
break;
}
case Token.LP:
result.append('(');
break;
case Token.RP:
result.append(')');
if (Token.LC == getNext(source, length, i))
result.append(' ');
break;
case Token.LB:
result.append('[');
break;
case Token.RB:
result.append(']');
break;
case Token.EOL: {
if (toSource) break;
boolean newLine = true;
if (!afterFirstEOL) {
afterFirstEOL = true;
if (justFunctionBody) {
/* throw away just added 'function name(...) {'
* and restore the original indent
*/
result.setLength(0);
indent -= indentGap;
newLine = false;
}
}
if (newLine) {
result.append('\n');
}
/* add indent if any tokens remain,
* less setback if next token is
* a label, case or default.
*/
if (i + 1 < length) {
int less = 0;
int nextToken = source.charAt(i + 1);
if (nextToken == Token.CASE
|| nextToken == Token.DEFAULT)
{
less = indentGap - caseGap;
} else if (nextToken == Token.RC) {
less = indentGap;
}
/* elaborate check against label... skip past a
* following inlined NAME and look for a COLON.
*/
else if (nextToken == Token.NAME) {
int afterName = getSourceStringEnd(source, i + 2);
if (source.charAt(afterName) == Token.COLON)
less = indentGap;
}
for (; less < indent; less++)
result.append(' ');
}
break;
}
case Token.DOT:
result.append('.');
break;
case Token.NEW:
result.append("new ");
break;
case Token.DELPROP:
result.append("delete ");
break;
case Token.IF:
result.append("if ");
break;
case Token.ELSE:
result.append("else ");
break;
case Token.FOR:
result.append("for ");
break;
case Token.IN:
result.append(" in ");
break;
case Token.WITH:
result.append("with ");
break;
case Token.WHILE:
result.append("while ");
break;
case Token.DO:
result.append("do ");
break;
case Token.TRY:
result.append("try ");
break;
case Token.CATCH:
result.append("catch ");
break;
case Token.FINALLY:
result.append("finally ");
break;
case Token.THROW:
result.append("throw ");
break;
case Token.SWITCH:
result.append("switch ");
break;
case Token.BREAK:
result.append("break");
if (Token.NAME == getNext(source, length, i))
result.append(' ');
break;
case Token.CONTINUE:
result.append("continue");
if (Token.NAME == getNext(source, length, i))
result.append(' ');
break;
case Token.CASE:
result.append("case ");
break;
case Token.DEFAULT:
result.append("default");
break;
case Token.RETURN:
result.append("return");
if (Token.SEMI != getNext(source, length, i))
result.append(' ');
break;
case Token.VAR:
result.append("var ");
break;
case Token.SEMI:
result.append(';');
if (Token.EOL != getNext(source, length, i)) {
// separators in FOR
result.append(' ');
}
break;
case Token.ASSIGN:
result.append(" = ");
break;
case Token.ASSIGNOP:
++i;
switch (source.charAt(i)) {
case Token.ADD:
result.append(" += ");
break;
case Token.SUB:
result.append(" -= ");
break;
case Token.MUL:
result.append(" *= ");
break;
case Token.DIV:
result.append(" /= ");
break;
case Token.MOD:
result.append(" %= ");
break;
case Token.BITOR:
result.append(" |= ");
break;
case Token.BITXOR:
result.append(" ^= ");
break;
case Token.BITAND:
result.append(" &= ");
break;
case Token.LSH:
result.append(" <<= ");
break;
case Token.RSH:
result.append(" >>= ");
break;
case Token.URSH:
result.append(" >>>= ");
break;
}
break;
case Token.HOOK:
result.append(" ? ");
break;
case Token.OBJLIT:
// pun OBJLIT to mean colon in objlit property initialization.
// this needs to be distinct from COLON in the general case
// to distinguish from the colon in a ternary... which needs
// different spacing.
result.append(':');
break;
case Token.COLON:
if (Token.EOL == getNext(source, length, i))
// it's the end of a label
result.append(':');
else
// it's the middle part of a ternary
result.append(" : ");
break;
case Token.OR:
result.append(" || ");
break;
case Token.AND:
result.append(" && ");
break;
case Token.BITOR:
result.append(" | ");
break;
case Token.BITXOR:
result.append(" ^ ");
break;
case Token.BITAND:
result.append(" & ");
break;
case Token.SHEQ:
result.append(" === ");
break;
case Token.SHNE:
result.append(" !== ");
break;
case Token.EQ:
result.append(" == ");
break;
case Token.NE:
result.append(" != ");
break;
case Token.LE:
result.append(" <= ");
break;
case Token.LT:
result.append(" < ");
break;
case Token.GE:
result.append(" >= ");
break;
case Token.GT:
result.append(" > ");
break;
case Token.INSTANCEOF:
result.append(" instanceof ");
break;
case Token.LSH:
result.append(" << ");
break;
case Token.RSH:
result.append(" >> ");
break;
case Token.URSH:
result.append(" >>> ");
break;
case Token.TYPEOF:
result.append("typeof ");
break;
case Token.VOID:
result.append("void ");
break;
case Token.NOT:
result.append('!');
break;
case Token.BITNOT:
result.append('~');
break;
case Token.POS:
result.append('+');
break;
case Token.NEG:
result.append('-');
break;
case Token.INC:
result.append("++");
break;
case Token.DEC:
result.append("--");
break;
case Token.ADD:
result.append(" + ");
break;
case Token.SUB:
result.append(" - ");
break;
case Token.MUL:
result.append(" * ");
break;
case Token.DIV:
result.append(" / ");
break;
case Token.MOD:
result.append(" % ");
break;
default:
// If we don't know how to decompile it, raise an exception.
throw new RuntimeException();
}
++i;
}
if (!toSource) {
// add that trailing newline if it's an outermost function.
if (!justFunctionBody)
result.append('\n');
} else {
if (topFunctionType == FunctionNode.FUNCTION_EXPRESSION) {
result.append(')');
}
}
return result.toString();
}
private static int getNext(String source, int length, int i)
{
return (i + 1 < length) ? source.charAt(i + 1) : Token.EOF;
}
private static int getSourceStringEnd(String source, int offset)
{
return printSourceString(source, offset, false, null);
}
private static int printSourceString(String source, int offset,
boolean asQuotedString,
StringBuffer sb)
{
int length = source.charAt(offset);
++offset;
if ((0x8000 & length) != 0) {
length = ((0x7FFF & length) << 16) | source.charAt(offset);
++offset;
}
if (sb != null) {
String str = source.substring(offset, offset + length);
if (!asQuotedString) {
sb.append(str);
} else {
sb.append('"');
sb.append(ScriptRuntime.escapeString(str));
sb.append('"');
}
}
return offset + length;
}
private static int printSourceNumber(String source, int offset,
StringBuffer sb)
{
double number = 0.0;
char type = source.charAt(offset);
++offset;
if (type == 'S') {
if (sb != null) {
int ival = source.charAt(offset);
number = ival;
}
++offset;
} else if (type == 'J' || type == 'D') {
if (sb != null) {
long lbits;
lbits = (long)source.charAt(offset) << 48;
lbits |= (long)source.charAt(offset + 1) << 32;
lbits |= (long)source.charAt(offset + 2) << 16;
lbits |= (long)source.charAt(offset + 3);
if (type == 'J') {
number = lbits;
} else {
number = Double.longBitsToDouble(lbits);
}
}
offset += 4;
} else {
// Bad source
throw new RuntimeException();
}
if (sb != null) {
sb.append(ScriptRuntime.numberToString(number, 10));
}
return offset;
}
private char[] sourceBuffer = new char[128];
// Per script/function source buffer top: parent source does not include a
// nested functions source and uses function index as a reference instead.
private int sourceTop;
// whether to do a debug print of the source information, when decompiling.
private static final boolean printSource = false;
}

View File

@@ -0,0 +1,65 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
/**
* This is the default error reporter for JavaScript.
*
* @author Norris Boyd
*/
class DefaultErrorReporter implements ErrorReporter {
public void warning(String message, String sourceName, int line,
String lineSource, int lineOffset)
{
// do nothing
}
public void error(String message, String sourceName, int line,
String lineSource, int lineOffset)
{
throw new EvaluatorException(message, sourceName, line,
lineSource, lineOffset);
}
public EvaluatorException runtimeError(String message, String sourceName,
int line, String lineSource,
int lineOffset)
{
throw new EvaluatorException(message, sourceName, line,
lineSource, lineOffset);
}
}

View File

@@ -0,0 +1,84 @@
/*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Roger Lawrence
* Patrick Beard
* Igor Bukanov
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.lang.reflect.Method;
/**
* Load generated classes.
*
* @author Norris Boyd
*/
public class DefiningClassLoader extends ClassLoader
implements GeneratedClassLoader
{
public DefiningClassLoader() {
this.parentLoader = getClass().getClassLoader();
}
public DefiningClassLoader(ClassLoader parentLoader) {
this.parentLoader = parentLoader;
}
public Class defineClass(String name, byte[] data) {
return super.defineClass(name, data, 0, data.length);
}
public void linkClass(Class cl) {
resolveClass(cl);
}
public Class loadClass(String name, boolean resolve)
throws ClassNotFoundException
{
Class cl = findLoadedClass(name);
if (cl == null) {
if (parentLoader != null) {
cl = parentLoader.loadClass(name);
} else {
cl = findSystemClass(name);
}
}
if (resolve) {
resolveClass(cl);
}
return cl;
}
private ClassLoader parentLoader;
}

View File

@@ -0,0 +1,264 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations
* under the License.
*
* The Original Code is Delegator.java, released Sep 27, 2000.
*
* The Initial Developer of the Original Code is Matthias Radestock.
* <matthias@sorted.org>. Portions created by Matthias Radestock are
* Copyright (C) 2000 Matthias Radestock. All Rights Reserved.
*
* Contributor(s):
* Redfig Ltd (http://www.redfig.com)
* LShift Ltd (http://www.lshift.net)
*
* Alternatively, the contents of this file may be used under the terms
* of the GNU Public License (the "GPL License"), in which case the
* provisions of the GPL License are applicable instead of those
* above. If you wish to allow use of your version of this file only
* under the terms of the GPL License and not to allow others to use
* your version of this file under the MPL, indicate your decision by
* deleting the provisions above and replace them with the notice and
* other provisions required by the GPL License. If you do not delete
* the provisions above, a recipient may use your version of this file
* under either the MPL or the GPL License.
*/
// API class
package org.mozilla.javascript;
/**
* This is a helper class for implementing wrappers around Scriptable
* objects. It implements the Function interface and delegates all
* invocations to a delegee Scriptable object. The normal use of this
* class involves creating a sub-class and overriding one or more of
* the methods.
*
* A useful application is the implementation of interceptors,
* pre/post conditions, debugging.
*
* @see Function
* @see Scriptable
* @author Matthias Radestock
*/
public class Delegator implements Function {
protected Scriptable obj = null;
/**
* Create a Delegator prototype.
*
* This constructor should only be used for creating prototype
* objects of Delegator.
*
* @see org.mozilla.javascript.Delegator#construct
*/
public Delegator() {
}
/**
* Create a new Delegator that forwards requests to a delegee
* Scriptable object.
*
* @param obj the delegee
* @see org.mozilla.javascript.Scriptable
*/
public Delegator(Scriptable obj) {
this.obj = obj;
}
/**
* Crete new Delegator instance.
* The default implementation calls this.getClass().newInstance().
*
* @see #construct(Context cx, Scriptable scope, Object[] args)
*/
protected Delegator newInstance()
{
try {
return (Delegator)this.getClass().newInstance();
} catch (Exception ex) {
throw ScriptRuntime.throwAsUncheckedException(ex);
}
}
/**
* Retrieve the delegee.
*
* @return the delegee
*/
public Scriptable getDelegee() {
return obj;
}
/**
* Set the delegee.
*
* @param obj the delegee
* @see org.mozilla.javascript.Scriptable
*/
public void setDelegee(Scriptable obj) {
this.obj = obj;
}
/**
* @see org.mozilla.javascript.Scriptable#getClassName
*/
public String getClassName() {
return obj.getClassName();
}
/**
* @see org.mozilla.javascript.Scriptable#get
*/
public Object get(String name, Scriptable start) {
return obj.get(name,start);
}
/**
* @see org.mozilla.javascript.Scriptable#get
*/
public Object get(int index, Scriptable start) {
return obj.get(index,start);
}
/**
* @see org.mozilla.javascript.Scriptable#has
*/
public boolean has(String name, Scriptable start) {
return obj.has(name,start);
}
/**
* @see org.mozilla.javascript.Scriptable#has
*/
public boolean has(int index, Scriptable start) {
return obj.has(index,start);
}
/**
* @see org.mozilla.javascript.Scriptable#put
*/
public void put(String name, Scriptable start, Object value) {
obj.put(name,start,value);
}
/**
* @see org.mozilla.javascript.Scriptable#put
*/
public void put(int index, Scriptable start, Object value) {
obj.put(index,start,value);
}
/**
* @see org.mozilla.javascript.Scriptable#delete
*/
public void delete(String name) {
obj.delete(name);
}
/**
* @see org.mozilla.javascript.Scriptable#delete
*/
public void delete(int index) {
obj.delete(index);
}
/**
* @see org.mozilla.javascript.Scriptable#getPrototype
*/
public Scriptable getPrototype() {
return obj.getPrototype();
}
/**
* @see org.mozilla.javascript.Scriptable#setPrototype
*/
public void setPrototype(Scriptable prototype) {
obj.setPrototype(prototype);
}
/**
* @see org.mozilla.javascript.Scriptable#getParentScope
*/
public Scriptable getParentScope() {
return obj.getParentScope();
}
/**
* @see org.mozilla.javascript.Scriptable#setParentScope
*/
public void setParentScope(Scriptable parent) {
obj.setParentScope(parent);
}
/**
* @see org.mozilla.javascript.Scriptable#getIds
*/
public Object[] getIds() {
return obj.getIds();
}
/**
* Note that this method does not get forwarded to the delegee if
* the <code>hint</code> parameter is null,
* <code>ScriptRuntime.ScriptableClass</code> or
* <code>ScriptRuntime.FunctionClass</code>. Instead the object
* itself is returned.
*
* @param hint the type hint
* @return the default value
*
* @see org.mozilla.javascript.Scriptable#getDefaultValue
*/
public Object getDefaultValue(Class hint) {
return (hint == null ||
hint == ScriptRuntime.ScriptableClass ||
hint == ScriptRuntime.FunctionClass) ?
this : obj.getDefaultValue(hint);
}
/**
* @see org.mozilla.javascript.Scriptable#hasInstance
*/
public boolean hasInstance(Scriptable instance) {
return obj.hasInstance(instance);
}
/**
* @see org.mozilla.javascript.Function#call
*/
public Object call(Context cx, Scriptable scope, Scriptable thisObj,
Object[] args)
throws JavaScriptException {
return ((Function)obj).call(cx,scope,thisObj,args);
}
/**
* Note that if the <code>delegee</code> is <code>null</code>,
* this method creates a new instance of the Delegator itself
* rathert than forwarding the call to the
* <code>delegee</code>. This permits the use of Delegator
* prototypes.
*
* @param cx the current Context for this thread
* @param scope an enclosing scope of the caller except
* when the function is called from a closure.
* @param args the array of arguments
* @return the allocated object
* @exception JavaScriptException if an uncaught exception
* occurred while executing the constructor
*
* @see org.mozilla.javascript.Function#construct
*/
public Scriptable construct(Context cx, Scriptable scope, Object[] args)
throws JavaScriptException {
if (obj == null) {
//this little trick allows us to declare prototype objects for
//Delegators
Delegator n = newInstance();
Scriptable delegee;
if (args.length == 0) {
delegee = Undefined.instance;
} else {
delegee = ScriptRuntime.toObject(cx, scope, args[0]);
}
n.setDelegee(delegee);
return n;
}
else {
return ((Function)obj).construct(cx,scope,args);
}
}
}

View File

@@ -0,0 +1,180 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Roger Lawrence
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
// API class
package org.mozilla.javascript;
/**
* The class of exceptions raised by the engine as described in
* ECMA edition 3. See section 15.11.6 in particular.
*/
public class EcmaError extends RuntimeException
{
/**
* Create an exception with the specified detail message.
*
* Errors internal to the JavaScript engine will simply throw a
* RuntimeException.
*
* @param sourceName the name of the source reponsible for the error
* @param lineNumber the line number of the source
* @param columnNumber the columnNumber of the source (may be zero if
* unknown)
* @param lineSource the source of the line containing the error (may be
* null if unknown)
*/
EcmaError(String errorName, String errorMessage,
String sourceName, int lineNumber,
String lineSource, int columnNumber)
{
super("EcmaError: "+errorName+": "+errorMessage);
this.errorName = errorName;
this.errorMessage = errorMessage;
this.sourceName = sourceName;
this.lineNumber = lineNumber;
this.lineSource = lineSource;
this.columnNumber = columnNumber;
}
/**
* @deprecated EcmaError error instances should not be constructed
* explicitly since they are generated by the engine.
*/
public EcmaError(Scriptable nativeError, String sourceName,
int lineNumber, int columnNumber, String lineSource)
{
this("InternalError", ScriptRuntime.toString(nativeError),
sourceName, lineNumber, lineSource, columnNumber);
}
/**
* Return a string representation of the error, which currently consists
* of the name of the error together with the message.
*/
public String toString()
{
StringBuffer buf = new StringBuffer();
buf.append(errorName);
buf.append(": ");
buf.append(errorMessage);
if (sourceName != null || lineNumber > 0) {
buf.append(" (");
if (sourceName != null) {
buf.append(sourceName);
buf.append("; ");
}
if (lineNumber > 0) {
buf.append("line ");
buf.append(lineNumber);
}
buf.append(')');
}
return buf.toString();
}
/**
* Gets the name of the error.
*
* ECMA edition 3 defines the following
* errors: EvalError, RangeError, ReferenceError,
* SyntaxError, TypeError, and URIError. Additional error names
* may be added in the future.
*
* See ECMA edition 3, 15.11.7.9.
*
* @return the name of the error.
*/
public String getName() {
return errorName;
}
/**
* Gets the message corresponding to the error.
*
* See ECMA edition 3, 15.11.7.10.
*
* @return an implemenation-defined string describing the error.
*/
public String getMessage() {
return errorMessage;
}
/**
* Get the name of the source containing the error, or null
* if that information is not available.
*/
public String getSourceName() {
return sourceName;
}
/**
* Returns the line number of the statement causing the error,
* or zero if not available.
*/
public int getLineNumber() {
return lineNumber;
}
/**
* The column number of the location of the error, or zero if unknown.
*/
public int getColumnNumber() {
return columnNumber;
}
/**
* The source of the line causing the error, or zero if unknown.
*/
public String getLineSource() {
return lineSource;
}
/**
* @deprecated Always returns result of {@link Context#getUndefinedValue()}.
*
*/
public Scriptable getErrorObject()
{
return Undefined.instance;
}
private String errorName;
private String errorMessage;
private String sourceName;
private int lineNumber;
private int columnNumber;
private String lineSource;
}

View File

@@ -0,0 +1,103 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
// API class
package org.mozilla.javascript;
/**
* This is interface defines a protocol for the reporting of
* errors during JavaScript translation or execution.
*
* @author Norris Boyd
*/
public interface ErrorReporter {
/**
* Report a warning.
*
* The implementing class may choose to ignore the warning
* if it desires.
*
* @param message a String describing the warning
* @param sourceName a String describing the JavaScript source
* where the warning occured; typically a filename or URL
* @param line the line number associated with the warning
* @param lineSource the text of the line (may be null)
* @param lineOffset the offset into lineSource where problem was detected
*/
void warning(String message, String sourceName, int line,
String lineSource, int lineOffset);
/**
* Report an error.
*
* The implementing class is free to throw an exception if
* it desires.
*
* If execution has not yet begun, the JavaScript engine is
* free to find additional errors rather than terminating
* the translation. It will not execute a script that had
* errors, however.
*
* @param message a String describing the error
* @param sourceName a String describing the JavaScript source
* where the error occured; typically a filename or URL
* @param line the line number associated with the error
* @param lineSource the text of the line (may be null)
* @param lineOffset the offset into lineSource where problem was detected
*/
void error(String message, String sourceName, int line,
String lineSource, int lineOffset);
/**
* Creates an EvaluatorException that may be thrown.
*
* runtimeErrors, unlike errors, will always terminate the
* current script.
*
* @param message a String describing the error
* @param sourceName a String describing the JavaScript source
* where the error occured; typically a filename or URL
* @param line the line number associated with the error
* @param lineSource the text of the line (may be null)
* @param lineOffset the offset into lineSource where problem was detected
* @return an EvaluatorException that will be thrown.
*/
EvaluatorException runtimeError(String message, String sourceName,
int line, String lineSource,
int lineOffset);
}

View File

@@ -0,0 +1,147 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
/**
* The class of exceptions thrown by the JavaScript engine.
*/
public class EvaluatorException extends RuntimeException
{
/**
* Create an exception with the specified detail message.
*
* Errors internal to the JavaScript engine will simply throw a
* RuntimeException.
*
* @param detail a message with detail about the exception
*/
public EvaluatorException(String detail)
{
super(detail);
Context cx = Context.getCurrentContext();
if (cx!= null) {
int[] linep = { 0 };
this.sourceName = cx.getSourcePositionFromStack(linep);
this.lineNumber = linep[0];
}
}
/**
* Create an exception with the specified detail message.
*
* Errors internal to the JavaScript engine will simply throw a
* RuntimeException.
*
* @param nativeError the Scriptable object constructed for this error.
Scripts will get it as an argument to catch statement.
* @param sourceName the name of the source reponsible for the error
* @param lineNumber the line number of the source
* @param columnNumber the columnNumber of the source (may be zero if
* unknown)
* @param lineSource the source of the line containing the error (may be
* null if unknown)
*/
public EvaluatorException(String detail, String sourceName, int lineNumber,
String lineSource, int columnNumber)
{
super(generateErrorMessage(detail, sourceName, lineNumber));
this.sourceName = sourceName;
this.lineNumber = lineNumber;
this.lineSource = lineSource;
this.columnNumber = columnNumber;
}
/**
* Get the name of the source containing the error, or null
* if that information is not available.
*/
public String getSourceName()
{
return sourceName;
}
/**
* Returns the line number of the statement causing the error,
* or zero if not available.
*/
public int getLineNumber()
{
return lineNumber;
}
/**
* The column number of the location of the error, or zero if unknown.
*/
public int getColumnNumber()
{
return columnNumber;
}
/**
* The source of the line causing the error, or zero if unknown.
*/
public String getLineSource()
{
return lineSource;
}
static String generateErrorMessage(String message,
String sourceName,
int line)
{
if (sourceName == null || line <= 0) {
return message;
}
StringBuffer buf = new StringBuffer(message);
buf.append(" (");
if (sourceName != null) {
buf.append(sourceName);
}
if (line > 0) {
buf.append('#');
buf.append(line);
}
buf.append(')');
return buf.toString();
}
private String sourceName;
private int lineNumber;
private String lineSource;
private int columnNumber;
}

View File

@@ -0,0 +1,86 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
// API class
package org.mozilla.javascript;
/**
* This is interface that all functions in JavaScript must implement.
* The interface provides for calling functions and constructors.
*
* @see org.mozilla.javascript.Scriptable
* @author Norris Boyd
*/
public interface Function extends Scriptable, Callable {
/**
* Call the function.
*
* Note that the array of arguments is not guaranteed to have
* length greater than 0.
*
* @param cx the current Context for this thread
* @param scope the scope to execute the function relative to. This is
* set to the value returned by getParentScope() except
* when the function is called from a closure.
* @param thisObj the JavaScript <code>this</code> object
* @param args the array of arguments
* @return the result of the call
* @exception JavaScriptException if an uncaught exception
* occurred while executing the function
*/
public Object call(Context cx, Scriptable scope, Scriptable thisObj,
Object[] args)
throws JavaScriptException;
/**
* Call the function as a constructor.
*
* This method is invoked by the runtime in order to satisfy a use
* of the JavaScript <code>new</code> operator. This method is
* expected to create a new object and return it.
*
* @param cx the current Context for this thread
* @param scope an enclosing scope of the caller except
* when the function is called from a closure.
* @param args the array of arguments
* @return the allocated object
* @exception JavaScriptException if an uncaught exception
* occurred while executing the constructor
*/
public Scriptable construct(Context cx, Scriptable scope, Object[] args)
throws JavaScriptException;
}

View File

@@ -0,0 +1,153 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Roger Lawrence
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.util.*;
public class FunctionNode extends ScriptOrFnNode {
public FunctionNode(String name) {
super(Token.FUNCTION);
functionName = name;
}
public String getFunctionName() {
return functionName;
}
public boolean requiresActivation() {
return itsNeedsActivation;
}
public boolean setRequiresActivation(boolean b) {
return itsNeedsActivation = b;
}
public boolean getCheckThis() {
return itsCheckThis;
}
public void setCheckThis() {
itsCheckThis = true;
}
public boolean getIgnoreDynamicScope() {
return itsIgnoreDynamicScope;
}
public void setIgnoreDynamicScope() {
itsIgnoreDynamicScope = true;
}
/**
* There are three types of functions that can be defined. The first
* is a function statement. This is a function appearing as a top-level
* statement (i.e., not nested inside some other statement) in either a
* script or a function.
*
* The second is a function expression, which is a function appearing in
* an expression except for the third type, which is...
*
* The third type is a function expression where the expression is the
* top-level expression in an expression statement.
*
* The three types of functions have different treatment and must be
* distinquished.
*/
public static final int FUNCTION_STATEMENT = 1;
public static final int FUNCTION_EXPRESSION = 2;
public static final int FUNCTION_EXPRESSION_STATEMENT = 3;
public int getFunctionType() {
return itsFunctionType;
}
public void setFunctionType(int functionType) {
itsFunctionType = functionType;
}
protected void finishParsing(IRFactory irFactory) {
super.finishParsing(irFactory);
int functionCount = getFunctionCount();
if (functionCount != 0) {
for (int i = 0; i != functionCount; ++i) {
FunctionNode fn = getFunctionNode(i);
// nested function expression statements overrides var
if (fn.getFunctionType() == FUNCTION_EXPRESSION_STATEMENT) {
String name = fn.getFunctionName();
if (name != null && name.length() != 0) {
removeParamOrVar(name);
}
}
}
// Functions containing other functions require activation objects
setRequiresActivation(true);
}
Node stmts = getLastChild();
if (getFunctionType() == FUNCTION_EXPRESSION) {
String name = getFunctionName();
if (name != null && name.length() != 0 && !hasParamOrVar(name))
{
// A function expression needs to have its name as a
// variable (if it isn't already allocated as a variable).
// See ECMA Ch. 13. We add code to the beginning of the
// function to initialize a local variable of the
// function's name to the function value.
addVar(name);
Node setFn = new Node(Token.POP,
new Node(Token.SETVAR, Node.newString(name),
new Node(Token.THISFN)));
stmts.addChildrenToFront(setFn);
}
}
// Add return to end if needed.
Node lastStmt = stmts.getLastChild();
if (lastStmt == null || lastStmt.getType() != Token.RETURN) {
stmts.addChildToBack(new Node(Token.RETURN));
}
}
private String functionName;
private boolean itsNeedsActivation;
private boolean itsCheckThis;
private int itsFunctionType;
private boolean itsIgnoreDynamicScope;
}

Some files were not shown because too many files have changed in this diff Show More