Commit Graph

23928 Commits

Author SHA1 Message Date
jband@netscape.com
b46968731b changed all those pesky instances of 'NULL' to 'nsnull' 1999-08-23 07:16:50 +00:00
jband@netscape.com
2c82fb91ad - 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
090a0e36b4 cleanup linking of libmozreg. 1999-08-21 15:41:53 +00:00
mccabe@netscape.com
dc85343e9f 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
7dd6792e2f General cleanup. 1999-08-21 03:06:46 +00:00
jband@netscape.com
459e6bd228 added files: mozilla/js/src/xpconnect/src/xpcexception.cpp 1999-08-20 23:11:45 +00:00
jband@netscape.com
de008fef78 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
a50c7e5dea remove mac compiler warnings 1999-08-20 13:30:39 +00:00
cls@seawood.org
be468eae84 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
af5b531d6b #
# 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
3bddc539eb 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
73aaed761e XPCOM Cleanup: Fixed error checking on AggregatedQueryInterface agruments. 1999-08-19 05:48:10 +00:00
tbogard@aol.net
b49eb58ef1 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
rogerl@netscape.com
57500c6915 Fixed lastIndex test - value is ignored for non-global regexp. 1999-08-11 04:31:19 +00:00
rogerl@netscape.com
07e992a3e9 Fixed test results to match new spec. 1999-08-10 19:25:00 +00:00
rogerl@netscape.com
e3e2f23555 Re-wrote the string_split algorithm to match new spec. 1999-08-10 18:36:46 +00:00
mccabe@netscape.com
2399f2b095 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
a06a9f277e updating tests 1999-08-10 06:12:06 +00:00
toshok@hungry.com
82cd8c483b we need keyCompare functions to these hashtables. 1999-08-10 05:25:14 +00:00
jband@netscape.com
4e3c9aeea9 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
3f6b5dcca4 - 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
b6c03fbd88 add JS based test for nsISupportsPrimitives. Run using 'xpcshell xpctest_primitive.js' 1999-08-06 09:43:45 +00:00
rogerl@netscape.com
cf31d163a1 Fixed tests for back-reference case 1999-08-04 23:40:13 +00:00
rogerl@netscape.com
7f79d859c6 Fixed off by one error and expected output text. 1999-08-04 23:38:34 +00:00
rogerl@netscape.com
2f5cb3988d 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
d124f1996c Missing '\' before \n. Trailing '|' in expected output was not correct. 1999-08-04 22:26:07 +00:00
rogerl@netscape.com
6845ba8250 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
ee35d2f88e Added Linux/sparc component 1999-08-04 20:46:58 +00:00
jband@netscape.com
52a2ea6d52 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
rogerl@netscape.com
f90f610e03 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
jband@netscape.com
69fd01ac30 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
48f038e547 OpenVMS-specific addition to force a POSIX build of jscpucfg. 1999-07-31 00:38:25 +00:00
jband@netscape.com
5208e9a33f 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
39a69b2d9a copy in most of the better error reporter from js.c 1999-07-31 00:19:50 +00:00
briano@netscape.com
1e444cc3e9 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
8a08819a9c 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
7b4dfaa39d 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
5d1fc074a7 Updated for recent semantic engine changes. Changed the meaning of (?= to match Perl. 1999-07-27 01:05:59 +00:00
waldemar@netscape.com
04e7e3a29b Updated for recent semantic engine changes 1999-07-27 01:05:27 +00:00
waldemar@netscape.com
933a7acf4d 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
b743c45a32 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
2706e7caf3 Made lexer-actions into global function calls 1999-07-27 01:00:05 +00:00
waldemar@netscape.com
2f3bf4a63d Added partial order library 1999-07-27 00:58:44 +00:00
waldemar@netscape.com
bcb1c1b7de Replaced :unit by :empty-10 1999-07-27 00:58:01 +00:00
waldemar@netscape.com
f348f5e5a7 First Checked In. 1999-07-27 00:57:03 +00:00
brendan@mozilla.org
526f69e548 Eliminate warning about unsigned/signed == comparison. 1999-07-23 08:24:35 +00:00
brendan@mozilla.org
900e5dfe58 Add new flag to js_DecompileValueGenerator calls. 1999-07-23 08:22:12 +00:00
brendan@mozilla.org
5997feaac8 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
4db01845c1 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
741a35dc17 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