Commit Graph

65393 Commits

Author SHA1 Message Date
mkaply%us.ibm.com
ecb1bbb781 #42637
r=mscott, a=brendan
OS/2 bringup - VisualAge treats this like a cast - according to nsFileSpec.h, our way is correct
2000-07-05 13:44:44 +00:00
mkaply%us.ibm.com
a3c3e7afcb #42637
r=dougt, a=brendan
OS/2 bringup - change to locate DLL in components dir
2000-07-05 13:40:53 +00:00
mkaply%us.ibm.com
815bae6e5c #42637
r=waterson, a=waterson
OS/2 bringup - this is a Windows path, not an XP_PC path
2000-07-05 13:39:07 +00:00
mkaply%us.ibm.com
39ea66a8bb #42637
r=mkaply, a=brendan
Support for subkeyboard types, like Dvorak
2000-07-05 13:37:09 +00:00
BlakeR1234%aol.com
fa72229711 Rest of the fix for 42318 (r=ben, see previous checkin) 2000-07-05 05:14:49 +00:00
BlakeR1234%aol.com
16ab02acec Partial fix for bug 42318 r=ben, fix for 44240 r=disttsc@bart.nl, a=brendan 2000-07-05 05:10:47 +00:00
sgehani%netscape.com
5b00ef0689 Use passive mode when downloading. (Checking in for Jeffrey Baker.)
[nsbeta2+ b = 40655; r=sgehani,dbragg]
2000-07-05 03:55:54 +00:00
sgehani%netscape.com
9cadc34054 Prevent multiple redundant downloads when default (return) key is hit more than once. [nsbeta2+ b = 31042; r=ssu] 2000-07-05 03:53:09 +00:00
dougt%netscape.com
f1a786417b Adding files to cvs for test application. 2000-07-04 22:42:09 +00:00
dougt%netscape.com
81ba5dd449 I am an idiot. 2000-07-04 22:08:41 +00:00
dougt%netscape.com
8cc0076ed5 44113, 44190, 44191.
r/a=valeski@netscape.com

nsDocShellTreeOwner not handling chrome/content correctly.
Asserts when no toplevel window set.
Need to start chrome up from NS_InitEmbedding()
Test App changes.
2000-07-04 21:53:27 +00:00
dougt%netscape.com
8b33bb5fa6 44113 r/a=valeski@netscape.com 2000-07-04 21:49:27 +00:00
brendan%mozilla.org
322b7f6614 Fix unused new Object before literal. 2000-07-04 19:06:26 +00:00
blizzard%redhat.com
ce8c34b8be fix for bug #43305. reduce the number of paints and fix leaking items into a linked list when scrolling. this should make linux a little faster. r=bryner,pavlov,imoT a=brendan 2000-07-04 19:05:47 +00:00
radha%netscape.com
586320a4e6 Enabling feature "Session History in frameset pages". bug # 36547. Reviewer for this checkin
as well as several previous checkins related to this bug is rpotts.
2000-07-04 18:51:14 +00:00
morse%netscape.com
1a9b31cf83 workaround for bug 43573, select user not working 2000-07-04 03:07:39 +00:00
cls%seawood.org
ca2b0dc434 Remove generated config files on distclean. Bug #43142 2000-07-03 21:41:19 +00:00
nboyd%atg.com
fdeea4b93b Subject:
Re: Rhino1.5.R1: problems with multithreaded embedded application.
        Date:
             Mon, 03 Jul 2000 14:38:56 -0400
       From:
             Norris Boyd <nboyd@atg.com>
 Organization:
             Art Technology Group
         To:
             Fergus Gallagher <Fergus.Gallagher@orbisuk.com>
 Newsgroups:
             netscape.public.mozilla.jseng
  References:
             1




You found a bug in Rhino; I wonder if others have been running into the same thing.

The problem is with a class called LazilyLoadedCtor. I wrote this class to reduce the
time
required by initStandardObjects by only creating standard objects when the associated
constructors are first accessed. The problem is that this class was not threadsafe.
I've
made changes to that class, and to ScriptableObject as well. The design of dynamic
properties calling getters and setters (which LazilyLoadedCtor uses) didn't really
allow
any way for the getter/setter to replace itself without a thread hazard. I've now
extended
setters so that they can return a value which replaces the getter/setter to avoid this
problem.

