Граф коммитов

59301 Коммитов

Автор SHA1 Сообщение Дата
ducarroz%netscape.com d25ee9357e Fix for bug 36939. Autocomplete widget doesn't use anymore its own tag but instead, it's now a textfield with the attribute "autocomplete" set to true. 2000-04-25 01:21:56 +00:00
waterson%netscape.com 17d001cafb Clean up pool initialization. 2000-04-25 01:20:00 +00:00
waterson%netscape.com 0b06dff716 Change from an array of sizes to a linked list so it can handle new sizes after initialization. 2000-04-25 01:18:56 +00:00
ducarroz%netscape.com b940ba20c8 Fix for bug 22338, 27171, 36939 and part of bug 35038. Some UI and autocomplete cleanup. 2000-04-25 01:18:41 +00:00
gagan%netscape.com 61440864c7 Fixed bug 36831. Removed an accidental checkin of an assertion. 2000-04-25 01:18:26 +00:00
shaver%mozilla.org 8677f7e6c0 Linux/m68k xptcall port from <Michael_Fedrowitz@gmx.net> 2000-04-25 01:15:51 +00:00
gagan%netscape.com 7e1c03978a First checkin of proxy auto config stuff. 2000-04-25 01:15:35 +00:00
brendan%mozilla.org 1a90497652 Final destroy-context must await racing GCs before freeing atom state (32525, r=jband). 2000-04-25 01:12:36 +00:00
shaver%mozilla.org 1e9b5eec44 add CurrentItemInPlaceUTF8 to reduce startup alloc by 2.3M(!), r=brendan 2000-04-25 01:11:08 +00:00
jdunn%netscape.com a12d17bca9 Remove HP specific stanza. It is not needed and causes 11.00 tinderbox bustage 2000-04-25 01:10:28 +00:00
shaver%mozilla.org deecf1d9e7 replace GC cache with LRU linked-list thing. r=pavlov 2000-04-25 01:09:32 +00:00
brendan%mozilla.org 440c791824 Count allocations too; dump nodes ranked by mean allocation size. 2000-04-24 23:52:27 +00:00
dougt%netscape.com fc2a69ba00 Adding xpcom.currentProcess 2000-04-24 22:54:04 +00:00
rogerl%netscape.com 43a5e02de9 Fixes for handling missing params. 2000-04-24 22:40:53 +00:00
putterman%netscape.com 3822ffce4e Backing out troy's changes to fix various UI blocker bugs. 2000-04-24 22:29:06 +00:00
dougt%netscape.com ea1aba0784 Fixing tree blocker. nsInstallFolder did not return an error code when
it could not initialize itself.  This caused crashes and return values which
were not correct.  I also fixed a huge about of memory leaks for allocation
of strings that were never freed.  r=dveditz, a=leaf.
2000-04-24 22:23:44 +00:00
putterman%netscape.com e25d9a73e7 Backing out troy's changes to fix various UI blocker bugs. 2000-04-24 22:21:56 +00:00
putterman%netscape.com 42e26161e8 Backing out troy's changes to fix various UI blocker bugs. 2000-04-24 22:15:55 +00:00
putterman%netscape.com f6b930c9e6 backing out troy's changes to fix various ui not working blocker bugs. 2000-04-24 22:05:39 +00:00
rginda%netscape.com cdf10d48f2 adding comments 2000-04-24 21:43:49 +00:00
rpallath%eng.sun.com e6fe7452fe modified README 2000-04-24 21:28:42 +00:00
rginda%netscape.com 9366e18dd5 NotARegister check in GenericBranch::print() 2000-04-24 20:08:16 +00:00
norris%netscape.com 600d365e30 Patch from Matthias Radestock <rade@logee.com>:
Subject:
             JavaAdapter return type conversion
        Date:
             Wed, 19 Apr 2000 12:12:47 +0100
       From:
             Matthias Radestock <rade@logee.com>
 Organization:
             Logee
         To:
             norris@netscape.com
         CC:
             mccabe@netscape.com, beard@netscape.com, rogerl@netscape.com




Dear Rhino team,

When returning an array from a scripted Java object (i.e. a JS object
that implements a Java interface), no type conversion is performed, ie.
a NativeArray is returned instead of a Java array. Example:

Java:
interface Foo {
        public String[] boo();
        }

