Commit Graph

3674 Commits

Author SHA1 Message Date
pschwartau%netscape.com
87765e762a Correcting comments at top of file, plus bug and summary values. 2001-09-05 17:01:03 +00:00
nboyd%atg.com
4e39e826e2 Patch from Igor. 2001-09-05 16:54:37 +00:00
nboyd%atg.com
8eb4d39793 Patch from jeffh@aiinet.com:
There is a bug in the JavaMembers class called to wrap a Java object.

In JavaMembers.lookup(), code was added to override the static type.  The
code works in the case of an Enumeration returning an Object which would
have to be casted to the appropriate type.

The code does not work when the static type is an interface.  In this case,
the interface class is the one which should be reflected, not a parent class
of the dynamic type.  A simple staticType.isInterface() check around the
parent traversal code fixes the problem.

Jeff
2001-09-05 16:52:39 +00:00
nboyd%atg.com
a19d5beda6 Patch from jeffh@aiinet.com:
I have found a couple problems with running Rhino 1.5R2 in a heavily
multi-threaded environment.  The attached patches fix the problems.

- org.mozilla.javascript.optimizer.InvokerImpl - This class was accessing
the shared classNumber outside of the synchronized block.

- org.mozilla.javascript.optimizer.OptClassNameHelper - The reset method was
not synchronized.  It needs to be because the class using the classNames map
is synchronized and does not handle nulling of the variable while it's
looping on the map.

Jeff
2001-09-05 16:50:26 +00:00
nboyd%atg.com
4507a1cf73 Update for new tests. 2001-09-05 16:48:31 +00:00
pschwartau%netscape.com
cb11cb7e47 Initial add. Regression test for bug 98306. 2001-09-05 06:27:25 +00:00
pschwartau%netscape.com
0b02e3b978 Skipping two new tests that use non-EMCA functionality: toSource() and uneval(). 2001-09-05 01:07:17 +00:00
pschwartau%netscape.com
ded8f34015 Improved readabilty. Improved accuracy of stripBraces() function. 2001-09-05 00:49:31 +00:00
pschwartau%netscape.com
018096156d This is more accurate. Also using sorting now, for definiteness in comparisons. 2001-09-05 00:46:24 +00:00
pschwartau%netscape.com
3e130a22c8 Initial add. Regression test for bug 96284. 2001-09-04 01:54:36 +00:00
brendan%mozilla.org
622522e134 Ignore property found in non-native prototype (12367, sr=jband&shaver, a=asa). 2001-09-03 22:29:12 +00:00
brendan%mozilla.org
0cf73f1847 Fix toSource on exception objects so it uses toSource to generate properly-quoted, embedded string literals for message and filename (bug 96284, r=jband, sr=shaver, a=asa). 2001-09-03 19:36:24 +00:00
rginda%netscape.com
f14e08526e bug 88130, patch=jband, r=me,dbradley, sr=jst, a=brendan
clear exception state before and after calling out via xpconnect.
remove redundant exception clear from CallQueryInterfaceOnJSObject.
2001-09-01 22:47:47 +00:00
rginda%netscape.com
c5226cb4b5 -- not built --
exposing call hook functionality
2001-09-01 18:03:53 +00:00
rginda%netscape.com
95a185d386 -- not built --
whitespace cleanup
2001-09-01 18:01:28 +00:00
jband%netscape.com
56d03ab63d fix bug 97555. Need to get the correct value of staep into the iterator object when we fail during enumeration init. r=jst sr=brendan a=asa 2001-08-31 21:48:18 +00:00
brendan%mozilla.org
43c254feee Fix 97540, r=rginda, sr=jband, a=asa:
- The most significant fix, to keep JSStackFrame.spbase, the operand stack base pointer for an active frame, null except when there is an operand stack allocated and in use by js_Interpret.  Previously, spbase would point after args and local vars (if any), then advance upon allocation of the (possibly discontiguous) operand stack space.  This made for a fatal ambiguity: js_AllocStack, called by XPConnect, could not tell when there was allocated operand stack space above the frame's sp, which needs to be set to a known (JSVAL_VOID) state for exact GC to work.  Now, the GC doesn't have to mark any operand stack space for a frame whose spbase is null, and js_AllocStack doesn't need to void any unused space for such a frame.

- Fixes to reload the JSRuntime's callHook or executeHook after calling or executing, in case the debugger removes the hook.  In which case, it must clean up any dynamic memory held by hookData, but in any event, in which case the engine must not call the post-call or post-execute hook.

