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

1308 Коммитов

Автор SHA1 Сообщение Дата
brendan%mozilla.org e70dccad55 JS_VERSION 140 lacked JS_HAS_NUMBER_FORMATS #define. 1999-09-21 21:33:38 +00:00
shaver%netscape.com eeb584ed5a turn on JS loader on Windows 1999-09-21 20:08:38 +00:00
shaver%netscape.com 4d11ade55f fixed Windows makefile goop and fixed __stdcall issue 1999-09-21 19:42:09 +00:00
rogerl%netscape.com 95fe66abc6 ECMA errors as exceptions changes - conformance to latest spec for
hierarchy and names etc. Added attempt to make the base exceptions be
instanceof equal across contexts.
1999-09-21 18:58:51 +00:00
shaver%netscape.com 81d56404d9 Errors-as-Exceptions and catchguards, because people want/need them 1999-09-21 18:48:43 +00:00
brade%netscape.com a83835cabe not currently part of the build (a=leaf); add libraries for xpcom and js so optimized will link 1999-09-21 15:55:56 +00:00
brade%netscape.com d661fc2540 First Checked In. 1999-09-21 14:55:39 +00:00
shaver%netscape.com d7f7ac9424 define some key names locally until we export them properly from xpcom 1999-09-21 14:54:39 +00:00
shaver%netscape.com 2d3e9e6f7e remove unused file and add initial windows build foo 1999-09-21 14:43:45 +00:00
shaver%netscape.com 75d7450ba4 add include of nsIModule.h -- why was this working before? 1999-09-21 14:38:50 +00:00
shaver%netscape.com be1e3bbcff fix =/== idiocy, abort if we fail to get runtime and better diagnostics 1999-09-21 14:36:40 +00:00
waterson%netscape.com fdc0f0beb3 Add some curly braces so that the rest of the world can run. 1999-09-21 04:20:17 +00:00
shaver%netscape.com ba18bf64a1 build JS component loader by default 1999-09-21 01:09:33 +00:00
shaver%netscape.com e6881e3478 fix typo before I inflict it on the world 1999-09-21 01:08:21 +00:00
brendan%mozilla.org 4ec954edb0 - Bumped default compile-time JS version from 1.4 to 1.5.
- Add JS1.5 getter/setter support in all its glory:

  * getter function SN() {return ++x} at top-level or as a closure binds an SN
    property getter than returns the incremented value of x.  Likewise for
    setter function SN(y) {return y = x}.

  * getters and setters may be defined in an object literal:
      o = {p getter:function() {return ++this.x},
           p setter:function(y){return this.x = y},
           x:42};

  * getter= and setter= operators (compound tokens) may be used to bind getter
    and setter properties dynamically:
      o = new Object;
      o.p getter= function() {return ++this.x};
      o.p setter= function(y){return this.x = y};
      o.x = 42;

    Waldemar is concerned that this form will collide semantically with JS2, so
    I am not committing to keeping it in JS1.5.  I'd like to check my code in
    ASAP so shaver can use it, and I'd also like to see this form get used (or
    not) during Mozilla betas.  Caveat emptor, and if you find this "dynamic"
    or "imperative" form necessary and hard to substitute, please let me know.
    If this proves important to users, then I think JS1.5 should keep it.

- Cleaned up property flags (in a binary-incompatible fashion -- who cares?) by
  eliminating JSPROP_ASSIGNHACK and JSPROP_TINYIDHACK.

- Added JS_DONT_PRETTY_PRINT flag to be ORed with the indent argument to the
  several JS_Decompile*() API calls.  This avoids any newlines or identation in
  the decompiled string.
 
- Improved and extended (for getter/setter non-reservation) scanner lookahead
  by using a circular (power-of-2 sized) token buffer.

- Fix ECMA Edition 3 deviation where function f(){function g(){}} bound f.g by
  mistake (it should arrange to make a closure named g in activations of f, but
  it should not bind a property of function f).
