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

1308 Коммитов

Автор SHA1 Сообщение Дата
rogerl%netscape.com 58feaf9b22 Disallowed multiple variable declaration in for (var X in...) 1999-09-13 21:07:34 +00:00
cls%seawood.org 1a2e16af42 Add -D_POSIX_SOURCE to DEFS to get rid of those useless 'index shadow' warnings. Add either -D_BSD_SOURCE or -D_XOPEN_SOURCE=500 to whichever Makefile.ins need it to accommodate for Posix' strictness. Add check for getopt.h for nsinstall.c. 1999-09-12 14:25:28 +00:00
jband%netscape.com 1cd1e7594d check resolve op for null before trying to use it 1999-09-11 05:22:42 +00:00
jband%netscape.com 105b05c5ab unfinished array support. fixes for exceptions 1999-09-11 05:21:30 +00:00
briano%netscape.com 5ad8121dce General cleanup. 1999-09-11 04:39:15 +00:00
briano%netscape.com 66ec0f1a1f Got rid of some trailing spaces. 1999-09-11 04:37:48 +00:00
norris%netscape.com aca2a22c7a Fix potential NullPointerException. 1999-09-10 18:39:04 +00:00
norris%netscape.com 34c9c62f33 Two submissions from Kurt Westerfield <kurt@westerfield.com>:
Subject:
        Embedding the shell
   Date:
        Wed, 8 Sep 1999 16:01:44 -0400
   From:
        "Kurt Westerfeld" <kurt@westerfeld.com>
     To:
        "Norris Boyd" <norris@netscape.com>




Norris, please find the attached zip file containing the (minor)
modifications to the Rhino shell module that enables the shell to be
embedded in a host application.

There are two areas of change to be concerned about:

    1. Any and all references to System.in/out/err have been modified to use
Main.in/out/err, which default to System.in/out/err.  Methods to do a setIn,
setOut, and setErr were added.   Note that in/out/err on Main were made
static public, so that the jikes compiler wouldn't complain (I had them as
static protected, but when accessed outside of the package, a warning was
issued).

    2.  The global and sharedGlobal static variables were made protected so
that my app can make use of them (to add extensions after an initial pass
through main()).

That's it.

I have successfully used the facility to drop a remote telnet server into
the shell interpreter, effectively giving our server a remote shell
interpreter.  It's quite nice, as we have a lot of extensions to Rhino
written that blend into our server already.

PS, I am still working on the array issues, but made a lot of progress
today.  I just wanted to get this stuff off my desk.

Thanks!

________________________________________________________________________
  Kurt Westerfeld
  Managed Object Solutions
  2722 Merrilee Drive
  Suite 350
  Fairfax, VA 22031
  Phone: 703.208.3330 x225
  Fax: 703.208.3331
  http://www.mosol.com
  mailto:kurt@mosol.com



   shell.zip

             Name:
                   shell.zip
             Type:
                   Zip Compressed Data (application/x-zip-compressed)
          Encoding:
                   base64


==============================================================================

Subject:
        Rhino Array Source (Fixed)
   Date:
        Thu, 9 Sep 1999 14:12:03 -0400
   From:
        "Kurt Westerfeld" <kurt@mosol.com>
     To:
        "Norris Boyd" <norris@netscape.com>




Attached is NativeJavaObject.java, which seems to now pass the tests supplied to me by you and Scott.  Not a lot of change, but a lot of
testing and thinking was involved. <g>

PS. I also fixed a bug in reportConversionError() which was throwing an IllegalArgumentException inside of the MessageFormat class at times.
It also looks a little nicer (uses formatting from NativeJavaMethod) and closer to the C implementation.




   NativeJavaObject.java

                        Name:
                              NativeJavaObject.java
                         Type:
                              Java Source File (text/java)
                     Encoding:
                              quoted-printable