JS:
FooI = {
        boo: function() { return ["Boo"];}
        }
myFoo = new Packages.Foo(FooI);
myFoo.boo(); //==> breaks with a ClassCastException


Looking at the JavaAdapter code, there is no code for array conversion.
This is particularly bad because precisely such a conversion *does*
happen when calling a Java method from JS. So we end up with a
discrepancy.

See attachment for a patch to fix this and little test program. The
patch works by calling the coerceType function on NativeJavaObject,
which is the function responsible for doing the conversion when calling
from JS to Java. I've simplified the code so that this function gets
called for all non-primitive return type, not just arrays. There are
probably more efficient solutions but I'm not a Java bytecode hacker.


Matthias
PS: I didn't open a bug for this because I wasn't sure whether you guys
would agree that this is indeed a problem ;)





public interface JSReturnTest {

  public boolean returnBoolean();
  public char returnChar();
  public int returnInt();
  public String returnString();
  public org.mozilla.javascript.Scriptable returnScriptable();
  public Object returnObject();
  public boolean[] returnBooleanA();
  public char[] returnCharA();
  public int[] returnIntA();
  public String[] returnStringA();
  public org.mozilla.javascript.Scriptable[] returnScriptableA();
  public Object[] returnObjectA();
  public Object[][] returnObjectAA();
}




Index: JavaAdapter.java
===================================================================
RCS file: /cvsroot/mozilla/js/rhino/org/mozilla/javascript/JavaAdapter.java,v
retrieving revision 1.21
diff -r1.21 JavaAdapter.java
54c54,59
<
---
>
>     public static Object convertResult(Object result, String classname)
>     throws ClassNotFoundException {
>         return NativeJavaObject.coerceType(Class.forName(classname),
>                                            result);
>     }
467,474c472,474
<         } else  if (retType.equals(String.class)) {
<             cfw.add(ByteCode.INVOKESTATIC,
<                     "org/mozilla/javascript/Context",
<                     "toString", "(Ljava/lang/Object;)",
<                     "Ljava/lang/String;");
<             cfw.add(ByteCode.ARETURN);
<         } else if (retType.equals(Scriptable.class)) {
<             cfw.add(ByteCode.ALOAD_0);  // load 'this' to find scope from
---
>         } else {
>             String retTypeStr = retType.getName();
>             cfw.addLoadConstant(retTypeStr);
476,477c476,477
<                     "org/mozilla/javascript/Context",
<                     "toObject",
---
>                     "org/mozilla/javascript/JavaAdapter",
>                     "convertResult",
479,500c479,480
<                      "Lorg/mozilla/javascript/Scriptable;)",
<                     "Lorg/mozilla/javascript/Scriptable;");
<             cfw.add(ByteCode.ARETURN);
<         } else {
<             // If it is a wrapped type, cast to Wrapper and call unwrap()
<             cfw.add(ByteCode.DUP);
<             cfw.add(ByteCode.INSTANCEOF, "org/mozilla/javascript/Wrapper");
<             // skip 3 for IFEQ, 3 for CHECKCAST, and 5 for INVOKEINTERFACE
<             cfw.add(ByteCode.IFEQ, 11);
<             cfw.add(ByteCode.CHECKCAST, "org/mozilla/javascript/Wrapper");
<             cfw.add(ByteCode.INVOKEINTERFACE,
<                     "org/mozilla/javascript/Wrapper",
<                     "unwrap", "()", "Ljava/lang/Object;");
<
<             // If Undefined, return null
<             cfw.add(ByteCode.DUP);
<             cfw.add(ByteCode.INSTANCEOF, "org/mozilla/javascript/Undefined");
<             // skip 3 for IFEQ, 1 for ACONST_NULL, 1 for ARETURN
<             cfw.add(ByteCode.IFEQ, 5);
<             cfw.add(ByteCode.ACONST_NULL);
<             cfw.add(ByteCode.ARETURN);
<
---
>                     "Ljava/lang/String;)",
>                     "Ljava/lang/Object;");
502,503c482
<             String retTypeStr = retType.getName().replace('.', '/');
<             cfw.add(ByteCode.CHECKCAST, retTypeStr);
---
>             cfw.add(ByteCode.CHECKCAST, retTypeStr.replace('.', '/'));



   testpatch.js

               Name:
                     testpatch.js
                Type:
                     JavaScript Program (application/x-javascript)
             Encoding:
                     7bit
