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

1426 Коммитов

Автор SHA1 Сообщение Дата
waldemar%netscape.com 842058475c Removed distribution restrictions because this is part of the language spec 1999-11-03 03:59:31 +00:00
waldemar%netscape.com cda16b1c7d Updated to Mozilla 1.1 license 1999-11-03 03:58:07 +00:00
rogerl%netscape.com 85ac1ef068 Not a part of SeaMonkey Build
- added lnker option for server folks
1999-11-03 00:28:51 +00:00
jband%netscape.com 267171e19a r=mccabe use NS_NewTimer stuff only on Win32 in this test code. This avoids Unix build order problems that were keeping the xpconnect test components from working at all. 1999-11-02 23:35:54 +00:00
jband%netscape.com 62de9600f7 r=mccabe make output from xpcshell's new 'dump' method go to the same place as output of 'print': stdout rather than stderr 1999-11-02 23:31:09 +00:00
rogerl%netscape.com 5a9571975a Added Kurt Westerfeld's fix for 'undefined is not a function' message. 1999-11-02 22:52:10 +00:00
dmose%mozilla.org a3997676e7 updated license boilerplate to xPL v1.1 1999-11-02 22:23:59 +00:00
waldemar%netscape.com 1240477065 Added more no-line-break constraints, simplified visibility treatment, and added named function arguments 1999-11-02 21:12:04 +00:00
msw%gimp.org 760c87a527 applied patch in 14263 to build xpconnect as a component on
Linux/alpha.  Should also fix 13601, 11847.
r=jband@netscape.com
1999-11-02 21:03:13 +00:00
waldemar%netscape.com 66698acfa9 Fixed constraint positioning bug 1999-11-02 20:54:44 +00:00
rogerl%netscape.com 485e507c0f More RegExp back reference specification mucking about. 1999-11-02 20:04:57 +00:00
rogerl%netscape.com babd0a87b2 Fixed up for Java vs. ECMA definitions in edge cases 1999-11-02 20:04:16 +00:00
mccabe%netscape.com 488568cc49 Reverting lib fix to fix impending bustage. 1999-11-02 07:39:51 +00:00
mccabe%netscape.com 01a56f0a66 Another stab at linking with the timer static library - this time using EXTRA_DSO_LDOPTS.
r=jband
1999-11-02 06:53:58 +00:00
jband%netscape.com 02da3dfca4 - Add test code for calling back via a timer on potentially other JSConetxt
to the xpconnect echo interface. This will help fix bug 17736. This includes
using nsITimer which is a pretty messed up xpcom interface w/o a factory.

- Added dump() to xpcshell to make it compatible with browsers debug
output method.

- reformat beard's leak fix to follow 80 column rule.

- Add a missing dont_AddRef to avoid a leak in some debug code.

