698 Commits

Author SHA1 Message Date
jband%netscape.com
704976db95 remove invalid assertion
git-svn-id: svn://10.0.0.236/trunk@53823 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-18 04:30:54 +00:00
rogerl%netscape.com
fd8c6885d9 Changes for JS1.5 build under AIX4.3.
(Not a part of SeaMonkey builds)


git-svn-id: svn://10.0.0.236/trunk@53773 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-17 18:34:04 +00:00
brendan%mozilla.org
693b8201bd Unregress top-level lambda expressions not in with statements to avoid full closure overhead.
git-svn-id: svn://10.0.0.236/trunk@53760 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-17 07:41:12 +00:00
brendan%mozilla.org
66fd5fc23b Whitespace, comment, and bracing diffs.
git-svn-id: svn://10.0.0.236/trunk@53749 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-17 04:32:37 +00:00
brendan%mozilla.org
1f55285563 Brutal sharing followup (15146, r=shaver@mozilla.org)
- jsinterp.c changes: 
__- JSOP_CLOSURE comment fixes.
____(NB: ECMA ed 3 seems to require that we abolish the Closure object altogether, replacing it with a new Function object where we used to make a new closure.  That says we should use JS_CloneFunctionObject or an internal form (js_).) 
__- Use obj rather than the same-valued fp->scopeChain as fourth argument to js_ConstructObject. 
__- JSOP_DEFFUN change to auto-clone when running a script in a different scope from the one the compiler used for static function scope linkage. 
__- Remove bogus assertion from JSOP_DEFVAR/CONST: case.

- jsparse.c/.h changes:
__- Restored outerFun test to FunctionDef in jsparse.c, so that we make a closure if (outerFun || lambda || !funAtom) -- i.e., if we're compiling
____- A function statement within an active function via eval;
____- We're compiling a function expression statement (not at apparent-to-compiler top-level; part of some kind of compound statement, e.g. if or with);
____- Or the function, even at top statement level and not in another function, has no name. 
__- Don't predefine local variables at compile time if they're in with statement
__- Enforce const at compile time for local consts

- Minor jsemit.[ch] cleanup.


git-svn-id: svn://10.0.0.236/trunk@53746 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-17 04:13:05 +00:00
rogerl%netscape.com
20bec5b4fd Added changes at Jane's request.
(Not a prt of SeaMonkey build)


git-svn-id: svn://10.0.0.236/trunk@53710 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-17 00:05:45 +00:00
rogerl%netscape.com
5ca7bc097e Added new defs at Jane's request.
(Not a prt of SeaMonkey build)


git-svn-id: svn://10.0.0.236/trunk@53709 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-17 00:04:49 +00:00
rogerl%netscape.com
bd24478a5d r=norris.
Fix overrun by back-reference digit sequence parsing.


git-svn-id: svn://10.0.0.236/trunk@53705 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-16 23:54:18 +00:00
rogerl%netscape.com
45e1ab641f r=norris
Fix for toString under 1.2 - calls toSource which provides extra '{}' that
doesn't match previous behaviour.


git-svn-id: svn://10.0.0.236/trunk@53704 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-16 23:53:33 +00:00
rogerl%netscape.com
6760f395ea r=norris
Fixed handling of weird indices (NaN etc) for charCode and charCodeAt.
Bug #16984


git-svn-id: svn://10.0.0.236/trunk@53702 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-16 23:52:08 +00:00
rogerl%netscape.com
8bff78dad7 r=norris.
Changes for ECMA compatible function.apply handling of missing or null args
Bug #16984


git-svn-id: svn://10.0.0.236/trunk@53701 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-16 23:51:02 +00:00
jdunn%netscape.com
f0c83b3d5a Fixing all unresolved symbols on unix. The bug has the diff's
r dp@netscape.com (ramiro helped me with it)
# 18688