- While debugging with rginda, I was horrified to see his trivial testcase function, expressed as a lambda, fail to be invoked using the "inline_call" machinery in js_Interpret (which avoids js_Interpret recursion through js_Invoke for most JS functions).  The problem was a test of fun->flags == 0 conditioning the /* inline_call: */ code.  Since that test was written, at least one JSFUN_* flag (JSFUN_LAMBDA, used only for pretty-printing or accurate decompilation) has been added.  But all along, that test was an over-optimization (testing against 0 without &'ing certain flags), making for an accident waiting to happen -- which did happen.  The relevant flags are JSFUN_HEAVYWEIGHT (set by the compiler when a function calls eval, uses with, or otherwise needs an activation object for its scope; if lightweight, the compiler can see the function's scope and eliminate it via specialized bytecodes) and JSFUN_BOUND_METHOD (for Java method calls, where |this| binds statically to the instance, not dynamically to the calling expression reference's base object, as in JS).
2001-08-31 21:25:26 +00:00
pschwartau%netscape.com
f37dffb52a Corrected testcase so it will work in Rhino as well as SpiderMonkey. 2001-08-31 06:10:13 +00:00
pschwartau%netscape.com
d3d0f5e05a Initial add. 2001-08-30 19:55:05 +00:00
pschwartau%netscape.com
e456fc4d42 Trivial whitespace change. 2001-08-29 23:34:32 +00:00
pschwartau%netscape.com
42fca7b54a Initial add. 2001-08-29 23:20:16 +00:00
pschwartau%netscape.com
36ee37b5de Removed a few hundred || conditions. See comment 2001-08-29 12:00 in bug 89443. 2001-08-29 20:37:58 +00:00
pschwartau%netscape.com
1842238b89 Adding skips for two tests employing the non-ECMA toSource() and uneval() functions. 2001-08-29 06:14:38 +00:00
pschwartau%netscape.com
cf7115e693 Initial add. 2001-08-29 05:59:52 +00:00
rginda%netscape.com
6835cdd75e - not built -
spruce up some comments
added, then comented out, jsdIDebuggerService::filterGlobalObject
2001-08-28 22:03:44 +00:00
rginda%netscape.com
7d148030f7 - not built -
whitespace tweakage
2001-08-28 22:02:28 +00:00
rginda%netscape.com
4f4bb7a28f - not built -
don't allow gc's during script hooks if CAUTIOUS_SCRIPTHOOK is defined (which it is, by default.)  Should help with stability until we can fix the real problems.
Use JSVAL_ macros instead of JSD_* calls in jsdValue::GetJSType method, avoiding two c++ frames per call.
2001-08-28 22:02:07 +00:00
rginda%netscape.com
7cb5a48149 - not built -
modeline fix
2001-08-28 21:59:53 +00:00
jband%netscape.com
f95e84e0e7 fix bug 96725. Avoid infinite recursion in call to QI'd xbl binding by avoiding the mutation of the interface set when the object implementing the interface is a wrappedJS around our wrappedNative's own JSObject. r=dbradley sr=hyatt a=brendan,hyatt,jband 2001-08-28 21:52:10 +00:00
pschwartau%netscape.com
09987595a3 Adding two new utility functions. 2001-08-28 21:13:58 +00:00
thesteve%netscape.com
aee3db86dc Bug#81373 (mac static build)
fixed up access paths: get rid of :::dist:client[_debug]
r=jfrancis
sr=sfraser
a=asa on behalf of drivers
2001-08-27 23:45:59 +00:00
pschwartau%netscape.com
7dcd878d8f Punctuation correction in comment. 2001-08-27 22:57:25 +00:00
pschwartau%netscape.com
f055101da4 Initial add. 2001-08-27 22:55:57 +00:00
pschwartau%netscape.com
c7e5cb06a4 Some RegExp bugs have now been fixed in Rhino. Removing the testcases from the skip list. 2001-08-27 19:58:56 +00:00
rogerl%netscape.com
b16d847568 Port of performance fixes from Monkey (see bug #85721).
Also, fixes for :
#91343, (non-latin1 fails for [\S])
#78156, (Unicode line terminator matching)
#87231, (/(A)?(A.*)/ didn't reset paren state for empty first match)
2001-08-27 18:03:19 +00:00
rjesup%wgate.com
6f3e4115eb Bug 94243: VoidArray usage patch. a=asa sr=brendan r=waterson r=bienvenu
r=pierre r=jband/dbradley  Also fixes some whitespace issues.
2001-08-27 06:15:54 +00:00
pschwartau%netscape.com
9e09712d1e Technical change. Now test is accurate for Rhino as well as SpiderMonkey. 2001-08-25 05:01:50 +00:00
nboyd%atg.com
115380ea02 Original problem in following mail. I implemented JDK1.1 compatibility and performance
improvements:

Subject:
        Rhino: Problem in NativeJavaMethod
   Date:
        Tue, 14 Aug 2001 10:23:35 +0200
   From:
        felix.meschberger@day.com
     To:
        Norris Boyd <nboyd@atg.com>




Hi Norris,

While working with wrapped Java classes we discovered a problem in
NativeJavaMethod : If the public method to be called is part of a
non-public class, the Sun Java VM throws an IllegalAccessException. This
bug in the Sun VM has been reported as Bug 4071593 to Sun, but has not been
resolved since....

I implemented a circumvention, for which I provide you the patch. I quickly
tested it, and it seems to work.

Regards
Felix

And here's the patch :

diff -w -r1.19 NativeJavaMethod.java
227a228,234
>        /**
>         * Due to a bug in Suns VM, public methods in private
>         * classes are not accessible by default (Sun Bug #4071593).
>         * We have to explicitly set the method accessible beforehand
>         */
>        meth.setAccessible(true);
>

-----------------------------------------------------------------
This message is a private communication. If you are not the intended
recipient, please do not read, copy, or use it, and do not disclose it
to others. Please notify the sender of the delivery error by replying to
this message, and then delete it from your system. Thank you.
The sender does not assume any liability for timely, trouble-free,
complete, virus free, secure, error free or uninterrupted arrival of
this e-mail. For verification please request a hard copy version.

mailto:felix.meschberger@day.com
http://www.day.com

Felix Meschberger
Development
Day Interactive AG
Steinenberg 21-23
4001 Basel
Switzerland

T  41 61 226 98 98
F  41 61 226 98 97
2001-08-24 20:01:49 +00:00
brendan%mozilla.org
f319c1d822 Check keyword version when scanning, not by installing different keywords on version selection (when starting to compile; bug 96562, r=rogerl, sr=shaver&jband, a=dbaron). 2001-08-24 03:32:31 +00:00
brendan%mozilla.org
f81e32a193 Avoid corrupting backpatch chains by checking for jump offset operand overflow (90445, khanson's patch with minor changes, sr=shaver&me, a=asa). 2001-08-23 02:07:07 +00:00
brendan%mozilla.org
8cc94e0ba1 Checking in khanson's patch for bug 85112, based on joemansh@interl.net's algorithm (r=beard, sr=me). 2001-08-22 05:42:16 +00:00
brendan%mozilla.org
834611cda0 Forget to include jsopcode.h. 2001-08-22 05:33:32 +00:00
brendan%mozilla.org
2b5a1171f6 Support ref()++ etc. for native ref (75688) and fix exn_toSource (96284); sr=shaver&jband. 2001-08-22 04:59:28 +00:00
brendan%mozilla.org
68f889e9bd Checking in shaver's patch for bug 78100, adding JS_GetExternalStringGCType (sr=brendan&jband). 2001-08-21 02:53:19 +00:00
dbaron%fas.harvard.edu
113ad642ae Replace uses of deprecated NS_IMPL_ISUPPORTS and NS_IMPL_QUERYINTERFACE macros with NS_IMPL_{ISUPPORTS,QUERYINTERFACE}{1,0}. r=jag rs=brendan b=45797 2001-08-21 01:48:11 +00:00
nboyd%atg.com
c9ff8d7ef1 Subject:
Rhino: Problem in NativeJavaMethod
   Date:
        Tue, 14 Aug 2001 10:23:35 +0200
   From:
        felix.meschberger@day.com
     To:
        Norris Boyd <nboyd@atg.com>




Hi Norris,

While working with wrapped Java classes we discovered a problem in
NativeJavaMethod : If the public method to be called is part of a
non-public class, the Sun Java VM throws an IllegalAccessException. This
bug in the Sun VM has been reported as Bug 4071593 to Sun, but has not been
resolved since....

I implemented a circumvention, for which I provide you the patch. I quickly
tested it, and it seems to work.

Regards
Felix
2001-08-17 14:29:48 +00:00
brendan%mozilla.org
b0e3e4ab62 Don't resolve standard classes if JSRESOLVE_ASSIGNING (NOT PART OF BUILD). 2001-08-17 10:40:15 +00:00
brendan%mozilla.org
6843e21c2b Checking in khanson's patch with whitespace cleanups for bug 89443, to avoid stack overflow on too many || operators in one expression (r=rogerl, sr=me). 2001-08-17 10:29:59 +00:00
brendan%mozilla.org
4e1703cf54 Shrinking realloc can fail (95517, basic patch from epstein@tellme.com, r=brendan, sr=jband). 2001-08-17 09:56:48 +00:00
sfraser%netscape.com
55069a4b1a Project cleanup, rs=scc. Fix one or more of access paths, linking with the correct startup library, and unnecessary linkage. 2001-08-17 01:28:47 +00:00