r=mccabe
1999-11-02 05:55:29 +00:00
brendan%mozilla.org f6243a48b1 Fixed getter/setters, pave way for brutal sharing (15146, r=shaver@mozilla.org,rogerl@netscape.com) 1999-11-02 02:23:50 +00:00
rogerl%netscape.com b9e8b7deb0 Changed -n to regular since the error is getting detected in the code now. 1999-11-02 01:55:59 +00:00
waldemar%netscape.com df52d397b6 Added basic no-line-break constraints matching JavaScript 1.x 1999-11-02 01:46:05 +00:00
waldemar%netscape.com def01413a0 Added no-line-break constraints 1999-11-02 01:45:31 +00:00
waldemar%netscape.com 75419a6521 Fixed comment 1999-11-02 01:45:14 +00:00
waldemar%netscape.com 4ec7adb2eb Added :no-line-break 1999-11-02 01:44:24 +00:00
waldemar%netscape.com ffb65e0ed1 Fixed annoying use of *error-output* that would always bring the listener window to the front while compiling a grammar 1999-11-02 01:43:52 +00:00
rogerl%netscape.com 70c652cda0 That's much cooler - i'm putting the 0 case back then. 1999-11-02 01:31:45 +00:00
rogerl%netscape.com a500a60e32 Needed string parameter in order to pass type comparison correctly.
Added missing TITLE declaration.
1999-11-02 01:03:52 +00:00
rogerl%netscape.com 664f99659e Moved nested function out - new ECMA definition. 1999-11-02 01:02:55 +00:00
rogerl%netscape.com ae35ba0b2b Put test case in eval statement to catch error. 1999-11-02 01:02:03 +00:00
rogerl%netscape.com a0a5d2f9e6 Added missing TITLE declaration 1999-11-02 01:01:34 +00:00
rogerl%netscape.com ad3fd79de4 Belay that, the tests were fine, the code HAS changed. 1999-11-01 23:16:00 +00:00
tbogard%aol.net c9198a207c Changed NS_ENSURE_NOT to NS_ENSURE_FALSE to reflect API change. r=hyatt 1999-11-01 21:43:56 +00:00
beard%netscape.com bf1dc93163 fix nsIInterfaceInfoManager leak. bug=15380, r=jband 1999-10-30 05:48:07 +00:00
rogerl%netscape.com c8f88ac34f I changed the exepcted value for object.toString() calls on the empty
object - There's no clear documentation of the result, but the source
code unambiguously calls 'js_obj_toSource', which inserts the extra '()'
under the version1_2 flag, so I believe this is the correct result.
1999-10-29 23:02:17 +00:00
rogerl%netscape.com e5c6839d25 Changed to account for latest ECMA spec on back-references vs. octal 1999-10-29 22:50:43 +00:00
rogerl%netscape.com 5bb6a11dcb New ECMA spec for no argument calls to max & min - should return +/- Inf 1999-10-29 22:48:33 +00:00
brendan%mozilla.org 98e43cc9a1 Add JS_VersionToString and JS_StringToVersion, updated Impl. Version (13163, r=shaver@mozilla.org). 1999-10-29 22:44:35 +00:00
rogerl%netscape.com fcb1dba7c5 r=norris
Change for ECMA spec. - String.charCodeAt, etc call ToInteger on index.
Ditto - String.match(re) was constructing /undefined/ instead of empty
regexp.
1999-10-29 22:27:33 +00:00
rogerl%netscape.com 80ca9fc6da r=norris
Opinion was that Script.exec() should execute in global scope, not caller.
1999-10-29 22:25:25 +00:00
rogerl%netscape.com 8294cc8954 r=norris
Fixed accidental eating of exceptions (match loop didn't terminate on
failure). New ECMA definition (again) of back reference format.
1999-10-29 22:23:36 +00:00
rogerl%netscape.com 149a895e81 r=norris
New ECMA behaviour for max & min.
1999-10-29 22:21:54 +00:00
rogerl%netscape.com 630003ce5b r=norris
Upgrading to new ECMA - conversionError subsumed by TypeError.
1999-10-29 22:20:23 +00:00
rogerl%netscape.com fca0381c56 r=norris, Bug#16984
New error message for function.apply arguments.
1999-10-29 22:19:04 +00:00
rogerl%netscape.com eec3580ecd New, spawned from AIX4.2.mk. 1999-10-29 21:14:31 +00:00
jband%netscape.com b2c71c3c9b r=shaver@mozilla.org
- Fix for bug 13419 - xpconnect calls wrapped JS objects on wrong JSContext.
Added code to use the nsThreadJSContextStack in order to call wrapped
JS object on the JSContext that is current for the running thread.

We've made the rule that xpconnect only supports one JSRuntime. We
partially enforce that here by enforcing that the JSContext on which
we will run code hails from the same JSRuntime as the JSContext on
which the wrapper for the JS code was built.

Because it is perfectly legal for the nsThreadJSContextStack to be empty
if a wrapped JS object is being called from code other than a DOM event,
this system will lazily create a JSContext for the current thread and
maintain it in TLS. This JSContext is used as necessary. If it uses such
a JSContext that was not already on the nsThreadJSContextStack then the
system will temporarily push that JSContext onto the nsThreadJSContextStack
during the course of the function call being performed. This is all managed
my a new auto class: AutoPushCompatibleJSContext. This is used in the two
places where wrapped JS code is called from native code.

