Commit Graph
786 Commits
Author SHA1 Message Date
[email protected] 0913c01126 trivial fixes to get rid of warnings 2000-01-26 11:08:24 +00:00
[email protected] 83af0a10ba Lots of xpconnect bug fixes...
- fix bug 12954 "should throw when setting non-settable props".

- fix bug 13418 "xpconnect needs to be threadsafe".
I think I filled in the cracks. Tests would be nice :)

- fix bug 22802 "[MLK] XPConnect Leaks".

- fix bug 24119 "[MLK] Reminder about cleaning up maps".

- fix bug 24453 "xpconnect needs default security manager".
I also changed the code in DOM and caps to just install a default secman and
not install a secman for each JSContext.

- fix bug 24687 "xpconect should avoid resolve performance suckage".
Added (modified) patch from shaver to create my JSObjects with the
global object as the temporary proto to avoid losing lookup.

- hack for bug 24688 "runtime errors in wrapped JS are not made obvious"
Added a debug only printf. We still need a JSErrorConsole service for this.

- fix bug 16130 "createInstanace and getService can create wrappers around wrappers"
Fixing this one really entailed changing the semantics of nsIXPConnect::wrapNative
and nsIXPConnect::wrapJS to use common code in xpcconvert that deals with existing
wrappers and DOM objects (with their own schemes for wrapping and unwrapping).
So, I changed the callers because the params changed slightly and some callers
were doing more work than necessary given the new semantics.

- Continued in the crusade to replace manaual refcounting with nsCOMPtrs whenever
touching old code.

- Added myself as first contributor to xpconnect files (vanity prevails!)

- Added new copyright header on some files that were missing it.

- Added some API comments.

- Converted nsXPCWrappedJS to implement nsIXPConnectWrappedJS via MI rather than
the old loser scheme of the nsIXPConnectWrappedJSMethods tearoff object.

- added DumpJSStack as globals to xpconnect and DOM dlls to be callable from
debuggers. I have ideas on how to improve and expand this support soon.