Thanks for finding this problem. There have been a couple of other reports of problems
in
this area, so I hope this will fix them.

The patch follows.

--N

Index: LazilyLoadedCtor.java
===================================================================
RCS file: /cvsroot/mozilla/js/rhino/org/mozilla/javascript/LazilyLoadedCtor.java,v
retrieving revision 1.1
diff -u -r1.1 LazilyLoadedCtor.java
--- LazilyLoadedCtor.java 2000/02/29 21:34:37 1.1
+++ LazilyLoadedCtor.java 2000/07/03 18:31:03
@@ -58,9 +58,12 @@
     }

     public Object getProperty(ScriptableObject obj) {
-        obj.delete(ctorName);
         try {
-            ScriptableObject.defineClass(obj, Class.forName(className));
+            synchronized (obj) {
+                if (!isReplaced)
+                    ScriptableObject.defineClass(obj, Class.forName(className));
+                isReplaced = true;
+            }
         }
         catch (ClassNotFoundException e) {
             throw WrappedException.wrapException(e);
@@ -83,11 +86,14 @@
         return obj.get(ctorName, obj);
     }

-    public void setProperty(ScriptableObject obj, Object val) {
-        obj.delete(ctorName);
-        obj.put(ctorName, obj, val);
+    public Object setProperty(ScriptableObject obj, Object val) {
+        synchronized (obj) {
+            isReplaced = true;
+            return val;
+        }
     }

     private String ctorName;
     private String className;
+    private boolean isReplaced;
 }
Index: ScriptableObject.java
===================================================================
RCS file: /cvsroot/mozilla/js/rhino/org/mozilla/javascript/ScriptableObject.java,v
retrieving revision 1.17
diff -u -r1.17 ScriptableObject.java
--- ScriptableObject.java 2000/03/13 17:12:36 1.17
+++ ScriptableObject.java 2000/07/03 18:31:04
@@ -246,11 +246,21 @@
                             break;
                         }
                     }
-                    getterSlot.setter.invoke(start, arg);
+                    Object v = getterSlot.setter.invoke(start, arg);
+                    if (getterSlot.setterReturnsValue) {
+                        slots[slotIndex].value = v;
+                        if (!(v instanceof Method))
+                            slots[slotIndex].flags = 0;
+                    }
                     return;
                 }
                 Object[] args = { this, actualArg };
-                getterSlot.setter.invoke(getterSlot.delegateTo, args);
+                Object v = getterSlot.setter.invoke(getterSlot.delegateTo, args);
+                if (getterSlot.setterReturnsValue) {
+                    slots[slotIndex].value = v;
+                    if (!(v instanceof Method))
+                        slots[slotIndex].flags = 0;
+                }
                 return;
             }
             catch (InvocationTargetException e) {
@@ -1183,6 +1193,7 @@
         slot.delegateTo = delegateTo;
         slot.getter = getter;
         slot.setter = setter;
+        slot.setterReturnsValue = setter != null && setter.getReturnType() !=
Void.TYPE;
         slot.value = null;
         slot.attributes = (short) attributes;
         slot.flags = flags;
@@ -1551,6 +1562,7 @@
     Object delegateTo;  // OPT: merge with "value"
     Method getter;
     Method setter;
+    boolean setterReturnsValue;
 }




Fergus Gallagher wrote:

