Commit Graph

2540 Commits

Author SHA1 Message Date
brendan%mozilla.org
2ecb3888a2 Avoid 80th column violations and unnecessary local variable. 2000-07-06 01:15:08 +00:00
brendan%mozilla.org
e5ca3a7b1a Undo teeny optimization from rev 3.28, alas it breaks ECMA Ed. 3, 15.5.4.15. 2000-07-06 00:30:46 +00:00
nboyd%atg.com
a1f493ab08 Remove obsolete references to NodeFactory. 2000-07-05 17:08:26 +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
jband%netscape.com
53edf6e9f7 updating readme. Not part of build 2000-07-02 19:37:57 +00:00
cls%seawood.org
1f3b6d75ab Removed obsolete REQUIRES variable from every Makefile.in/makefile.win 2000-06-30 08:08:04 +00:00
jband%netscape.com
1a7630d560 Fix dogfood/crash bugs: 42750, 39858 and fix 43897 and improve JS/XPConnect error reporting to help with crasher 40792. r=mccabe@netscape.com. 2000-06-30 04:04:46 +00:00
beard%netscape.com
0eeae607ae Fix build bustage. 2000-06-29 18:40:58 +00:00
rogerl%netscape.com
fd98adafce use handleDot for call, too. 2000-06-29 18:30:47 +00:00
beard%netscape.com
8f5fea173e delete property support. 2000-06-29 18:14:14 +00:00
beard%netscape.com
a4c5f704f4 DELETE_PROP 2000-06-29 18:13:46 +00:00
beard%netscape.com
7a6367c583 DELETE_PROP 2000-06-29 17:14:56 +00:00
beard%netscape.com
11134b4173 added DELETE_PROP instruction to implement the "delete" operation. 2000-06-29 17:11:50 +00:00
beard%netscape.com
97dfdc5f04 unused parameter warning 2000-06-29 05:48:09 +00:00
beard%netscape.com
8f4cadb250 complementary operator delete(void*, JSClass*). 2000-06-29 05:46:36 +00:00
beard%netscape.com
8891b0c7ba some classes to test js2 with. 2000-06-29 04:49:48 +00:00
beard%netscape.com
8da0055bc5 updated dependencies 2000-06-29 04:25:10 +00:00
beard%netscape.com
074f981eb4 Changed StaticCall to use static slot. 2000-06-29 04:23:56 +00:00
beard%netscape.com
b202adfd39 Fixing static dotted expressions. 2000-06-29 04:23:20 +00:00
beard%netscape.com
7a512866fd now uses conditional compilation #if defined(OPCODE_NAMES), so that a simple "icode.h" can be included by vmtypes.h and vmtypes.cpp. 2000-06-29 04:21:00 +00:00
beard%netscape.com
486b437613 moved all machine generated classes, etc. to icode.h. 2000-06-29 04:19:19 +00:00
beard%netscape.com
2a451cdd8b Generated by tools/gencode.pl. 2000-06-29 04:18:16 +00:00
beard%netscape.com
640ba6e24c fixed static calls. 2000-06-29 03:15:52 +00:00
rogerl%netscape.com
63744d7c1c Implicit this and class lookup stuff. 2000-06-29 01:21:41 +00:00
cls%seawood.org
e5efcb7528 wrap ifndef XPCONNECT_STANDALONE around xpconnect test components that require external interfaces. Thanks to Mark Adams <madams@janna.com> for the patch. Bug 42026 2000-06-28 22:53:55 +00:00
beard%netscape.com
237dd352ed implemented JSClass::printProperties(). 2000-06-28 19:46:13 +00:00
beard%netscape.com
9930edd0d5 Enhanced printing of types. 2000-06-28 19:45:44 +00:00
beard%netscape.com
c0e9f6d274 Type of a JSType* is Type_Type (wow, recursive). Changed mBaseType to be JSType* instead of const JSType*. 2000-06-28 19:45:09 +00:00
rogerl%netscape.com
52bffdadcf First set of unified 'dot' handling changes for statics. 2000-06-28 18:41:30 +00:00
beard%netscape.com
d40b8dd8cb added jsclasses.h 2000-06-28 18:10:04 +00:00
beard%netscape.com
941b505765 Fix string <. 2000-06-28 16:38:20 +00:00
beard%netscape.com
d9bf640477 Fixed dynamic lookup of static slots. Added code to compare strings. 2000-06-28 16:32:52 +00:00
beard%netscape.com
b1350d87b6 GET_STATIC/SET_STATIC/STATIC_XCR now use an index rather than a name. Implemented GET_PROP/SET_PROP for class objects (looks up slot dynamically, etc.) 2000-06-28 16:15:06 +00:00
beard%netscape.com
866b5d3d8d GET_STATIC/SET_STATIC/STATIC_XCR now use an index rather than a name. Now using JSClass::hasStatic() rather than looking up statics in class' scope. 2000-06-28 16:14:18 +00:00
beard%netscape.com
8132734212 GET_STATIC/SET_STATIC/STATIC_XCR now use an index rather than a name. 2000-06-28 16:13:12 +00:00
beard%netscape.com
970477555f Static slots. 2000-06-28 16:11:54 +00:00
cls%seawood.org
a9f6433fbe Tweaks to build xpconnect standalone. Bug #42024. Thanks to Mark Adams <madams@janna.com> for the patches. 2000-06-28 07:03:13 +00:00
beard%netscape.com
2b1351cc3b Win-specific operator== noise. 2000-06-27 03:52:56 +00:00
beard%netscape.com
4873ce7882 Fixed unitialized static class members. 2000-06-27 03:43:40 +00:00
beard%netscape.com
7b2b4a1e2f addSlot -> defineSlot, added defineStatic. 2000-06-27 03:42:42 +00:00
brendan%mozilla.org
9f75641ee2 Not again\! 2000-06-27 03:29:49 +00:00
beard%netscape.com
74e8d0a780 Fixed type management. 2000-06-27 03:21:33 +00:00
brendan%mozilla.org
af94bec8f7 Fix my stupid missing comma bustage. 2000-06-27 03:17:47 +00:00
rogerl%netscape.com
fbdb3fe1c1 lots of stuff me and Patrick did 2000-06-27 02:39:32 +00:00
brendan%mozilla.org
6afe0ed1a7 Fix JS_SetPrototype and __proto__ setting to deal with shared scopes; use JSObjectOps for setProto and setParent operations, and add spare op slots (41126, r=shaver@mozilla.org,pschwartau@netscape.com). 2000-06-27 02:37:25 +00:00
beard%netscape.com
965f10e915 JSValue::operator==: added CASE(type) to fix warning. 2000-06-26 17:47:07 +00:00
beard%netscape.com
f276cc3dfd added JSObject::deleteProperty(), and changed mName in JSType to be a JSString. Need to revisit other uses of String soon. 2000-06-26 17:42:20 +00:00
beard%netscape.com
07dff8c5d1 simplified string addition 2000-06-26 17:25:25 +00:00
beard%netscape.com
fef138fae2 defined JSStringBase, and constructors from in JSString 2000-06-26 17:24:57 +00:00
beard%netscape.com
769d11bcbf String addition: don't share structure with LHS. 2000-06-26 17:09:27 +00:00
beard%netscape.com
45301bb589 added constructor from JSString&. 2000-06-26 16:55:01 +00:00
beard%netscape.com
3a78e14938 Reset register usage after generating each initializer statement. 2000-06-26 15:19:45 +00:00
beard%netscape.com
714e109074 Simplified NEW_CLASS, using a single do .. while loop, introducing nextPC instruction iterator to simplify initial case. now calls all defined constructors. 2000-06-26 15:06:36 +00:00
beard%netscape.com
07d6ee2613 Only call non-null constructors. 2000-06-25 17:04:38 +00:00
beard%netscape.com
40e53d46ea Conditionally set constructor, if it has any instructions. 2000-06-25 17:04:01 +00:00
beard%netscape.com
21f549896a updated dependencies 2000-06-25 16:44:29 +00:00
beard%netscape.com
d6c6cc31bb check for non-null superClass 2000-06-25 16:43:25 +00:00
beard%netscape.com
5d311184e2 hooked up superClass' scope as the prototype of a class's scope, to do method inheritance, removed bogus JSInstance::getSlotCount(), which overcounted slots. 2000-06-25 16:35:33 +00:00
beard%netscape.com
728580c6f8 Added calls to superClass constructors. 2000-06-24 22:42:43 +00:00
beard%netscape.com
e41bd745dd JSInstance::getSlotCount() no longer recursive. 2000-06-24 22:42:15 +00:00
beard%netscape.com
7b76b9503a Beginning support for superclass slots. 2000-06-24 22:07:00 +00:00
beard%netscape.com
36eef7adea Added emptyArgs, removed unused return value in readEvalFile 2000-06-24 05:42:51 +00:00
beard%netscape.com
a6493add9f enable RTTI 2000-06-24 05:36:52 +00:00
beard%netscape.com
b877fde64f VC++ doesn't like local classes in templates. 2000-06-24 05:36:09 +00:00
beard%netscape.com
c5298ced1d major surgery to enable the "load()" native function. 2000-06-24 05:25:33 +00:00
beard%netscape.com
46c0a7c5a8 Experiment with looking up methods in the prototype chain. 2000-06-24 05:22:23 +00:00
beard%netscape.com
c337fff76a Always use the target object, regardless of where a method property is found along the prototype chain. 2000-06-24 05:21:49 +00:00
beard%netscape.com
8558f071a4 When generating a reference to "this" use the current code generator's mClass when appropriate. 2000-06-24 05:21:03 +00:00
rginda%netscape.com
486d1cc51a fixing source stepping (opcode stepping to come back later)
debugger is now quiet by default.
2000-06-24 02:53:29 +00:00
beard%netscape.com
27b088f22a Removed JSType::isClassType(). 2000-06-24 02:51:34 +00:00
beard%netscape.com
565b0389db Added JSClass::get/setConstructor(). 2000-06-24 02:51:03 +00:00
beard%netscape.com
9fd0505086 Added call to constructor when executing NEW_CLASS. 2000-06-24 02:50:23 +00:00
beard%netscape.com
47638a00c7 Generating default constructor to run slot initializers. 2000-06-24 02:49:45 +00:00
beard%netscape.com
146e187c7b testCompile() is static 2000-06-24 01:04:58 +00:00
rogerl%netscape.com
e497a7809f typing 'this' 2000-06-24 01:02:34 +00:00
rogerl%netscape.com
432c8b3cdc Got newClass working, added printProperties for instances, some slot
stuff is happening.
2000-06-24 00:50:59 +00:00
beard%netscape.com
f304229d7f added NEW_CLASS instruction, to instantiate classes. 2000-06-23 23:49:48 +00:00
beard%netscape.com
35b239cd47 added NEW_CLASS instruction. 2000-06-23 23:49:17 +00:00
rogerl%netscape.com
e939fbddc4 Adding slot handling to code gen. 2000-06-23 23:43:24 +00:00
beard%netscape.com
841b79b5eb added NEW_CLASS instruction. 2000-06-23 23:41:27 +00:00
beard%netscape.com
da108e7b96 Added JSClass::hasSlot, getSlotCount(), and JSInstance. 2000-06-23 23:25:55 +00:00
beard%netscape.com
9f413f408b JSValue::type now JSType* instead of const JSType*, all predefined JSType objects no longer const as well. 2000-06-23 23:25:14 +00:00
rogerl%netscape.com
89515e83dc Removed FUNCTION instruction, other class related junk. 2000-06-23 22:53:09 +00:00
rginda%netscape.com
da45d9b0eb Added debugger opcode, change InstructionMap to a std::map, print source lines while tracing 2000-06-23 22:27:17 +00:00
rogerl%netscape.com
ea920b48c8 Add return statement if the function doesn't end with one 2000-06-23 21:20:03 +00:00
beard%netscape.com
da19218b3e added assertion to ensure that mPC is always valid before fetching the next instruction. 2000-06-23 06:10:14 +00:00
beard%netscape.com
95adc8b187 Additional JSClass processing: defining slots, generating methods. 2000-06-23 05:13:04 +00:00
beard%netscape.com
ca9001f387 When using a JSScope that has a parent scope, don't bother defining the standard properties, they will be shared. 2000-06-23 05:10:46 +00:00
beard%netscape.com
6ccb94e600 A JSClass is a JSType now, and has a JSScope. Added addSlot, getSlot, getScope. 2000-06-23 05:09:37 +00:00
beard%netscape.com
dee62b8d67 remove unused file. 2000-06-23 04:10:04 +00:00
drapeau%eng.sun.com
7f384b86a6 Two main things:
1) Fix for 23775 (three files changed for this)