1999-09-09 18:49:58 +00:00
mccabe%netscape.com bf5438329f Add parens to squelch 'suggest parentheses around arithmetic in operand of |' warning. Thanks to Morten Welinder <terra@diku.dk> for catching this. (And thanks to Waldemar for not letting me drop it.) 1999-09-08 23:35:37 +00:00
slamm%netscape.com 0edef8dc21 Fix warnings (again) by moving string.h include inside ifdef. Tested on mac, win, and linux. 1999-09-08 19:03:57 +00:00
slamm%netscape.com 9b2166e0db Mac needs string.h put it back. 1999-09-07 21:09:29 +00:00
slamm%netscape.com b0e651b44a Fix warning. 1999-09-07 21:05:56 +00:00
slamm%netscape.com ba6232c670 Fix unix build warnings 1999-09-07 20:35:19 +00:00
rogerl%netscape.com a9494accb9 Mostly just some cleaning up - especially in regexp.
Merged server specific GC changes from NES branch.
Bunch o' ECMA version 3 fixes to jsregexp.
1999-09-07 20:34:47 +00:00
shaver%netscape.com c5e6bad50e Add set/check of modification date and file size in registry.
Defer compilation and module object fetch to first factory use.
(not yet part of build, a=gramps)
1999-09-07 20:30:25 +00:00
shaver%netscape.com 0d33e34888 JSRuntime svc now controls lifetime; make nsIJSRuntimeService::runtime readonly 1999-09-07 19:44:13 +00:00
shaver%netscape.com 0722b8808f initial JS component loader work 1999-09-07 06:18:08 +00:00
toshok%hungry.com d5417ad6fa ignore Makefile and js 1999-09-07 05:03:42 +00:00
toshok%hungry.com 34172e4dec wrap calls to JSD_IsActiveScript with JSD_{Lock,Unlock}ScriptSubsystem. 1999-09-07 05:02:11 +00:00
toshok%hungry.com afe7957f30 fix up the unix build a bit -- egcs had problems with aggregate initializers, and linux whines about gets. also, include errno.h to stop errors dealing with the (questionable practice of) setting of errno to 0. 1999-09-07 05:00:56 +00:00
toshok%hungry.com 9993819d15 fix up unix build of jsdebugger. 1999-09-07 04:57:03 +00:00
toshok%hungry.com 75916cca3b lock/unlock the script subsystem around the call to jsd_DestroyAllJSDScripts 1999-09-07 04:54:41 +00:00
jband%netscape.com 5af91fa188 fix that shaver needs for wrapped JS object doing QI semantics 1999-09-07 01:48:13 +00:00
jband%netscape.com d54dc3ee4d fix bug 13217 and add someparam checking for other methods in this interface 1999-09-07 00:03:43 +00:00
brendan%mozilla.org d31330dd99 Expand tabs to spaces per Emacs modeline; other space cleanups. 1999-09-06 22:59:11 +00:00
toshok%hungry.com 3a6cc145f1 move the typedef to jsd_lock.h so the prototypes will match the actual definition. 1999-09-06 00:19:14 +00:00
cls%seawood.org 835ba7418d When cross-compiling, jscpucfg needs to grab the values from NSPR rather than calling sizeof(). 1999-09-05 20:46:57 +00:00
shaver%netscape.com 543b857d9b _finish_ adding JSRuntime service 1999-09-04 20:41:27 +00:00
shaver%netscape.com 14439cf8ec added files: mozilla/js/src/xpconnect/src/xpcruntimesvc.cpp 1999-09-04 20:09:55 +00:00
beard%netscape.com 54ddade8fd added files: mozilla/js/src/xpconnect/idl/nsIJSRuntimeService.idl 1999-09-04 19:58:30 +00:00
shaver%netscape.com 9fa20fc3ef JSRuntime management service 1999-09-04 19:57:49 +00:00
shaver%netscape.com 5661180216 add JSRuntime-access service 1999-09-04 19:25:15 +00:00
briano%netscape.com 8268365e89 Fix for the QNX 4.24 tinderbox breakage. 1999-09-04 03:25:02 +00:00
cls%seawood.org a72a8e9c3f Ack! Do not redefine jscpucfg target for OpenVMS arch. Only add HOST_NSPR_MDCPUCFG to build if it is defined 1999-09-03 05:35:26 +00:00
jband%netscape.com cd94757f54 renaming the field called 'code' to 'result' in nsIXPCException so that we don't conflict with DOM exception's use of the name 'code'. We want these types of exceptions to be compatible and the DOM exception ought to have a 'code' field that is as required by the DOM spec and also a 'result' field that is the nsresult. This avoids the naming conflict. 1999-09-03 02:32:21 +00:00
norris%netscape.com 5e46da0224 Long not supported here. Fix up comments so that is clear. 1999-09-02 16:48:20 +00:00
cls%seawood.org 3885dc436e Build jscpucfg using HOST_CC for cross-compiler builds. If cross-compiling, it needs the changes from the autoconf'd nspr tree to support using a different mdcpucfg.h 1999-09-02 05:27:14 +00:00
jband%netscape.com ea5d8af86f fix for bug 13001 - gotta let DefaultValue do its thing 1999-09-02 05:07:36 +00:00
jband%netscape.com e3e4cfa56d Added Components.returnCode so that JS components can control the nsresult that xpconnect will return on their behalf without having to throw the number. Also better mapping of this code to Components.lastResult so that JS components calling JS components will work right with no special treatment 1999-09-02 00:19:42 +00:00
jband%netscape.com 8531322d89 fix for bug 12954 - was failing to set rval on DeleteProperty call 1999-09-02 00:16:09 +00:00
jband%netscape.com 22517bf5ff priming the JSContext stack in the test program 1999-09-02 00:11:54 +00:00
jband%netscape.com 21b3b50d7f modernizing the undefined test in println 1999-09-02 00:11:16 +00:00
jband%netscape.com 4bdef0ce93 removing unused var 1999-09-02 00:08:53 +00:00
briano%netscape.com 55c40828fa Cleaned it up and eliminated the pointless #!gmake. 1999-09-02 00:06:06 +00:00
fur%netscape.com 57e72d2b3a Added capability to pass JS arrays as arguments to Java methods. 1999-09-01 14:37:21 +00:00
jband%netscape.com 94c6f13d23 removing commented out code 1999-09-01 09:37:20 +00:00
mcafee%netscape.com 010a1832ab Fixing comment warning on Linux. 1999-09-01 08:12:24 +00:00
cyeh%netscape.com cc2825cbe0 Remove IGNORE_MANIFEST=1. It doesn't do anything and it confuses people. 1999-09-01 00:54:34 +00:00
rogerl%netscape.com 39b97d5d00 Fixed bug : 8672, using prototype from closure instead of function
Fixed memory leak- object acquired by 'in' operator was not being released.
1999-08-30 22:17:55 +00:00
rogerl%netscape.com 2c76a7b45a Changed handling of undefined limit and negative limit values to
String.split()
1999-08-30 22:05:56 +00:00
rogerl%netscape.com 3f93d3e7ad Added new error messages for ecma_2 compliant regular expression handling. 1999-08-30 22:04:07 +00:00
fur%netscape.com 3f7bceee2b Eliminate obsolete error message 1999-08-29 16:55:02 +00:00
fur%netscape.com 7f0a6e786b Propagating fixes from SpiderMonkey140_BRANCH 1999-08-29 16:54:24 +00:00
beard%netscape.com 28bcad085f wasn't calling __intialize/__terminate. 1999-08-28 02:58:35 +00:00
jband%netscape.com 93ae7df138 fix for bug 12466 - heuristic check for existence of 'message' and 'code' properties was broken. Added missing XPC_MSG_DEF 1999-08-26 00:04:14 +00:00
ramiro%netscape.com 8644dc2074 Cleanup linking of libimg. 1999-08-25 13:37:11 +00:00
jband%netscape.com 83d989c97f - Added Support for 'foo instanceof Components.interaces.nsIFoo'.
- Added support for reflecting interface constants as Components.interfaces.nsIFoo.* (this may change).
- Only interfaces marked 'scriptable' are visible in the Components.interfaces array.
- Getting rid of some of the template style syntax.
- Added GetWStringCopied and GetWStringShared for lame tests of speed in wstring copies.
- Cleaned up more Unix warnings.
1999-08-25 06:01:42 +00:00
brendan%mozilla.org bbe959f4d1 Massive spankage to capitalize C++ method and attribute name bindings, per
Architecture Item 6.3 (news://news.mozilla.org/37BA89CF.3823D6F9%40meer.net).
1999-08-25 05:26:25 +00:00
rogerl%netscape.com a498530aa5 Fixes for ecma 2 regexp - adding context to init 1999-08-25 01:05:42 +00:00
rogerl%netscape.com e089e6f867 Fixes for ecma 2 regexp - adding context to init. 1999-08-25 01:03:06 +00:00
rogerl%netscape.com 60f4c56d75 New errors for ecma 2 regexp. 1999-08-25 01:01:19 +00:00
rogerl%netscape.com 03a9476464 Fixes for ecma 2 - add context to regexp init. 1999-08-25 01:00:09 +00:00
rogerl%netscape.com 8c0f28df90 Fixed \<digits> interpretation for ecma 2 compliance. 1999-08-25 00:59:21 +00:00
rogerl%netscape.com 13eda36d4e Fixed test case - was assuming a length limit on octal sequence rather than
a value limit. (this is version 120 specific in any case)
1999-08-25 00:56:05 +00:00
jband%netscape.com 085ded5878 Switched to newer style NS_IMPL_* macros. Fixed some warnings. 1999-08-23 08:01:33 +00:00
jband%netscape.com 0c0fd6a587 changed a comment 1999-08-23 07:58:19 +00:00
jband%netscape.com 72978b6209 changed all those pesky instances of 'NULL' to 'nsnull' 1999-08-23 07:16:50 +00:00
jband%netscape.com bb9b3a9f2c - Move reflected result codes into Components.results - populated dynamically.
- Throw nsIXPCException objects rather than strings into JS.
- Better and more information in exceptions - including names of result codes and call stack.
- Added nsIJSErrorReport as attachment to exceptions for JS errors.
- Exceptions thrown in JS now get properly translated into result codes.
- Exceptions thrown JS->native->JS get propagated.
- Added per thread nsIXPConnect::[G,S]etPendingException.
- Added XPCConvert::JSValToXPCException - still needs better handling JS exception objects.
- Added XPCConvert::JSErrorToXPCException.
- No longer eat JS errrors in wrapped JS code called from native code.
- Declare xpconnect result codes in nsIXPConnect.h.
- Changed format of xpc.msg to give error names and descriptions.
- Fixed extraneous semicolons on XPC_IMPLEMENT_* macro usage.
- Using NS_IMPL_ISUPPORTS2 for nsIXPCScriptable declarations.
- Improve refcounting in xpccomponents.
- Turned some common code into macros.
- Converting some interfaces to use mccabe's NS_IMPL_* macros.
- Cleanup lots of trailing whitespace.
- Fixed idl comments.
1999-08-22 23:56:42 +00:00
ramiro%netscape.com 16bbd09726 cleanup linking of libmozreg. 1999-08-21 15:41:53 +00:00
mccabe%netscape.com 779d51d186 First cut at removing manual declaration of interface methods in implementation classes and replacing with xpidl-generated NS_DECL_NSIFOO macro.
Hopefully this'll help turn the copy-n-paste tide towards using this macro.
1999-08-21 08:54:47 +00:00
briano%netscape.com b40b24cd8d General cleanup. 1999-08-21 03:06:46 +00:00
jband%netscape.com b029b36916 added files: mozilla/js/src/xpconnect/src/xpcexception.cpp 1999-08-20 23:11:45 +00:00
jband%netscape.com 2b6e686d50 Rework nsIDs are reflected into JS. Expose HasInstance to nsIXPCScriptable. Initial work on making structured exceptions for JS. Switch nsIXPCScriptable implementations to use multiple inheritence rather that returning separate objects - stop breaking some xpcom rules. Fix NS_IMPL_QUERY_INTERFACE_SCRIPTABLE. Get rid of caching of nsIAllocator service. Add system to conditionally auto update the ThreadJSContextStack as we get called from JS. Expose Components.Exception and Components.ID ctors to JS. Convert more NULLs to nsnulls. Trim and or fix broken nsID tests. 1999-08-20 23:11:30 +00:00
brade%netscape.com fdee7cf9ca remove mac compiler warnings 1999-08-20 13:30:39 +00:00
cls%seawood.org 0991be09fa Removed all references to obsolete OBJDIR variable.
Removed various sections of config.mk & rules.mk that were only used by OBJDIR or by a non-autoconf build.
1999-08-20 06:52:59 +00:00
mgleeson1%netscape.com a16b5c49c6 #
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL.  You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation.  Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
# Reserved.
#

DEPTH		= ../../../..
topsrcdir	= @top_srcdir@
srcdir		= @srcdir@
VPATH		= @srcdir@

include $(DEPTH)/config/autoconf.mk

LIBRARY_NAME	= xpconnect
MODULE		= xpconnect

CPPSRCS		= \
		nsXPConnect.cpp \
		xpcarbitrary.cpp \
		xpccomponents.cpp \
		xpccontext.cpp \
		xpcconvert.cpp \
		xpcjsid.cpp \
		xpclog.cpp \
		xpcmaps.cpp \
		xpcmodule.cpp \
		xpcstack.cpp \
		xpcthreadcontext.cpp \
		xpcthrower.cpp \
		xpcwrappedjs.cpp \
		xpcwrappedjsclass.cpp \
		xpcwrappednative.cpp \
		xpcwrappednativeclass.cpp \
		xpcwrappednativejsops.cpp \
		$(NULL)

include $(topsrcdir)/config/config.mk

# XXX hackage!
# only copy the .so to components dir on platforms where xptcall is supported

# Unixish x86
ifneq (,$(filter SunOS Linux FreeBSD NetBSD BSD_OS,$(OS_ARCH)))
ifeq (86,$(findstring 86,$(OS_TEST)))
IS_COMPONENT	= 1
endif
endif

# Neutrino Cross-Compiled for x86
ifneq (,$(filter NTO,$(OS_TARGET)))
ifeq (86,$(findstring 86,$(OS_TEST)))
IS_COMPONENT	= 1
endif
endif

# Solaris/sparc
ifeq ($(OS_ARCH),SunOS)
ifneq (86,$(findstring 86,$(OS_TEST)))
IS_COMPONENT	= 1
endif
endif

# Linux/sparc
ifeq ($(OS_ARCH),Linux)
ifeq ($(OS_TEST),sparc)
IS_COMPONENT    = 1
endif
endif

# NetBSD/m68k
ifeq ($(OS_ARCH),NetBSD)
ifneq (,$(filter amiga atari hp300 mac68k mvme68k next68k sun3 sun3x x68k,$(OS_TEST)))
IS_COMPONENT	= 1
endif
endif

# BeOS/Intel
ifeq ($(OS_ARCH),BeOS)
ifeq ($(OS_TEST),BePC)
IS_COMPONENT	= 1
endif
endif

# HPUX
ifeq ($(OS_ARCH),HP-UX)
ifneq ($(CC),gcc)
IS_COMPONENT	= 1
endif
endif

# AIX
ifeq ($(OS_ARCH),AIX)
IS_COMPONENT	= 1
endif

# IRIX
ifeq ($(OS_ARCH),IRIX)
ifneq ($(basename $(OS_RELEASE)),5)
IS_COMPONENT	= 1
endif
endif

# OpenVMS (Alpha only at this point)
ifeq ($(OS_ARCH),OpenVMS)
ifeq ($(CPU_ARCH),Alpha)
IS_COMPONENT	= 1
endif
endif

# Linux or NetBSD ARM
ifneq (,$(filter Linux NetBSD,$(OS_ARCH)))
ifeq (arm,$(findstring arm,$(OS_TEST)))
IS_COMPONENT	= 1
endif
ifeq (sa110,$(findstring sa110,$(OS_TEST)))
IS_COMPONENT	= 1
endif
endif

include $(topsrcdir)/config/rules.mk

# this is automatically discovered under BeOS
ifneq ($(OS_ARCH),BeOS)
LIBS		+= \
		-lmozjs \
		-lxpcom \
		-lmozreg \
		$(NSPR_LIBS) \
		$(NULL)
endif

DEFINES		+= -DJSFILE -DJS_THREADSAFE
1999-08-19 21:30:47 +00:00
jband%netscape.com 3854fff49d Fixing xptinfo bug with getting information about the type of an interface pointer parameter of a method when the method is inherited from another interface in another typelib file. The api needs to also pass along the method index in order to convey enough information to always give the right answer. Got that? :) Fixing users of this modified api also. 1999-08-19 10:12:30 +00:00
tbogard%aol.net c96570c9fa XPCOM Cleanup: Fixed error checking on AggregatedQueryInterface agruments. 1999-08-19 05:48:10 +00:00
tbogard%aol.net c8c8eea4c0 XPCOM Cleanup: Fixed Aggregation macros in nsAgg.h to do aggregation correctly. Fixed usages and implementation of aggregation using these macros through out the tree. 1999-08-19 05:36:30 +00:00
norris%netscape.com 179e277ffe Add a comment. 1999-08-16 18:54:47 +00:00
beard%netscape.com 2fdb417734 js now propagates ThreadDeath exceptions 1999-08-14 02:32:20 +00:00
beard%netscape.com dcae8601b3 added mozilla/js/rhino/org/mozilla/javascript/tools/shell/SharedGlobal.java 1999-08-14 02:01:00 +00:00
norris%netscape.com f317859421 Fix more importerTopLevel problems. 1999-08-13 20:44:46 +00:00
norris%netscape.com 4ae628be8d Fix problem:
The fix sort of works. But there are some new problems. I enclosed two JavaScript files, button.js and image.js.

