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

1634 Коммитов

Автор SHA1 Сообщение Дата
mkaply%us.ibm.com 72fdd96e76 #59855
r=mccabe, sr=brendan
OS/2 needs fdlibm copysign
2001-01-31 23:24:27 +00:00
mkaply%us.ibm.com 808af911ef #59855
r=mccabe, sr=brendan
Fix Javascript to get Endianness from jstypes.h
2001-01-31 23:23:42 +00:00
mkaply%us.ibm.com 484398fb9e #59855
r=mccabe, sr=brendan
Fix Javascript to get Endianness from jstypes.h - start with a Makefile change and let it cycle once
2001-01-31 21:07:16 +00:00
dveditz%netscape.com 4c8c73bb24 enable win32 XPC_TOOLS_SUPPORT environment var to turn on js profiler hooks. r=mcafee,sr=jband 2001-01-31 03:26:31 +00:00
jband%netscape.com 993aa699c2 NOT PART OF THE BUILD - simple observer test to demonstrate use of weak references 2001-01-31 02:32:39 +00:00
brendan%mozilla.org c39cba66d9 Throw EvalError for indirect eval calls iff strict+werror (38512, r=rogerl, sr=shaver). 2001-01-31 01:12:15 +00:00
dbaron%fas.harvard.edu 208b4d5fa6 Attempt to fix build bustage from mkaply's checkin. r=kin 2001-01-30 16:31:43 +00:00
mkaply%us.ibm.com b8aaae7f98 #62003
r=mccabe, sr=brendan
Fixing up some Javascript CALLBACKs
2001-01-30 15:53:38 +00:00
mkaply%us.ibm.com ac97ab347b #62003
r=mccabe, sr=brendan
Fixing up some Javascript CALLBACKs
2001-01-30 15:43:35 +00:00
brendan%mozilla.org 621cdcc5b2 Better branch callback failure message. 2001-01-29 20:32:57 +00:00
brendan%mozilla.org 86de81d302 Make branch callback optional, parameterize its limit, and give a warning when it fails. 2001-01-29 20:27:30 +00:00
brendan%mozilla.org 27d55355a6 Fixes for bug 33390 (r=mccabe, sr=shaver)
- Optimize compile (parse+emit) operation to generate code for each top-level
  statement or function in turn, recycling JSParseNodes as we go for greatly
  reduced "long linear script" footprint.
- Fix O(n**2) growth problems in bytecode and srcnote generation.
- Add js_ParseTokenStream entry point to compiler, for tree-generation without
  code-generation.  Move JSOP_EVAL instruction selection from code-generator to
  parser, to match other such specializations and enable js_ParseTokenStream.
- Fix js_CompileTokenStream (and get it right in new js_ParseTokenStream) to
  respect JSOPTION_VAROBJFIX.
- Clean up bracing, multi-line conditions, and overlong lines.
2001-01-27 08:00:45 +00:00
rogerl%netscape.com 52a07b9666 Fixes for bugs #66234 (57572, 57631, 61266, 61766) sr=brendan, r=mccabe,
r=rginda,r=rogerl. Also 60925, 60926 by virtue of being subsumed by above.
2001-01-27 00:31:32 +00:00
jband%netscape.com 355a6cb803 fix jump in leaks caused by previous checkin by commenting out the offending code that roots Object.prototype 2001-01-26 08:02:23 +00:00
jband%netscape.com 57579a2b2f backing out the unreviewed change to the loader for bug 63027 that I checked in with the other xpconnect changes by mistake. 2001-01-26 02:35:22 +00:00
jband%netscape.com 6bf9fd8163 add xpidl support for DOMString to fix bug 65762. r=jst sr=brendan 2001-01-26 02:32:18 +00:00
jband%netscape.com f74be035ac This is mostly to fix bug 64111 - XPConnect vs. Object.prototype.toSource woes.
Some other small fixes are included. Here is the list...

- Make nsIJSID::id [noscript] because xpconnect automatically builds a nsIJSID
wrapper around nsid values. However, xpconnect does not maintain a table of
those wrappers. So, given the same id twice it will make two nsIJSID wrappers.
This means that property walking could get foo.id.id.id... and not detect that
the different objects represent the same id. nsIJSID already exposes 'number'
so that JS can get the stringified value of the nsid. The nsid struct returned
by 'id' is useful for C++, but only causes problems for JS.

- Fix the nsIXPCScriptable 'IGNORE' handler for GetAttributes to not fail
silently.

- Add 'Components' to global objects as a non-enumerable property for backwards
compatibility and to avoid additional work in property enumeration (esp. in
win.toSource!)

- Expose toSource on wrapped native JSObjects. This just returns an empty object
string: '{}'. It can be overridden by an interface method if present.

- Expose toString on wrapped native JSObjects. It can be overridden by an
interface method if present. Previously we only did this as part of the
Convert op. Now someWrapper.toString will return a callable function.

- Extend the toString behaviour to also print the address of the wrapper in
DEBUG builds only: e.g. "xpconnect wrapped nsIFoo @ 0x12345678". mccabe
convinced me this would be useful. Release build behaviour is unchanged - we
worried that exposing addresses might contribute to possible security exploits.

- Have wrapped native JSObjects use Object.prototype as their proto rather than
have a null proto. Originally this was going to allow delegation to
Object.prototype.toSource, but even without that, this seems like a good thing.
This is implemented by getting Object.prototype from the global object each
time we create a wrapper to allow for spify JS dynamic craziness.

- Use 16bit values in wrappednative property descriptors to save space. It was
only possible to use 16 bits of the pointer-sized ints in the structs anyway.

- Do a security check at enumeration time and only expose those properties that
the caller can actually 'Get'. This fixes the toSource security exception
problem.

- Add a big comment about the problem of reporting uncaught exceptions.

- Fix crashing bug for case where object has no enumerable properties and
xpconnect failed to fill in the zero count.

- Fix NewInstanceJSObject to dig in and find the 'ultimate' parent when
parenting new wrapper JSObject. The old scheme was ending up with hugely
long parent chains in some cases.

r=jst, sr=brendan
2001-01-26 02:25:09 +00:00
jband%netscape.com 42df2f7125 WHITESPACE ONLY CHANGE. Detabbing this stuff cuz it bothers me (tabbing didn't match 'Mode' line's tab-width) 2001-01-26 01:53:22 +00:00
brendan%mozilla.org d5e03229e3 Fixes for bug 61898 (which has morphed), r=rogerl, sr=jband.
- Optimize integer ++ and -- to avoid double-to-int, which is quite costly for
  some compilers (ftol on Windows with MSVC).
- Optimized arguments[i] and arguments.length references to use bytecodes that
  avoid creating an arguments object for the current frame.  This entailed
  simplifying the compiler to avoid flagging functions and scripts that set
  arguments, since we have code in jsfun.c to catch such sets at runtime.
- The code generator now eliminates useless expression statements, giving a
  strict warning about them.
- Rationalized jsemit.c's LookupArgOrVar to have well-defined results in *pn.
  Eliminate bytecode specializations for argument and local variable gets and
  sets from jsparse.c -- these precede jsemit.c's LookupArgOrVar and frustrate
  it, by setting pn_slot non-negative too early.
- Code generation errors set report->filename and report->lineno, rather than
  hacking "{0}, line {1}: " into the localized message.
- Bogus JSFRAME_VAROBJBUG removed, JSOPTION_VAROBJFIX is sufficient.
- Spruce up jsinterp.c macros to use JS_BEGIN/END_MACRO brackets if possible.
- Avoid calling JS_PropertyStub.  The call is too costly compared to a branch
  in the caller.
2001-01-26 00:59:50 +00:00
sspitzer%netscape.com 1f7b9feefe back out brendan (Career Limiting Move) to fix blocker bug #66545.
a=leaf
2001-01-25 18:06:57 +00:00
brendan%mozilla.org bc6f4bf25f Fixes for bug 61898 (which has morphed), r=rogerl, sr=jband.
- Optimize integer ++ and -- to avoid double-to-int, which is quite costly for
  some compilers (ftol on Windows with MSVC).
- Optimized arguments[i] and arguments.length references to use bytecodes that
  avoid creating an arguments object for the current frame.  This entailed
  simplifying the compiler to avoid flagging functions and scripts that set
  arguments, since we have code in jsfun.c to catch such sets at runtime.
- The code generator now eliminates useless expression statements, giving a
  strict warning about them.
- Rationalized jsemit.c's LookupArgOrVar to have well-defined results in *pn.
- Code generation errors set report->filename and report->lineno, rather than
  hacking "{0}, line {1}: " into the localized message.
- Bogus JSFRAME_VAROBJBUG removed, JSOPTION_VAROBJFIX is sufficient.
- Spruce up jsinterp.c macros to use JS_BEGIN/END_MACRO brackets if possible.
- Avoid calling JS_PropertyStub.  The call is too costly compared to a branch
  in the caller.
2001-01-25 09:22:19 +00:00
beard%netscape.com 7d89961329 [not part of build] Added UTCUtils to reflect new dependencies in JS engine. 2001-01-23 19:54:49 +00:00
brendan%mozilla.org 7a48de7730 Followup to last checkin, comment change only, r=mccabe. 2001-01-20 02:02:48 +00:00
brendan%mozilla.org f7b7182178 2nd attempt: Fix API botch where 'var x=0' vs. 'x=0' could put x in a different object (65553, r=mccabe, sr=jband). 2001-01-20 01:41:55 +00:00
kin%netscape.com 254142b18a Temporary fix for Bug #65828: mozilla installer.exe fails with "-229 script error"
Backing out Brendan's previous checkin for bug #65553 (jsapi.c, jsdbgapi.c, jsemit.c, jsinterp.c, jsinterp.h, jsobj.c, and jsscript.c), so we can get smoke tests going.

r=attinasi@netscape.com (sheriff)
2001-01-18 22:10:12 +00:00
brendan%mozilla.org 6016f92494 Fix API botch where 'var x=0' vs. 'x=0' could put x in a different object (65553, r=mccabe, sr=jband). 2001-01-18 03:00:31 +00:00
brendan%mozilla.org 383d566ed0 Fix ABW impurities under JS_ClearScope on an unmutated obj (64958, r=shaver, sr=jband). 2001-01-11 23:55:30 +00:00
brendan%mozilla.org d69df4fc93 Speed up js_qsort_r a bit (64065, r=mccabe, sr=jband). 2001-01-04 10:13:18 +00:00
mccabe%netscape.com 1202414e22 Add emacs makefile modeline.
Not part of the Mozilla build.
2000-12-29 23:23:52 +00:00
rogerl%netscape.com 8b7f5ab4ea Fix for #60164, more failure testing during exception processing.
r=mccabe, a=brendan
2000-12-29 22:19:09 +00:00
mccabe%netscape.com d85aab0c36 Fix courtesy jband to quiet unused variable warning.
Move 'dlsoffset' to the block where it's used, inside #ifdef XP_MAC.