2) Many OJI unit tests added.
2000-06-23 02:28:31 +00:00
beard%netscape.com
f7c44fcf6f putting the JSClass* in the current global scope, and looking up superclass rereferences. 2000-06-23 02:22:55 +00:00
rogerl%netscape.com
33c9eb064a Added support for 'debugger' as a statement. (Rob made me) 2000-06-23 00:08:10 +00:00
beard%netscape.com
5ee7d6da77 JSClass support. 2000-06-21 23:58:17 +00:00
beard%netscape.com
124280ce07 initial checkin, starting on a representation for JS2 classes. 2000-06-21 23:57:09 +00:00
rogerl%netscape.com
f2591282dc Work to support 'this'. 2000-06-21 22:32:21 +00:00
nboyd%atg.com
e7359ce462 Fix javadoc warning 2000-06-21 15:49:14 +00:00
rogerl%netscape.com
27e254fee3 Changed use of Register to TypedRegister throughout. 2000-06-20 22:45:45 +00:00
rogerl%netscape.com
8a71a568af Support for TypedRegister 2000-06-20 22:44:46 +00:00
pavel%gingerall.cz
f8ce45f144 - workaround of -rdynamic (JS_PERLCONNECT only) 2000-06-16 08:56:03 +00:00
brendan%mozilla.org
5c53e520b1 sfraser@netscape.com's fine GC_MARK_DEBUG enhancement for XPConnect. 2000-06-16 04:34:00 +00:00
rogerl%netscape.com
a8a18e9d21 Added tests for scripts as strings. 2000-06-16 01:37:47 +00:00
rogerl%netscape.com
ecd0d99e85 Mucking about with operator overlaoding plus initializing global context
- beginning type stuff.
2000-06-16 01:36:59 +00:00
rogerl%netscape.com
670a8310fb Fixed spelling. 2000-06-16 01:35:25 +00:00
rogerl%netscape.com
b2f3dff014 Added op= support. 2000-06-15 16:03:54 +00:00
nboyd%atg.com
4242e00f01 Wrapping a class produces a NativeJavaClass. 2000-06-15 14:00:31 +00:00
rogerl%netscape.com
c354e43376 Mark top-level execution as 'script' rather than function - to handle
vars correctly.
2000-06-14 23:28:38 +00:00
rogerl%netscape.com
5762b34619 Added 'Function' instruction, plus suppresses class output if there is
no super specified. (ok it's a hack, but it works)
2000-06-14 23:27:28 +00:00
rogerl%netscape.com
6526fedd31 Adding support for Functions and Vars, preXcrement, object literals. 2000-06-14 23:26:15 +00:00
nboyd%atg.com
999f43aaec Fix bug 42097 2000-06-14 13:39:44 +00:00
pavel%gingerall.cz
fff3bf7638 - fixes in original version of perlconnect (JSVALToSV SVToJSVAL etc.)
- object delegation (like JSCreateObject) Perl->JS
- ParlValue handles PerlObject correctly
- undef values handled correctly (in both directions)
- JS arrays may be tied to perl arrays
- error handlers supported on Perl side
- no globals
- several minor fixes
2000-06-14 07:23:58 +00:00
pavel%gingerall.cz
0c07208dc5 - minor change of jsperl.h inclusion, matters for perlconnect build only 2000-06-14 07:18:41 +00:00
rginda%netscape.com
2ebc0a5b20 -- NOT PART OF THE BUILD --
Conditionally build lcshell w/ jdk 1.1.8 or 1.2.2 on windows
2000-06-14 00:14:56 +00:00
mkaply%us.ibm.com
737d9fb1b4 # 37239
r = mccabe, a = brendan
OS/2 bring-up - PR_CALLBACK for VisualAge
2000-06-14 00:07:08 +00:00
mccabe%netscape.com
3a709facd8 First part of fix for 38495, support for exposing plugin methods to JavaScript.
This patch teaches XPConnected objects to look in their JavaScript __proto__ chain for any names they can't resolve themselves.  The rest of the fix to this bug sets the original DOM node object as the prototype of a new xpconnect-exposed plugin object, so javascript accesses will see names from both objects.

r=jst,brendan
a=beard
2000-06-13 23:18:21 +00:00
nboyd%atg.com
341e3b8ddf Begin 1.5R2 effort.
Commit the following contributions:
* Andi Vajda's changes to allow embedders to capture the generated bytecode (and thus control
generated class names).
* Marshall Cline's changes to allow embedders to override the default Java object wrapping
behavior
* Kurt Westerfeld's change to handle calling static methods better
2000-06-13 14:33:54 +00:00
scc%mozilla.org
507357239c fix type equivalence between |PRUnichar| and |jschar| now that |PRUnchar| may be |wchar_t| on select platforms 2000-06-12 23:52:31 +00:00
rogerl%netscape.com
0b4dc2b357 Added check for FORMAT characters in new unicode cr/lf handling code. 2000-06-12 17:56:05 +00:00
brendan%mozilla.org
d8f3cd1921 Comply with weird ECMA nit: call (o.f)() (note parens around the function expression) must bind 'this' to the global object, not to o\! (41864, r=shaver). 2000-06-08 06:46:18 +00:00
nboyd%atg.com
bd67f54d28 Fix formatting. 2000-06-07 14:51:08 +00:00
nboyd%atg.com
fc46786bff Fix the following problem:
Subject:
        Odd behaviour on placement of .jar files?!
   Date:
        Mon, 05 Jun 2000 10:46:08 -0700
   From:
        John Raykowski <xski@xski.org>
     To:
        nboyd@atg.com