[the two places where this system is invoked are currently disabled due to
the fact that the DOM code makes bad assumptions about the JSContext on
which DOM objects can be accessed. We are working to fix that and then this
code will be enabled.]

- Add #ifdef XPC_DETECT_LEADING_UPPERCASE_ACCESS_ERRORS code that will help
users when we do things like fix bug 14460. As soon as we make more of the
idl declarations of methods leadingLowercase then we will have
LeadingUppercase calls from JS breaking at runtime. It is expected that this
will especially be a problem for coders working with the same interfaces
from both C++ and JS (since from C++ an interface has LeadingUpper methods and
the *same* interface seen from JS has leadingLowecase names). This code
(as suggested by shaver) will print out an informative error message when
it detects the misuse. This is currently enabled for DEBUG builds only.

- Copy code from xpcshell to TestXPC to use the JSRuntimeSerivce.

r=norris@netscape.com
- Check to see if a wrapped JS object has a QueryInterface property before
trying to call that method. This is a speed optimization. It also and makes
norris happy because his perrenial breakpoint in jsReportErrorNumber is not
getting hit (even though the old code was safe).
1999-10-29 05:42:41 +00:00
mccabe%netscape.com 0031e240f2 adding comments 1999-10-29 00:26:19 +00:00
mccabe%netscape.com 4765341f7e Add an API entry point for building JS Date objects from millisecond values.
Patches courtesy Chris Houck.  r=mccabe.
1999-10-28 22:11:41 +00:00
norris%netscape.com 18cde77084 Fix spelling of contributor's name. 1999-10-28 17:43:43 +00:00
brendan%mozilla.org 59caacf4e4 Fix bogus assertion (r=shaver@mozilla.org) found by chouck@geocast.com. 1999-10-28 02:50:15 +00:00
fur%netscape.com 343eb0d4cd Removed unused variable declaration to eliminate warning 1999-10-28 02:48:32 +00:00
fur%netscape.com 6fea510d3a Eliminated references to long-dead jsaddr.[ch].
Note: These files only used in standalone JS, not SeaMonkey build.
1999-10-28 02:45:01 +00:00
fur%netscape.com 65d039625f Removed unused files - they have been dead for years 1999-10-28 02:42:49 +00:00
rogerl%netscape.com 8f57c3272c Changed commandline option for classpath to 'classpath' instead of 'cp' 1999-10-27 22:22:56 +00:00
rogerl%netscape.com 18fd9855d1 Error message for apply argument type 1999-10-27 22:17:44 +00:00
rogerl%netscape.com 81c0d08d38 ECMA handling of undefined args for call & apply. 1999-10-27 22:17:05 +00:00
rogerl%netscape.com cc732387b7 Handle LINE & SOURCEFILE in dumpIcode
Fix bug in multiple try/catch clauses after a catch - the tryStackTop was
being decremented twice.
1999-10-27 22:16:15 +00:00
rogerl%netscape.com d935bcc715 Handle missing arg in match_or_replace 1999-10-27 22:14:46 +00:00
rogerl%netscape.com a5795eb216 ECMA specified handling of NaN inputs for max & min 1999-10-27 22:11:43 +00:00
rogerl%netscape.com 9bbac00b7f Subsumed ConversionError into TypeError 1999-10-27 22:10:36 +00:00
sfraser%netscape.com 23b4cda2b7 Really change to using the NSComponent library. the opt target still had NSStartup. r=moose. 1999-10-27 06:31:40 +00:00
rogerl%netscape.com e8f48b9e26 Changed from pic to PIC for Solaris build per Vishy. 1999-10-26 20:34:55 +00:00
norris%netscape.com f568b465b6 Remove method duplication in NativeGlobal.
Add javadoc comments to EcmaError.
1999-10-26 17:22:23 +00:00
norris%netscape.com 272cd30a80 Get filename and line number into uncaught exception reports. 1999-10-26 17:06:12 +00:00
brendan%mozilla.org 11200ff7a6 - Chouck's changes to grow a JSIdArray if necessary in JS_Enumerate, with my
code review and fixes (r=chouck@geocast.com).  He needs this cuz he has no
  knowledge of exact number of properties before new-style enumerating them.