2000-04-24 19:36:51 +00:00
rpallath%eng.sun.com 59eca4c85a New Tests for getAlignment 2000-04-24 19:02:42 +00:00
rpallath%eng.sun.com c3291b195e getAlignment tests for API -> LEFT 2000-04-24 18:58:18 +00:00
rpallath%eng.sun.com 1adee25c28 GetAlignment API tests 2000-04-24 18:55:25 +00:00
rpallath%eng.sun.com 171e857827 New files for Killer app on Win32 2000-04-24 18:52:40 +00:00
rginda%netscape.com 9c545008e5 quieting linux warnings 2000-04-24 18:41:05 +00:00
rpallath%eng.sun.com b381bf0be3 Added README and BWTest.lst
Updated some test cases
2000-04-24 18:25:27 +00:00
brade%netscape.com b46ef0737b fixing build bustage; submitted by Philip.Blundell@pobox.com (a=granrose) 2000-04-24 15:42:15 +00:00
dveditz%netscape.com 8789b40a77 fixing clobber bustage 2000-04-24 15:03:47 +00:00
ftang%netscape.com 9f75eb5a87 Change the implementation to use nsILocalFile as the first step to fix
non ASCII problem. We will change to use the unicode version of the method in the
near future. The unicode version is put in the comment for now. After we validate the
nsILocalFile version have no problem. We will switch to it's unicode version of method
r=dougt
2000-04-24 14:51:48 +00:00
dcone%netscape.com 262b63dad4 Round the stikewidth properly.. instead of truncation. 2000-04-24 14:32:58 +00:00
dveditz%netscape.com 64d77c0aef First cut at chrome install 2000-04-24 13:53:38 +00:00
dveditz%netscape.com 15bbd2c7a4 added missing dependency 2000-04-24 13:36:06 +00:00
dcone%netscape.com 06fccd4174 Adjusted the subscript height for the font. 2000-04-24 13:34:07 +00:00
jfrancis%netscape.com c207f78168 lots of improvements to block transformations: 1) looks inside inlines for breaks; 2) fixes the "extra break when unlisting" bug 3) changing paragraph style to normal consistently gets breaks 4) any splitting needed occurs when blocks inserted plus a lot of small bug fixes 2000-04-24 11:51:12 +00:00
rjc%netscape.com fc8da5b029 Remove "category.rdf"... its been replaced with "search.rdf" which is now in the default profile directory. 2000-04-24 09:39:40 +00:00
rjc%netscape.com 27b2ab9c87 When downloading new search engines/images, check HTTP status against 200 level success. 2000-04-24 08:49:59 +00:00
alecf%netscape.com 14539e2d9f fix strres js so that the string bundle service is retrieved via getService, not createInstance()
(otherwise there were 2 createinstances for every creation of a stringbundle!)
2000-04-24 08:04:06 +00:00
rickg%netscape.com 634e686818 more WIP on strict DTD 2000-04-24 07:35:37 +00:00
tbogard%aol.net 4e41e11bd7 Added getContentDocShell to allow access to the browser docShell. 2000-04-24 06:31:30 +00:00
rickg%netscape.com 9590b2c4d4 first pass (of many) to bring us into alignment with Strict DTD 2000-04-24 06:09:04 +00:00
dougt%netscape.com b63f84a202 Adding critical check for null.
removing unneded assignment to temp var.
2000-04-24 06:08:48 +00:00
sspitzer%netscape.com a5bf878c6b fix warnings, remove unused code. 2000-04-24 05:37:34 +00:00
sspitzer%netscape.com 94a652a4bd fix for #14313, don't migrate on top of an existing directory. 2000-04-24 05:28:49 +00:00
scc%netscape.com 4fc9172ea9 makings string conversions explicit 2000-04-24 05:19:20 +00:00
scc%netscape.com 3f0250495b making string conversions explicit 2000-04-24 05:11:18 +00:00
tbogard%aol.net 1a7002f08c Added comment for when to add win_start in just like the win_stop. 2000-04-24 05:06:51 +00:00
tbogard%aol.net 7b4745b063 Added new flag for a timed out net connection. 2000-04-24 05:03:49 +00:00