670 Commits

Author SHA1 Message Date
rogerl%netscape.com
6701db0533 Not a part of SeaMonkey Build
- added lnker option for server folks


git-svn-id: svn://10.0.0.236/trunk@52626 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 00:28:51 +00:00
jband%netscape.com
f26efbdd12 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.
git-svn-id: svn://10.0.0.236/trunk@52608 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 23:35:54 +00:00
jband%netscape.com
e1ba1048c5 r=mccabe make output from xpcshell's new 'dump' method go to the same place as output of 'print': stdout rather than stderr
git-svn-id: svn://10.0.0.236/trunk@52606 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 23:31:09 +00:00
msw%gimp.org
ceb7def2a5 applied patch in 14263 to build xpconnect as a component on
Linux/alpha.  Should also fix 13601, 11847.
r=jband@netscape.com


git-svn-id: svn://10.0.0.236/trunk@52573 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 21:03:13 +00:00
mccabe%netscape.com
b3f3e6c4bc Reverting lib fix to fix impending bustage.
git-svn-id: svn://10.0.0.236/trunk@52538 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 07:39:51 +00:00
mccabe%netscape.com
b13865d0da Another stab at linking with the timer static library - this time using EXTRA_DSO_LDOPTS.
r=jband


git-svn-id: svn://10.0.0.236/trunk@52531 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 06:53:58 +00:00
jband%netscape.com
5cd00daf35 - 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


git-svn-id: svn://10.0.0.236/trunk@52518 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 05:55:29 +00:00
brendan%mozilla.org
bed10de2c0 Fixed getter/setters, pave way for brutal sharing (15146, r=shaver@mozilla.org,rogerl@netscape.com)
git-svn-id: svn://10.0.0.236/trunk@52487 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 02:23:50 +00:00
tbogard%aol.net
ae3cd9e2ce Changed NS_ENSURE_NOT to NS_ENSURE_FALSE to reflect API change. r=hyatt
git-svn-id: svn://10.0.0.236/trunk@52417 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 21:43:56 +00:00
beard%netscape.com
2300c27a4f fix nsIInterfaceInfoManager leak. bug=15380, r=jband
git-svn-id: svn://10.0.0.236/trunk@52317 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 05:48:07 +00:00
brendan%mozilla.org
ba803ea225 Add JS_VersionToString and JS_StringToVersion, updated Impl. Version (13163, r=shaver@mozilla.org).
git-svn-id: svn://10.0.0.236/trunk@52281 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 22:44:35 +00:00
rogerl%netscape.com
8760c5b5e8 r=norris
Change for ECMA spec. - String.charCodeAt, etc call ToInteger on index.
Ditto - String.match(re) was constructing /undefined/ instead of empty
regexp.


git-svn-id: svn://10.0.0.236/trunk@52277 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 22:27:33 +00:00
rogerl%netscape.com
853e43bd31 r=norris
Opinion was that Script.exec() should execute in global scope, not caller.


git-svn-id: svn://10.0.0.236/trunk@52276 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 22:25:25 +00:00
rogerl%netscape.com
dcacacf7d7 r=norris
Fixed accidental eating of exceptions (match loop didn't terminate on
failure). New ECMA definition (again) of back reference format.


git-svn-id: svn://10.0.0.236/trunk@52275 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 22:23:36 +00:00
rogerl%netscape.com
e8f1c05ca6 r=norris
New ECMA behaviour for max & min.


git-svn-id: svn://10.0.0.236/trunk@52274 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 22:21:54 +00:00
rogerl%netscape.com
2ed88ba80b r=norris
Upgrading to new ECMA - conversionError subsumed by TypeError.


git-svn-id: svn://10.0.0.236/trunk@52273 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 22:20:23 +00:00
rogerl%netscape.com
69933e9f74 r=norris, Bug#16984
New error message for function.apply arguments.


git-svn-id: svn://10.0.0.236/trunk@52272 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 22:19:04 +00:00
rogerl%netscape.com
338c55ea1d New, spawned from AIX4.2.mk.
git-svn-id: svn://10.0.0.236/trunk@52260 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 21:14:31 +00:00
jband%netscape.com
d8b2fc8146 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).