r=mccabe
2000-01-26 08:38:10 +00:00
[email protected] cc8071d9eb !! Not a part of the build !!
r=norris. Updated license contents (continuing bug#15529)
2000-01-25 18:42:55 +00:00
[email protected] afa336d2f5 Track js_Invoke API change (24668, [email protected]). 2000-01-25 04:00:45 +00:00
[email protected] d48ec37751 Landing nsIFile. 2000-01-24 21:28:28 +00:00
[email protected] 9875af405d Repeating, prioritised timer implementation for Windows and Gtk (bug 22979). author={[email protected], [email protected]}, r={kmcclusk,rods,sfraser,et al} a=brendan 2000-01-21 21:56:09 +00:00
[email protected] cbda12912a Long-awaited fix courtesy rogerl's keen analysis (19165, [email protected]). 2000-01-19 03:53:07 +00:00
[email protected] 12c75fcd2f Some platforms object to using JS_ASSERT without including jsutil.h. 2000-01-19 03:00:04 +00:00
[email protected] c9b82fec65 reminder comment, r=brendan 2000-01-18 22:38:56 +00:00
[email protected] 0d55725343 add JS_CompileFileHandleForPrincipals, (r=rginda) 2000-01-18 22:04:01 +00:00
[email protected] 6002ceb6c7 JS1.5 fixes (17290, 21618, plus shaver's 22243 fix, [email protected]). 2000-01-18 11:06:05 +00:00
[email protected] 609b771967 - checkin of test for arrays of interface fix that went in yesterday.
- fix to xpcconvert NativeData2JS to support getting JSObject of DOM object
even when not running on a DOM created JSContext.
- some updates to comments, etc.
r=mccabe
2000-01-14 08:26:34 +00:00
[email protected] d459b2ef64 Converting usage of ::GetIID() to NS_GET_IID().
Bug #20232, [email protected]
2000-01-11 20:49:15 +00:00
[email protected] 30b6994f16 Removed redundant XPDIST from the build. Changed existing references to DIST.
Replaced all uses of $(DIST)/include with $(PUBLIC) except those looking for NSPR headers.
Removed extra instances of $(DIST)/include or $(PUBLIC) from INCLUDES as it's already there.
Override OS_LIBS when setting host variables for cross-compiling.
2000-01-11 05:13:01 +00:00
[email protected] 81b35946b1 Fix base class specifiers, since be default if they aren't specified it is Private
# 23237
r= [email protected], [email protected], [email protected]
2000-01-11 01:45:34 +00:00
[email protected] d16c5155f0 Bug 23320. Per [email protected]'s suggestion, fix passing of va_list for platforms that typedef to an array. r=brendan 2000-01-08 00:32:25 +00:00
[email protected] df9b4c7a72 resolving all unresolved symbols at link time
#= 18896 (continuation)
r= [email protected] - but ramiro and I talked about these types of changes ages ago
2000-01-07 02:46:06 +00:00
[email protected] b6719f0a43 change the module string name. not part of build 2000-01-07 02:25:47 +00:00
[email protected] d4d3d478b6 use generic module stuff. My part to fix bug 22922. r=dp 2000-01-07 02:24:39 +00:00
[email protected] 0193278be5 add support for Components.Constructor to build constructors for xpcom objects from JS. r=mccabe 2000-01-07 02:21:14 +00:00
[email protected] 1fb39b21ef fix leak of argument formatters upon JSContext destruction. bug 22802. r=rogerl 2000-01-07 02:19:44 +00:00
[email protected] b4952fb34f Fixed accidental trailing semi at end of if statement. Many thanks to
everyone who participated in this test of the warning detection system.
2000-01-07 00:15:11 +00:00
[email protected] 48a65e11e8 I know it's unorthodox to do a top level checkin like this, but I've got so many files
in so many different directories, that I think it's the best way.
I've pulled and clobber_all'd my tree and got

r=dp

on this checkin.

Here are the touched files:

M mozilla/embedding/browser/activex/src/control/MozillaBrowser.cpp
M mozilla/embedding/browser/activex/src/control/MozillaBrowser.h
M mozilla/js/src/xpconnect/shell/xpcshell.cpp
M mozilla/netwerk/protocol/res/src/nsResProtocolHandler.cpp
M mozilla/xpcom/build/nsXPComInit.cpp
M mozilla/xpcom/components/nsComponentManager.cpp
M mozilla/xpcom/components/nsIServiceManager.h
M mozilla/xpcom/components/nsServiceManager.cpp
M mozilla/xpcom/io/nsSpecialSystemDirectory.cpp
M mozilla/xpcom/io/nsSpecialSystemDirectory.h
M mozilla/xpcom/tests/TestBuffers.cpp
M mozilla/xpcom/tests/TestPipes.cpp
M mozilla/xpcom/tests/TestShutdown.cpp
M mozilla/xpcom/tests/windows/TestHelloXPLoop.cpp
M mozilla/xpcom/tools/registry/regExport.cpp
M mozilla/xpcom/tools/registry/regxpcom.cpp
M mozilla/xpinstall/stub/xpistub.cpp
M mozilla/webshell/embed/ActiveX/MozillaBrowser.cpp
M mozilla/webshell/embed/ActiveX/MozillaBrowser.h
M mozilla/webshell/tests/viewer/nsMacMain.cpp
M mozilla/webshell/tests/viewer/nsPhMain.cpp
M mozilla/webshell/tests/viewer/nsWinMain.cpp
M mozilla/webshell/tests/viewer/unix/gtk/nsGtkMain.cpp
M mozilla/xpfe/appshell/src/nsFileLocations.cpp
M mozilla/xpfe/bootstrap/nsAppRunner.cpp

The heart of this checkin is a change in the signature and symantics
of NS_InitXPCOM.

The new signature is

extern NS_COM nsresult
NS_InitXPCOM(nsIServiceManager* *result, nsFileSpec* binDirectory);

I filed a bug for this problem:

b=23157

The original manifestation of this bug was in mozilla/netwerk/protocol/res/src/nsResProtocolHandler.cpp It used the current process directory to find resources, which is not correct when the current process is not mozilla.exe.

I have added a new type to nsSpecialSystemDirectory, Moz_BinDirectory, and made nsResProtocolHandler use that value.
2000-01-06 01:05:13 +00:00
[email protected] 90f7dfb743 |T| requires an accessible default constructor (on some old compilers)
This is the same as mozilla/netwerk/cache/mgr/nsCachedNetData.h
(also declared nsIXPCWrappedNativeScope to be public since by default it is private

r= [email protected]
2000-01-06 00:59:07 +00:00
[email protected] c4785aaf10 adding new files. not part of build 2000-01-03 22:34:01 +00:00
[email protected] 2126e6b818 Change nsComponentManager::ProgIDToCLSID to nsComponentManager::ProgIDToClassID as per bug #3579. Checking in for sford. r=scc,r=blizzard 1999-12-30 22:03:58 +00:00
[email protected] 79b27cac74 Fixed copyright dates and added lincense boilerplate. 1999-12-22 22:03:59 +00:00
[email protected] 107b19ab58 Changed comment format to C-style. 1999-12-22 22:02:16 +00:00
[email protected] 4de1c4b5a5 r=brendan
Bug #20444, delete of non-reference
1999-12-22 22:01:19 +00:00
[email protected] dbf2794ebc r=brendan
Bug #21836, apply didn't check for non-object argument.
1999-12-22 22:00:07 +00:00
[email protected] 3e89ef4511 r=brendan
Bug #21799, uncaught throw of null crash.
1999-12-22 21:58:53 +00:00
[email protected] a57fb1aa4b r=norris
Bug #20547 & 20549 - ECMA3 compatible handling of String.replace and fixes
to $ handling.
1999-12-22 21:57:10 +00:00
[email protected] 07e04a0aae Partial fix for bug 20254. Allow flags passed to CFLAGS during configure be used for both compiling & linking. CFLAGS as we know it becomes COMPILE_CFLAGS so that platforms that cannot link using DSO flags (qnx) can still build. The new CFLAGS will not have DSO flags and will be used primarily for linking.
Remove OPTIMIZER & XP_DEFINE from config.mk
1999-12-22 03:40:16 +00:00
[email protected] 77c190e947 #ifdefs to build the JavaScript engine under metrowerks on windows machines.
Fixes courtesy Chris Dillman <[email protected]>.

r=mccabe
a=sdagley
1999-12-22 00:03:50 +00:00
[email protected] 84e7ae5d17 ignore generated Makefile 1999-12-21 22:41:26 +00:00
[email protected] 96cd1122b1 fix new warnings resulting from my carpool 1999-12-18 22:33:18 +00:00
[email protected] 2e04e1dd4e Landing big set of DOM and XPConnect changes:
DOM: getting rid of JS_GetContextPrivate wherever possible. Use static parent
links where we can. When we do need to find this info about the caller
we call a function that knows how to get that info rather than inline calls
to JS_GetContextPrivate. This is all required for calling DOM objects on
non-DOM JSContexts as we do via xpconnect.

XPConnect: basic refactoring work to disassociate wrappers from the JSContext
that was active when the wrapper was constructed. This allows for calling into
wrapped JS objects on the right JSContext and for proper grouping of wrapped
native objects so that they can share proto objects. This also allows for
better sharing of objects and lays the foundations for threadsafety and
interface flattening.

Also, xpconnect tests are reorganized and improved.

fixes bugs: 13419, 17736, 17746, 17952, 22086

r=vidur r=mccabe r=norris r=cbegle
a=chofmann
1999-12-18 20:29:29 +00:00
[email protected] 98d2ea6556 Bug 21643. Temporary hack to avoid leaking root wrapper when creating both, and root != wrapper. Note that the fix is 'sloppy', as there are flows-of-control that could potentially leak the NS_ADDREF(); however, since jband is rewriting this stuff RSN, and that stuff doesn't really ever fail too often, we'll let i slide. r=jband 1999-12-17 00:02:58 +00:00
[email protected] c4a66bfa49 Add missing JS_END_EXTERN_C to match JS_BEGIN_EXTERN_C at the beginning. Thanks to Till Volmer <[email protected]> cor spotting this.
r=mccabe, a=brendan.
1999-12-14 22:39:54 +00:00
[email protected] 4f30de40e2 Final portion of the fix for bug 20882. Just a cleaner way of doing what is already being done. 1999-12-14 00:56:50 +00:00
[email protected] 894050b8ad fix JS component loader by reimplementing nsGenericModule (r=dveditz,slamm;a=leaf) 1999-12-13 22:33:11 +00:00
[email protected] 923bb47f3c QNX-specific build bustage fix. va_list is an array on QNX, so assignments need to use array notation. 1999-12-09 03:09:56 +00:00
[email protected] 907a2d6166 Fix #12367. Don't crash evaluating 'foo.constructor' if foo is a JavaObject.
r:none
1999-12-08 07:41:35 +00:00
[email protected] 39d48b61fa Change for QNX 4 to work around their extremely limited compiler and linker, which aren't capable of creating an object from a lib as we're doing here with jsmath.o. 1999-12-08 04:03:24 +00:00
[email protected] fb99d15b2a QNX-specific build bustage fix. Also excludes NTO just in case both are defined under Neutrino. 1999-12-08 03:58:40 +00:00
[email protected] bb242b46ab Backing out. 1999-12-05 04:34:15 +00:00
[email protected] 18d65572e4 Checking in JS Component changes for shaver
"<shaverAway> slamm reviewed, I made the diff, it's a tested fix"
I built and ran here as well.
1999-12-05 03:36:59 +00:00
[email protected] 5fff447b0c Fix 20594: C++ comments in C files 1999-12-02 22:41:02 +00:00
[email protected] 0a47c973de NOT IN BUILD. Added strdup to make Mac standalone js engine work again 1999-12-02 03:05:14 +00:00
[email protected] 91eeae36b5 Fix to bug 17263: toPrecision when called with no arguments. r=shaver 1999-12-02 03:04:31 +00:00