If I load button.js first and then image.js, I got the following:

js> load("button.js");
js> load("image.js");
Ambiguous import: [JavaClass javax.swing.ImageIcon] and [JavaClass javax.swing.ImageIcon]
js> load("image.js");
Ambiguous import: [JavaClass java.net.URL] and [JavaClass java.net.URL]
js> load("image.js");
Ambiguous import: [JavaClass java.lang.System] and [JavaClass java.lang.System]
js> load("image.js");
loadImage for 0
Ambiguous import: [JavaClass java.awt.Toolkit] and [JavaClass java.awt.Toolkit]
js> load("image.js");
loadImage for 0
js>

If I load imag.js first and then button.js, I got the following:

js> load("image.js");
loadImage for 0
js: [JavaPackage java.lang.URL] is not a function.
[JavaPackage java.lang.URL] is not a function.
js> load("image.js");
js: [JavaPackage java.lang.ImageIcon] is not a function.
[JavaPackage java.lang.ImageIcon] is not a function.
js> load("image.js");
js: [JavaPackage java.lang.ImageIcon] is not a function.
[JavaPackage java.lang.ImageIcon] is not a function.
js> load("image.js");
js: [JavaPackage java.lang.ImageIcon] is not a function.
[JavaPackage java.lang.ImageIcon] is not a function.
js> load("button.js");
js: [JavaPackage java.lang.JButton] is not a function.
[JavaPackage java.lang.JButton] is not a function.
js> load("button.js");
js: [JavaPackage java.lang.JButton] is not a function.
[JavaPackage java.lang.JButton] is not a function.
js> load("image.js");
js: [JavaPackage java.lang.ImageIcon] is not a function.
[JavaPackage java.lang.ImageIcon] is not a function.
js>

It looks like something wrong in the image.js file but this should not interfere with button.js. It looks like some arbitary package objects are created, like java.lang.URL. This happened in NativeJavaPackage.get method. If a class of java.lang.URL is not found, a package object is then created. So next time the interpreter encounters URL, it somehow uses the object java.lang.URL instead of the correct class object java.net.URL.. This is one problem. The interference between button.js and jmage.js is another problem.

Howard
  ----- Original Message -----
  From: Norris Boyd
  To: \ Howard\\ Xuhua Lin
  Sent: Thursday, August 12, 1999 12:58 PM
  Subject: Re: ImporterTopLevel problem


  Sorry I've been slow. I finished up the fix this morning and have posted it on the ftp site and checked into cvs.
  Let me know if it works for you.

  --Norris

  \"Howard\" Xuhua Lin wrote:

    Hi, Norris, what's the status of the ImporterTopeLevel problem (i.e if you use importPackage twice, you will get an "Ambiguous import" exception)? Are you still working on it? Howard