git-svn-id: svn://10.0.0.236/trunk@53637 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-16 06:02:31 +00:00
brendan%mozilla.org
f02610dd2c Fix exception bytecodes to use script->main (18926, r=jband@netscape.com).
git-svn-id: svn://10.0.0.236/trunk@53602 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-16 02:15:22 +00:00
rogerl%netscape.com
50e9fca03a Backing out changes to script.exec scope access. r=norris
git-svn-id: svn://10.0.0.236/trunk@53562 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-15 22:54:06 +00:00
jband%netscape.com
0468fe6fcd r=norris. Fix for bug 18702. Adds code to track whether caller to xpconnect is native or JS. This allows xpconnect to decide to not call security manager to filter calls originating from native code
git-svn-id: svn://10.0.0.236/trunk@53548 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-15 22:11:21 +00:00
brendan%mozilla.org
52c12d5bf6 Disassembler uses ToSource, not ToString, where appropriate (DEBUG only change).
git-svn-id: svn://10.0.0.236/trunk@53532 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-15 21:11:59 +00:00
brendan%mozilla.org
2d612a6ea6 Fix 18684, bad combo of old-latent and new bugs (r=shaver@mozilla.org).
git-svn-id: svn://10.0.0.236/trunk@53363 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-12 20:41:04 +00:00
brendan%mozilla.org
5d2eac8479 XULDOMJS_19991106_BRANCH landing (15146, 18025, r=shaver@mozilla.org)
git-svn-id: svn://10.0.0.236/trunk@53326 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-12 06:03:40 +00:00
mccabe%netscape.com
b31e8409ff Fix most remaining warnings in js/src. Patch courtesy slamm.
r=mccabe.


git-svn-id: svn://10.0.0.236/trunk@53245 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-11 21:52:35 +00:00
mccabe%netscape.com
f7d8c1e1aa Warning fix for uninitialized structure members. r=fur,slamm.
git-svn-id: svn://10.0.0.236/trunk@53158 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-11 01:15:43 +00:00
waterson%netscape.com
2a0808b97f Bug 18408. Use 'ObjectAt()' rather than 'Peek()', which looks at the
front of the queue. r=jband


git-svn-id: svn://10.0.0.236/trunk@53091 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-10 21:59:05 +00:00
shaver%netscape.com
e67b7a69e7 fix build bustage from big dumb shaver
git-svn-id: svn://10.0.0.236/trunk@53058 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-10 02:04:58 +00:00
shaver%netscape.com
d9c238eacf - use JSThreadContextStack and JSRuntimeService (more) correctly in loader
- teach loader about unloading and deferring components
- turn off some DEBUG_shaver noise
- better error reporting
- use nsXPIDLCString
- use nsCOMPtr
- add missing cxstack->Pop() in the xpcshell
- Components.results.NS_ERROR_FACTORY_REGISTER_AGAIN (want better text for
  error message)
- handle thrown-nsresult correctly where C++ calls JS without an active JS
  stack
- remove missing cxstack->Pop() from TestXPC
r=jband,brendan


git-svn-id: svn://10.0.0.236/trunk@53049 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-10 00:34:26 +00:00
taek%netscape.com
502dbdb8c2 updated to use /share/builds/components
git-svn-id: svn://10.0.0.236/trunk@52895 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-06 02:11:18 +00:00
drapeau%eng.sun.com
c38feba394 r=fur@netscape.com, approval=chofmann@netscape.com. Fix for bug 5369
("[PP]Crash on startup because of Java Plug-in 1.3 for Netscape
Navigator.")  Make the code more bulletproof by checking for NULL
arguments to several methods.  If JVM isn't running, jEnv arg should
be NULL.

This doesn't entirely fix the problem of a JVM gone awry in all cases;
in the case of this particular bug, the Sun JDK 1.3 Beta HotSpot VM
caused an error, and there's no way for Mozilla code to detect this
failure mode.  The fix for that half of the problem is to use the new
JDK 1.3 Early Access VM, which does not exhibit the problem.


git-svn-id: svn://10.0.0.236/trunk@52888 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-06 00:24:42 +00:00
rogerl%netscape.com
aa1271a477 Not a part of SeaMonkey Build
- new LiveConnect AIX4.3 makefile for server builds


git-svn-id: svn://10.0.0.236/trunk@52745 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 22:55:03 +00:00
rogerl%netscape.com
9f777f2bad Added defn of AIX4_3 to help fix dup typedef int8,int16 etc
git-svn-id: svn://10.0.0.236/trunk@52720 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 18:56:17 +00:00
mccabe%netscape.com
793e09ae44 Fix many nsInterfaceInfo leaks, thanks in part to patches provided by Patrick Beard. Fixes 15855. Some remain.
Clear up build warnings, and quiet nsInterfaceInfomanager debug output unless DEBUG_iim.  Makes startup a li'l less noisy.  Fixes 15628.

r=jband


git-svn-id: svn://10.0.0.236/trunk@52695 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 07:23:37 +00:00
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