Hello,

I didn't want to post this directly as a rhino bug 'coz I think it may
be more of a JDK thing, but I thought I'd toss it to you as well.

The goal is to create a JavaScript object that implements a Java
interface. Straightforward enough and the example on the page using
ActionListener works without a hitch.  However, when I try to do the
same with my own interface, I get an error message: error instantiating
({0}): class {1} is interface or abstract (coming from
NativeJavaClass.construct).

Here's where it gets a bit strange.  Normally, I run with the jar files
in jre/lib/ext.  When I remove the rhino files from jre/lib/ext and
reference them explicitly on the commandline with the -cp option, it
works as expected and my script can implement the interface just fine.
Go figure.

Anyhoo, there ya go.  Like I said, I think its a JDK issue, but I
thought you'd be interested.  The attached zipfile contains a set of
sample code to demonstrate this problem.

Thanks heaps,

-jmr
2000-06-07 14:50:47 +00:00
brendan%mozilla.org
73d4167370 Use localizable error message for out of memory. 2000-06-06 04:54:04 +00:00
brendan%mozilla.org
28d3dcb5fc Better fix, really (r=shaver for sure). 2000-06-06 04:41:05 +00:00
brendan%mozilla.org
4e92401f64 Better control flow for catch clause code generation (r=shaver). 2000-06-06 04:27:37 +00:00
mccabe%netscape.com
3b337ab6af Fix to potential leak introduced with fix to 40406.
Be conservative in handling the lifetime of the safe context created by XPConnect to execute JS Components, and save it off to be destroyed at cleanup time, even if some other safe context is registered with XPConnect via SetSafeJSContext.