1999-08-13 17:25:14 +00:00
norris%netscape.com abc0613496 Fix the following problem:
Subject:
        ImporterTopLevel problem
   Date:
        Fri, 6 Aug 1999 15:42:50 -0400
   From:
        "\"Howard\" Xuhua Lin" <howard@softcom.com>
     To:
        "Norris Boyd" <norris@netscape.com>
    CC:
        "Andrew Wason" <aw@softcom.com>




Hi, The following script will cause an EvaluatorException: Ambiguous import: [JavaPackage java.awt.JButton] and [JavaPackage
java.awt.Packages.javax.swing.JButton] in the js shell:

js>importPackage(java.awt);
js>importPackage(Packages.javax.swing);
js>new JButton();.

The current JS shell will not print this exception message, even though the comment says "// Already printed message, so just fall
through". I add System.err.println(ee.getMessage()); for this exception.

The problem is that in NativeJavaPackage.get(String, Scriptable) method, if a ClassNotFoundException is caught, a
NativeJavaPackage object is created and passed back to ImporterTopLevel.get Method. So in ImporterTopLevel.get method, object v
is always not NOT_FOUND and the ambiguous exception will be thrown. Object v is supposed to be a Class object but it actually is
a Package object.

The fix can be either (1) in NativeJavaPackage.get(String, Scriptable) method, if a ClassNotFoundException is caught, return a
NOT_FOUND object (you may still create a Package object) or (2) in ImporterTopLevel.get method, make sure the returned object
from NativeJavaPackage.get method is of NativeJavaClass type.

Howard
1999-08-12 16:59:29 +00:00
rogerl%netscape.com 0fb847d2e5 Converting value type for setter method to match declared type. 1999-08-11 18:33:48 +00:00
rogerl%netscape.com f7d87ad41d Factored out convertArg so that it can be called from ScriptableObject
for setter methods.
1999-08-11 18:31:34 +00:00
rogerl%netscape.com 1d17ab4d1f Undo captures from failed OPT child 1999-08-11 04:34:52 +00:00
rogerl%netscape.com 6c61f8bdb0 Tentative fix for allowing call to 'exec' on RegExp objects. 1999-08-11 04:34:05 +00:00
rogerl%netscape.com 949625b502 Fix 'zero' & 'one' to use byte instead of Double 1999-08-11 04:33:08 +00:00
rogerl%netscape.com 6734615a71 Fixed lastIndex test - value is ignored for non-global regexp. 1999-08-11 04:31:19 +00:00
rogerl%netscape.com d7aeb2cd5a Fixed limit parameter interpretation to match ecma_2 spec. 1999-08-10 23:36:23 +00:00
rogerl%netscape.com 0c0ff5606b Fixed test results to match new spec. 1999-08-10 19:25:00 +00:00
rogerl%netscape.com 499ee153d4 Re-wrote the string_split algorithm to match new spec. 1999-08-10 18:36:46 +00:00
mccabe%netscape.com d6e7410f31 Changes to the xpidl compiler -
Error if an interface is declared [scriptable], but contains methods that can't be scripted because they refer to native-declared types, unless the method is declared [noscript].

This change is intended to make it easier to determine when an interface is not scriptable, and to make it easier to see what changes need to be made to make it scriptable.

As many of the .idl files in the tree defined [scriptable] interfaces that contained non-scriptable methods, I've sprinkled [noscript] throughout.  As the interfaces weren't scriptable anyway, this shouldn't change their visibility to javascript.
1999-08-10 12:18:01 +00:00
jband%netscape.com 28a2bd53f1 updating tests 1999-08-10 06:12:06 +00:00
toshok%hungry.com f8a04a2364 we need keyCompare functions to these hashtables. 1999-08-10 05:25:14 +00:00
jband%netscape.com 3f75ebc9ff adding enumeration of CLSIDs and ProgIDs using code from Robert Ginda <rginda@ix.netcom.com> 1999-08-09 05:02:25 +00:00
brendan%mozilla.org 45c305e973 - Tighten up code in gc_root_marker that now allows for roots to contain jsvals
(tagged machine words, some of which when untagged are 8-byte-aligned GC heap
  pointers).
- Fix bad effects of rogue global-replace of JS_FREE by free.
1999-08-08 02:32:00 +00:00
jband%netscape.com bb288dc200 add JS based test for nsISupportsPrimitives. Run using 'xpcshell xpctest_primitive.js' 1999-08-06 09:43:45 +00:00
norris%netscape.com 00f712e786 Fix problem found by Andrew Wason <aw@softcom.com>:
Subject:
        reflection and illegal package access
   Date:
        Wed, 04 Aug 1999 21:56:20 -0400
   From:
        Andrew Wason <aw@softcom.com>
     To:
        norris@netscape.com (Norris Boyd)
    CC:
        Howard Lin <howard@softcom.com>




If you run Rhino under JDK1.2 with a security manager:

java -Djava.security.manager=java.lang.SecurityManager
org.mozilla.javascript.tools.shell.Main

Then reflection fails for objects that are in a restricted access package
(e.g. sun.*).  Rhino is reflecting based on the dynamic type of the object
instead of the declared static return type.

In this example, createImage is declared to return java.awt.Image, but it
returns sun.awt.image.OffScreenImage.  Attempting to reflect this class
results in a java.security.AccessControlException for
java.lang.RuntimePermission accessClassInPackage.sun.awt.image.

Here is the script.  You will need to type it in because you won't be able
to load it from a file due to the security manager.

var f = new java.awt.Frame();
f.setVisible(true);
var i = f.createImage(10,10);
1999-08-05 16:49:20 +00:00
rogerl%netscape.com cc0f36d7ec Fixed tests for back-reference case 1999-08-04 23:40:13 +00:00
rogerl%netscape.com bddae3b849 Fixed off by one error and expected output text. 1999-08-04 23:38:34 +00:00
norris%netscape.com 7c5ca20070 Fix problem found by Andrew Wason <aw@softcom.com>:
Subject:
        null arguments
   Date:
        Wed, 04 Aug 1999 13:22:35 -0400
   From:
        Andrew Wason <aw@softcom.com>
     To:
        norris@netscape.com
    CC:
        Howard Lin <howard@softcom.com>




When I try to pass a null argument to an interface implemented in JS, I get:

js: Cannot convert null to an object.
js: uncaught JavaScript exception:
org.mozilla.javascript.EvaluatorException: Cannot convert null to an object.


var b = new Packages.javax.swing.border.Border() {
        getBorderInsets : function(c) {
                return new Insets(0,0,0,0);
        }
};
b.getBorderInsets(null);


Here is the stack trace where the exception is happening:

java.lang.reflect.InvocationTargetException:
org.mozilla.javascript.EvaluatorException: Cannot convert null to an object.
         at
org.mozilla.javascript.tools.ToolErrorReporter.runtimeError(ToolErrorReporte
r.java:106)
         at org.mozilla.javascript.Context.reportRuntimeError(Context.java:484)
         at org.mozilla.javascript.Context.reportRuntimeError(Context.java:500)
         at
org.mozilla.javascript.ScriptRuntime.toObject(ScriptRuntime.java:529)
         at org.mozilla.javascript.Context.toObject(Context.java:1107)
         at adapter0.getBorderInsets(<adapter>)
         at java.lang.reflect.Method.invoke(Native Method)
         at
org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java,
Compiled Code)
         at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1256)
         at org.mozilla.javascript.Interpreter.interpret(Interpreter.java,
Compiled Code)
         at
org.mozilla.javascript.InterpretedScript.call(InterpretedScript.java:49)
         at
org.mozilla.javascript.InterpretedScript.exec(InterpretedScript.java:37)
         at org.mozilla.javascript.Context.evaluateReader(Context.java:691)
         at
org.mozilla.javascript.tools.shell.Main.processSource(Main.java, Compiled Code)
         at org.mozilla.javascript.tools.shell.Main.main(Main.java:146)


Context.toObject does not allow wrapping nulls.
JavaAdapter.generateOverride should generate bytecode to check if an
argument is null and if it is not call Context.toObject.

I'll take a look at fixing this after the other JavaAdapter patches get
checked in so we don't get out of sync.