> I am having problems getting my head around contexts and scopes and my
> multi-threaded application fall over.
>
> If I set "global=false" the following code used a per-thread
> initStandardObject() and this seems to work.  But when I set
> "global=true", the global "parentScope" is used and I get some wierd
> errors.
>
> If I change "__CODE__.slice(0,5)" to
> 1. "__CODE__" - works
> 2. "__CODE__.substring(0,5)" - fails
> 3. "__CODE__.toString()" - works
>
> Any help appreciated.
>
> Fergus
>
> ===== Test.java =========================================
> import java.io.*;
> import org.mozilla.javascript.*;
>
> public class Test implements Runnable {
>         private Script script;
>         private Scriptable parentScope;
>         private String __CODE__="ABCDEFGHIJK";
>         private boolean global = true;
>         private static Context globalContext = null;
>         public Test() throws Exception {
>                 String js= "java.lang.System.out.println(__CODE__.slice(0,5));";
>                 globalContext.setCompileFunctionsWithDynamicScope(false);
>                 parentScope = globalContext.initStandardObjects(null);
>                 StringReader sr = new StringReader(js);
>                 script = globalContext.compileReader(parentScope, sr, "(compiled)",
> 1,null);
>         }
>
>         public void run() {
>                 try {
>                         Context context = Context.enter();
>                         Scriptable threadScope;
>                         if (global) {
>                                 threadScope = context.newObject(parentScope);
>                                 threadScope.setPrototype(parentScope);
>                                 threadScope.setParentScope(null);
>                         } else {
>                                 threadScope = context.initStandardObjects(null);
>                         }
>                         threadScope.put("__CODE__",threadScope,__CODE__);
>                         script.exec(context,threadScope);
>                 }
>                 catch (Exception e) {
>                         System.err.println(e.getClass().getName()+":
"+e.getMessage());
>                 }
>                 finally {
>                         Context.exit();
>                 }
>         }
>
>         public static void main(String args[]) throws Exception {
>         globalContext = Context.enter();
>                 Test me = new Test();
>                 int count=10;
>                 Thread[] threads = new Thread[count];
>                 for (int i=0; i<count; i++) {
>                         Thread t = new Thread(me);
>                         threads[i] = t;
>                         t.start();
>                 }
>                 for (int i=0; i<count; i++) {
>                         threads[i].join();
>                 }
>                 Context.exit();
>         }
> }
>
> ==== OUTPUT ===============================================
> ABCDE
> ABCDE
> org.mozilla.javascript.EcmaError: undefined is not a function.
> org.mozilla.javascript.EvaluatorException: Constructor for "String" not
> found.
> org.mozilla.javascript.EvaluatorException: Constructor for "String" not
> found.
> org.mozilla.javascript.EvaluatorException: Constructor for "String" not
> found.
> org.mozilla.javascript.EvaluatorException: Constructor for "String" not
> found.
> org.mozilla.javascript.EvaluatorException: Constructor for "String" not
> found.
> org.mozilla.javascript.EvaluatorException: Constructor for "String" not
> found.
> org.mozilla.javascript.EvaluatorException: Constructor for "String" not
> found.
> ===========================================================
>
> The number and type of exceptions is highly variable from run to run -
> anywhere from 1-9 out of 10.
> The EcmaError in particular only happens occasionally.
>
> --
> Fergus Gallagher          Tel: +44 (20) 8 987 0717
> Orbis                     Fax: +44 (20) 8 742 2649
> The Swan Centre           email: Fergus.Gallagher@orbisuk.com
> Fishers Lane              Web: http://www.orbisuk.com
> London W4 1RX / UK
2000-07-03 18:40:35 +00:00
BlakeR1234%aol.com
ec875575a4 Fix for 44442. r=me 2000-07-03 05:56:58 +00:00
rbs%maths.uq.edu.au
36f65d4461 [not part of default build] Fix bug 43443, and some updates in the stretchy chars land. a:waterson@mozilla.org 2000-07-03 05:40:13 +00:00
BlakeR1234%aol.com
5c94e82446 Partial fix for bug 44442. Thanks to walk84@usa.net for catching it r=me 2000-07-03 00:41:30 +00:00
bienvenu%netscape.com
4d3c8ade88 fix OS2 build bustage 2000-07-02 23:56:10 +00:00
jband%netscape.com
53edf6e9f7 updating readme. Not part of build 2000-07-02 19:37:57 +00:00
cls%seawood.org
bca014f1bb Removing last vestiges of raptor from unix build. Since some libs were renamed, a 'make distclean' is recommeneded to remove the old copies of those libs. Bug #8228 r=bryner 2000-07-02 18:44:42 +00:00
bienvenu%netscape.com
556ce644e5 fix OS2 build bustage 2000-07-02 18:16:47 +00:00
bienvenu%netscape.com
5373466ff1 fix os2 build bustage 2000-07-02 18:11:32 +00:00
ben%netscape.com
4805623c73 tweaks to classic skin for mac (make throbber normal size, make splitter the right colour) 2000-07-02 07:03:16 +00:00
morse%netscape.com
3c358ddf73 fix bug 43227, quickfill still in menu on mac 2000-07-02 04:00:02 +00:00
dbaron%fas.harvard.edu
fc3dadcc58 Ignore the correct generated files (rather than the list copied from leaky). 2000-07-02 00:44:31 +00:00
dbaron%fas.harvard.edu
71dee3b6b0 Fix bug 35355 by not reading before the beginning of an array. Patch from Robert O'Callahan <roc+moz@cs.cmu.edu>.
Fix ConditionRect so really wide documents repaint correctly on Win95.
r=kmcclusk, a=waterson
2000-07-01 22:12:23 +00:00
leaf%mozilla.org
89d62a278c Automated update 2000-07-01 21:45:08 +00:00
dbaron%fas.harvard.edu
da67297134 Fix leak of content from trees introduced recently. r=hyatt,waterson 2000-07-01 21:45:06 +00:00
dbaron%fas.harvard.edu
a921110dbd Add Vidur's xmlextras to the list of *all* extensions (what you get with --with-extensions=all). Does not affect default build. r=vidur 2000-07-01 21:41:48 +00:00
dbaron%fas.harvard.edu
0abf789810 Allow Vidur's xmlextras to be built on Linux (not part of default build). r=vidur 2000-07-01 21:40:53 +00:00
jab%atdot.org
4677a29ea5 A typo in the Windows makefile... 2000-07-01 12:41:53 +00:00
jab%atdot.org
9cdd33f1bd The mac build was not getting my new MANIFEST file. I think this might fix it. 2000-07-01 11:05:41 +00:00
jab%atdot.org
e329811f28 I had an extra tab after one of the makefile lines... 2000-07-01 10:49:06 +00:00
jab%atdot.org
3ff5cd0f65 a=brendan@mozilla.org
Bug #16103
Support for SOCKS proxies in HTTP, HTTPS, and FTP protocols.
Also includes the prefs configuration and UI bits.
2000-07-01 10:25:25 +00:00
ssu%netscape.com
4f787c64e4 fixing bug 44006 - Please don't use Windows extended dialogs in setupsrc.dll. nsbeta2+ r=sgehani 2000-07-01 08:50:44 +00:00
andreas.otte%primus-online.de
1a2a5c7fee fix bug 43659, URL bar does not accept hexadecimal domain names, r=gagan@netscape.com, a=waterson@mozilla.org 2000-07-01 06:29:13 +00:00
rpotts%netscape.com
602b139a4a Fixed a leak where child SHEntry were not being released when the parent SHEntry was deleted. 2000-07-01 05:37:40 +00:00
sspitzer%netscape.com
31e159ea1b last check in before sabbatical! fix for nsbeta2+ bugscape bug #1149.
install default templates in the case where the profile's locale
is not set.  r=mscott
2000-07-01 02:38:27 +00:00
brendan%mozilla.org
b864716baa Reference-count XBL JSClass structs, and LRU-cache unreferenced ones up to some quota, to avoid bloat and shutdown crashes due to unavoidable manual delete/last-use misorder (42530, r=hyatt). 2000-07-01 02:36:18 +00:00
nisheeth%netscape.com
d70a4ed2b5 Fix for nsbeta2+ bug 12152. r=vidur, pollmann. Setting the src property during document load works on <IMG> and <INPUT type="image"> elements. 2000-07-01 02:26:30 +00:00
cmanske%netscape.com
7d40913fb4 Don't include current URL when building Recent Files menu. Checking in work for Ryan Cassin, b=17502, r=cmanske 2000-07-01 02:16:04 +00:00
dougt%netscape.com
684793f190 submitted by Quy Tonthat <quy@igelaus.com.au>
a=waterson@netscape.com
2000-07-01 02:12:52 +00:00
javi%netscape.com
e9987aeb54 Get the CRL dialog window to properly close and refresh the Signers pane
when no more CRL's are left.
2000-07-01 01:26:42 +00:00
javi%netscape.com
628ab13451 First shot at having UI for deleting CRLs. 2000-07-01 01:19:22 +00:00
javi%netscape.com
b5b2f5d3cd Remove an unused button from dialog. 2000-07-01 01:15:28 +00:00
javi%netscape.com
303eb4dbb0 Changes for having a dialog that does CRL deleting. 2000-07-01 01:14:22 +00:00