git-svn-id: svn://10.0.0.236/trunk@52197 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 05:42:41 +00:00
mccabe%netscape.com
5124ea8599 adding comments
git-svn-id: svn://10.0.0.236/trunk@52153 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 00:26:19 +00:00
mccabe%netscape.com
c568cf9bed Add an API entry point for building JS Date objects from millisecond values.
Patches courtesy Chris Houck.  r=mccabe.


git-svn-id: svn://10.0.0.236/trunk@52130 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 22:11:41 +00:00
brendan%mozilla.org
da68e2dcd8 Fix bogus assertion (r=shaver@mozilla.org) found by chouck@geocast.com.
git-svn-id: svn://10.0.0.236/trunk@52043 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 02:50:15 +00:00
fur%netscape.com
50f46042f0 Removed unused variable declaration to eliminate warning
git-svn-id: svn://10.0.0.236/trunk@52042 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 02:48:32 +00:00
fur%netscape.com
dbcd581b59 Eliminated references to long-dead jsaddr.[ch].
Note: These files only used in standalone JS, not SeaMonkey build.


git-svn-id: svn://10.0.0.236/trunk@52040 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 02:45:01 +00:00
fur%netscape.com
e969fa7f4f Removed unused files - they have been dead for years
git-svn-id: svn://10.0.0.236/trunk@52039 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 02:42:49 +00:00
rogerl%netscape.com
1aa494ee2b Changed from pic to PIC for Solaris build per Vishy.
git-svn-id: svn://10.0.0.236/trunk@51875 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 20:34:55 +00:00
brendan%mozilla.org
b3a1017637 - 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.


git-svn-id: svn://10.0.0.236/trunk@51734 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 19:24:03 +00:00
dp%netscape.com
1e5c5df64f bug#16742 Fixing delete on nsISupports. Thanks for patch from
<heikki@citec.fi> r=dp


git-svn-id: svn://10.0.0.236/trunk@51662 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 17:34:55 +00:00
jband%netscape.com
d7cf1d350b 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 :)


git-svn-id: svn://10.0.0.236/trunk@51655 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 07:20:04 +00:00
ramiro%fateware.com
a5d3f6cc70 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


git-svn-id: svn://10.0.0.236/trunk@51521 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 07:11:43 +00:00
brendan%mozilla.org
9ef594d4bf Avoid gratuitous initialization and extra sets of ok (r=shaver@mozilla.org).
git-svn-id: svn://10.0.0.236/trunk@51482 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 01:44:47 +00:00
rogerl%netscape.com
4e16b4e094 r=norris
Delayed functionDef from creating property until after the body parses
succesfully.


git-svn-id: svn://10.0.0.236/trunk@51176 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 21:07:45 +00:00
rogerl%netscape.com
d0725e4d4e r=norris
Fixed bug #12951 - var if for..in statement should always be of type
string.


git-svn-id: svn://10.0.0.236/trunk@51174 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 21:06:03 +00:00
jband%netscape.com
88ae89c00d trivial fix to get rid of warning from copy/paste error - was passing unused argument to printf
git-svn-id: svn://10.0.0.236/trunk@51123 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 08:00:29 +00:00
jband%netscape.com
defd5464f8 fixing brendan's copy/paste bug that broke gc. r=shaver
git-svn-id: svn://10.0.0.236/trunk@51116 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 05:58:07 +00:00
cls%seawood.org
8644b9e14b Use PR_TRUE instead of c++ keyword "true" in case of broken/out-of-date compilers.
r=syd