Andrew
--
Andrew Wason
SoftCom, Inc.
aw@softcom.com
1999-08-04 23:14:57 +00:00
rogerl%netscape.com 729d969253 The lastIndex property is defined to be an integer which we're allowed to
keep as 32 bits, so the tests for 33 bits were too demanding.
1999-08-04 22:27:31 +00:00
rogerl%netscape.com c93ef4e649 Missing '\' before \n. Trailing '|' in expected output was not correct. 1999-08-04 22:26:07 +00:00
rogerl%netscape.com 1355cfb383 Was using 'g' flag instead of 'm' and wasn't really testing the multiline
functionality (assuming I interpreted the intent correctly).
1999-08-04 22:24:57 +00:00
rogerl%netscape.com d47169e539 Added Linux/sparc component 1999-08-04 20:46:58 +00:00
norris%netscape.com 452bf1af92 Fix bug 11077 "ScriptableObject.defineFunctionProperties() uses invalid signature check."
The check was actually okay, but the error message didn't state the error correctly.
1999-08-04 19:37:51 +00:00
norris%netscape.com b8ad6df8ca * Take advantage of the new semantics of Context.enter & exit to save codesize.
* Accept patch from Andrew Wason <aw@softcom.com>:

Subject:
        Re: partial interface problem
   Date:
        Wed, 04 Aug 1999 13:04:37 -0400
   From:
        Andrew Wason <aw@softcom.com>
     To:
        norris@netscape.com
    CC:
        Howard Lin <howard@softcom.com>




>I'm having a problem implementing a Java interface in JS where I don't
>implement all the methods, and one of the methods I don't define returns
>non-void.

I have a patch for this.  I generate bytecode in
JavaAdapter.generateReturnResult to check the return type on the stack from
JavaAdapter.callMethod.  If it is Undefined, return null.

I'm not positive this is the right way to fix this - maybe it should be
fixed closer to the source (e.g. prevent callMethod from returning
Undefined to begin with)

Andrew

--
Andrew Wason
SoftCom, Inc.
aw@softcom.com
1999-08-04 17:43:18 +00:00
norris%netscape.com 94b8197903 Accept patch (with modifications) from Andrew Wason <aw@softcom.com>:
Subject:
        default JavaAdapter patch
   Date:
        Tue, 20 Jul 1999 15:35:01 -0400
   From:
        Andrew Wason <aw@softcom.com>
     To:
        norris@netscape.com
    CC:
        mccabe@netscape.com, rogerl@netscape.com




Attached is a patch to the patch I sent a while ago for the JavaAdapter stuff.

If a SecurityManager is installed, attempting to access the
"org.mozilla.javascript.JavaAdapter" system property can throw a
SecurityException.  This should not prevent the default JavaAdapter
implementation from being used.

Andrew
--
Andrew Wason
SoftCom, Inc.
aw@softcom.com
1999-08-04 16:56:18 +00:00
jband%netscape.com eb1a8d0cf3 adding modifications to support enumeration of interfaces from Robert Ginda <rginda@ix.netcom.com>. Also extending nsIXPCScriptable to support a set of flags - the only one implemented now allows for indicating that the objects static properties shouyld not be enumerated 1999-08-04 06:22:27 +00:00
mccabe%netscape.com 6618e19762 Added missing ImporterTopLevel.java and ListenerCollection.java files to the source list.
Thanks to Andrew Wason <aw@softcom.com> for noticing this problem.
1999-08-04 02:50:47 +00:00
rogerl%netscape.com 5e4cc01584 Updated internal name of exec function to match new naming rules. 1999-08-03 22:41:57 +00:00
mccabe%netscape.com 56ac346458 - Added OS_TARGET-switched definition of CLASSPATHSEP, to support building under Windows NT with GNU make. Thanks to Andew Wason <aw@softcom.com> for this fix.
- Removed outdated references to JSDEBUG_JAR.
1999-08-03 22:15:02 +00:00
norris%netscape.com 14d89e5bff Adding patch (with slight modifications for javadoc) from Andrew Wason <aw@softcom.com>:
Subject:
        Rhino reflection patch
   Date:
        Wed, 28 Jul 1999 18:14:52 -0400
   From:
        Andrew Wason <aw@softcom.com>
     To:
        norris@netscape.com
    CC:
        mccabe@netscape.com, rogerl@netscape.com, Howard Lin <howard@softcom.com>




When JavaAdapter generates an adapter class, it does not take into account
the types of method parameters when wrapping the generated methods arguments.

This means that if a non-public class implements a public interface the
non-public class type will be wrapped instead of the declared public
interface - and methods cannot be invoked via the wrapper.

I have attached sample code (reflect-demo.zip) which shows this.  The
JavaScript caller.js generates an adapter implementing the CallerInterface
interface.  CallerInterface has a method (doSomething) which takes an
argument of type pkg.Interface.  pkg.Target is a non-public class that
implements pkg.Interface.  If an instance of pkg.Target is passed to the
CallerInterface adapter doSomething method, an Error is thrown because
pkg.Target.doSomething is called (instead of pkg.Interface.doSomething) and
pkg.Target is not public.

I have attached a patch to Context.java, ScriptRuntime.java and
JavaAdapter.java.  I overloaded toObject in Context and ScriptRuntime to
take a 3rd argument which is the declared type of the object being
wrapped.  This is passed to NativeJavaObject.wrap so that it generates the
correct wrapper. I changed JavaAdapter.generateOverride to generate
bytecode calling Context.toObject passing the declared Class type of the
argument.

Context.java also includes my previously submitted patch for dealing with
SecurityExceptions and the JavaAdapter property (because this patch has not
been checked into CVS yet).

Andrew

--
Andrew Wason
SoftCom, Inc.
aw@softcom.com



   reflect-patch.txt

                Name:
                      reflect-patch.txt
                 Type:
                      Plain Text (text/plain)




   reflect-demo.zip

                   Name:
                         reflect-demo.zip
                    Type:
                         Zip Compressed Data (application/x-zip-compressed)
                Encoding:
                         base64