1999-09-21 00:13:48 +00:00
rogerl%netscape.com 53952765f6 (Bug #13416)
Turned off 'super' keyword - was letting through some cut'n'pasted java
code quietly and blowing big chunks out of the codegen/interpreter later.
Anybody know why 'super' had an interesting value here? - there was no
support for it on any path that I could see.
1999-09-20 22:21:24 +00:00
norris%netscape.com d66f23fafa Changes necessary to generate adapter classes to files with associated optimizer package. 1999-09-20 21:16:45 +00:00
jband%netscape.com 357467c1cc fix for bug 13426 - can now do 'new Components.classes.foo()' to create a new instance of a wrapped native 1999-09-20 20:59:38 +00:00
jband%netscape.com 7cc103b757 fix a warning and add JS stack dumper with a test. 1999-09-20 07:32:32 +00:00
jband%netscape.com c04dfdac8f - Changed the interface for getting the interface_is argnum.
- Merged the typelib types for array and array_with_length.
- Added typelib types for string_with_size and wstring_with_size
- Fixed array param conversion and cleanup - using two passes over the params where necessary.
- Added array conversions when calling wrapped JS objects.
- Added expanded array tests.
- Avoid repeated atomization of 'value' property name.
1999-09-20 02:51:16 +00:00
mccabe%netscape.com 39e5fe6519 Fix to 7610. Modify xpidl compiler to add 'const' to the method signature for generated attribute setter methods for string, wstring and nsid attributes.
As this changed the generated interface signatures, I had to change all of the uses to avoid bustage.  Any corners of the browser that aren't built by default, or that I haven't discovered how to build, may be at risk of bustage if they use string or wstring attributes.  (This could mean blackwood; sorry, guys!)

Many thanks to Alec Flett (alecf@netscape.com) for preparing diffs for the mailnews portion of the signature changes; thanks also to Ariel Backenroth (arielb@rice.edu) and Mike Shaver (shaver@mozilla.org) for help with updating the tree with NS_DECL_NSIFOO macros; everwhere where one of these macros was used was one less place I had to manually add 'const'.

Also removed extraneous space from generated method signatures, leftover from Brendan's capitalization spam, and made 'const decl must be of type short or long' an error rather than just a warning.
1999-09-19 23:46:35 +00:00
slamm%netscape.com ce1c9ef630 Fix build whine. 1999-09-18 01:15:57 +00:00
slamm%netscape.com 37fd48a824 Add braces to avoid "ambiguous else" warning. 1999-09-18 00:13:02 +00:00
slamm%netscape.com ff3f8d2d65 Fix build warning. 1999-09-18 00:10:11 +00:00
slamm%netscape.com 535ba2e06d Fix build warnings, but get it right. 1999-09-18 00:09:24 +00:00
colin%theblakes.com 635bcc17d9 Order of evaluation is undefined, hence two ++ in one statement is bad 1999-09-18 00:03:28 +00:00
slamm%netscape.com 8aaaafe723 Fix build warning. 1999-09-17 23:57:47 +00:00
brendan%mozilla.org ccbeeddbbc Fix va_arg abusages (13676, thanks to ajoshi@glue.umd.edu and Franz.Sirl@munich.netsurf.de for the patch). 1999-09-17 23:46:20 +00:00
waldemar%netscape.com 75b0ee9f80 First Checked In. 1999-09-17 19:45:20 +00:00
waldemar%netscape.com 1c84bceae2 NOT IN BUILD. Made JSRef work as a Macintosh MPW tool 1999-09-17 19:45:07 +00:00
norris%netscape.com 08c1752616 Fix comments. 1999-09-17 16:38:51 +00:00
norris%netscape.com e3ec2e1782 fix comment 1999-09-17 16:37:35 +00:00
colin%theblakes.com 20d6154559 Remove OpenVMS specific code, its no longer needed 1999-09-17 11:53:11 +00:00
norris%netscape.com 14eadb66ef Clearer example. 1999-09-17 06:12:45 +00:00
norris%netscape.com 60c5cbcb99 Tutorial examples. 1999-09-17 05:54:27 +00:00
cls%seawood.org b88eebd5e1 Undefined __P before redefining it. 1999-09-17 04:21:03 +00:00
rogerl%netscape.com de0539f848 Backed out preventing multiple var decls in for..in stmts - it impacted
all for stmts instead, duh.
1999-09-16 22:12:29 +00:00
waldemar%netscape.com 5a43c15125 Shut up Linux compiler warnings 1999-09-16 08:16:21 +00:00
waldemar%netscape.com 1d2d779bd2 Updated standalone JS shell Mac project to remove accumulated breakage. Added debug build. 1999-09-16 07:54:01 +00:00
waldemar%netscape.com 187f052d20 First Checked In. 1999-09-16 07:51:52 +00:00
waldemar%netscape.com d910e5e841 Added number formatting routines required by ECMA. Fixed several long-standing floating-point reading and writing bugs. Upgraded to latest version of David Gay's floating-point code to fix one of these bugs. Added many comments there. 1999-09-16 07:16:33 +00:00
waldemar%netscape.com d6c83ee683 Turned on 64-bit integers on Mac 1999-09-16 07:13:23 +00:00
waldemar%netscape.com 79b4c35b2f Added ECMA number formatting 1999-09-16 07:12:30 +00:00
waldemar%netscape.com 9e86e5f3ba Added ECMA number formatting error message 1999-09-16 07:12:00 +00:00
waldemar%netscape.com 0a7bf55002 Added NaN atom 1999-09-16 07:09:24 +00:00
waldemar%netscape.com 5afaee97fc Fixed Mac warnings 1999-09-16 07:08:49 +00:00
jband%netscape.com d1445daa09 fix for 13819 - missing a release 1999-09-14 22:51:04 +00:00
briano%netscape.com d383eba5ba Whoops, deleted one too many endifs. 1999-09-14 00:10:22 +00:00
briano%netscape.com 5ff10c0df2 General cleanup. 1999-09-13 23:49:27 +00:00
rogerl%netscape.com 3acd0af5e8 Added define NES40 for server-related gc fixes 1999-09-13 21:08:26 +00:00
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