r=vishy, a=brendan
2000-06-06 00:01:25 +00:00
brendan%mozilla.org
6f0b30ca8f Fix missing $ bug when testing test_dir. 2000-06-03 19:20:03 +00:00
brendan%mozilla.org
d2c7c21d1b Avoid zero-length malloc (and assertbotch) in array_sort, just return true early\! 2000-06-03 19:00:28 +00:00
warren%netscape.com
512c8bf433 Renaming nsIAllocator to nsIMemory (and nsAllocator to nsMemory). API cleanup/freeze. Bug #18433 2000-06-03 09:46:12 +00:00
waldemar%netscape.com
2166c80bec Added parsing and printing of classes, interfaces, and namespaces 2000-06-02 04:35:44 +00:00
brendan%mozilla.org
6ca20f928f Fix ECMA DontDelete compliance problems, which create getter/setter security holes (40760, r=shaver). 2000-06-02 00:02:46 +00:00
nboyd%atg.com
faea4ed119 Fix "in" operator for compiled mode. 2000-06-01 23:40:29 +00:00
nboyd%atg.com
4d4458bd63 Add column number and line source information to the EcmaError object. 2000-06-01 17:30:28 +00:00
mkaply%us.ibm.com
716fff7b7c # 40177
r = leaf, a = brendan
Fix tab in makefile
2000-06-01 14:15:39 +00:00
waldemar%netscape.com
767f3c1669 Widened default line width to 30 2000-06-01 03:31:17 +00:00
waldemar%netscape.com
5c440a5bc5 Added function and constructor parsing and printing; fixed printing of blocks, compound statements, and :: 2000-06-01 03:30:58 +00:00
waldemar%netscape.com
ebbccfd9f8 Added two-argument linearBreak 2000-06-01 03:30:19 +00:00
brendan%mozilla.org
aca040859b Use JS_ValueToId to go from user to internal property id, for integer-id optimality (40731, r=shaver). 2000-05-31 22:10:53 +00:00
brendan%mozilla.org
d84057e951 Make JS_ExecuteScriptPart call the debugger hooks (41066, r=MyNGs@HotMail.com). 2000-05-31 21:57:46 +00:00
nboyd%atg.com
4a72992ae8 check for null scope 2000-05-30 21:50:44 +00:00
nboyd%atg.com
9cc29b7e22 Fix bug 40844 2000-05-29 16:57:13 +00:00
nboyd%atg.com
a50280a77b Fix bug 39906 2000-05-28 19:01:24 +00:00
nboyd%atg.com
dc7deebcad Remove tests obsoleted by the change that access to nonexistent properties of Java objects
returns undefined rather than causing an error
2000-05-28 18:50:58 +00:00
nboyd%atg.com
d092952991 for Java methods, print the signatures of the overloaded methods in a comment when
the JavaScript function wrapper's toString method is called
2000-05-28 04:25:07 +00:00
brendan%mozilla.org
6a220f2f41 Fix unreviewed changes made to fix 'Uninitialized variable compiler warnings'. 2000-05-28 00:02:26 +00:00
jst%netscape.com
60b53dbf6e Fixing bustage on solaris native builds. reported and reviewed by Tomi.Leppikangas@oulu.fi 2000-05-27 13:14:31 +00:00
edburns%acm.org
67cfd5f36b r=brendan
a=brendan
bug: 27362

This fix makes it so nsCLiveconnect.cpp doesn't #include
files within an extern "C" {} block.  To make this work, I
simply moved the extern "C" {} to the minimum necessary
range.  This required placing an "ifdef __cplusplus extern "C""
block in jsj_private.h, since nsCLiveconnect.cpp is the only
c++ file that includes jsj_private.h.
2000-05-27 01:12:40 +00:00
rogerl%netscape.com
4e3dcc082c Removed old branches, changed offset printing to handle NULL operand. 2000-05-26 22:35:36 +00:00
rogerl%netscape.com
565b842243 Update to new icg constructor etc. 2000-05-26 22:34:42 +00:00
rogerl%netscape.com
573531b249 Statement fun 2000-05-26 22:33:05 +00:00
waldemar%netscape.com
bd3b79569c Added var, const, and for statements 2000-05-26 06:20:11 +00:00