- Patch up jsdbgapi.c a bit -- it needs to use OBJ_GET_ATTRIBUTES and new APIs
  to do a better job describing properties to a debugger.
- Add JSMSG_CANT_DESCRIBE_PROPS for bogus non-native error case in jsdbgapi.c.
- Fix "Inappropriate" => "invalid" in JSMSG_BAD_ARRAY_LENGTH message.
1999-10-25 19:24:03 +00:00
norris%netscape.com 67c18acd0c Add contributors. 1999-10-25 17:52:48 +00:00
norris%netscape.com 43d6dcf526 Add license text. 1999-10-25 17:41:49 +00:00
norris%netscape.com 608c323aba Add license boilerplate. 1999-10-25 17:36:20 +00:00
norris%netscape.com fa8870089d Should get ReferenceError exception for name not found. 1999-10-25 16:41:24 +00:00
norris%netscape.com 3b332c3835 Add contributors. 1999-10-25 16:40:30 +00:00
dp%netscape.com 0733ace331 bug#16742 Fixing delete on nsISupports. Thanks for patch from
<heikki@citec.fi> r=dp
1999-10-23 17:34:55 +00:00
jband%netscape.com a2bf64ef64 r=mccabe
Primarily fixes to properly handle nsIXPCSecurityManager vetos of
xpconnect activities.

- The code was not propagating security manager vetos of native wrapping up
through xpconnect internals. So, xpconnect was erroneously masking the
security exception with its own 'failed to convert param' exception.
This effects the signatures of nsXPCWrappedNative::GetNewOrUsedWrapper
and nsXPCWrappedJSClass::GetNewOrUsedClass.

- This propagation also helps with the problem that sometimes interfaces
are not set as [scriptable] and we did not make that clear as the source
of xpconnect's failure to convert a param in calling a method. Now this
specific class of exceptions is indicated in the JS exception object when
this happens.

- Added an explicit call to js_ForceGC on shutdown of xpcshell to aid in
avoiding 'false positives' in leak detection

- Return JS_FALSE rather than JS_TRUE when an exception is thrown in
xpcjsid to make the jsengine notices the exception.

- Move #includes that others added in xpcmodule.cpp to xpcprivate.h in
order to maintain the include conventions of this module.

- Avoid throwing an exception if it represents a security manager veto
and the security manager set an exception already.

- Replace uses of nsCOMTypeInfo<> added by scc with NS_GET_IID macros.

