Commit Graph

2322 Commits

Author SHA1 Message Date
brendan%mozilla.org
d8f3cd1921 Comply with weird ECMA nit: call (o.f)() (note parens around the function expression) must bind 'this' to the global object, not to o\! (41864, r=shaver). 2000-06-08 06:46:18 +00:00
nboyd%atg.com
bd67f54d28 Fix formatting. 2000-06-07 14:51:08 +00:00
nboyd%atg.com
fc46786bff Fix the following problem:
Subject:
        Odd behaviour on placement of .jar files?!
   Date:
        Mon, 05 Jun 2000 10:46:08 -0700
   From:
        John Raykowski <xski@xski.org>
     To:
        nboyd@atg.com




Hello,

I didn't want to post this directly as a rhino bug 'coz I think it may
be more of a JDK thing, but I thought I'd toss it to you as well.

The goal is to create a JavaScript object that implements a Java
interface. Straightforward enough and the example on the page using
ActionListener works without a hitch.  However, when I try to do the
same with my own interface, I get an error message: error instantiating
({0}): class {1} is interface or abstract (coming from
NativeJavaClass.construct).

Here's where it gets a bit strange.  Normally, I run with the jar files
in jre/lib/ext.  When I remove the rhino files from jre/lib/ext and
reference them explicitly on the commandline with the -cp option, it
works as expected and my script can implement the interface just fine.
Go figure.

Anyhoo, there ya go.  Like I said, I think its a JDK issue, but I
thought you'd be interested.  The attached zipfile contains a set of
sample code to demonstrate this problem.

Thanks heaps,

-jmr
2000-06-07 14:50:47 +00:00
brendan%mozilla.org
73d4167370 Use localizable error message for out of memory. 2000-06-06 04:54:04 +00:00
brendan%mozilla.org
28d3dcb5fc Better fix, really (r=shaver for sure). 2000-06-06 04:41:05 +00:00
brendan%mozilla.org
4e92401f64 Better control flow for catch clause code generation (r=shaver). 2000-06-06 04:27:37 +00:00
mccabe%netscape.com
3b337ab6af Fix to potential leak introduced with fix to 40406.
Be conservative in handling the lifetime of the safe context created by XPConnect to execute JS Components, and save it off to be destroyed at cleanup time, even if some other safe context is registered with XPConnect via SetSafeJSContext.

r=vishy, a=brendan
2000-06-06 00:01:25 +00:00
brendan%mozilla.org
6f0b30ca8f Fix missing $ bug when testing test_dir. 2000-06-03 19:20:03 +00:00
brendan%mozilla.org
d2c7c21d1b Avoid zero-length malloc (and assertbotch) in array_sort, just return true early\! 2000-06-03 19:00:28 +00:00
warren%netscape.com
512c8bf433 Renaming nsIAllocator to nsIMemory (and nsAllocator to nsMemory). API cleanup/freeze. Bug #18433 2000-06-03 09:46:12 +00:00
waldemar%netscape.com
2166c80bec Added parsing and printing of classes, interfaces, and namespaces 2000-06-02 04:35:44 +00:00
brendan%mozilla.org
6ca20f928f Fix ECMA DontDelete compliance problems, which create getter/setter security holes (40760, r=shaver). 2000-06-02 00:02:46 +00:00
nboyd%atg.com
faea4ed119 Fix "in" operator for compiled mode. 2000-06-01 23:40:29 +00:00
nboyd%atg.com
4d4458bd63 Add column number and line source information to the EcmaError object. 2000-06-01 17:30:28 +00:00
mkaply%us.ibm.com
716fff7b7c # 40177
r = leaf, a = brendan
Fix tab in makefile
2000-06-01 14:15:39 +00:00
waldemar%netscape.com
767f3c1669 Widened default line width to 30 2000-06-01 03:31:17 +00:00
waldemar%netscape.com
5c440a5bc5 Added function and constructor parsing and printing; fixed printing of blocks, compound statements, and :: 2000-06-01 03:30:58 +00:00
waldemar%netscape.com
ebbccfd9f8 Added two-argument linearBreak 2000-06-01 03:30:19 +00:00
brendan%mozilla.org
aca040859b Use JS_ValueToId to go from user to internal property id, for integer-id optimality (40731, r=shaver). 2000-05-31 22:10:53 +00:00
brendan%mozilla.org
d84057e951 Make JS_ExecuteScriptPart call the debugger hooks (41066, r=MyNGs@HotMail.com). 2000-05-31 21:57:46 +00:00
nboyd%atg.com
4a72992ae8 check for null scope 2000-05-30 21:50:44 +00:00
nboyd%atg.com
9cc29b7e22 Fix bug 40844 2000-05-29 16:57:13 +00:00
nboyd%atg.com
a50280a77b Fix bug 39906 2000-05-28 19:01:24 +00:00
nboyd%atg.com
dc7deebcad Remove tests obsoleted by the change that access to nonexistent properties of Java objects
returns undefined rather than causing an error
2000-05-28 18:50:58 +00:00
nboyd%atg.com
d092952991 for Java methods, print the signatures of the overloaded methods in a comment when
the JavaScript function wrapper's toString method is called
2000-05-28 04:25:07 +00:00
brendan%mozilla.org
6a220f2f41 Fix unreviewed changes made to fix 'Uninitialized variable compiler warnings'. 2000-05-28 00:02:26 +00:00
jst%netscape.com
60b53dbf6e Fixing bustage on solaris native builds. reported and reviewed by Tomi.Leppikangas@oulu.fi 2000-05-27 13:14:31 +00:00
edburns%acm.org
67cfd5f36b r=brendan
a=brendan
bug: 27362