1999-08-03 21:24:39 +00:00
norris%netscape.com e48746d3bd Remove unused clone() method. 1999-08-03 20:40:25 +00:00
rogerl%netscape.com 49598375a1 Fixed test cases for non-global regexp. case - the result array should be
exactly the same as that returned by simply 'exec'ing the regexp against
the input string.
1999-08-03 00:51:23 +00:00
mccabe%netscape.com 71d9e10c3c Further fix to properly include classes from the org.mozilla.classfile package in the generated .jar file.
Thanks to Andrew Wason <aw@softcom.com> for his continued work on the Rhino make system.
1999-08-03 00:25:30 +00:00
mccabe%netscape.com 3824e4ce66 Add the classes defined in org/mozilla/classfile to js.jar. 1999-08-02 09:01:19 +00:00
jband%netscape.com 1e78c7d4c9 fix for bug 10998 pointed out by rginda@ix.netcom.com. This was really just a refcounting bug 1999-07-31 18:53:40 +00:00
briano%netscape.com b1ebcd6eb3 OpenVMS-specific addition to force a POSIX build of jscpucfg. 1999-07-31 00:38:25 +00:00
jband%netscape.com dce27dd602 1) fix the xpconnect factories to not use static objects.
2) add a test that acts as a sample for doing oberloaded methods on xpconnect wraped natives.
3) add a NOT_IMPLEMENTED method to wrapped native for getting the prototype JS object.
4) Set the global object of the JSContext as the wrapped native JSObject's parent when creating this JSObject. This makes JS code compiled against the wrapper actuall work!
5) fix the refcounting on factories in the tests/components module
1999-07-31 00:26:35 +00:00
jband%netscape.com e118451581 copy in most of the better error reporter from js.c 1999-07-31 00:19:50 +00:00
briano%netscape.com ea37bbc00a Trivial elimination of some pointless macros as discussed in bug 8568. Approved by leaf@mozilla.org. 1999-07-29 01:18:12 +00:00
brendan%mozilla.org 2ac2a0d840 Fix warnings reported at http://tinderbox.mozilla.org/SeaMonkey/warnings.html, mostly unsigned/signed bothers. 1999-07-28 06:48:44 +00:00
briano%netscape.com d99daeea9b Cleaned it up and changed the name of libreg.{a,so} to libmozreg.{a,so} to fix the conflict reported in bug 8568. 1999-07-27 23:27:44 +00:00
waldemar%netscape.com 89d2f00c13 Updated for recent semantic engine changes. Changed the meaning of (?= to match Perl. 1999-07-27 01:05:59 +00:00
waldemar%netscape.com a47778dc21 Updated for recent semantic engine changes 1999-07-27 01:05:27 +00:00
waldemar%netscape.com e44b2fd3a0 Implemented partial order for operator precedences. Removed global array functions and reformatted 'length' and 'empty' functions. 1999-07-27 01:03:19 +00:00
waldemar%netscape.com b58090bf41 Implemented partial order for operator precedences. Removed global array functions and reformatted 'length' and 'empty' functions. Made lexer-actions into global function calls. 1999-07-27 01:02:21 +00:00
waldemar%netscape.com 06b9b1e365 Made lexer-actions into global function calls 1999-07-27 01:00:05 +00:00
waldemar%netscape.com 661e147d86 Added partial order library 1999-07-27 00:58:44 +00:00
waldemar%netscape.com 0c4a9632a2 Replaced :unit by :empty-10 1999-07-27 00:58:01 +00:00
waldemar%netscape.com bb32acd59c First Checked In. 1999-07-27 00:57:03 +00:00
mccabe%netscape.com 01f06bc645 Fix code to invoke Wrapper interfaces using INVOKEINTERFACE rather than INVOKEVIRTUAL.
Thanks go to Andrew Wason <aw@softcom.com> for finding this problem and providing the patch:



If we implement a Java interface in JavaScript, and a method in that interface returns a Java object, we get a java.lang.IncompatibleClassChangeError: org/mozilla/javascript/Wrapper  exception.

We have attached a sample JavaScript file which duplicates the error.

The problem is JavaAdapter is generating an INVOKEVIRTUAL bytecode to call Wrapper.unwrap, but Wrapper is an interface and so INVOKEINTERFACE should be used instead.  As a result of this change, the IFEQ bytecode generated needs to jump more bytes.  We have attached a patch that fixes the problem.

Andrew
--
Andrew Wason
SoftCom, Inc.
aw@softcom.com
1999-07-26 10:45:38 +00:00
mccabe%netscape.com 05ad44c9f8 Added NPL. 1999-07-26 10:41:46 +00:00
mccabe%netscape.com 4ebeecff4e Comment fixes.
- normalized initial MPL comment to match the format of others in the tree, including an initial -*- Mode line.

- removed RCS $log$, etc. comments.  We use CVS, and they just make spurious changes...
1999-07-26 10:40:53 +00:00
brendan%mozilla.org bf87ed2da8 Eliminate warning about unsigned/signed == comparison. 1999-07-23 08:24:35 +00:00
brendan%mozilla.org a82fcf9479 Add new flag to js_DecompileValueGenerator calls. 1999-07-23 08:22:12 +00:00
brendan%mozilla.org 892c6a80d1 Bugs, bugs bugs:
- js_DecompileValueGenerator had rusted due to bytecode/source-note changes,
  or maybe parts of it never worked right.  Anyway, it now does not induce a
  crashing underflow in the decompiler.  As part of this fix, it now takes a
  checkStack flag telling whether to look for the jsval v argument on the JS
  stack.  The calls from ImportProperty, js_SetProperty, and js_DeleteProperty
  pass in v a jsval for the property id, which should not be sought after on
  the stack (it might happen to be there due to o['p'] = 2, but we want to
  decompile o["p"], not "p").
- js_DecompileValueGenerator would load a generating pc even if the value v
  did not match the pc's corresponding stack item!  Oops.  This lead to less
  than idea diagnostics.
- js_DecompileValueGenerator was also not mapping JSOP_TRAP to the real op at
  a sufficiently early and univeral point in its control flow.
- Fix PopOff to assert and check for stack underflow in the decompiler, and
  beef up PushOff too (it asserted, but did not check).
- js_ReportIsNotFunction now avoids JS_InternString by indexing directly into
  cx->runtime->atomState.typeAtoms with the result of JS_TypeOfValue.
- Removed unnecessary local GC root reserved by non-zero trailing member of
  obj_eval's JSFunctionSpec initializer.
1999-07-23 08:01:54 +00:00
mccabe%netscape.com f88d4c4862 Fix warnings flagged by the auto-warnings page http://tinderbox.mozilla.org/SeaMonkey/warnings.html . Thanks slamm. 1999-07-22 10:36:23 +00:00
mccabe%netscape.com 44c1aa3958 Changes to support building on Alpha NT.
Patches courtesy bob meader <bob@guiduck.com> who seems to be working fast and furious on this port.
1999-07-22 03:58:51 +00:00
cbegle%netscape.com 1e355189af fixed a versioning problem with the tests. these should succeed now.
these files files have no impact on the mozilla build.
1999-07-21 19:20:02 +00:00
cbegle%netscape.com 85da0ba851 *** empty log message *** 1999-07-21 18:02:34 +00:00
cbegle%netscape.com 5b6edba7cc update shared functions file.
this is not part of the mozilla client build, and has no effect on its
bustedness.
1999-07-20 18:00:13 +00:00
cbegle%netscape.com 899e0d5d83 adding file for running tests in the driver. 1999-07-20 17:49:01 +00:00
Jerry.Kirk%Nexwarecorp.com c80aa6b941 Defined DASH_R for Neutrino 1999-07-19 21:18:19 +00:00
jband%netscape.com 1af850b898 enabling xpconnect for Linux ARM because we now have xptcall code for Linux ARM from Stefan Hanske <sh990154@mail.uni-greifswald.de> 1999-07-19 02:59:21 +00:00
cbegle%netscape.com f80bb6aad0 the js1.2 tests really need the version(120) called.
fix regression test for #7703.

This is not part of the mozilla build and has no effect on its bustedness.
1999-07-16 21:47:51 +00:00
jband%netscape.com 5cf8d696a6 adding forward declaration test 1999-07-16 20:38:16 +00:00
jband%netscape.com 7972332b69 added files: mozilla/js/src/xpconnect/idl/xpctest2.idl 1999-07-16 20:35:58 +00:00
jband%netscape.com 5c4e62e268 adding new file for forward declaration test 1999-07-16 20:33:36 +00:00
jband%netscape.com c50f5e41ca an inout of interface pointer test that illustrates that bug 9914 is not a bug 1999-07-16 04:29:49 +00:00
jband%netscape.com 425c09247d make the const things const so that strict compilers don't complain 1999-07-16 04:23:00 +00:00
norris%netscape.com 1eb0a9e85e Add new example. 1999-07-16 03:03:20 +00:00
cbegle%netscape.com eb378fea4e Remove more recursive calls to startTest. hm..
This is not part of the mozilla build and has no effect on its bustedness.
1999-07-16 01:39:07 +00:00
cbegle%netscape.com 47f6d82edf Add a regression test case for #7224.
This is not part of the mozilla build and has no effect on build bustage.
1999-07-16 01:30:24 +00:00
cbegle%netscape.com 00f16d48ce Remove a recursive call to startTest.
This file is not part of the client build.
1999-07-16 01:25:50 +00:00
mccabe%netscape.com 140c877e02 Fix to 9523. In the javascript Date implementation, check for unsupplied date argument to new Date(year, month, date) rather than clamping it to 1 if < 1. Previously we ignored negative values for the date argument, rather than subtracting from the resulting date, as per the ECMA-262 spec. for the JavaScript language.
Thanks go to Martin Honnen <martin.honnen@sector27.de> for spotting this difference from the spec.
1999-07-16 00:50:11 +00:00
mccabe%netscape.com f54711dfb3 Fix to 9523.
Add an #if defined(__arm) check to tell jsdtoa.c about the (somewhat bizzare) endian-ness of the ARM architecture.

Thanks go to Stefan Hanske <sh990154@mail.uni-greifswald.de> for this fix.
1999-07-16 00:45:13 +00:00
rogerl%netscape.com 7d5915b747 Fixed compile time errors + minor memory allocation problems. 1999-07-15 23:37:05 +00:00
cbegle%netscape.com bf39a7e9ea Add a regression test case for #7635.
This file is not part of the client build.
1999-07-15 22:28:12 +00:00
cbegle%netscape.com a83c8e90d2 New tests for the JavaScript engine.
These tests are not built and are not part of the client build.
1999-07-15 20:27:40 +00:00
jband%netscape.com 3b6299569f 1) added JSContextStack per thread service (with test).
2) rooted out all instances of JS_ReportErros and replaced with JS exception throwing.
3) added more exception message types.
4) Added service (also reflected into JS) for getting JS and native stack objects to be used in exceptions.
5) Fixed broken test.
6) updated TODO list.
1999-07-15 05:42:53 +00:00
mcafee%netscape.com 6799de361e Fixing linux warning 1999-07-15 03:02:44 +00:00
jband%netscape.com dba86ef898 added files: mozilla/js/src/xpconnect/src/xpcstack.cpp 1999-07-15 03:00:55 +00:00
jband%netscape.com 25a274eb5b adding placeholder file - soon to be used 1999-07-15 02:59:43 +00:00
jband%netscape.com 01ae1a98f1 added files: mozilla/js/src/xpconnect/idl/xpcexception.idl 1999-07-15 02:50:47 +00:00
jband%netscape.com 2adb3d6c59 adding file - soon to be used 1999-07-15 02:48:07 +00:00
brendan%mozilla.org b983096b74 Warning abatement. 1999-07-15 02:46:00 +00:00
brendan%mozilla.org 451238c875 - Fix for..in bug where ECMA 12.6.3 steps 5 and 6 are reversed: the effect was
to define an unbound global variable used to enumerate an empty object, when
  the standard says no variable should be defined.