r=mccabe
2000-12-21 04:32:13 +00:00
brendan%mozilla.org b2209e4182 Don't fatten a flyweight lock unnecessarily in JS_SetPrototype; misc. cleanups (63097, r=mccabe, sr=jband). 2000-12-20 22:36:01 +00:00
mccabe%netscape.com 2fe07882cc Fix to 62309. Change JS_AddRoot to JS_AddNamedRoot in Liveconnect to aid leak diagnoses.
r=beard
sr=brendan
2000-12-09 01:35:46 +00:00
mccabe%netscape.com abdaf190a6 More licenses and modelines.
Not part of the Mozilla build.
2000-12-08 10:19:59 +00:00
mccabe%netscape.com 4fa75fb716 Add informative comment.
Not part of the Mozilla build.
2000-12-08 10:01:35 +00:00
mccabe%netscape.com d04a849968 Whoops, wrong license. 2000-12-08 10:00:20 +00:00
mccabe%netscape.com d04afd6262 Add -p flags to several Makefile mkdir commands, to allow parallel gmakes. Still not sure how to make js/src/liveconnect/classes/*.java happy with parallel. gmakes...
Also add some #modelines to makefiles, and some more NPL licenses.

None of these files are part of the Mozilla build.
2000-12-08 09:56:47 +00:00
mccabe%netscape.com e548353c35 Update to last fix of js.c. Multiple versions of functions #ifdef'ed to take different numbers of arguments (in C) are a pain. Use #ifdef-safe JS_GET_CLASS, instead.
Not part of the Mozilla build.
2000-12-08 06:30:57 +00:00
mccabe%netscape.com 19d6cc69f6 Fix to Windows build problem with the js reference build; replace non-API macro OBJ_GET_CLASS with API-kosher JS_GetClass. (OBJ_GET_CLASS used js_GetSlotWhileLocked, pulled from the set of exported symbols with the recent thread optimization checkin.)
Not part of the Mozilla build.  (Yes, it's a closed tree!)

r=brendan
2000-12-08 02:35:17 +00:00
cls%seawood.org 2c34b69f67 Adding caps to REQUIRES. Bug #62069 r=burning tinderbox: senna 2000-12-07 22:46:13 +00:00
jband%netscape.com bcc3c85a43 now that the bustage is cleanedup (sorry), I'm fixing the whitespace of that hasty checkin 2000-12-07 09:06:55 +00:00
jband%netscape.com ca8db95467 fix build bustage on some platforms from MI ambiguity 2000-12-07 08:33:50 +00:00
jband%netscape.com 45128b707e fix bug 62069 and bug 68538 by using nsISecurityCheckedComponent to allow unfettered access from JavaScript to Components.interfaces and the safer methods on nsXPCException. r=brendan r=mstoltz sr=hyatt 2000-12-07 08:14:27 +00:00
mccabe%netscape.com 9911434787 Add emacs makefile modeline to many makefiles, add npl license to others.
(Comment changes only.)
2000-12-07 02:44:27 +00:00
brendan%mozilla.org d20bef443d Fix leak on IS_BIG_ENDIAN malloc failure early return (r=mccabe,sr=jband). 2000-12-06 06:53:33 +00:00
brendan%mozilla.org bfe244979f Include <ctype.h> before using isalpha, etc.; misc style cleanup (r=mccabe,sr=jband). 2000-12-06 06:46:55 +00:00
jband%netscape.com 0666f237d9 fix bug 59588. Since js_MarkAtom is called *so* often but is usually short-circuited, we add a macro to get the shortcircuit flag in the 3 callers and avoid most of the calls. r=mccabe sr=brendan 2000-12-06 06:03:30 +00:00
jband%netscape.com 33f4835a09 fix bug 61788 - don't leave garbage in stack from js_AllocStack. Also, avoid allocing unneeded slots. r=mccabe sr=brendan 2000-12-06 06:00:49 +00:00
jband%netscape.com b33bf4ec79 fix warnings 2000-12-06 05:59:16 +00:00
brendan%mozilla.org 49c564a725 JSPROP_SHARED implies no slot to entrain garbage (bug 61482, r=mccabe, sr=jband). 2000-12-05 21:47:23 +00:00
brendan%mozilla.org 977ca0b14a Forgot to check this in as part of 54743's big patch, d'oh\! 2000-12-05 06:42:14 +00:00
mccabe%netscape.com c8171ec7cc Fix to 45590. Beard untangled ancient and wrong code from prmjtime.c interacting with the Mac OS; 45590 is fixed by actually treating the date offset as a signed value (it should be!) rather than adding a day when east of Greenwich.
Along the way, Patrick also fixed a bug that's been with the JS engine on the mac for more than three years; used to be that Mac dates throughout the year were displayed according to the machine's *current* daylight savings time setting; now they display properly and all is well with the world.

Dependent on recent checkin fixing 61577, adding needed time library to the mac build.X

r=mccabe
2000-12-05 05:17:30 +00:00
brendan%mozilla.org 58badac28d Checkin for art@halogen.kharkov.ua, bug 61899, r=mccabe, sr=brendan. 2000-12-05 03:16:41 +00:00
brendan%mozilla.org ef455e7028 A bit over-aggressive with that static keyword last time... 2000-12-04 04:34:18 +00:00
brendan%mozilla.org 6c9e3d3542 Fix NSPR_LOCK ifdefs (for JS_NO_THIN_LOCKS mode, enabled due to a configure.in bug on gcc/sparc5 systems). Fixes speedracer build bustage. 2000-12-04 04:02:27 +00:00
brendan%mozilla.org 606546fd75 All this r=mccabe, r=beard, and sr=jband -- many thanks to all who helped,
especially to jband for his great stress-test setup and particularly helpful
(in terms of reproducing bugs in draft patches) MP and laptop machines.

- Radical(*) object (scope) locking optimization: don't lock if a scope is
  accessed on the context that exclusively owns it (initially, the context
  on which the scope was created).  Once a scope becomes shared among more
  than one owner-context, give it the usual thin or fat lock, per existing
  jslock.c code.

  I did this at the memory cost of another word per JSScope, ownercx, which
  raised scope size from 12 to 13 words if !DEBUG.  I also added a linked
  list head pointer, rt->scopeSharingTodo, and a scopeSharingDone condition
  variable to JSRuntime, and a scopeToShare pointer to JSContext that's
  necessary for deadlock avoidance.

  The rt->scopeSharingTodo list links JSScopes through the scope->u.link
  union arm, which overlays the pre-existing scope->count (now u.count)
  member.  This list holds scopes still exclusively owned by a context, but
  wanted by js_LockScope calls active on other threads.  Those calls wait
  on the rt->scopeSharingDone condition, which is notified every time an
  owner-context ends the request running on it, in which code active on
  that context may be using scope freely until end of request.

  The code that waits on rt->scopeSharingDone must first suspend any and
  all requests active on the calling context, and resume those contexts
  after the wait is notified.  This means a GC could happen while the
  thread locking a scope owned by another thread's context blocks; all
  calls to JS_LOCK_OBJ must therefore first home fp->sp above any live
  operands, e.g.  The interpreter takes care to do that already.

  To avoid AB-BA deadlocks, if a js_LockScope attempt on one context finds
  that the owner-context of the scope is already waiting on a scope owned
  by the current context (or indirectly depending on such a scope lock),
  the attempt converts the scope from lock-free exclusive ownership to
  shared ownership (thin or fat lock).

- Fix js_SetupLocks and the js_LockGlobal/js_UnlockGlobal code to avoid
  divmod instruction costs, strength-reducing to bit-mask instructions.

- The radical lock-free scope change required care in handling the 0=>1
  and 1=>0 transitions of cx->requestDepth, which was till now thread-local
  because part of the JSContext not manipulated by other threads.  It's
  still updated only by cx's thread, but it is read by other threads in
  the course of attempting to claim exclusive ownership of a scope for more
  lock-free JS object operations.

- The JS_SuspendRequest and JS_ResumeRequest APIs have changed incompatibly
  to require their caller to save and restore the requestCount found when
  JS_SuspendRequest is called.  This is necessary to avoid deadlock; sorry
  for the incompatible change.

- Fixed various nits in jslock.[ch], including using Init/Finish rather
  than New/Destroy for the methods that take a JSThinLock and initialize
  and finish/free its members.  Another example: JS_ATOMIC_ADDREF is now
  JS_ATOMIC_INCREMENT and JS_ATOMIC_DECREMENT, so the two cases can be
  mapped to PR_AtomicIncrement and PR_AtomicDecrement.  This entailed
  changing jsrefcount from jsword to int32 (PRInt32).

- No need to use JS_ATOMIC_INCREMENT on JSScopeProperty.nrefs, as it is
  always and everywhere protected by the property's JSScope.lock.

- Cleaned up gratuitous casts in jscntxt.c by using &cx->links, etc.

- The lock used for mutual exclusion around both request begin and end vs.
  GC synchronization is rt->gcLock, and this lock now also protects all
  scope->ownercx pointer changes from non-null (exclusive) to null (shared),
  the rt->scopeSharingTodo/scope->u.link list operations, and of course the
  rt->scopeSharingDone condition.

  But this means that js_GC cannot hold rt->gcLock across the bulk of its
  body, in particular the mark phase, during which JS_GetPrivate calls,
  e.g., may need to "promote" scope locks from lock-free to thin or fat,
  because doing so would double-trip.  There never was any good reason to
  hold rt->gcLock so long, of course -- locks are for mutual exclusion, not
  for waiting or notifying a thread -- those operations require a condition,
  rt->gcDone, which we already use along with rt->gcLevel to keep racing GC
  attempts at bay.

  So now that rt->gcLock does not protect the mark phase, the enumeration
  of rt->gcRootsHash can race badly with JS_RemoveRootRT, an API that may
  legitimately be called outside of a request, without even a context.  It
  turns out that people may be cheating on the request model even with
  JS_AddRoot, JS_AddNamedRoot, and JS_RemoveRoot calls, so we must make
  all of those interlock with the GC using gcLevel and gcDone, unless they
  are called on the gcThread.

  Also, since bug 49816 was fixed, there has been no need for a separate
  finalize phase, or for rt->gcFinalVec.  Finalizers can no longer allocate
  newborn GC-things that might be swept (because unmarked), or double-trip
  on rt->gcLock (which is no longer held).  So js_GC finalizes as it sweeps,
  just as it did in days of old.

- I added comments to jslock.h making it plain that callers of JS_LOCK_OBJ
  and JS_UNLOCK_OBJ must either be implementations of js_ObjectOps hooks,
  or code reachable only from those hooks; or else must be predicated on
  OBJ_IS_NATIVE tests.  It turns out jsinterp.c's CACHED_GET and CACHED_SET
  macros neglected to do such tests, limiting the ability of JS embeddings
  to implement JSObjectOps with their own non-JSScope JSObjectMap subclass.
  Fixed, small performance hit that the lock-free optimization should more
  than make up for.

- jslock.c now gives a #error if you try to compile it on a platform that
  lacks a compare-and-swap instruction.  The #error says to use NSPR locks.
  Before this change, some platforms would emulate compare-and-swap using
  a global PRLock, which is always worse in runtime than using per-scope
  PRLocks.
2000-12-04 02:43:31 +00:00
jband%netscape.com 9467ba676e remove unnecessary nested JS_{Begin,End}Request in Load. r=beard 2000-12-04 02:13:13 +00:00
cls%seawood.org f518d8fb8f Update REQUIRES. 2000-12-03 22:33:51 +00:00
jband%netscape.com eaf3928939 fixes for bug 60303, bug 60356, bug 57370, and bug 58982 r=mccabe sr=hyatt sr=brendan 2000-11-30 06:58:37 +00:00
mccabe%netscape.com 6df0ad455d Fix to 61183. Detect whether the OS has given us a date string ending in /xx (as in xx/xx/xx) for Date.prototype.toLocale[Date]String, and pad it out to the real number of digits.
r=rogerl
2000-11-30 05:52:44 +00:00
mccabe%netscape.com d9cd56c60b Fix to 58673. Alias Date.prototype.toGMTString to Date.prototype.toUTCString (rather than defining seperate function objects for each). ECMA conformance.
r=rogerl
2000-11-29 03:03:05 +00:00
mccabe%netscape.com 1509017ef1 Fix to 57048. Bring the JS engine's implementation of Object.prototype.propertyIsEnumerable in line with the ECMA spec.
Thanks to David Flanagan for noticing this problem.

r=rogerl
2000-11-29 02:05:10 +00:00
mstoltz%netscape.com 668715ee7b bug 59766. Added code to push current JS context onto context stack before all LC calls into JS, becuase the security manager looks on the context stack for permission info. r=jband, mccabe 2000-11-28 02:50:21 +00:00
brendan%mozilla.org e21159cb73 Store real JSString*, not address of auto JSSubString, in local root (60674, r=beard, sr=jband). 2000-11-21 00:51:43 +00:00
cls%seawood.org 8bd122b3d5 Resurrect REQUIRES so that we have some sort of means to track intermodule dependencies. Bug #59454 r=blizzard@mozilla.org 2000-11-20 07:16:06 +00:00
pavel%gingerall.cz 3f402edbe2 - script compilation support (JS::CompileScript)
- compiled script may be executed (JS::exec)
- memory leak fixed
  (JSVALtoSV returning objects; magic has to to a mortal value)
2000-11-19 14:40:33 +00:00
danm%netscape.com b9887b3ac3 removing glowcode directives. won't affect you unless you use an obsolete version of glowcode. 2000-11-18 02:13:42 +00:00
mccabe%netscape.com 92e9039cb0 Not part of the Mozilla build. Update tool paths for server build. 2000-11-16 00:03:20 +00:00
mccabe%netscape.com dea57eb30f Not part of the Mozilla build. Add js and liveconnect config files for OSFV5.0 2000-11-15 23:57:49 +00:00
mccabe%netscape.com 1691baff22 Fix to 58946.
Make try { ... } catch(exn) { return exn } work by ensuring that the return value (exn) is maintained on the stack as we pop off scopes to return from the try/catch/finally.  The newly added JSOP_SWAP opcode helps us bubble.

This fixes a regression uncovered by the fix to 56716.

(I've noticed that this causes *depend* builds of the standalone JS shell to crash on this construct, but I've tested in the Mozilla build, and the dependencies seem to solve the problem there.)

r=brendan.mozilla.org
sr=jband@netscape.com
2000-11-08 20:39:43 +00:00
pavel%gingerall.cz 7ac6f89e90 - jsperl.c compiled with js programm, not with libjs
- better JS value tie methods
- memory leaks fixed
- support of digging native js error from exception
2000-11-07 15:24:49 +00:00
mccabe%netscape.com 1cb16802f8 Fix previous fix to conform to brendan-nit. 2000-11-02 03:38:09 +00:00
mccabe%netscape.com 980b771c8d Fix to 58007. Add Date.prototype.toDateString, toTimeString methods, by commoning existing date_format helper function with toString. ECMA-262 ed. 3 conformance.
r=brendan@mozilla.org
sr=jband@mozilla.org
2000-11-01 23:57:37 +00:00
mccabe%netscape.com 82a15a1687 Fix sense of don't-fail-on-warning check propagated from js.c.
Thanks to John Bandhauer for the catch.

Not part of Mozilla.
2000-10-30 22:42:48 +00:00
shaver%mozilla.org f188006b0a #56716, run finally{} before return from try{}/catch{}, r=mccabe, sr=brendan 2000-10-29 18:54:58 +00:00
brendan%mozilla.org 9d7b76c742 Use 0 - i rather than -i to avoid unsigned warning on Windows. 2000-10-29 18:08:40 +00:00
brendan%mozilla.org cb814a824f Handle negative-int-fits-in-jsval string literals as property names equivalent to their int conversions (57043, r=shaver, sr=jband). 2000-10-29 01:30:16 +00:00
mccabe%netscape.com 133caad64a Changes to update standalone JavaScript and Liveconnect library builds to the New Era of NSPR 4 and JDK 1.2.
Fixes for OSF; they they assume the existence of /share/builds/components/[jdk|nspr]/SOME_VERSION/etc/etc.  Sorry, external folks!

Not part of the Mozilla build.
2000-10-27 01:10:09 +00:00
mccabe%netscape.com a516acc1d9 Changes to update standalone JavaScript and Liveconnect library builds to the New Era of NSPR 4 and JDK 1.2.
Fixes for Linux and SunOS; they assume the existence of /share/builds/components/[jdk|nspr]/SOME_VERSION/etc/etc.  Sorry, external folks!

Not part of the Mozilla build.
2000-10-27 00:08:31 +00:00
mccabe%netscape.com b75a03d416 Fix standalone liveconnect build to not complain about missing fdlibm when asked to clean or clobber.
Not part of the Mozilla build.
2000-10-26 23:48:16 +00:00
mccabe%netscape.com 0773be3ba0 Make commandline shells for javascript and xpconnect-enabled javascript not return failure error codes when a warning occurs.
The failure codes were confusing our test drivers.

Not part of the Mozilla product.
2000-10-26 23:45:43 +00:00
mccabe%netscape.com ea452afb28 Add magic emacs modeline comment to make it display in Makefile mode.
Not part of the Mozilla build.
2000-10-26 02:59:03 +00:00
mccabe%netscape.com 8502dbb654 Add magic emacs modeline comment to make it display in Makefile mode.
Not part of the Mozilla build.
2000-10-26 02:13:07 +00:00
brendan%mozilla.org 1d811ae9b8 Fix obj.toSource to get attributes using the object in which id was found (56482, r=jband, sr=shaver). 2000-10-25 07:00:31 +00:00
brendan%mozilla.org 30d3951dc9 Home sp before calling js_ValueToStringAtom and js_ValueToFunction (bug 57826, r=mccabe, sr=jband). 2000-10-25 04:04:29 +00:00
brendan%mozilla.org 7527c8a330 Comment change only: document TOK_TRY and TOK_CATCH nodes. 2000-10-22 22:47:40 +00:00
beard%netscape.com 87e4c0401b Fixed access paths, link errors. [Not part of build.] 2000-10-21 07:29:53 +00:00
beard%netscape.com e77b33af7d Added static library targets, JSRef.o and JSRefDebug.o. [Not part of build.] 2000-10-21 06:46:21 +00:00
beard%netscape.com a0fa5086d0 LiveConnect support for Mac. [Not part of standard build.] 2000-10-21 06:44:54 +00:00
brendan%mozilla.org c9423a9980 - Treat 08, 09, 078, 079, etc. as decimal, but warn that they're not legal
ECMA-262 octal literals.  Old code would split 08 into 0 and 8 if JS1.2 or
  other non-ECMA version, and always split 078 into 07 and 8, resulting in
  missing ; syntax errors.

- Fix CheckFinalReturn to be aware of JS_HAS_EXCEPTIONS, finally (sic).  Lots
  of help from jag (Peter Annema, disttsc@bart.nl), thank him.

Both changes got lumped under bug 49233, and are r=jband, sr=shaver.
2000-10-19 19:21:53 +00:00
jeff.dyer%compilercompany.com feccfe330f b=53849, r=mstoltz@netscape.com,edburns@acm.org, a=brendan@mozilla.org.
This fix makes Liveconnect smarter about getting a security principal
when verifying that call from an applet to JS should be allowed.
2000-10-19 11:51:22 +00:00
brendan%mozilla.org 0b83f3aa96 Don't nuke the stackPool in JS_GC if it's in use by cx->stackHeaders or cx->fp (or other future users; 57096, r=shaver, a=jband). 2000-10-18 22:21:46 +00:00
brendan%mozilla.org 66e3327295 Fix cx-for-acx typo-blunder (57070, r=mccabe, a=jband). 2000-10-18 16:00:39 +00:00
jband%netscape.com aee1c25d21 fix crasher bug 56843 in case of if('wrappedJSObject' in foo). Better solution for bigger problem in the works. a=brendan@mozilla.org r=shaver@mozilla.org 2000-10-16 22:34:26 +00:00
jband%netscape.com deded45781 remove JS gc roots on wrappedjs objects during xpconnect shutdown to avoid needless rooting and noise in root leak logs. bug 55426. a=brendan@mozilla.org r=mccabe@netscape.com 2000-10-15 05:42:25 +00:00
jband%netscape.com f3f7e3cf67 only emit leaked root warnings when the JSRuntime is being deleted. This changes around the fix of bug 55117 and cleans up the incorrect leaked root warnings in bug 55426. a=brendan@mozilla.org r=mccabe@netscape.com 2000-10-15 00:20:48 +00:00
rogerl%netscape.com bdb6266783 Bug #46196, a=brendan, r=mccabe. Fixed recursive death in out of memory
situation.
2000-10-13 22:11:52 +00:00
brendan%mozilla.org c7d1950d0e Checking in for rogerl (53614, r=mccabe, a=me). 2000-10-13 01:58:40 +00:00
rogerl%netscape.com 22b5bf23a9 Bug #55114, a=brendan, r=mccabe. Fixed failure in enumerating Java string
objects.
2000-10-12 01:23:13 +00:00
rogerl%netscape.com d533f7e957 Bug #53614, a=brendan,r=mccabe. Fixed crash for calling RegExp literal. 2000-10-12 00:18:40 +00:00
rogerl%netscape.com 3379e625da Bug #52479 , a=brendan,r=mccabe. Fixed crash on bad \uXXXX in input. 2000-10-11 22:34:40 +00:00
rogerl%netscape.com 12bba253e7 Bug #54408, r=mccabe, a=brendan. LiveConnect top-level property names
predefined readonly.
2000-10-09 21:39:22 +00:00
brendan%mozilla.org 3525efa958 Remove not-found property caching (55624, r=shaver a=jband). 2000-10-09 14:38:21 +00:00
mccabe%netscape.com 2f0d7b87e1 Fix to 55117. Warn on DEBUG of any GC roots remaining at engine shutdown.
r=rogerl@netscape.com
a=brendan@mozilla.org
2000-10-05 21:55:38 +00:00
jband%netscape.com cecbb83988 fix bug 55139. fix broken JSObject parenting of wrapped natives for JS components. r=shaver@mozilla.org a=brendan@mozilla.org 2000-10-05 04:15:43 +00:00
jband%netscape.com 46893817df part of bug 55139. Add debug only diagnostic code for dump JSObjects. r=shaver@mozilla.org a=brendan@mozilla.org 2000-10-05 04:13:53 +00:00
jband%netscape.com f803edb01b fix bug 55151. This fixes a trunk only regression caused by me in a previous checkin. I missed that an 'if' block contained both a report of an error (that we might want to skip) and also a few lines of necessary error handling code. r=mccabe@netscape.com a=brendan@mozilla.org 2000-10-05 04:13:48 +00:00
brendan%mozilla.org 00c4402750 Fix old bug that stored iter_state even after OBJ_ENUMERATE error (55201, r=rogerl, a=jband). 2000-10-05 00:43:17 +00:00
jband%netscape.com e80b9b250d Mostly submitted patches...
- Fix bug 54264 from Jon Smirl <jonsmirl@mediaone.net>
  Do cleanup of thread local storage on main thread.

- Fix bug 54275 from Jon Smirl <jonsmirl@mediaone.net>
  Release components in shell before shutting down xpcom

- Fix bug 54310 from Jon Smirl <jonsmirl@mediaone.net>
  Call JS_DestroyScript in xpcshell and js.c

- Fix bug 54352 from Jon Smirl <jonsmirl@mediaone.net>
  Cleanup what static data we can in xpclog.

- Initial fix of bug 54473
  Don't report warnings as errors in wrapped JS calls.

- Fix bug 54462 from Mark Hammond <MarkH@ActiveState.com>
  Fix jband's stupid use of uint8 for method indexes.

- Use environment rather than prefs for #ifdef'd debug options

- Don't report NS_ERROR_FACTORY_REGISTER_AGAIN as an error.

r=mccabe@netscape.com a=jband@netscape.com
2000-09-30 08:16:09 +00:00
mccabe%netscape.com 5911e488e0 Propagate fix to 41872 from the standalone JS shell to the standalone XPConnect-enabled JS shell. Make warnings on by default in the standalone JS shell, and introduce the -W option to suppress warnings if needed. Retained the -w option (enable warnings) in case somebody was using it.
This file doesn't go into the Mozilla distribution.

r=brendan,r=jband
2000-09-30 01:42:29 +00:00
mccabe%netscape.com 40e861a13e Fix to 41872. Make warnings on by default in the standalone JS shell, and introduce the -W option to suppress warnings if needed. Retained the -w option (enable warnings) in case somebody was using it.
This file is not part of the Mozilla build.

r=brendan
2000-09-30 00:24:22 +00:00
brendan%mozilla.org 4ed9d79e0a Fix bungled GC_KEEP_ATOMS logic (51954, r=mccabe, a=jband). 2000-09-29 00:18:15 +00:00
brendan%mozilla.org 8d730c70da Don't leave fp->sp above fp->spbase when returning, js_Invoke may GC on the way out (53123, r=mccabe, a=jband). 2000-09-29 00:11:49 +00:00
cls%seawood.org 799d3ef591 Do not use c++ comments in c file. Breaks WS5.0 compiler. 2000-09-28 08:08:02 +00:00
mccabe%netscape.com ba4d6a252b Fix to 54307. Patch courtesy Jon Smirl <jon@mediaone.net>.
Clean up several locks that jsdtoa uses, when JS_THREADSAFE.

a=brendan
r=mccabe
2000-09-28 05:14:32 +00:00
mccabe%netscape.com 897e928322 Remove unused function prototype.
r=jband
2000-09-28 02:47:40 +00:00
mccabe%netscape.com 3b57292fa9 Fix to 54305, free array holding fat locks. Patch courtesy Jon Smirl <jonsmirl@mediaone.net>.
a=brendan
r=mccabe
2000-09-27 21:52:27 +00:00
jband%netscape.com b416a15d43 NOT PART OF BUILD. fixing tools bustage 2000-09-26 10:23:23 +00:00
brendan%mozilla.org 5c322995b7 Fix two distinct bugs with similar symptoms (53123, r=law, a=jband). 2000-09-23 01:23:53 +00:00
jeff.dyer%compilercompany.com d5d760afb0 #45692:r=edburns,a=brendan. Followup fixes for oji liveconnect security. 2000-09-22 13:48:20 +00:00
jband%netscape.com 418b39b154 - Use the thread context service rather than our own JSContext. This makes
us less unthreadsafe. Use THREADSAFE nsISupports impl macro. bug 52936
- Add JS_{Begin,End}Request. bug 39373
- Call xpc->InitClass on each global - not just the superglobal. bug 52591
- Remove some gotos using auto classes for cleanup.
- Converted WITH_SERVICE calls to do_GetService.
- Consistent placement of contractID strings.
a=shaver@mozilla.org
2000-09-21 04:30:32 +00:00
jband%netscape.com 3dcad1b0a6 rest of the fix for bug 53268. a=brendan@mozilla.org 2000-09-21 03:56:42 +00:00
brendan%mozilla.org ccf7a9fae9 Fix 53268, r=jband. 2000-09-21 01:37:02 +00:00
brendan%mozilla.org 2861dff1f3 Add strict warning for undefined property reference (foo.bar where bar names no object in foo or its prototypes; r=jband). 2000-09-19 02:24:11 +00:00
brendan%mozilla.org 490bf8236e Fix JS_BeginRequest to avoid self-deadlock if called from a finalizer (52808, r=jband). 2000-09-19 02:18:17 +00:00
jband%netscape.com ef7bb615cc fix shutdown crasher bug 52940. We can't leave the thread context stack service thinking that the context we are about to delete is still valid. a,r=brendan@mozilla.org 2000-09-19 01:09:48 +00:00
beard%netscape.com b35d6552f0 Create SIOUX console with menus, etc. r=jband, a=brendan 2000-09-18 23:49:46 +00:00
brendan%mozilla.org de5d6d74b9 Censor all Call objects, per ECMA-262 (r=rogerl, 53037). 2000-09-18 23:35:22 +00:00
brendan%mozilla.org 1f03cb71d4 - Fix encodeURI, decodeURI, etc. common subroutines to avoid realloc'ing char
by char, by using a larger chunk size (64 chars) for linear growth.  Also got
  rid of ASCII-oriented add_bytes subroutine and related sprintf usage.
- Avoid reloading loop invariant str->chars all the time in encode and decode.
- Avoid creating garbage strings for unescaped and reserved character sets, by
  using statically initialized jschar array constants.
- Expand tabs, clean up 80th column violations, use prevailing style, etc.
2000-09-18 22:17:30 +00:00
beard%netscape.com dee42157a2 Make XPC shell compile on XP_MAC. r=jband, a=brendan 2000-09-17 15:34:39 +00:00
jband%netscape.com 51e5128d17 NOT PART OF BUILD. Fix xpconenct test uses of progids missed in the big progid to contractid renaming 2000-09-16 22:17:23 +00:00
brendan%mozilla.org 3d0b204150 - Back out part of patch from tlundeen@webcrossing.com, my fault for taking it
in part (the entire patch made JSContexts ref-counted, but that is not an API
  compatible change, and it doesn't help clean up at JS_Finish time if the API
  user leaks JSContext refs anyway).  52835, r=jband.
- First part of 64-bit portability fix for 52792, r=jnance.  More work needed.
- Fix bogus assert and minimization in js_AllocStack, too.
2000-09-16 22:17:22 +00:00
jband%netscape.com d50e6f9d65 NOT PART OF BUILD. Fix xpconenct test uses of progids missed in the big progid to contractid renaming 2000-09-16 21:47:32 +00:00
jband%netscape.com 6eabb6acbd fix bug 39373. make xpconnect calls into JS within a request for safety. a,r=brendan@mozilla.org 2000-09-15 06:59:38 +00:00
jband%netscape.com feed45599c fix bug 52579. Avoid infinite recursion dialog when JS is run by xpconnect on DOM context. a,r=brendan@mozilla.org 2000-09-15 06:17:08 +00:00
brendan%mozilla.org 84aaf06fe8 Better patch for bug and bogus assertion found by rogerc@geocast.com. 2000-09-15 06:05:28 +00:00
rayw%netscape.com d39d9e6d59 Bug fix for 52648 -- remaining stash of progids which I missed on
the mega-change yesterday.  This will fix a few more issues.

r=warren
2000-09-14 23:20:49 +00:00
rogerl%netscape.com b0bb9eeddc Bug #46429. r=rginda. Fixed bug in nested quantifiers. 2000-09-14 22:39:21 +00:00
brendan%mozilla.org ed8364faab Fix bogus new assertion in js_AllocGCThing (r=rogerc@geocast.com). 2000-09-14 19:58:11 +00:00
brendan%mozilla.org da262c552a Fixes to make JS GC truly exact:
- All jsvals for which JSVAL_IS_GCTHING evaluates to true must contain tagged
pointers into the GC heap -- therefore jsapi.c's JS_DefineConstDoubles cannot
"cheat" by tagging addresses of static jsdoubles to avoid js_NewNumberValue.

- Finalization is now interleaved with the Sweep phase, to avoid allocating
memory for finalization records while sweeping.  Instead, the JSRuntime holds a
preallocated JSGCThing vector (gcFinalVec) that the Sweep phase fills and
flushes via gc_finalize_phase, repeatedly.

This means that finalizers cannot allocate a new GC thing, an incompatible but
plausible change.  js_AllocGCThing asserts and then checks whether it is called
while rt->gcLevel is non-zero, and fails the allocation attempt if so.  But this
fixes bug 38942, where the old sweep-then-finalize with a sweep => malloc
dependency could lead to memory exhaustion.

- Instead of scanning whole stackPool arenas, which led to UMRs (bug 27924) and
sometimes to gross over-scanning that depended on the GC bounds-checking all
thing pointers against its heap, we scan exactly those stack slots in use:
  - arguments reachable from fp->argv;
  - variables reachable from fp->vars;
  - operands now reachable from fp->spbase, bounded above by the lesser of
    fp->sp or fp->spbase + fp->script->depth for an interpreted frame; if the
    latter, fp->sp has advanced logically above the operand budget, in order to
    call a native method, and all unused slots from fp->sp up to depth slots
    above fp->spbase must be set to JSVAL_VOID;
  - stack segments pushed when calling native methods, prefixed by JSStackHeader
    structs and linked from cx->stackSegments through each header.
The stack segment headers help the GC avoid scanning unused portions of the
stack: the generating pc slots running depth slots below fp->spbase, and slots
at the end of an arena that aren't sufficient to satisfy a contiguous allocation
for more args, vars, or operands.

- Exact GC means the stack pointer must remain above live operands until the
interpreter is done with them, so jsinterp.c got heavily whacked.  Instead of
POPs of various kinds followed by a PUSH for binary operators (e.g.), we use
FETCH and STORE macros that index by -1 and -2 from sp, and minimize adjustments
to sp.  When sp is homed to fp->sp, this allows js_DecompileValueGenerator to
find the value reliably, and if possible its generating pc.

- Finally, the O(n**2) growth rate of gc_find_flags has been fixed, using the
scheme sketched in bug 49816 and documented in a new major comment in jsgc.c.
Briefly, by allocating flags and things from one arena, we can align things on
1024-byte "thing page" boundaries, and use JSGCPageInfo headers in each page to
find a given thing's flags in O(1) time.

/be
2000-09-14 06:14:45 +00:00
rayw%netscape.com 52476868db fix to mal-formed contract id introduced in mega-check-in:x 2000-09-14 04:18:07 +00:00
rayw%netscape.com 6cc70ebd6c Bug 37275, Changing value of all progids, and changing everywhere a progid
is mentioned to mention a contractid, including in identifiers.

r=warren
2000-09-13 23:57:52 +00:00
brendan%mozilla.org d3ef2ed32f Fix uninitialized var bug found by one warning, silence another that's a can't-happen (r=jwbaker@acm.org). 2000-09-12 19:42:01 +00:00
jeff.dyer%compilercompany.com ca2b6410e1 b=45692 r=rogerl a=brendan: Enable liveconnect security. 2000-09-12 11:50:49 +00:00
rginda%netscape.com 2ae0bfa864 reverting old volatile fix for 24892 and replacing with cls' union patch.
spider and xpshell now pass the related testcases.
author=cls, r=me
2000-09-11 20:56:33 +00:00
brendan%mozilla.org 4b88e28559 Fix C++ portability and AIX compilation problem due to last C++ porting attempt (48976, r=jdunn@netscape.com). 2000-09-09 05:53:00 +00:00
rginda%netscape.com 25a6903bfd add fileName and lineNumber to Error.prototype for bug #50447
r=a=brendan
2000-09-09 00:41:15 +00:00
brendan%mozilla.org d8b759c670 Comments and white-space cleanup. 2000-09-08 21:24:14 +00:00
alla%lysator.liu.se 405c7b811f Implement js_CompareAndSwap for GCC x86 (Linux, FreeBSD etc). This gives us fast thin locks on Linux. bug 20357 r=brendan a=brendan
This version should now work on older binutils too.
2000-09-08 12:13:39 +00:00
alla%lysator.liu.se 47d1d132c3 Reverting last change. 2000-09-08 09:28:56 +00:00
alla%lysator.liu.se d0c3a704c2 Implement js_CompareAndSwap for GCC x86 (Linux, FreeBSD etc). This gives us fast thin locks on linux.
bug 20357, r=brendan a=brendan
2000-09-08 08:59:37 +00:00
jband%netscape.com 45fb207d7e fix bug 13125. Add support for wrapped native xpcom objects to be used as __proto__ objects for JavaScript objects. a,r=brendan@mozilla.org 2000-09-07 18:49:06 +00:00
brendan%mozilla.org 1b378df792 Improve JSNewEnumerateOp comment per recent exchange with Helge Hess. 2000-09-07 18:06:02 +00:00
brendan%mozilla.org 9e22c923eb Improve a comment that implied a need to include jsstr.h. 2000-09-05 21:39:48 +00:00
brendan%mozilla.org 5527354734 Must JS_SetGlobalObject at least, if not JS_InitStandardClasses, before defining native functions at startup. 2000-09-04 00:10:06 +00:00
scc%mozilla.org 0411ae4a6b fixing bustage exposed by removing extra comparisons 2000-09-03 03:28:05 +00:00
brendan%mozilla.org 1b4cfb986d Support external string GC types so XPConnect and other systems can optimize away copies (50602, r=jband). 2000-09-02 20:37:37 +00:00
jband%netscape.com ffb8d0a867 fix crasher bug 51176. xpti semantics for GetParent changed sometime back and I did not find all the cases where this mattered. thanks to mang@subcarrier.org. a,r=brendan@mozilla.org 2000-09-02 20:30:56 +00:00
brendan%mozilla.org 6303228f09 Followup for 44997, r=shaver:
- #if JS_HAS_LVALUE_RETURN around cx->rval2/rval2set defs and uses.
- Instrument different kinds of invocations, #ifdef DEBUG only.
- Clean up basis case of empty switch statement to use high = -1, low = 0,
  requiring care when optimizing in-range tests using unsigned casts, but
  freeing the interpreter and decompiler from having to do an extra test
  before looping from low to high.
- Clean up all codegen to use JUMP_OFFSET_LEN, ATOM_INDEX_LEN, etc. instead of
  magic 2 or 4.
- Add JSOP_TRY and JSOP_FINALLY no-ops to save a srcnote per JSOP_NOP, and to
  make decompilation and jit'ing easier.
- Minimize number of source notes to maximize SRC_XDELTA span.
- Use JSSCRIPT_FIND_CATCH_START in throw code.
- Indentation and bracing nits picked.
2000-09-01 18:42:22 +00:00
brendan%mozilla.org b11ea5a651 Fix js_EnterSharpObject to clean up sharpObjectMap on error (44009, r=shaver). 2000-09-01 18:01:04 +00:00
jband%netscape.com a5d8f71528 fix bug 50941 by updating help text. r=shaver@mozilla.org a=brendan@mozilla.org 2000-09-01 01:02:39 +00:00
brendan%mozilla.org ff4e039487 Support ECMA reference type return from native methods (44997, r=shaver). 2000-09-01 00:45:50 +00:00
waldemar%netscape.com dca152c48e Added jsdhash.c 2000-08-31 20:41:33 +00:00
jband%netscape.com 91431137bb fix to un-bust XPCONNECT_STANDALONE build (#ifdef'd out code for the browser) from shaver@mozilla.org 2000-08-31 10:44:28 +00:00
brendan%mozilla.org dec096cac0 Fix GC_MARK_DEBUG bustage (r=dbaron, not part of build unless you -D it). 2000-08-31 03:41:36 +00:00
brendan%mozilla.org 396485e045 Forgot to round capacity up to nearest power of two\! r=bienvenu. 2000-08-31 03:12:40 +00:00
beard%netscape.com 3940913be4 bug #44187: added guards to prevent crashes when Java not available. r=jband 2000-08-31 02:37:42 +00:00
brendan%mozilla.org c1a33908b2 Script to NSPR-ize and 'PL-ize' jsdhash.[ch] so they fit (sort of) over in xpcom/ds. 2000-08-30 19:30:33 +00:00
mkaply%us.ibm.com 31422b574a #50212
r=brendan, a=brendan
OS/2 GCC doesn't define _M_IX86
2000-08-30 01:04:59 +00:00
brendan%mozilla.org a9f537b714 Finish fixing 42221, for sure. 2000-08-29 23:09:47 +00:00
mccabe%netscape.com f80b936149 Potential fix to 50313
Initialize stack variable to NULL on suspicion that later possibly-unset use of it is causing crash.
2000-08-26 07:10:31 +00:00
brendan%mozilla.org 72259545ec Clean up JSObjectOps layering violations by adding mark and clear ops; JSClass gets a corresponding mark op so classes with unregistered roots in private data can mark them. The JS API gets a new JS_MarkGCThing entry point for JSObjectOps.mark implementors. Prerequisite check-in for bug 49816 and others (r=shaver). 2000-08-26 02:30:22 +00:00
brendan%mozilla.org 0bd1873977 Lazily define escape and unescape (via js_InitStringClass) only #ifndef MOZILLA_CLIENT, because the DOM must predefine backward-compatible versions of these functions that 'stick' (42221, r=mccabe). 2000-08-26 02:05:41 +00:00
mccabe%netscape.com b81dd96492 Fix to 39141.
Check for empty element case in array literals ( first element in [,'foo'] ) now uses the next token instead of the previous one when constructing the node, so the first element gets TOK_COMMA instead of TOK_LB.

This fixes a crash from previously accepted JS.

r=rogerl
2000-08-26 01:44:35 +00:00
brendan%mozilla.org c2a345b42b Macro-ize FPU mode fixing and do it on ever js_InitNumberClass; also, simplify #ifdefs to unify OS2 with XP_PC && _M_IX86 case (50212, r=mkaply@us.ibm.com). 2000-08-25 03:14:50 +00:00
jband%netscape.com 126a33230c bug 49748. Fix crash due to JS loader holding xpconnect service too long. Also add unimplemented method to xpconnect service and fix cast for bug 49641. r=shaver@mozilla.org a=brendan@mozilla.org 2000-08-24 07:50:27 +00:00
beard%netscape.com dd483f92da use QueryElementAt() to save space and time. r=shaver 2000-08-24 04:10:47 +00:00
brendan%mozilla.org 79e140d05d Eliminate silly gcc warning. 2000-08-24 03:14:17 +00:00
brendan%mozilla.org 1167c13750 Add strict warning about trailing comma in object initializers being non-ECMA (50001, r=shaver). 2000-08-23 23:55:43 +00:00
rogerl%netscape.com fbca44a130 r,a=beard@netscape.com. Bug #45415, fix LiveConnect memory leak. 2000-08-22 23:31:09 +00:00
brendan%mozilla.org 36d7d7ffd0 Fix UMR on ok in JS_ResolveStandardClass (46703, r=rogerl). 2000-08-22 00:25:17 +00:00
pavel%gingerall.cz 5871a2c6c0 - JSVALToSV handles perl objects in the right way 2000-08-21 16:52:49 +00:00
brendan%mozilla.org 5e88ad7a0a Re-constipate JSClass.name. 2000-08-19 19:17:32 +00:00
jband%netscape.com e117ff9576 fix the warnings that went along with the last bustage fix - in case one of the compilers needs it. brendan can fix as he likes in the morning 2000-08-19 10:36:45 +00:00
jband%netscape.com 74edc9d97c fix bustage 2000-08-19 10:22:13 +00:00
brendan%mozilla.org 1c45c63e32 Move shell to DIRS from ENABLE_TESTS ifdef addition to DIRS (r=mccabe,leaf). 2000-08-19 08:41:34 +00:00
brendan%mozilla.org 9d16e66aad Support lazy initialization of standard classes and their associated global functions/properties (46703, r=jband,rogerl). 2000-08-19 08:37:07 +00:00
brendan%mozilla.org b100da9c08 Add stub entry struct and ops for const void *keys, split out JS_DHashTableRawRemove, beefed up comments (part of 46703, r=jband). 2000-08-19 08:36:32 +00:00
cls%seawood.org 469c427b58 Use the -n32 ABI as the default for Irix 6.x but allow the option to disable it. 2000-08-19 08:05:05 +00:00
jband%netscape.com 764e0f7ef4 Add support for -w and -s for reporting warnings and doing strict JS checking (as supported by the engine). Also update the usage info. ra=brendan@mozilla.org 2000-08-19 03:28:01 +00:00
jband%netscape.com aa629031f9 Adding better diagnostic message to help in finding and fixing mismatched calls to JS_AddNamedRoot/JS_RemoveRoot. ra=brendan@mozilla.org 2000-08-19 03:25:16 +00:00
brendan%mozilla.org 415d5448ff Add jsdhash. 2000-08-18 00:04:53 +00:00
rogerl%netscape.com e98da0f355 Backing out fix to see if Linux build passes alivetest. 2000-08-17 00:30:57 +00:00
rogerl%netscape.com 963fe8b249 Bug #31255. r,a=brendan. Once more unto the '-->' accepted as line comment
fix.
2000-08-16 22:46:04 +00:00
rogerl%netscape.com 230bda8aea Bug #39141, r=mccabe, a=beard. Fix crash for empty array initializer. 2000-08-16 22:43:26 +00:00
shaver%mozilla.org ef25ecf277 Fix 47354 and 39975 by providing a system-privileged scope backstop for
JS Components, and teaching the ScriptSecurityManager to check for
XPC-wrapped native objects in the scope chain when looking for an
object's principal. r=jband/a=brendan
2000-08-16 04:01:02 +00:00
mccabe%netscape.com 08a7acd612 Fix to 39438.
Add a TokenStream entry to the regexp parser state so that regexps compiled at script-compilation time can report filename and line number on error.
2000-08-11 23:51:12 +00:00
conrad%ingress.com 008b9ba5fb Changed from using strings for nsIDirectoryService props to using macro names defined in nsDirectoryServiceDefs.h r=valeski 2000-08-11 20:31:57 +00:00
mccabe%netscape.com bb5fe130e4 Back in backed-out fix. 2000-08-11 02:58:30 +00:00
mccabe%netscape.com 121f13f6ad Backout until I can figure out why mac doesn't like strlen here, even though it seems OK elsewhere. 2000-08-10 23:32:03 +00:00
mccabe%netscape.com 7486821862 Fix to 46566.
Always copy the current line string out of the token buffer when generating an error report, rather than just passing the token buffer itself.  The token buffer wasn't necessarily a well-terminated string, so displaying the contents of the string in the error report produced unexpected results.

The unicode string in the error report is owned by a JSString; this string is rooted for the (stack-based) lifetime of the error report.

Fix courtesy jband.

r=mccabe
a=beard
2000-08-10 23:02:39 +00:00
mccabe%netscape.com 80888bc8ae Fix to 34425 -
Always create an error report, even when there is no current stack frame and it might be empty.  This fixes an API regression; we used to allow JS_ReportError to be called from the API when no JavaScript was running.

r=rogerl
a=beard
2000-08-10 22:57:40 +00:00
mccabe%netscape.com 3ef2f70f03 Fix to 47409 -
Don't use timezone comment in javascript Date object toString string if it looks like it might not be ASCII.

a,r=beard
2000-08-10 22:54:45 +00:00
brendan%mozilla.org fe5af9cfa3 Fix cut-and-paste bugs in JavaMember_finalize (48304, r=pschwartau). 2000-08-10 03:09:41 +00:00
mccabe%netscape.com 28cb72d740 Cast some parameters to PRUnichar * from jschar * to make the Mac happy. 2000-08-09 23:42:24 +00:00
mccabe%netscape.com 3ec109ea38 Fix to 24688. Post a message to the JavaScript console whenever a call is made through XPConnect to a JS Component or other JS object that results in an exception.
Also eliminate xpcJSErrorReport and merge some functionality from it into nsScriptError.

r=jband,a=beard
2000-08-09 22:48:52 +00:00
rogerl%netscape.com 5cabacffb2 r,a=brendan@mozilla.org. Adding missing ECMA3 compliance toLocaleXXX
functions to built-in Array, Date and Object object prototypes.
2000-08-09 21:46:03 +00:00
rogerl%netscape.com 7dd101a0af r=brendan, bug# 34276. Fix for correctly including winsock2.h. 2000-08-08 20:28:49 +00:00
rogerl%netscape.com 8d6efefdc6 (update to fix for bug #31255). Previous patch was insufficient in that it
didn't handle the case when the tokenstream is not tokenizing newlines.
2000-08-08 20:24:56 +00:00
jband%netscape.com 96a94769c3 interim fix for bug 25180. Build double wrappers around JS components used by JS code. Includes secured scheme for getting at underlying JSObject for those who really need to do this. a=warren r=rginda 2000-08-02 03:57:59 +00:00
mccabe%netscape.com aff2fb4f1e Not part of the Mozilla build.
Promulgate line-editing to the lcshell standalone command-line interpreter, and add more comments to the js shell support for the same.
2000-07-26 03:14:49 +00:00
brendan%mozilla.org 23e7eef778 What a dork, I didn't test-build on Linux! 2000-07-24 21:28:08 +00:00
putterman%netscape.com 0d22a278e4 backing out brendan's changes to fix build 2000-07-24 21:13:13 +00:00
morse%netscape.com 737f59960d attempt to fix build bustage 2000-07-24 21:03:41 +00:00
brendan%mozilla.org dd89a16a61 Micro-optimize source (compilers probably do it, but hey); fix a comment. 2000-07-24 20:17:24 +00:00
brendan%mozilla.org 5510a3a176 Fix broken code that stored off the end of 'vector' in ProcessArgs (not part of build). 2000-07-24 20:13:50 +00:00
brendan%mozilla.org a4164779e0 Fix second (prototype-owns-property) setter/shared special case to unlock properly (45940, r=mccabe). 2000-07-22 01:03:04 +00:00
rogerl%netscape.com b3b9f1eed2 r=brendan@mozilla.org Bug #31381 Bug in Alpha 64-bit pointer cast.
Added extra 'long'field to Java wrapper object to handle platforms with
64 bit pointers.
2000-07-21 21:57:29 +00:00
rogerl%netscape.com 0f1f29797d r,a=brendan@mozilla.org. Bug #23502, crash in qsort when user function
misbehaves.
2000-07-21 21:46:22 +00:00
jband%netscape.com 196dad70b4 drastically reduce unnecessary malloc calls from js_Atomize. r=brendan@mozilla.org. a=brendan@mozilla.org 2000-07-21 00:57:19 +00:00
dougt%netscape.com 07462eab19 more debug information. r=jband. 2000-07-21 00:53:07 +00:00
jband%netscape.com 4b23169051 fix for crash that can happen when wrapped JS objects get accessed after xpconnect shutdown. This was burning outside users of xpconnect. bug 45669. r=mccabe@netscape.com a=brendan@mozilla.org 2000-07-19 06:15:32 +00:00
jband%netscape.com 895baf831b fix bustage from dougt's last change to this file. not part of build. r=dougt@netscape.com 2000-07-19 06:11:12 +00:00
jband%netscape.com d64b148f22 patches from madams@janna.com to build xpconnect standalone. bug 42026. r=leaf@mozilla.org a=brendan@mozilla.org 2000-07-19 03:36:27 +00:00
brendan%mozilla.org 282dc9d68d Remove unused vars and WIN16 crap; improve freelist-scavenging code to avoid taking too big an arena off the freelist in the case where nb > arenasize (41381 again, r=jband@netscape.com). 2000-07-15 19:12:49 +00:00
mcafee%netscape.com decadd6ee1 Ignore generated files 2000-07-15 15:56:34 +00:00
brendan%mozilla.org bfa5020e72 Fix for..in loop bug that reopened 41126 (r=jband@netscape.com). 2000-07-14 05:37:40 +00:00
brendan%mozilla.org aa640b04e4 Fix 41381 regression from last fix attempt (r=jband). 2000-07-14 05:35:08 +00:00
jband%netscape.com 5aed7f0953 Fix dropProperty crash. This is needed because the JSObjects used by xpconnect wrapped natives need to act both as host objects with non-slot properties and as a plain JSObjects using the default JSOps and all that entails. So, we can't be passing the host-style props to dropProperty though we do still need to do so for other props. This has only been working up to now by luck. r=brendan@mozilla.org a=brendan@mozilla.org 2000-07-14 05:34:46 +00:00
jband%netscape.com ca2743a4e9 add THREADSAFE nsISupports implementation macros to some of the classes which lacked them. bug 45404. a=brendan@mozilla.org 2000-07-13 23:04:15 +00:00
brendan%mozilla.org 16c0b57382 Why didn't the lack of this break Linux, where I tested? 2000-07-13 05:56:28 +00:00
syd%netscape.com 319637810d Add support to JS profiler for collecting min, max, and average execution
times of functions. Doesn't yet handle rentrancy. Create Makefile.in files
so this stuff will build on *nix. r=jband, a=leaf
2000-07-13 05:19:22 +00:00
brendan%mozilla.org 87fdbe9365 Try again for bug 41381, r=wtc@netscape.com 2000-07-13 05:08:35 +00:00
brendan%mozilla.org b718a50b56 Uh oh. Back out last change until I'm sure I'm not an idiot. 2000-07-13 04:00:33 +00:00
brendan%mozilla.org d727cfab13 Fix ancient bugs: compare-and-swap is not threadsafe given A-B-A address replay via malloc/free; release to mark in pool->first empty arena would not free anything, as troy@tellme.com found (41381, r=wtc@netscape.com). 2000-07-13 03:49:22 +00:00
dougt%netscape.com c422448137 bug 40750.
Adding followSymlink flag to nsILocalFile.
Adjusting callers.
windows shortcut optimizations.
r=blizzard@mozilla.org.
a=brendan@mozilla.org
2000-07-12 23:31:31 +00:00
jdunn%netscape.com 79a7d94f44 do not include -lm for HPUX (as well as BeOS)
r= leaf@mozilla.org
2000-07-12 22:41:17 +00:00
brendan%mozilla.org 5e34c8be8b Fix 'out of order' malloc failure-handling bug found by cgn1234@yahoo.com (41022, r=cgn1234). 2000-07-12 01:44:12 +00:00
jband%netscape.com 938d6e31d0 add previously overlooked support for nsIXPCNativeCallContext implementors to signal that they have set the method return value for the JS caller. a=brendan@mozilla.org r=vidur@netscape.com 2000-07-10 22:39:37 +00:00
rogerl%netscape.com 4fa8a32d3b r=brendan@mozilla.org, Fix for #31255, support '-->' on line by itself as
a line comment - allows old, bogus HTML to execute a la 4.X.
2000-07-10 20:23:54 +00:00
rogerl%netscape.com 38133a200e r=brendan@mozilla.org, Fix for #44013 - enforce security for defineGetter
& defineSetter by calling OBJ_CHECK_ACCESS.
2000-07-10 20:21:38 +00:00
brendan%mozilla.org 13a173485a Fix an out-of-date comment. 2000-07-08 02:35:56 +00:00
brendan%mozilla.org 897fd3f942 Make it safe to nest a GC from js_AllocGCThing, ultimately from the interpreter; also make sure we collect all garbage (even garbage created by finalizers who unroot or unlock GC-things) when destroying the last context (39125, 44376, r=mccabe@netscape.com). 2000-07-08 02:06:01 +00:00
waterson%netscape.com f9fee044e1 Brendan meant to add jsdhash.h to the Mac build, too. 2000-07-06 20:55:23 +00:00
brendan%mozilla.org 5fea88fc63 Fix lying comment, pick control flow nit (r=lumpy,a=jack). 2000-07-06 07:38:11 +00:00
brendan%mozilla.org d77f792685 Add jsdhash.h to export/install lists, and jsdhash.c/.obj. 2000-07-06 04:46:18 +00:00
brendan%mozilla.org 9f75367cb3 Avoid 80th column violations and unnecessary local variable. 2000-07-06 01:15:08 +00:00
brendan%mozilla.org c55f98ab95 Undo teeny optimization from rev 3.28, alas it breaks ECMA Ed. 3, 15.5.4.15. 2000-07-06 00:30:46 +00:00
jband%netscape.com a49977b549 updating readme. Not part of build 2000-07-02 19:37:57 +00:00
cls%seawood.org e1e6c5760f Removed obsolete REQUIRES variable from every Makefile.in/makefile.win 2000-06-30 08:08:04 +00:00
jband%netscape.com 9ec0b005fc Fix dogfood/crash bugs: 42750, 39858 and fix 43897 and improve JS/XPConnect error reporting to help with crasher 40792. r=mccabe@netscape.com. 2000-06-30 04:04:46 +00:00
cls%seawood.org d7e09e3e95 wrap ifndef XPCONNECT_STANDALONE around xpconnect test components that require external interfaces. Thanks to Mark Adams <madams@janna.com> for the patch. Bug 42026 2000-06-28 22:53:55 +00:00
cls%seawood.org 8e8437f9fd Tweaks to build xpconnect standalone. Bug #42024. Thanks to Mark Adams <madams@janna.com> for the patches. 2000-06-28 07:03:13 +00:00
brendan%mozilla.org a17ba70026 Not again\! 2000-06-27 03:29:49 +00:00
brendan%mozilla.org 326fe4c9b8 Fix my stupid missing comma bustage. 2000-06-27 03:17:47 +00:00
brendan%mozilla.org 1a3dbef568 Fix JS_SetPrototype and __proto__ setting to deal with shared scopes; use JSObjectOps for setProto and setParent operations, and add spare op slots (41126, r=shaver@mozilla.org,pschwartau@netscape.com). 2000-06-27 02:37:25 +00:00
drapeau%eng.sun.com 72597d4d70 Two main things:
1) Fix for 23775 (three files changed for this)

2) Many OJI unit tests added.
2000-06-23 02:28:31 +00:00
pavel%gingerall.cz f21b6d3d1a - workaround of -rdynamic (JS_PERLCONNECT only) 2000-06-16 08:56:03 +00:00
brendan%mozilla.org b07fc1d1bb sfraser@netscape.com's fine GC_MARK_DEBUG enhancement for XPConnect. 2000-06-16 04:34:00 +00:00
pavel%gingerall.cz 34337bd829 - fixes in original version of perlconnect (JSVALToSV SVToJSVAL etc.)
- object delegation (like JSCreateObject) Perl->JS
- ParlValue handles PerlObject correctly
- undef values handled correctly (in both directions)
- JS arrays may be tied to perl arrays
- error handlers supported on Perl side
- no globals
- several minor fixes
2000-06-14 07:23:58 +00:00
pavel%gingerall.cz 122e709f36 - minor change of jsperl.h inclusion, matters for perlconnect build only 2000-06-14 07:18:41 +00:00
rginda%netscape.com b135be69a0 -- NOT PART OF THE BUILD --
Conditionally build lcshell w/ jdk 1.1.8 or 1.2.2 on windows
2000-06-14 00:14:56 +00:00
mkaply%us.ibm.com 739f68cd6d # 37239
r = mccabe, a = brendan
OS/2 bring-up - PR_CALLBACK for VisualAge
2000-06-14 00:07:08 +00:00
mccabe%netscape.com 9eeb8e5a67 First part of fix for 38495, support for exposing plugin methods to JavaScript.
This patch teaches XPConnected objects to look in their JavaScript __proto__ chain for any names they can't resolve themselves.  The rest of the fix to this bug sets the original DOM node object as the prototype of a new xpconnect-exposed plugin object, so javascript accesses will see names from both objects.

r=jst,brendan
a=beard
2000-06-13 23:18:21 +00:00
scc%mozilla.org 55650a35b3 fix type equivalence between |PRUnichar| and |jschar| now that |PRUnchar| may be |wchar_t| on select platforms 2000-06-12 23:52:31 +00:00
brendan%mozilla.org c01c46739f Comply with weird ECMA nit: call (o.f)() (note parens around the function expression) must bind 'this' to the global object, not to o\! (41864, r=shaver). 2000-06-08 06:46:18 +00:00
brendan%mozilla.org 71d336d3a2 Use localizable error message for out of memory. 2000-06-06 04:54:04 +00:00
brendan%mozilla.org 254d95a427 Better fix, really (r=shaver for sure). 2000-06-06 04:41:05 +00:00
brendan%mozilla.org 53389789d1 Better control flow for catch clause code generation (r=shaver). 2000-06-06 04:27:37 +00:00
mccabe%netscape.com 95640360aa Fix to potential leak introduced with fix to 40406.
Be conservative in handling the lifetime of the safe context created by XPConnect to execute JS Components, and save it off to be destroyed at cleanup time, even if some other safe context is registered with XPConnect via SetSafeJSContext.

r=vishy, a=brendan
2000-06-06 00:01:25 +00:00
brendan%mozilla.org a6d231a46a Avoid zero-length malloc (and assertbotch) in array_sort, just return true early\! 2000-06-03 19:00:28 +00:00
warren%netscape.com 958ed96edd Renaming nsIAllocator to nsIMemory (and nsAllocator to nsMemory). API cleanup/freeze. Bug #18433 2000-06-03 09:46:12 +00:00
brendan%mozilla.org a9f1d30ada Fix ECMA DontDelete compliance problems, which create getter/setter security holes (40760, r=shaver). 2000-06-02 00:02:46 +00:00
mkaply%us.ibm.com c99a5a0599 # 40177
r = leaf, a = brendan
Fix tab in makefile
2000-06-01 14:15:39 +00:00
brendan%mozilla.org fae789131e Use JS_ValueToId to go from user to internal property id, for integer-id optimality (40731, r=shaver). 2000-05-31 22:10:53 +00:00
brendan%mozilla.org 5cad625cd0 Make JS_ExecuteScriptPart call the debugger hooks (41066, r=MyNGs@HotMail.com). 2000-05-31 21:57:46 +00:00
brendan%mozilla.org eda440d4f6 Fix unreviewed changes made to fix 'Uninitialized variable compiler warnings'. 2000-05-28 00:02:26 +00:00
jst%netscape.com 1065a83626 Fixing bustage on solaris native builds. reported and reviewed by Tomi.Leppikangas@oulu.fi 2000-05-27 13:14:31 +00:00
edburns%acm.org 3d7b682c98 r=brendan
a=brendan
bug: 27362

This fix makes it so nsCLiveconnect.cpp doesn't #include
files within an extern "C" {} block.  To make this work, I
simply moved the extern "C" {} to the minimum necessary
range.  This required placing an "ifdef __cplusplus extern "C""
block in jsj_private.h, since nsCLiveconnect.cpp is the only
c++ file that includes jsj_private.h.
2000-05-27 01:12:40 +00:00
shaver%mozilla.org d7e842a0c5 use NS_METHOD for register/unregister callback, for Win32 2000-05-26 05:55:00 +00:00
shaver%mozilla.org 5cab829a39 fix build bustage -- I'm an ass 2000-05-26 05:18:31 +00:00
shaver%mozilla.org c681e00cf1 remove useless nsIModule paste (#22922), add debug() for JS components, use categories for component loaders, XPCONNECT_STANDALONE (#39875), r=dp,waterson a=brendan 2000-05-26 04:56:23 +00:00
mkaply%us.ibm.com 2609bf3c3a # 34106
r = leaf, a = brendan
Mistake was made with an earlier makefile checkin - removing double definition of EXTRA_DSO_OPTS
2000-05-25 14:25:04 +00:00
mccabe%netscape.com c362ca7ae7 Fix the fix to 40406, fixing bustage.
Don't destroy the per-thread safe JS context on cleanup if that context was provided through the setter.

r=waterson
2000-05-25 08:33:53 +00:00
mccabe%netscape.com cb41d34427 Fix for 40406. Add setter to XPConnect to set default JS context used to execute JS components when no appropriate context can be found.
The setter changes per-thread data - for the DOM/UI thread, this means that we can set the JS Context to one with DOM magic.  This magic allows some DOM JS <-> XPConnect JS conversions to succeed, and in particular allows creation of a DOM window from within a JS component.

Unblocks nsbeta2 work by Vishy and Pavlov.

r=mccabe,vishy.  a=brendan,sleestack.
2000-05-24 22:54:57 +00:00
cls%seawood.org 29367c81f1 More OS/2 changes. Batches 19 & 20 of Bug #34106 r=pavlov 2000-05-21 13:32:11 +00:00
brendan%mozilla.org c099365219 Fix remove-while-enumerating, beef up metering and add JS_DHashTableDumpMeter (these files are not part of the client build). 2000-05-20 18:42:22 +00:00
brendan%mozilla.org 31e48aabc5 Fix old stddev calc bug (#ifdef'd code, not part of build). 2000-05-20 18:41:13 +00:00
cls%seawood.org b129e998c9 Finishing off the standalone modules framework.
List js/src/liveconnect & js/src/xpconnect in toplevel Makefile.in to allow js to be built using the standalone framework.
Use the <module>_STANDALONE defines anytime BUILD_MODULES != all.
r=slamm
2000-05-20 02:45:59 +00:00
brendan%mozilla.org 3e2bb3db78 Use int for shift type consistently; optimize primary hash match (NOT PART OF BUILD). 2000-05-19 18:26:37 +00:00
brendan%mozilla.org 65a3d9575a Don't clear memory gratuitously (after create-error; after destroy). 2000-05-19 05:10:58 +00:00
brendan%mozilla.org 5873c77a22 Don't destroy what hasn't been created (NOT PART OF BUILD). 2000-05-19 03:49:32 +00:00
brendan%mozilla.org c7e55e24c1 Experimental double-hashing code, hope to donate to nsprpub/lib/ds (NOT PART OF BUILD). 2000-05-19 02:51:20 +00:00
mccabe%netscape.com 9dd8c20ce2 Patch xpcshell.cpp to not try to call JS_malloc with 0 bytes.
Patch courtesy Mark G. Adams <madams@livepage.com>

r=mccabe

This code is part of xpcshell, and doesn't go into the mozilla product.  Prior to this fix, xpcshell crashed on startup.
2000-05-19 00:34:46 +00:00
cls%seawood.org 1165ad3a33 Mass replace of -lmozjs with $(MOZ_JS_LIBS) needed for OS/2 and consistency. 2000-05-17 06:45:45 +00:00
brendan%mozilla.org b428bdcc8f Include jsstddef.h first in all js*.c files (r=tlundeen@webcrossing.com). 2000-05-17 06:24:45 +00:00
brendan%mozilla.org 7ec8bd2b9d JS_DestroyRuntime nukes all contexts; add JS_G/SetRuntimePrivate (r=tlundeen@webcrossing.com). 2000-05-17 06:23:03 +00:00
pavlov%netscape.com 0c75802384 changes all usages of NS_NewTimer to CreateInstance 2000-05-17 02:49:35 +00:00
sfraser%netscape.com 758611a321 Fix to only broadcast to the autoreg observer if we are really registering. 2000-05-17 01:54:18 +00:00
mkaply%us.ibm.com 04f5a1c6d5 # 37239
r= rogerl
OS/2 bring up continues - fix for floating point trap
2000-05-16 22:51:12 +00:00
rayw%netscape.com 1a08e06897 Added the fixes for 35866 and one older bug to the js component loader.
This means it is more careful about how it writes binary filenames in
the registry and it calls an observer to report autoregistrations.

This should have gone out with equivalent Native Component Loader fixes,
but it didn't.
2000-05-16 05:09:31 +00:00
cls%seawood.org 962f4851b8 Latest OS/2 makefile changes. Bug 34106. Batch 14, 15, & 16. 2000-05-16 04:41:54 +00:00
brendan%mozilla.org cde1ff4429 Fix GC request debiting to cope with multiple JSContexts on the same thread (39321, r=shaver). 2000-05-16 02:44:27 +00:00
brendan%mozilla.org 74b92d79e0 Common a string literal (js_call_str; r=shaver). 2000-05-15 20:21:05 +00:00
brendan%mozilla.org 11f2b967f5 Remove deadwood brought to my attention by tlundeen@webcrossing.com (r=shaver). 2000-05-15 20:04:41 +00:00
brendan%mozilla.org 66f16c7662 Fix stupid 0-for-enumerator-equal-to-0 warning (r=shaver). 2000-05-15 20:03:13 +00:00
mscott%netscape.com 681e89f874 backing out rayw's checkin because the tree WAS CLOSED! Shame on you =). 2000-05-15 18:07:36 +00:00
rayw%netscape.com 62565a9c19 I needed to add a better comment for the prior version I checked in.
Bug 3690, I added the native character writing / escaping logic to
the javascript components as it was added to native components.

r=dveditz
2000-05-15 17:29:20 +00:00
rayw%netscape.com bbea185af6 The remaining fix for international characters in component names. 2000-05-15 17:26:18 +00:00
brendan%mozilla.org 2cc44b24b1 Enforce interCaps Mozilla XPIDL style (r=shaver). 2000-05-15 07:03:46 +00:00
brendan%mozilla.org abe80212f1 Update JS_InitClass to match signature. 2000-05-15 06:07:10 +00:00
brendan%mozilla.org 77e3687daa Comment the need for rooted JS_NewScriptObject; whitespace/comment cleanup. 2000-05-15 06:06:12 +00:00
brendan%mozilla.org 96e08e9fe3 Cleanups from tlundeen@webcrossing.com, plus fun->call=>native renaming. 2000-05-15 03:54:50 +00:00
brendan%mozilla.org eaa1e364fe Forgot to check this in with the last batch! 2000-05-14 23:04:33 +00:00
brendan%mozilla.org 240be7a3b0 GC synchronization and lock fixes, plus comments (37983, r=waterson@netscape.com). 2000-05-14 23:00:51 +00:00
shaver%mozilla.org b6fe117b32 remove bogus CHECK_REQUEST in JS_ClearRegexpStatics (16128) 2000-05-14 15:38:04 +00:00
brendan%mozilla.org 2cdcef05eb Set newborn to root of object tree created by literal (followup to waterson nsJSEnvironment.cpp fix). 2000-05-14 05:38:51 +00:00
brendan%mozilla.org 19ff28a612 Avoid zero-length mallocs (prompted by ped@nospam.cadence.com). 2000-05-14 05:35:19 +00:00
mccabe%netscape.com be51bb5b1c Mark 'clear' function exposed thru shell global object PR_CALLBACK, like other similar functions.
Patch courtesy Skip Nizinski <snizinsk@us.ibm.com>.
2000-05-10 23:58:51 +00:00
brendan%mozilla.org da321a0e18 Reword comment to fix typo (missing 'to'). 2000-05-10 20:05:17 +00:00
brendan%mozilla.org e73260b22d More minor style cleanups, plus a teeny optimization from tlundeen@webcrossing.com. 2000-05-10 19:58:28 +00:00
brendan%mozilla.org c697742103 Fix the TOO_MUCH_GC define (optional for GC stress-testing, not part of build). 2000-05-10 19:56:21 +00:00
brendan%mozilla.org 204a8cfeee Minor style improvements (80th column, over-parenthesization, better variable names). 2000-05-10 19:55:48 +00:00
mccabe%netscape.com 7b64369c95 Add pithy quote. 2000-05-10 00:35:30 +00:00
cls%seawood.org 772286e0af More OS/2 Makefile changes. Bug #34106 Batch 12 2000-05-04 11:00:47 +00:00
cls%seawood.org 7188e4e94c MOZ_JS_LIBS doesn't set the linker path so put it after MOZ_COMPONENT_LIBS. 2000-05-03 00:21:08 +00:00
thayes%netscape.com 305c17893f Replace implementation of nsISupports with thread-safe version. This allows
SSL/HTTPS operations to complete on debug builds with thread-safety checking.
r=bryner
2000-05-03 00:04:48 +00:00
mkaply%us.ibm.com 6d0ec2f2c9 # 34082
r= rogerl
OS/2 bring up continues - support for debugging asserts on OS/2
2000-05-02 23:18:32 +00:00
mkaply%us.ibm.com 24ea211304 # 34082
r= rogerl
OS/2 bring up continues - VisualAge fixes
2000-05-02 22:44:23 +00:00
cls%seawood.org 58aac2e6af OS/2 Makefile.in tweaks. Batch 10 & 11. Bug #34106 2000-05-02 01:18:46 +00:00
rogerl%netscape.com 6408cd1ab7 r=norris@netscape.com. Add ASSERT/ASSERT_NOT cases to fixNext child
processing - was running into garbage when processing these as children
of a '|'
2000-05-01 21:57:22 +00:00
rogerl%netscape.com c85e0eeeaf r=norris@netscape.com
Bug #34187, adding 'eval' as property of global object.
Bug #31864, decompiler failure when attempting to invoke a non-function
where that object is accessed via an incoming argument of the current
function.
2000-05-01 21:55:52 +00:00
rogerl%netscape.com 96c66a2bba r=norris@netscape.com; Bug#32174
Prevent recursive death when user has a function 'Object'.
2000-05-01 21:53:20 +00:00
jband%netscape.com 7e27d3faff be less aggresive in shutdown cleanup to avoid shutdown crashes. See bug 37058 for an example stack. 2000-04-25 07:26:02 +00:00
jband%netscape.com f7dc9f09e9 release the threadcontextstack to avoid a shutdown leak 2000-04-25 04:59:21 +00:00
jband%netscape.com 42defd8cf1 Cleanup at shutdown the JSContexts that xpconnect manages on a per thread basis. This should fix some shutdown leaks. 2000-04-25 04:57:32 +00:00
brendan%mozilla.org 99896c816a Final destroy-context must await racing GCs before freeing atom state (32525, r=jband). 2000-04-25 01:12:36 +00:00
jband%netscape.com 04051a0da0 belt and suspenders check of WITH_SERVICE results 2000-04-23 23:04:40 +00:00
jband%netscape.com c9fbfe6b3f fix a dangerous looking (but harmless) warning on Mac opt 2000-04-22 01:06:42 +00:00
mccabe%netscape.com b83e22e2ea Fix to 23532. Check validity of JS_ARENA_ALLOCATE call before using it as an argument of memcpy in JS_ArenaGrow.
Thanks to wyeung@real.com for noticing we were being unsafe here and suggesting the fix.
2000-04-21 09:25:43 +00:00
brendan%mozilla.org c4dc0a590b Spruce up a couple of comments. 2000-04-21 01:49:49 +00:00
brendan%mozilla.org c65d2d6a93 Functions that use unqualified __parent__ or __proto__ must be heavyweight (36625, r=shaver). 2000-04-21 01:47:20 +00:00
jband%netscape.com 9b08d1ac85 Had the wrong clazz for the root! So it was better when the caching was broken. Now it works on MI objects with caching fixed. My bad copy/paste error from long ago. 2000-04-20 12:16:45 +00:00
jband%netscape.com 9c1badb1ca backing out little fix from earlier today because it causes crashes in some MI cases. I'll investigate and do the right fix 2000-04-20 11:06:48 +00:00
brendan%mozilla.org 3d6de092fd Check access and redeclaration legality when defining a getter/setter (36117, r=norris) 2000-04-20 07:10:14 +00:00
jband%netscape.com d727af1bbe fix typo bug that was causing wrapper cache misses on wrapper around objects implementing multiple interfaces when the first wrapper is made for an interface that is not leftmost 2000-04-20 03:38:47 +00:00
scc%netscape.com 995abb7f46 making string conversions explicit 2000-04-18 23:53:10 +00:00
dp%netscape.com 366ecea0fc Implemented component unregister. 2000-04-18 05:26:40 +00:00
mccabe%netscape.com b93c689e66 Move nsIConsoleService and implementation into xpcom/base, and nsIScriptError and implementation into js/src/xpconnect. (A place for JavaScript-specific XPCOM would be better, but xpconnect will do). 2000-04-18 02:34:54 +00:00
braddr%puremagic.com 97d2f19960 Implicit types are evil. Add PRUint32.
r=mccabe
2000-04-16 00:21:07 +00:00
jband%netscape.com 70c7e60b98 add a test with an 'out' array of strings 2000-04-15 18:44:22 +00:00
mccabe%netscape.com 73dd1ab098 Print error diagnostics to stderr even when non-debug, to support those folks
that want to debug with the -console flag.
2000-04-15 06:59:21 +00:00
brendan%mozilla.org ec5a9e9229 Always call resolve for each object in a prototype chain (35738, r=shaver). 2000-04-15 02:01:02 +00:00
shaver%mozilla.org 024dad8f12 Replace stupid and evil BYTECODE_ITER hack with proper use of back-patch
chained PatchGotos goodness.  (PatchGotos seasoned to taste.)
r=brendan
2000-04-14 23:27:09 +00:00
norris%netscape.com a3caa18f07 Fix
28390, 28866, 34364
r=brendan@mozilla.org
35701
r=jst@netscape.com
2000-04-14 03:14:53 +00:00
rginda%netscape.com 83d124c38c -- NOT PART OF THE DEFAULT BUILD --
Added -c (stackchunksize) option to the js shell, for testing purposes
r=pschwartau
2000-04-06 21:19:56 +00:00
brendan%mozilla.org eb7b547e77 Fix 22048 and 33391 (see bugs for details; r=jband@netscape.com). 2000-04-05 06:39:11 +00:00
dveditz%netscape.com ec8da1a0e9 Use threadsafe ISupports for service 2000-04-05 03:31:57 +00:00
brendan%mozilla.org 6b71fed163 Clean up ugly whitespace, some of which survived my r=brendan comments. 2000-04-05 02:17:38 +00:00
brendan%mozilla.org e8ead8549a Eliminate unused var warning and clean up other stuff not in the patch I reviewed and approved! 2000-04-04 08:17:05 +00:00
cls%seawood.org 57978e5c23 Moved static MOZ_COMPONENT_NSPR_LIBS, MOZ_COMPONENT_XPCOM_LIBS, MOZ_COMPONENT_LIBS definitions from configure.in to config.mk. Replaced -lxpcom in Makefiles to $(XPCOM_LIBS) so that we can optionally link against -lboehm when needed. Bug #31287 2000-04-04 04:46:38 +00:00
cls%seawood.org 61f85b0c73 Use LDFLAGS when creating shared libraries. It may contain the paths to essential libraries. 2000-04-03 01:04:59 +00:00
cls%seawood.org 0d63199902 Adding a script to print out which of a given list of files do not end with a newline. Source files that do not end with a newline break at least the HP-UX compiler. Adding newlines to all of the source files found at this point. 2000-04-02 07:17:25 +00:00
brendan%mozilla.org 120957d855 Don't forget to drop property in getter/setter case (34069, r=jband,a=leaf). 2000-04-01 04:23:04 +00:00
scc%netscape.com 080a801eb7 making string conversions explicit 2000-04-01 00:39:02 +00:00
mccabe%netscape.com fddee86d15 Error reporting mechanisms for nsDocShell (xul js and content js) and mosJSComponentLoader (JS components) now pipe error objects to the JavaScript console. 2000-03-31 11:19:51 +00:00
jband%netscape.com 614784ba32 fix a side effect of the fix to bug 32485. It turns out it is better to leak some native objects while shutting down then to fire off Release calls on those wrapped native objects and watch the browser crash 2000-03-31 10:31:00 +00:00
jband%netscape.com 80550f984e use JS_LookupProperty to find the Components object in the JS scope because the OBJ_GET_PROPERTY call we had been using can fail for security reasons. travis needs this to fix bug 33489. r=brendan@mozilla.org 2000-03-31 02:47:46 +00:00
brendan%mozilla.org 541058b723 Allow anonymous function compilation via JS_Compile*Function (33840, r=shaver,jband). 2000-03-31 02:47:15 +00:00
jband%netscape.com dd8457f599 fix a search-and-replace mistake that was hiding in an #ifdef 2000-03-30 22:37:29 +00:00
jband%netscape.com ddf804fae7 Expose method for getting a 'safe' JSContext appropriate for use on the current thread. This will help travis fix bug 33489. r=brendan@mozilla.org. 2000-03-30 07:06:10 +00:00
jband%netscape.com ab6e3ae8c5 fix for bug 32485. Mark wrappednatives when xpconnect shuts down to avoid bad things happening when JS collects the JSObject part of the wrapper. r=mccabe 2000-03-30 00:09:15 +00:00
rogerl%netscape.com 0fc7bc4bdb Bug #32677, fix for optimizer reducing expression incorrectly for Math.pow
edge cases.
2000-03-29 23:46:08 +00:00
rogerl%netscape.com b3e1adad38 Bug #32677, r=rginda bugs in Win32 optimized version for edge cases in
Math.exp and Math.pow
Bug #32937, r=rginda, implement missing toLocaleString
2000-03-29 23:45:07 +00:00
jband%netscape.com 732ce11747 adding new files - not part of build 2000-03-28 05:14:51 +00:00
jband%netscape.com b5fa1f25db Landing changes that have been banging around in my tree... - Add #ifdef'd out support for profiling. - Add support for calling the JS gc root dumper. - Add unified #define for dumping shutdown info". Remove redundant define in makefile.win. - Prepare for semantic change to nsIInterfaceInfo::GetParent if there is no parent (return null rather than an error code). 2000-03-28 03:54:34 +00:00
jband%netscape.com 0ec5a0540c allow for later use of xpconnect\tools 2000-03-28 03:46:21 +00:00
jband%netscape.com db0060c73f general cleanup 2000-03-28 03:45:12 +00:00
brendan%mozilla.org 67c7207921 Augh! Fix one name-hiding warning, add another... Fixed. 2000-03-24 03:01:47 +00:00
brendan%mozilla.org 8bc339a857 Eliminate name-hiding and consequent compiler warning (r=shaver@mozilla.org). 2000-03-24 00:20:02 +00:00
brendan%mozilla.org 3885090954 Rename stacksize formal param to stackChunkSize (27767, really a doc bug). 2000-03-23 23:50:29 +00:00
brendan%mozilla.org d9dad582f8 Rename stacksize to stackChunkSize, similar cleanups, default new object class extension (27767). 2000-03-23 23:47:23 +00:00
brendan%mozilla.org f3a07673fc Optimize lightweight function calls, and bound their recursion (27767, r=rogerl@netscape.com). 2000-03-23 23:29:36 +00:00
rogerl%netscape.com 8165cab2a9 r=brendan@mozilla.org
Bug #32674, JS_SetVersion hides error; also, jsscan.c keyword bug
2000-03-23 23:00:35 +00:00
slamm%netscape.com da5accf667 Quiet a warning: '/*' within a comment. 2000-03-22 04:56:37 +00:00
rogerl%netscape.com 3581c8e965 r=rginda
bug #31316, screwed up match array contents for | operator.
2000-03-21 21:11:19 +00:00
ftang%netscape.com c9d3a2036a add assertion code to catch data lostage. r=jband 2000-03-21 21:02:18 +00:00
beard%netscape.com d456930974 fix stand-alone LiveConnect shell on XP_MAC. 2000-03-18 09:45:13 +00:00
beard%netscape.com 5d7976051c fix simple callbacks (not part of standard LiveConnect) 2000-03-18 09:44:07 +00:00
beard%netscape.com 307efa378c added classpath processing. 2000-03-18 09:42:15 +00:00
beard%netscape.com 4a376d4e5b removed redundant implementation of strdup. 2000-03-18 00:55:47 +00:00
beard%netscape.com da7ef54727 fixed to work with Universal Headers 3.3 JManager interfaces. 2000-03-18 00:55:15 +00:00
beard%netscape.com 5b7fb442d2 fixed to work with Universal Headers 3.3 to get MRJ interfaces/libraries, added jsj_simpleapi.c. (not part of mozilla build) 2000-03-18 00:53:55 +00:00
mccabe%netscape.com 7fadd2f19a Patches for building perlconnect, courtesy Pavel Hlavnicka <pavel@gingerall.cz>. 2000-03-17 06:40:22 +00:00
gagan%netscape.com 5ec5e31673 Fix a mem leak. r=jband 2000-03-16 23:31:53 +00:00
mkaply%us.ibm.com 404c967b8e # 25555
r= rogerl@netscape.com
OS/2 changes for Mozilla - add #ifdef, change #ifdef
2000-03-15 14:50:26 +00:00
mkaply%us.ibm.com e859503601 # 25555
r= rogerl@netscape.com
OS/2 changes for Mozilla - add #ifdef, change #ifdef
2000-03-15 14:31:55 +00:00
jband%netscape.com e0098df4ca Fix protection against gc reentry on same thread but on different JSContexts. Also fix potential deadlock in gc when destroying a JSContext while some other thread is blocked in gc waiting for the EndRequest of the first thread. The reentrance fix is needed to fix bug 28570. r=brendan@mozilla.org 2000-03-12 05:09:46 +00:00
norris%netscape.com b06e55722c Files:
caps/idl/nsICertificatePrincipal.idl
	caps/idl/nsIPrincipal.idl
	caps/src/nsBasePrincipal.cpp
Implement the ability to manipulate multiple capabilties simultaneously.
r=mstoltz@netscape.com

Files:
	caps/src/nsCodebasePrincipal.cpp
Codebase equality should be based upon origin, not full path.
r=mstoltz@netscape.com

Files:
	caps/src/nsScriptSecurityManager.cpp
Change URI checking to deny based upon scheme rather than allow based upon
scheme for greater flexibility.
r=mstoltz@netscape.com

Files:
	dom/public/nsDOMPropEnums.h
	dom/public/nsDOMPropNames.h
	dom/src/base/nsGlobalWindow.cpp
	modules/libpref/src/init/all.js
Fix bug 20469 Seeing JS functions and global variables from arbitrary host
r=vidur@netscape.com

Files:
	dom/src/base/nsJSUtils.cpp
	dom/src/base/nsJSUtils.h
	dom/src/base/nsJSEnvironment.cpp
	dom/tools/JSStubGen.cpp
	layout/base/src/nsDocument.cpp
	layout/html/content/src/nsGenericHTMLElement.cpp
Improve performance by removing NS_WITH_SERVICE call for every DOM access.
Propagate XPCOM failure codes out properly.
r=vidur@netscape.com

Files:
	layout/html/document/src/nsFrameFrame.cpp
Fix 27387 Circumventing Same Origin security policy using setAttribute
r=vidur@netscape.com
2000-03-11 06:32:42 +00:00
pavlov%netscape.com 33ce2d4e90 changes to let us build on MacOS X 2000-03-11 03:08:04 +00:00
jeff.dyer%compilercompany.com 14bfa9dc1b Fix for #16438 (r=stanley.ho@eng.sun.com). Adds functionality for unwrapping
wrapped JSObjects.
2000-03-07 02:38:44 +00:00
rogerl%netscape.com aeb7b3d55b r=rginda
Make shared lib thingy configurable.
2000-03-02 23:21:04 +00:00
rogerl%netscape.com 5fd2a5458a r=brendan,rginda
Added ECMA3 compliant getter/setter syntax.
Fixed bugs
	- #28686, mishandling of \$ in replace()
	- #27902, eval not detected as heavyweight indicator for non ECMA
			context version.
2000-03-02 23:21:03 +00:00
cls%seawood.org 0b8cf7d0df Reverted part of slamm's checkin so that non-official builds (including tinderboxes) stop on errors. Changed makefiles to use gmake's -C option instead of 'cd'. 2000-03-02 12:41:47 +00:00
jband%netscape.com bec540695e Fix bug 28982. Call to JS_ClearScope in property setter (e.g. window.location = "foo")
was causing defered calls to js_FreeSlot to do wild pointer writes into slots that
were no longer owned by the object. Also this improves the fix to 14462 (see note
in 28982 from brendan). r=brendan@mozilla.org a=jar@netscape.com
2000-02-26 23:47:33 +00:00
bryner%uiuc.edu bbfe27364b Adding a new flag to the Win32 build system. Set DISABLE_TESTS=1 to skip
building in the tests directories.  Should not affect the build at all if
you do not have this environment variable.  r=leaf.
2000-02-25 04:12:40 +00:00
shaver%mozilla.org 5deb3eee46 fix #25581 (leaking JSScript, r=beard, a=waterson) 2000-02-23 06:09:04 +00:00
bruce%cybersight.com ad45d64472 Fixes a memory leak. r=shaver,a=waterson 2000-02-22 22:22:02 +00:00
jband%netscape.com 0ffe9d5214 fix bug 28381. Make xpcshell bypass the caps security manager. dougt has looked at and used this but is not around for a 'r='. a=jar 2000-02-19 00:14:44 +00:00
cls%seawood.org 89d57d0dd8 Temporary fix for bug #24892 2000-02-16 07:58:45 +00:00
dveditz%netscape.com dc71859afb registry speed ups (part of 12817) 2000-02-16 07:45:20 +00:00
rginda%netscape.com 06d4a1efb7 Fix for 26725, r=jband 2000-02-16 06:26:21 +00:00
rginda%netscape.com 40e551de92 Fix for JS bug 26463. r=rogerl 2000-02-16 01:02:25 +00:00
rogerl%netscape.com 297c0ad32a Bug #9141, prevent recurse death for greedy matching on MAC.
r=rginda
2000-02-16 00:49:34 +00:00
jband%netscape.com 047f41715b Reimplement the Components.[ID,Exception,Constructor] properties in C++. These
things were completely unusable due to security restriction in anything besides
xpcshell. This fixes bug 26879 and helps a lot for bug 8700 because is reduces
the work done for JSContext creation.

Also, ease the burden of xptcall porters by doing IS_COMPONENT for all unix platforms.

r=mccabe
2000-02-15 06:43:51 +00:00
rogerl%netscape.com 318f0369a0 Nuts, checked in wrong file AND named wrong bug in previous checkin, msu
be friday or something.
Correct bug# is 26060.
2000-02-11 23:00:21 +00:00
rogerl%netscape.com db94be8b0b r=brendan@mozilla.org
bug #26857
Fix for evaluating multi-part script prologs in advance.
2000-02-11 22:21:15 +00:00
rogerl%netscape.com ed4a19ac7b r=brendan@mozilla.org
Prepare for new setter/getter syntax.
2000-02-11 22:19:33 +00:00
rogerl%netscape.com d632ed5956 r=mccabe
bug #22866
Support unicode line/paragraph separators.
2000-02-11 22:17:56 +00:00
rogerl%netscape.com c090d759bc r=norris
Deal with precendence warning whinings
2000-02-11 22:16:55 +00:00
mccabe%netscape.com d38a48ba5a Added comment recommending rooting of new script objects, to address problems experienced by netscape.public.mozilla.jseng developers.
Also verbiage refactory.

r=brendan
2000-02-08 01:38:20 +00:00
rogerl%netscape.com accca6ac13 r=brendan@mozilla.org
Bug #14462, lot's of discussin there about these changes, but here's
Brendan's description :
In order, changes in the patch are:

- Rename JSSLOT_ITR_STATE to be JSSLOT_ITER_STATE (avoid cybercrud abbreviation
as cbrcrd, no more six-char id limits!).

- Property cache tests must occur with the object's scope-lock held, to close a
race with delete (js_DestroyProperty, always called with the property's scope
locked).  Once the cache has been hit, and before the lock is released, the
property's refcount must be bumped.  This requires re-acquisition of the lock
and js_DropScopeProperty afterward.

- Reworked js_FindProperty to use a do-while loop, as cx->fp->scopeChain must be
non-null.  This avoids a gratuitous lastobj init done to "Suppress gcc warning"
in the old revision.

- Akin to the property cache hit cases in jsinterp.c and jsobj.c's
js_FindProperty, code to hold and drop the scope-property by its refcount that
was #ifdef JS_THREADSAFE must be unconditional, now that user-defined getters
and setters may delete the property id they're getting or setting.

- Fixed overlong continuation line in jsobj.h.

/be
2000-02-08 01:24:53 +00:00
scc%netscape.com 5e041e830f Pro5 update 2000-02-07 23:06:04 +00:00
brendan%mozilla.org 6c650cca5d Comment/cosmetic changes only (r=shaver@mozilla.org). 2000-02-07 07:28:25 +00:00
norris%netscape.com 968aa458f4 Fix 18860 impossible to call applet's public methods from JavaScript
(fix from jeff.dyer@compilercompany.com, r=norris)
2000-02-06 23:34:50 +00:00
risto%netscape.com b011c9aaf1 Changing all cvs-mirror.mozilla.org references to point to politically
correct addresses, for example tinderbox.mozilla.org, lxr.mozilla.org or
bonsai.mozilla.org. cvs-mirror shouldn't use in URLs anymore because it's
now on different server.

r=bryner
2000-02-05 07:23:36 +00:00
brendan%mozilla.org cd95a8bb37 Argh, fix stupid typo that sometimes breaks for/in loops (26595, r=jband@netscape.com). 2000-02-05 02:04:16 +00:00
brendan%mozilla.org 8d4074ad39 Fix crash reported in bug 26595 (r=jband@netscape.com) via better compilation-frame conditioning. 2000-02-05 01:54:13 +00:00
pinkerton%netscape.com ca825bef77 fix the access paths for pro5 migration. r=macdev. 2000-02-04 03:27:36 +00:00
brendan%mozilla.org f70f30872e - Eliminate ancient, bogus proxying of function object for its call objects (23346, r=jband@netscape.com).
- Tabs expanded as much as I could stand, without taking too much cvsblame.
2000-02-04 02:01:49 +00:00
rogerl%netscape.com d6177ed1aa r=Norris
License updating, bug#15529, continuing.
2000-02-04 00:08:13 +00:00
jband%netscape.com 610d83d7b1 fix XPCContext leak bug 25911 r=beard. fix DOM wrapping case where static called object does not have a static DOM scope, but is run in a DOM context; e.g. calling a JS component from within a window that calls some native service that returns a DOM window - the serive is not a DOm object and has no static DOm scope, but the call is made on a DOM context so a dynamic lookup works. r=mscott 2000-02-03 03:25:53 +00:00
rogerl%netscape.com 8320a45b74 r=norris
Bug#24712, regexp greedy recursing wasn't handling zero kid back-tracked
state nor re-setting parenCount correctly.
Added license junk for bug#15529 (continuing).
Fix type-mismatch warning in jsstr.c
Switched off DEBUG only use of fd_pow under Windows.
2000-02-03 00:44:03 +00:00
mccabe%netscape.com 79ebcf1cfb Changes to allow Spider Monkey to be compiled under C++.
Courtesy Bill Gibbons <bill@gibbons.org>

His comments:

Here are the changes to JSRef to make it compile either as C or C++. Mostly the changes are to add missing casts (since C++ doesn't have implict conversion from void* to other pointer types nor implicit casts from ints to enumerations) plus a few random things like the use of "private" as a variable name.

There are a few other minor bug fixes; in particular:

  * A long statement with and'ed conditions is reformatted to make it easier to remove other builtin objects (e.g. Date).

  * A #if was added to jsscript.c for the JS_HAS_SCRIPT_OBJECT off case.

  * In jsmath a #ifdef was changed to #if.

My notes also mention...

  * jsobj.c should include jsopcode.h

  * jsfun.c - doesn't link if JS_HAS_ARGS_OBJECT is off

  * jsarray.c - a reference to js_ValueToSource should be conditional on JS_HAS_TOSOURCE

r=mccabe
2000-02-02 01:10:31 +00:00
norris%netscape.com 131271ae68 Fix bug #25864 watch() vulnerability
r=vidur,rogerl
2000-02-02 00:22:58 +00:00
jband%netscape.com ba8be566fd trivial block scope loop counter variable rename to squelch shadow warning.r=jband 2000-02-01 10:53:34 +00:00
mccabe%netscape.com 94158a3912 Warning fixes. (Found one semantic problem in nsCLiveconnect.cpp)
r=mozbot
2000-02-01 09:12:58 +00:00
jband%netscape.com 321d0f8624 add improved support for dumping the JS stack from the native debugger or using the 'debugger' statement in JavaScript. Doc coming to the mozilla site soon. r=mccabe 2000-02-01 08:48:17 +00:00
norris%netscape.com e19ea68179 Fix use of unsupported typedef.
r=Jerry.Kirk@Nexwarecorp.com
2000-01-31 23:10:12 +00:00
jband%netscape.com f150a0dd3f trivial rename of local var in test to fix shadow warning 2000-01-29 04:53:22 +00:00
jband%netscape.com 736252f45f show more info when a call to wrapped JS object fails due to lack of the callee method - show what we were trying to call rather than let the engine just error out with 'undefined is not a function'. r=mccabe 2000-01-28 06:02:41 +00:00
mang%subcarrier.org 21c16707a0 Add rules for incremental relinking on Unix to partially fix bug 23724.
The static libraries on Win32 are still broken. r=mccabe
2000-01-28 01:39:11 +00:00
jband%netscape.com 89900282d1 make certain that the JSRuntimeService singleton does not go away before the xpconnect singleton. Fix for bug 25093. r=ssu@netscape.com 2000-01-27 08:58:48 +00:00
rginda%netscape.com e704417b3b Fix for gcc opt bug described in bug 24892. JSRef build fix only, mozilla build still needs some lovin'.
r=rogerl
2000-01-27 00:01:29 +00:00
beard%netscape.com 3da493b0ce changes to build on Mac OS X, r=mccabe 2000-01-26 22:48:49 +00:00
mccabe%netscape.com 7539c81efb Fix to 24800. Change FREEBSD to __FreeBSD__, allowing the standalone JS engine to build and link on FreeBSD without the client build system (which defines FREEBSD).
Thanks go to braden@endoframe.com for the patch, and to sidr@albedo.net and fur@geocast.com for bug discussion.
2000-01-26 22:27:51 +00:00
beard%netscape.com d5e806f28c configuration file for Mac OS X. 2000-01-26 22:27:29 +00:00
rogerl%netscape.com f3a0bbab33 r=norris,waldemar
Fixes for bugs#23607, 23608, 23610, 23612, 23613. Also, first cut at URI
encode & decode routines.
2000-01-26 22:15:06 +00:00
jband%netscape.com 0602b121c6 trivial fixes to get rid of warnings 2000-01-26 11:08:24 +00:00
jband%netscape.com bf596d809e 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