This fix makes it so nsCLiveconnect.cpp doesn't #include
files within an extern "C" {} block.  To make this work, I
simply moved the extern "C" {} to the minimum necessary
range.  This required placing an "ifdef __cplusplus extern "C""
block in jsj_private.h, since nsCLiveconnect.cpp is the only
c++ file that includes jsj_private.h.
2000-05-27 01:12:40 +00:00
rogerl%netscape.com
4e3dcc082c Removed old branches, changed offset printing to handle NULL operand. 2000-05-26 22:35:36 +00:00
rogerl%netscape.com
565b842243 Update to new icg constructor etc. 2000-05-26 22:34:42 +00:00
rogerl%netscape.com
573531b249 Statement fun 2000-05-26 22:33:05 +00:00
waldemar%netscape.com
bd3b79569c Added var, const, and for statements 2000-05-26 06:20:11 +00:00
shaver%mozilla.org
634ad644e4 use NS_METHOD for register/unregister callback, for Win32 2000-05-26 05:55:00 +00:00
shaver%mozilla.org
12fe3f7799 fix build bustage -- I'm an ass 2000-05-26 05:18:31 +00:00
shaver%mozilla.org
ee8d2a82fe remove useless nsIModule paste (#22922), add debug() for JS components, use categories for component loaders, XPCONNECT_STANDALONE (#39875), r=dp,waterson a=brendan 2000-05-26 04:56:23 +00:00
mkaply%us.ibm.com
367ea5b7df # 34106
r = leaf, a = brendan
Mistake was made with an earlier makefile checkin - removing double definition of EXTRA_DSO_OPTS
2000-05-25 14:25:04 +00:00
mccabe%netscape.com
b05da32465 Fix the fix to 40406, fixing bustage.
Don't destroy the per-thread safe JS context on cleanup if that context was provided through the setter.

r=waterson
2000-05-25 08:33:53 +00:00
mccabe%netscape.com
ba80f85fb1 Fix for 40406. Add setter to XPConnect to set default JS context used to execute JS components when no appropriate context can be found.
The setter changes per-thread data - for the DOM/UI thread, this means that we can set the JS Context to one with DOM magic.  This magic allows some DOM JS <-> XPConnect JS conversions to succeed, and in particular allows creation of a DOM window from within a JS component.

Unblocks nsbeta2 work by Vishy and Pavlov.

r=mccabe,vishy.  a=brendan,sleestack.
2000-05-24 22:54:57 +00:00
nboyd%atg.com
a7fc06c9a3 Add rhino9 and rhinoms9. 2000-05-24 18:10:55 +00:00
waldemar%netscape.com
cec8a6816d Fixed case/default indenting 2000-05-24 02:18:57 +00:00
rogerl%netscape.com
39ebb9c8d8 Codegen for statements. Blew off old statement API and most of the test
functions for now, sorry.
2000-05-24 02:11:39 +00:00
waldemar%netscape.com
d4e4f10d14 Turned on statement parsing and printing 2000-05-24 01:51:32 +00:00
waldemar%netscape.com
c970639ae9 Added statement parsing 2000-05-24 01:51:20 +00:00
waldemar%netscape.com
fe6fac7c85 Added using std::fmod declaration 2000-05-24 00:55:23 +00:00
waldemar%netscape.com
389625522b Fixed Mac warning 2000-05-24 00:54:56 +00:00
waldemar%netscape.com
bdd3276507 Fixed Mac warnings 2000-05-24 00:54:40 +00:00
waldemar%netscape.com
0765893319 Fixed syntax errors: can't use qualified names in class definitions, and 'not' is a C++ reserved word 2000-05-24 00:54:28 +00:00
nboyd%atg.com
0074ca5edf Remove unused constructor. 2000-05-23 21:03:50 +00:00
nboyd%atg.com
108f81d6ac Fix up bug where direct calls were getting the parent scope when they shouldn't have,
resulting in a NullPointerException on the following code when run on the MS VM with -opt 9:

var testcases = getTestCases();

function getTestCases() {
    return new Boolean(new MyObject(true));
}

function MyObject( value ) {
    this.value = value;
    this.valueOf = new Function( "return this.value" );
    return this;
}
2000-05-23 20:59:13 +00:00
rginda%netscape.com
b71c85c7dc apparently windows is too 2000-05-23 00:15:06 +00:00