- Clean up minor nits, make comment style match prevailing, tighten up for..in
  element-indexing special case comments.
- Fix js_Invoke to take CONSTRUCT and INTERNAL flags arg instead of a construct
  boolean arg and the JSStackFrame internalCall mis-located boolean non-arg.
  Use these flags correctly in all calls (previous version failed to set the
  bogus frame.internalCall around js_Invoke calls from jsfun.c and jsstr.c).
1999-07-15 02:24:23 +00:00
cbegle%netscape.com ece8b98f54 add a regression test for bug #9802 1999-07-14 20:26:27 +00:00
cbegle%netscape.com fdca8e9c92 correct the naming of these tests. negative tests have an -n.js filename
extension.
1999-07-14 18:12:11 +00:00
cbegle%netscape.com a981b78562 allow command line option to specify the full path to the js executable. 1999-07-14 18:11:22 +00:00
jdunn%netscape.com 1d3c4947d1 Need to put libxpconnect.so in components for AIX 1999-07-14 16:36:16 +00:00
norris%netscape.com d1249dd430 Report errors for incorrect usages of varargs forms. 1999-07-08 16:32:51 +00:00
norris%netscape.com 67d7d2b31e Fix javadoc bug. 1999-07-08 00:37:12 +00:00
ramiro%netscape.com 9200ddaebb Checkin another chunk of Alex Larsson's non-exported symbol reduction
patch.  All changes protected by  MOZ_STRIP_NOT_EXPORTED.
These particular changes set the NS_EXPORT declarations as needed by
the linker.
1999-07-07 09:02:21 +00:00
brendan%mozilla.org 1a2b00ad18 Avoid overallocating JS stack for "%ip" and other multi-char format codes. 1999-07-07 08:18:42 +00:00
mccabe%netscape.com b497e1ee93 Define JS_HAVE_LONG_LONG for VMS on the Alpha.
Thanks to Colin Blake <colin@theblakes.com> for this patch.
1999-07-07 00:38:52 +00:00
mccabe%netscape.com b3e571fe0e Fix to 9241 - Change types to unsigned to fix compile-time warnings.
Thanks go to kherron@sgum.mci.com for the patch.
1999-07-06 22:58:42 +00:00
sspitzer%netscape.com 3649abeee9 fix warning 1999-07-06 22:40:54 +00:00
norris%netscape.com d44417769f Fix bug in ScriptableObject that make classes with jsGet_ but not jsFunction_ work improperly.
Also update Foo example to conform to new defineClass API.
1999-07-06 17:13:33 +00:00
jband%netscape.com 1f2399d268 added files: mozilla/js/src/xpconnect/src/xpcthreadcontext.cpp 1999-07-05 19:42:55 +00:00
jband%netscape.com 96c26ceb43 adding new file to build projects 1999-07-05 19:42:32 +00:00
jband%netscape.com 6f36ff2772 added files: mozilla/js/src/xpconnect/idl/nsIJSContextStack.idl 1999-07-05 19:29:09 +00:00
jband%netscape.com d5f54ee406 adding JSContextStack interface 1999-07-05 19:26:36 +00:00
jband%netscape.com 7d3165f329 updating string example/test to include an example of [shared] 1999-07-03 00:59:56 +00:00
jband%netscape.com af6b377f29 adding a string getter tests as an example for bug 9227 1999-07-03 00:34:35 +00:00
briano%netscape.com 4ac02159ad Minor IRIX-specific tweak to make 5.x happy. 1999-07-02 23:19:13 +00:00
jband%netscape.com b1282050fe fix mismatched bool type. Thanks to Glen Nakamura <glen.nakamura@usa.net> 1999-07-02 23:08:24 +00:00
ramiro%netscape.com 86fad9ffe1 Part I of Alexander Larsson's (alex@signum.se) patch to reduce symbol bloat.
All these changes are safely ifdefed out for the time being.
There are also a few implementation
DEFINES cleanups.
1999-07-02 14:59:36 +00:00
dveditz%netscape.com 4c4f269dd4 nakefile cleanups 1999-07-02 13:42:17 +00:00
jband%netscape.com 7939655243 spaced out format string for readability 1999-07-02 02:41:15 +00:00
jband%netscape.com 6307910ee4 xpconnect now QIs the object to be wrapped before wrapping it 'just to be sure' 1999-07-02 02:17:37 +00:00
jband%netscape.com ecee6badc3 change some instances of 'const char* foo' to 'const char foo[]' 1999-07-01 18:21:01 +00:00
brendan%mozilla.org f6ac0352a7 Rip out assign hack, simplify boolean value synthesis, minor cleanups. 1999-07-01 02:24:32 +00:00
jband%netscape.com bed85f79da 1) make nsIXPConnect.h include only jspubtd.h instead of the whole of jsapi.h.
2) make the wrappedJS QI check for a match with chained wrappers before trying QI on the wrapped JS object.
3) add support for brendan's new JSArgumentFormatter callback to do auto js arg conversions - with test.
1999-06-30 06:01:36 +00:00
jband%netscape.com 4cb66eedfa an nsISupports::GetIID() to nsCOMTypeInfo<nsISupports>::GetIID() change that scc missed 1999-06-30 03:17:30 +00:00
jband%netscape.com 8c9b477138 Fixing lame bug in two Find implementations - thanks shaver. Removing commented out dead code 1999-06-29 21:37:09 +00:00
jband%netscape.com 4ce4016bd1 doing my part for bug 8227 1999-06-29 21:34:50 +00:00
scc%netscape.com 54c96baa72 |nsISupports::GetIID()| --> |nsCOMTypeInfo<nsISupports>::GetIID()| 1999-06-29 21:01:31 +00:00
mcafee%netscape.com f24dcc30a9 BeOS changes. a=jband 1999-06-29 07:05:14 +00:00
mcafee%netscape.com 3491f36188 BeOS changes. a=jband 1999-06-29 06:57:57 +00:00
mcafee%netscape.com e98da71c56 BeOS changes. a=jband 1999-06-29 06:53:01 +00:00
mcafee%netscape.com 26fb25c58e BeOS changes. a=jband 1999-06-29 06:51:25 +00:00
mcafee%netscape.com a0739f965b BeOS changes, a=jband. 1999-06-29 06:47:38 +00:00
mcafee%netscape.com 8f5c81e5fd BeOS changes. a=jband 1999-06-29 06:44:17 +00:00
mcafee%netscape.com 34df2d5c5a BeOS changes 1999-06-29 06:42:26 +00:00
mcafee%netscape.com b43f9d36f9 BeOS changes 1999-06-29 06:36:18 +00:00
mcafee%netscape.com d4613b733d Changes for BeOS. r=jband 1999-06-29 06:23:40 +00:00
brendan%netscape.com 705992358f - Add (jsatomid) cast to GET_ATOM_INDEX to abate warnings.
- Fix js_GetAtom fallibility by returning &dummy on assert-botch "can't happen"
  index out of range case.