- Fixed a methodname misspelling because reviewers care about stuff
like that :)
1999-10-23 07:20:04 +00:00
beard%netscape.com 923861d24d synched. 1999-10-22 22:39:51 +00:00
beard%netscape.com 71f6a206ac changed SharedGlobal.java to Global.java 1999-10-22 22:39:23 +00:00
norris%netscape.com b5bbaa31df Changes for improved errors-as-exceptions handling. 1999-10-22 22:02:58 +00:00
norris%netscape.com fc4ba15202 Use simpler, more widely applicable structure for global. Also avoids test failure for Function called as a function. 1999-10-22 22:00:21 +00:00
norris%netscape.com b29858df93 A NativeString object shouldn't be unwrapped to a primitive. 1999-10-22 21:58:54 +00:00
norris%netscape.com ab350ea41b Shouldn't test for equality against the message string, which is implementation independent. 1999-10-22 18:33:46 +00:00
norris%netscape.com 9a8c3dfaeb Don't print out control characters that break the driver. 1999-10-22 17:31:59 +00:00
norris%netscape.com 079455f8ab Fix formatting. 1999-10-22 16:58:30 +00:00
norris%netscape.com 38c1cad9a0 Fix javadoc 1999-10-22 16:56:56 +00:00
ramiro%fateware.com a426b260aa Removing the badly rotten MOZ_STRIP_NOT_EXPORTED hack. We now have a better
way to accomplish the same thing using linker version scripts.
r=cls@seawood.org
1999-10-22 07:11:43 +00:00
brendan%mozilla.org c46577b077 Avoid gratuitous initialization and extra sets of ok (r=shaver@mozilla.org). 1999-10-22 01:44:47 +00:00
rogerl%netscape.com ace733bf91 Loop from 1 instead of 0 since the test result parsing gets messed up by
the null strings not containing 'PASSED'. The 0 case isn't all that
important for upperCase testing.
1999-10-21 22:18:52 +00:00
waldemar%netscape.com 60174b9647 Changed bottom expressions to syntax error throws 1999-10-20 20:58:07 +00:00
waldemar%netscape.com dc9f364011 Added upper-case Greek letters 1999-10-20 20:57:37 +00:00
waldemar%netscape.com d4bbf7cd7e Removed types from bottom expressions 1999-10-20 02:27:53 +00:00
waldemar%netscape.com b55f9ec5ab First Checked In. 1999-10-20 02:27:34 +00:00
waldemar%netscape.com 2990b743e1 Changed syntax of getters and setters to "get name" and "set name". Relaxed grammar constraints on definitions. Changed over to colon syntax for types. Added local visibility and block modifiers. 1999-10-20 00:46:31 +00:00
waldemar%netscape.com f3d863d69f Removed octal escapes. Replaced bottom by throw of syntax error. 1999-10-20 00:43:58 +00:00
waldemar%netscape.com 6a022dcba1 Removed octals. Removed rational-to-integer, which was replaced by semantic subtyping. Replaced bottom by throw of syntax error. 1999-10-20 00:43:22 +00:00
waldemar%netscape.com 8bf0421c92 Removed rational-to-integer and types in bottom calls, which were replaced by semantic subtyping 1999-10-20 00:42:17 +00:00
waldemar%netscape.com dcf782950a Removed rational-to-integer, which was replaced by semantic subtyping 1999-10-20 00:41:59 +00:00
waldemar%netscape.com 7c5d2c5286 Added semantic subtyping, throw, and catch 1999-10-20 00:40:55 +00:00
waldemar%netscape.com 02648df558 Fixed bug that would sometimes emit a newline between a backslash and its following escaped character 1999-10-20 00:40:04 +00:00
rogerl%netscape.com f578335319 r=norris
Delayed functionDef from creating property until after the body parses
succesfully.
1999-10-19 21:07:45 +00:00
rogerl%netscape.com aa9c2e26ed r=norris
Fixed bug #12951 - var if for..in statement should always be of type
string.
1999-10-19 21:06:03 +00:00
norris%netscape.com 33f79a9fa4 Fixed bug. We weren't loading classes in bottom-up dependency order.
Subject:
            Re: another getClassLoader exception
       Date:
            Mon, 18 Oct 1999 22:01:24 -0400
      From:
            Andrew Wason <aw@softcom.com>
        To:
            norris@netscape.com (Norris Boyd)
        CC:
            Howard Lin <howard@softcom.com>
 References:
            1 , 2




At 05:03 PM 10/18/99 -0700, Norris Boyd wrote:
>Are you still seeing this problem?


Yes.  I just did a CVS update to get the latest stuff and we still have
this problem.

I wrote a standalone sample program that duplicates the problem.  Run
JSSupport and you should get this exception:

defineClass org.mozilla.javascript.gen.c2
Exception in thread "main" java.lang.NoClassDefFoundError:
org/mozilla/javascript/gen/c1
         at java.lang.ClassLoader.resolveClass0(Native Method)
         at java.lang.ClassLoader.resolveClass(ClassLoader.java:545)
         at
JSSupport$MySecuritySupport$DataClassLoader.loadClass(JSSupport.java:89)
         at JSSupport$MySecuritySupport.defineClass(JSSupport.java:47)
         at org.mozilla.javascript.optimizer.Codegen.compile(Codegen.java,
Compiled Code)
         at org.mozilla.javascript.Context.compile(Context.java:1761)
         at org.mozilla.javascript.Context.compile(Context.java:1691)
         at org.mozilla.javascript.Context.compileReader(Context.java:810)
         at org.mozilla.javascript.Context.evaluateReader(Context.java:725)
         at org.mozilla.javascript.Context.evaluateString(Context.java:692)
         at JSSupport.<init>(JSSupport.java:20)
         at JSSupport.main(JSSupport.java:9)



