Commit Graph

1060 Commits

Author SHA1 Message Date
rogerl%netscape.com
8ee7e4dbe3 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
c40b5eb226 Changed handling of undefined limit and negative limit values to
String.split()
1999-08-30 22:05:56 +00:00
rogerl%netscape.com
ab037e08c4 Added new error messages for ecma_2 compliant regular expression handling. 1999-08-30 22:04:07 +00:00
fur%netscape.com
35fb077e22 Eliminate obsolete error message 1999-08-29 16:55:02 +00:00
fur%netscape.com
036aa965fc Propagating fixes from SpiderMonkey140_BRANCH 1999-08-29 16:54:24 +00:00
beard%netscape.com
ae4c1402d3 wasn't calling __intialize/__terminate. 1999-08-28 02:58:35 +00:00
jband%netscape.com
d4f04e6ea1 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
5c9835cc68 Cleanup linking of libimg. 1999-08-25 13:37:11 +00:00
jband%netscape.com
bdc94f184f - 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
defeffaabd 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
a59e01d63d Fixes for ecma 2 regexp - adding context to init 1999-08-25 01:05:42 +00:00
rogerl%netscape.com
3c54401cd6 Fixes for ecma 2 regexp - adding context to init. 1999-08-25 01:03:06 +00:00
rogerl%netscape.com
bb3f4355d0 New errors for ecma 2 regexp. 1999-08-25 01:01:19 +00:00
rogerl%netscape.com
86ebd61886 Fixes for ecma 2 - add context to regexp init. 1999-08-25 01:00:09 +00:00
rogerl%netscape.com
a845f3ca48 Fixed \<digits> interpretation for ecma 2 compliance. 1999-08-25 00:59:21 +00:00
rogerl%netscape.com
34e85a1b9c 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
465726be68 Switched to newer style NS_IMPL_* macros. Fixed some warnings. 1999-08-23 08:01:33 +00:00
jband%netscape.com
eb6cb3f04d changed a comment 1999-08-23 07:58:19 +00:00
jband%netscape.com
1b34910a0c changed all those pesky instances of 'NULL' to 'nsnull' 1999-08-23 07:16:50 +00:00
jband%netscape.com
7f1f0f4f3d - 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
2c19866af3 cleanup linking of libmozreg. 1999-08-21 15:41:53 +00:00
mccabe%netscape.com
d98f4dca1d 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
f08b4b5bff General cleanup. 1999-08-21 03:06:46 +00:00
jband%netscape.com
174036f2af added files: mozilla/js/src/xpconnect/src/xpcexception.cpp 1999-08-20 23:11:45 +00:00
jband%netscape.com
5ea06c2c11 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
d2b75277c5 remove mac compiler warnings 1999-08-20 13:30:39 +00:00
cls%seawood.org
c2bdb85bf4 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
cc01d6c8c1 #
# 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
d63d8a18c4 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
67af37b3e7 XPCOM Cleanup: Fixed error checking on AggregatedQueryInterface agruments. 1999-08-19 05:48:10 +00:00
tbogard%aol.net
57feff30c2 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
cea0ae8198 Add a comment. 1999-08-16 18:54:47 +00:00
beard%netscape.com
efd6873119 js now propagates ThreadDeath exceptions 1999-08-14 02:32:20 +00:00
beard%netscape.com
f8e5d95fcd added mozilla/js/rhino/org/mozilla/javascript/tools/shell/SharedGlobal.java 1999-08-14 02:01:00 +00:00
norris%netscape.com
6b84d958f4 Fix more importerTopLevel problems. 1999-08-13 20:44:46 +00:00
norris%netscape.com
4751b9866b 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
1d174dde8d 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
8135508ba4 Converting value type for setter method to match declared type. 1999-08-11 18:33:48 +00:00
rogerl%netscape.com
d9458a9429 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
9d49971dfa Undo captures from failed OPT child 1999-08-11 04:34:52 +00:00
rogerl%netscape.com
f5682225f9 Tentative fix for allowing call to 'exec' on RegExp objects. 1999-08-11 04:34:05 +00:00
rogerl%netscape.com
7971c3069a Fix 'zero' & 'one' to use byte instead of Double 1999-08-11 04:33:08 +00:00
rogerl%netscape.com
59e4c96f70 Fixed lastIndex test - value is ignored for non-global regexp. 1999-08-11 04:31:19 +00:00
rogerl%netscape.com
feb87ac66a Fixed limit parameter interpretation to match ecma_2 spec. 1999-08-10 23:36:23 +00:00
rogerl%netscape.com
a2644affcd Fixed test results to match new spec. 1999-08-10 19:25:00 +00:00
rogerl%netscape.com
edc08d0635 Re-wrote the string_split algorithm to match new spec. 1999-08-10 18:36:46 +00:00
mccabe%netscape.com
2a403483de 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
4939d0f312 updating tests 1999-08-10 06:12:06 +00:00
toshok%hungry.com
de92454091 we need keyCompare functions to these hashtables. 1999-08-10 05:25:14 +00:00
jband%netscape.com
c153f122e9 adding enumeration of CLSIDs and ProgIDs using code from Robert Ginda <rginda@ix.netcom.com> 1999-08-09 05:02:25 +00:00