git-svn-id: svn://10.0.0.236/trunk@51114 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 05:38:27 +00:00
jband%netscape.com
039dd4adee 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
git-svn-id: svn://10.0.0.236/trunk@51066 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 23:45:39 +00:00
jband%netscape.com
fb63cac2a5 checking in bug 16629 fix to cbegle's xpconnect tests submitted by green@FreeBSD.org. This fixes screwy longlong test methods. r=jband
git-svn-id: svn://10.0.0.236/trunk@51058 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 23:20:16 +00:00
jband%netscape.com
0a174a879e r=mccabe (I'll be adding more comments to the headers as requested)
Implement nsIXPCNativeCallContext to meet user feature
requirements. This allows simpler implementation of reflection of
native classes into JavaScript in cases where they need to
support legacy interfaces that include optional parameters and
method name overloading. This also provides a general mechanism
for native methods to discover if they were called from JS code,
exactly what JS parameters were passed, explicitly return jsvals,
and throw explicit jsvals without interference from xpconnect.
With test cases.


git-svn-id: svn://10.0.0.236/trunk@50971 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 02:53:04 +00:00
neeti%netscape.com
a87ba00c59 Converted dll to use nsIModule -bug 14034, r=jband
git-svn-id: svn://10.0.0.236/trunk@50915 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 03:04:16 +00:00
fur%netscape.com
1242a2627f Renamed variable to avoid a compiler warning. R: mccabe
git-svn-id: svn://10.0.0.236/trunk@50868 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:38:04 +00:00
mccabe%netscape.com
dc9018f2ee Fix line editing support for the standalone XPCOM-enabled JavaScript shell. To aid debugging on unix platforms.
To use, define JS_READLINE when compiling mozilla/js/src/xpconnect/shell.

r=shaver


git-svn-id: svn://10.0.0.236/trunk@50859 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:23:53 +00:00
brendan%mozilla.org
f2330eb459 1. Fixed missing JS_LOCK_GC in JS_YieldRequest, commented other badness there.
2.  Cleaned up ugly JS_GC_Flag typedef name and put XXXbe comment in there for
    next time: someone seems to have patched around a deadlock that has since
    bit chouck@geocast.com.
3.  Fixed gcDisabled by moving it from cx to rt and updating it atomically.
4.  Fixed ECMA violation where for (var i, j in o) ... was permitted; only one
    variable is allowed.
(Item 4 was a bug on rogerl's list, since closed?  r=shaver@mozilla.org.)


git-svn-id: svn://10.0.0.236/trunk@50795 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 05:46:42 +00:00
jband%netscape.com
32f352bb68 adding new empty placeholder file to the build. Will also add it to Mac project via camelot and put real stuff in it after all is stable. r=jband :)
git-svn-id: svn://10.0.0.236/trunk@50793 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 05:09:08 +00:00
shaver%netscape.com
103a22ed8e fix obj_getCount to property destroy state and propagate error (r=jband)
git-svn-id: svn://10.0.0.236/trunk@50787 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 04:32:46 +00:00
brendan%mozilla.org
7c13a9f3b1 Rename ToSource to uneval (r=shaver@mozilla.org,terry@geocast.com).
git-svn-id: svn://10.0.0.236/trunk@50781 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 04:07:59 +00:00
jband%netscape.com
df5ae28aef r=shaver
- Fixed two similar cases where code was missing one level of
pointer dereference in terminating a copied string. Was trashing
data further up the stack.
- Use 'nsAllocator::Free' in two similar cases where 'delete' was
mistakenly used. Error pointed out by Purify.


git-svn-id: svn://10.0.0.236/trunk@50770 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 03:31:09 +00:00
shaver%netscape.com
9a4de938e7 make xpcshell use jsrtsvc, and let jsrtsvc handle JS_Shutdown (r=jband)
git-svn-id: svn://10.0.0.236/trunk@50766 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 03:05:48 +00:00
mgleeson1%netscape.com
34c5281c43 r=pepper HPUX specific change - enable 64-bit int for js
git-svn-id: svn://10.0.0.236/trunk@50709 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:20:27 +00:00
jband%netscape.com
b3711cec39 Fixing leaks found by beard...
- Fixed leaked nsID ptr. bug 16373. This alsothrows a JS
exception when JS callers call createInstance or getService
using an (optional) param that is not an iid. This had been a
'XXX' in the code.
- Moved a release call out of just the error condition block in
setting up a ServiceReleaser. I should have caught this one, but
few of my tests use services :(  I have hopes that the whole
ServiceReleaser will become unnecessary as the ServiceManager
system changes and simply calling NS_RELEASE on a service becomes
sufficient.
- Cleaned up an addref/release pair in a setter (need to move to
nsComPtrs!) r=beard


git-svn-id: svn://10.0.0.236/trunk@50703 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:08:59 +00:00