Andrew



>--N
>
>Andrew Wason wrote:
>
> > At 04:54 PM 10/12/99 -0700, Norris Boyd wrote:
> > >I just checked in changes so that the class calling ScriptRuntime (c5
> in your
> > >case) will load the class itself using the normal Java classloading
> mechanism
> > >rather than an explicit call to the class loader. I pushed the bits up
> to the
> > >ftp site, but it takes a bit to propagate.
> >
> > I get this exception now (debugging statements are from my code):
> >
> > SecuritySupport.defineClass org.mozilla.javascript.gen.c5
> > DataClassLoader.loadClass org.mozilla.javascript.gen.c5
> > DataClassLoader.loadClass org.mozilla.javascript.gen.c4
> > using default loader com.softcom.realjava.PluginClassLoader@da9486a0
> > java.lang.NoClassDefFoundError: org/mozilla/javascript/gen/c4
> >          at java.lang.ClassLoader.resolveClass0(Native Method)
> >          at java.lang.ClassLoader.resolveClass(ClassLoader.java:545)
> >          at
> >
> com.softcom.realjava.plugins.RealJavaScript$RealJavaScriptSecuritySupport$Da
> > taClassLoader.loadClass(RealJavaScript.java:410)
> >          at
> >
> com.softcom.realjava.plugins.RealJavaScript$RealJavaScriptSecuritySupport.de
> > fineClass(RealJavaScript.java:352)
> >          at org.mozilla.javascript.optimizer.Codegen.compile(Codegen.java,
> > Compiled Code)
> >          at org.mozilla.javascript.Context.compile(Context.java:1761)
> >          at org.mozilla.javascript.Context.compile(Context.java:1691)
> >          at org.mozilla.javascript.Context.compileReader(Context.java:810)
> >
> > So when c5 is being loaded by my SecuritySupport, it also needs to load c4.
> > I decompiled org.mozilla.javascript.gen.c5 and it's constant pool
> > references CLASS org.mozilla.javascript.gen.c4, so c5 is dependent on c4
> > being loadable.  Is the problem that c5 is being loaded before the
> > optimizer has defined c4?
> >
> > I get the above exception for some classes and not others.  It seems
> > consistent that I always get it for classes with dependencies on other
> > optimizer classes that haven't been generated yet.
> >
> > Andrew
> >
> > --
> > Andrew Wason
> > SoftCom, Inc.
> > aw@softcom.com

--
Andrew Wason
SoftCom, Inc.
aw@softcom.com



   JSSupport.java

                  Name:
                         JSSupport.java
                   Type:
                         Java Source File (text/java)
                Encoding:
                         base64
1999-10-19 16:38:23 +00:00
jband%netscape.com 0503271fe7 trivial fix to get rid of warning from copy/paste error - was passing unused argument to printf 1999-10-19 08:00:29 +00:00
beard%netscape.com c1f48b75f9 changed NSLibraryStartup.o to NSComponentStartup.o, since it's really a component. r=jband 1999-10-19 06:31:49 +00:00
jband%netscape.com 6868764b91 fixing brendan's copy/paste bug that broke gc. r=shaver 1999-10-19 05:58:07 +00:00
cls%seawood.org ff88c66302 Use PR_TRUE instead of c++ keyword "true" in case of broken/out-of-date compilers.
r=syd
1999-10-19 05:38:27 +00:00
jband%netscape.com 87f852459b checking in code to fix bug 12768 submitted by Dan.Oscarsson@trab.se. Needed a 'const char*' tmp varible to work with a 'const char*' buffer that was passed in. The same problem is in both js.c and xpcshell.cpp. r=jband 1999-10-18 23:45:39 +00:00
jband%netscape.com f4071145f8 checking in bug 16629 fix to cbegle's xpconnect tests submitted by green@FreeBSD.org. This fixes screwy longlong test methods. r=jband 1999-10-18 23:20:16 +00:00