- js_InitAtomMap needn't bother nulling ale->next with tmp save
- js_InitAtomState explicit tail fusion for FROB via goto bad, and early memset
  (I know, JSRuntime is cleared already and it contains the atom state ... but
  jsatom.c doesn't know that).
- Clear all ATOM_ flags save ATOM_PINNED when creating a new atom.
- Cleanup xtra, ALIGNNUM, etc. useless variables, use JSVAL_ALIGN and JS_MAX.
1999-06-29 02:19:17 +00:00
brendan%netscape.com 680af4966c Final part of 8042 fix: always initialize frame.internalCall. 1999-06-29 00:22:06 +00:00
brendan%netscape.com d812020eef Forgot externs before JS_PUBLIC_API calls for ArgumentFormatter functions. 1999-06-29 00:20:21 +00:00
brendan%netscape.com 006608b0f7 OK, final fix not to impute JS_ARGUMENT_FORMATTER_DEFINED from va_start (duh).
Despite my stupidity here, I must say that over-includers elsewhere of both
jspubtd.h and jsapi.h, and even jscntxt.h, with system headers intermixed, suck
a lot too.
1999-06-28 04:50:37 +00:00
brendan%netscape.com d5e19cb369 Shoot me now. 1999-06-28 04:36:54 +00:00
brendan%netscape.com 72ba6416a2 *Clone* JSArgumentFormatter typedef from jspubtd.h to jsapi.h to cope with bad
includers who grab jspubtd.h first, then stdarg.h, then jsapi.h.  Suckage.
1999-06-28 04:04:58 +00:00
brendan%netscape.com b889c10cb4 Move JSArgumentFormatter typedef from jspubtd.h to jsapi.h to cope with bad
includers who grab jspubtd.h first, then stdarg.h, then jsapi.h.
1999-06-28 03:52:16 +00:00
brendan%netscape.com 7e820b0c72 Added custom JS_{Convert,Push}Arguments{,VA} formatter function support for
use by XPConnect and other clients.
1999-06-28 03:13:21 +00:00
sspitzer%netscape.com 3c95fb7fef more anal tricks. 1999-06-26 05:01:40 +00:00
sspitzer%netscape.com adacdfb839 being anal. 1999-06-26 04:59:48 +00:00
brendan%netscape.com f209a9322b Remove gratuitous include of <string.h>. 1999-06-26 03:32:15 +00:00
brendan%netscape.com e929b85ff4 - Rename js_CallFunctionValue to js_InternalCall to distinguish it from all
"external" calls compiled from scripts, which have stack budget depth slots
  under the return value slot for the call expression's generating pc.
- New internalCall packed boolean flag in JSStackFrame to distinguish callers
  of js_InternalCall so the generating pc isn't mistakenly stored depth slots
  below stack space allocated on-the-fly for internal call args/rval.
- Fixed bugzilla bug 8042, finally by storing the call expression's generating
  pc -- but only for external calls.
- Whitespace policing, gratuitous parenthesization reduction, etc.
1999-06-26 03:28:47 +00:00
brendan%netscape.com 664844765b Eliminate assignment in condition. 1999-06-26 03:00:36 +00:00
briano%netscape.com ac1b6ba8d3 Fix for the case where jscpucfg dies and leaves a zero-length jsautocfg.h. 1999-06-24 22:35:28 +00:00
rogerl%netscape.com ae476b46cd Added tree deletion to regexp finalizer 1999-06-24 20:47:20 +00:00
Jerry.Kirk%Nexwarecorp.com 42318bb122 - Add support for Neutrino platform 1999-06-24 20:21:26 +00:00
fur%netscape.com 90f9504386 Backing out the merge with SpiderMonkey140_BRANCH for LiveConnect.
Some OJI-related changes were made on the trunk that can't be easily
reconciled with the branch.
1999-06-24 05:56:16 +00:00
fur%netscape.com ec38c4038d Merge changes from SpiderMonkey140_BRANCH between
JS_STABLE_DROP_04261999 and
 JS_STABLE_DROP_06221999
1999-06-24 05:22:41 +00:00
briano%netscape.com 0f4f67d026 IRIX-specific fix to create jsmath.o properly. 1999-06-23 22:20:25 +00:00
fur%netscape.com c301cd5024 Removing shaver/brendan fix for #8042 since it's apparently buggy 1999-06-23 19:39:08 +00:00
fur%netscape.com bdfa8055e2 Merge from SpiderMonkey140_BRANCH:
Incorporated changes from JS_STABLE_DROP_04261999 to JS_STABLE_DROP_06221999
1999-06-23 14:18:56 +00:00
jband%netscape.com 57da103f9b 1) fix for bug 7700 - use a JSClass without a call method for all wrappers that don't do nsIXPCScriptable so that JS doesn't think they're all functions.
2) breakout js ops into their own file so that the flattening project is less complicated
3) add a noisy object to the test components - this object prints addrefs, release, QIs, ctor, and dtor. This is useful for refcounting tests.
4) cleanup some component registration stuff.
1999-06-23 07:04:34 +00:00
jband%netscape.com ff917e5746 fix bustage 1999-06-22 20:57:57 +00:00
jband%netscape.com 3e9ca9595c added files: mozilla/js/src/xpconnect/src/xpcwrappednativejsops.cpp 1999-06-22 19:50:25 +00:00
jband%netscape.com c266b08c2f breaking out stuff into a new file - using placeholder now to get all makefiles and projects building right first 1999-06-22 19:45:56 +00:00
beard%netscape.com df4127f63c added ImporterTopLevel.java 1999-06-19 23:38:35 +00:00
norris%netscape.com 3797e07208 Add support for selectively filtering Java classes' visibility to JS 1999-06-18 21:35:35 +00:00
norris%netscape.com e9b22cde54 Reduce need for a current context. 1999-06-18 21:32:18 +00:00
norris%netscape.com aadce49c83 A bunch of changes, some experimental.
Support for jsGet_ and jsSet_ prefixes to methods for explicit getter
and setter definition.
Addition of "importClass" and "importPackage" top-level functions.
The beginnings of a history object accessible from the shell.
1999-06-18 17:37:20 +00:00
cbegle%netscape.com 89373c0b65 Add regression test for http://bugzilla.mozilla.org/show_bug.cgi?id=7635.
Rename files for consistency.

These files are not part of the client.
1999-06-17 00:20:04 +00:00
cbegle%netscape.com 906d33eea7 Add regression test for http://bugzilla.mozilla.org/show_bug.cgi?id=4088,
Date.parse.

Not built in the client.
1999-06-16 19:25:05 +00:00
jband%netscape.com 01f33d5355 updaing TODO list 1999-06-16 01:30:13 +00:00
jband%netscape.com cd88910ae0 fix for bug 8248. Not setting the VAL_IS_IFACE flag for purely out params when calling native from JS. All interfaces that return an interface (e.g. QueryInterface) were getting left with one extra ref. Yuck! 1999-06-16 01:29:49 +00:00
dp%netscape.com 49de0b7870 Using default autoregistration 1999-06-16 00:34:08 +00:00
rogerl%netscape.com ab99e3dfdb Fixed bug #7635. instanceof now starts the chain walk from the object
prototype.
1999-06-15 23:44:30 +00:00
cbegle%netscape.com ab6d808ff3 Fix errors in liveconnect tests per furman@netscape.com. Renaming files
to not have a "-n" filename, since they are no longer negative tests.
1999-06-15 20:03:30 +00:00
jband%netscape.com 3c3d813ffb removing an assert that is no longer appropriate 1999-06-15 04:46:18 +00:00
jband%netscape.com 8fffb2d916 fix for bug 7940. Notification in xpconnect of JSContext about to be destroyed was zeroing out information later used to remove gc root. This was keeping JS_RemoveRoot from being called for those objects. So, the JSRuntime was getting left with pointers to roots for stuff on JSContexts long since destroyed and for which memory had been recycled. The fix is to be *sure* to do all the proper cleanup in xpconnect upon notification that a JSContext is about to be destroyed. 1999-06-15 02:48:26 +00:00