Rod Spears wrote:
> I agree with Simon, I just ran into this tracking down a regression and
> it made the entire process take that much longer.
>
> I think the bottom line here is there needs to be enough information in
> a check in comment to understand why the file was changed, in case
> further investigation is necessary.
>
> At a minimum, one clear concise sentence shouldn't burden anyone (of
> coarse a little more is better).
>
> Rod
Is the attached example (near and dear to me) too much or too little? I
sometimes feel like I'm saying too much. Disk is cheap.
/be
RCS file: /cvsroot/mozilla/js/src/jsobj.c,v
Working file: jsobj.c
head: 3.91
branch:
locks: strict
access list:
keyword substitution: kv
total revisions: 142; selected revisions: 142
description:
----------------------------
revision 3.91
date: 2001/05/17 01:43:56; author: brendan%mozilla.org; state: Exp; lines: +255 -157
Unified resolve recursion damping (70358) and resolve-from-js_SetProperty (72354),
r/sr=jband,jst,shaver.
----------------------------
revision 3.90
date: 2001/05/08 17:30:22; author: jst%netscape.com; state: Exp; lines: +4 -0
branches: 3.90.4;
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by [EMAIL PROTECTED]
and [EMAIL PROTECTED], also some changes done by [EMAIL PROTECTED],
[EMAIL PROTECTED] and [EMAIL PROTECTED] r= and sr= by [EMAIL PROTECTED],
[EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED],
[EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]
----------------------------
revision 3.89
date: 2001/05/08 01:31:02; author: brendan%mozilla.org; state: Exp; lines: +31 -3
- Fix bug 79054, AB-BA deadlock between rt->setSlotLock and one or more claimed scopes
(r=shaver, sr=jband)
js_SetProtoOrParent should always have used a condvar in addition to a lock.
- Fix bug 79129, assert-botch in js_AllocSlot (r/sr=jband, sr=shaver)
JS_INITIAL_NSLOTS is the minimum number of slots, js_FreeSlot guarantees it.
----------------------------
revision 3.88
date: 2001/04/14 07:34:58; author: brendan%mozilla.org; state: Exp; lines: +24 -13
Use parent, if non-null, as scope chain with which to find default proto from
Class.prototype, in js_{New,Construct}Object (75975, sr=jband&jst).
----------------------------
revision 3.87
date: 2001/04/08 23:23:34; author: brendan%mozilla.org; state: Exp; lines: +45 -1
Add __lookupGetter__ and __lookupSetter__ (71992, r=rogerl, sr=shaver).
----------------------------
revision 3.86
date: 2001/04/05 01:53:21; author: brendan%mozilla.org; state: Exp; lines: +120 -58
- Add JS_GetReservedSlot, JS_SetReservedSlot, and JSCLASS_HAS_RESERVED_SLOTS(n)
to the JS API, for per class extra slots beyond JSSLOT_PRIVATE (or starting
there for a class that lacks JSCLASS_HAS_PRIVATE). To avoid penalizing all
instances, these slots are allocated only upon first property-owned slot
allocation, or upon first JS_SetReservedSlot.
This entailed adding getRequiredSlot and setRequiredSlot hooks to the
JSObjectOps struct, and making obj->slots self-describing, a la BSTR. It
also afforded me a chance to clean up obj->slots locking so that non-native
JSObjectOps didn't risk unlocked accesses! Now there are thread-safe hooks
for all uses of obj.
First consumer is the new, DOM-glue-unifying XPConnect, which needs two
slots per wrapped function. Hence the change to js_FunctionClass.flags'
initializer.
- Commented the heck out of JSClass and JSObjectOps function typedefs in
jspubtd.h. I hope embedders see these comments!
- Fix JS_XDRValue's default case to handle int exclusively, there is no other
possible type (and therefore no JSMSG_BAD_JVAL_TYPE error).
- Clean up tabs in select old, tab-ridden files and sections.
- s/\<fh\>/file/g for stdio FILE * canonical variable names.
----------------------------
revision 3.85
date: 2001/04/04 07:45:22; author: brendan%mozilla.org; state: Exp; lines: +7 -2
Quote reserved identifiers as well as non-lexical-identifier property ids in object
literals (73598, r=jband, sr=shaver).
----------------------------
revision 3.84
date: 2001/03/22 02:52:38; author: brendan%mozilla.org; state: Exp; lines: +35 -6
branches: 3.84.2;
- [jsemit.c] Fix horrid stupid bugs generating JSOP_ARGCNT and JSOP_ARGSUB,
where any occurrence of arguments.length or arguments[0], e.g., would be
"optimized" to use those bytecodes. This is just wrong if the occurrence
is an operand of delete, ++, --, or the left-hand-side of an assignment
operator!
- [jsfun.c, jsinterp.c] args_getProperty etc. must use JS_GetInstancePrivate,
not JS_GetPrivate, as the arguments object is exposed, and can be made a
prototype of other objects that do not have private data, or private data
that's a JSStackFrame*. Same goes for fun_getProperty, js_GetArgument, etc.
- [jsfun.c, jsobj.c, jsstr.c] No need to specialize fun_delProperty and
str_delProperty to help convince users and ECMA conformance tests that
fun.length and str.length are direct properties of instances, instead of
being delegated to Function.prototype.length and String.prototype.length.
This special case is done universally in js_DeleteProperty for all SHARED
and PERMANENT proto-properties.
- [jshash.c] Sneaking this followup-fix for bug 69271 in: use JS_HASH_BITS
rather than hardcoded 32.
- [jsobj.c, jsscope.[ch]] Fix misnamed js_HashValue (it takes a jsid, so it
is now js_HashId).
- [jsscript.c] script_compile needs to call JS_InstanceOf, to ensure that obj
is a Script object.
----------------------------
revision 3.83
date: 2001/03/11 02:35:10; author: brendan%mozilla.org; state: Exp; lines: +13 -2
Fix js_LookupProperty to resolve iff the resolved-in object owns its own scope (jband
private bug, r=jband, sr=shaver).
----------------------------
revision 3.82
date: 2001/03/06 01:56:28; author: brendan%mozilla.org; state: Exp; lines: +4 -5
bugs 31003 and (mostly) 68045, r=rogerl, sr=shaver&hyatt
- Fix bug where script jssrcnote vector terminator was not XDRed.
- Ensure that memory is cleared by serializing zero padding bytes as needed
under JS_XDRBytes and JS_XDRString.
- Fix JS_XDRValue to handle undefined and null JS types properly (bug 31003).
Also make it cast from jsint to uint32 and back carefully, so as to work
with negative numbers even on targets where jsval is a signed 64 bit type.
- Add JS_XDRScript public API.
- Optimize the per-JSXDRState class registry so it uses a JSDHashTable upon
searching for a class-id by name in an overpopulated (for linear search)
registry table.
- Clean up API nits such as JS_XDRNewBase => JS_XDRInitBase, with parameter
list rotation to put cx last (JS_XDRInitBase is an infallible init helper,
not an error-reporting, cx-comes-first, API entry point).
- Fix some XXX comments, unneeded masks, other nits.
- Make sure all JS XDR API functions start with JS_XDR.
----------------------------
revision 3.81
date: 2001/02/24 03:07:58; author: brendan%mozilla.org; state: Exp; lines: +2 -0
branches: 3.81.2;
Don't deprecate __proto__, there ain't no forward-compatible alternative (68401,
r=timeless, sr=shaver).
----------------------------
revision 3.80
date: 2001/02/14 09:11:09; author: brendan%mozilla.org; state: Exp; lines: +29 -14
branches: 3.80.4;
Crash fix (first part, two more files to come) for old-style obj.eval in a function
(68498, r=bryner, sr=jband).
----------------------------
revision 3.79
date: 2001/02/06 23:19:44; author: brendan%mozilla.org; state: Exp; lines: +812 -798
branches: 3.79.4;
Fix for bug 44009 (r=rogerl, sr=shaver)
- Remove bogus JS_ASSERT(!outermost) from the code that deals with a "#n="
type string being returned from js_EnterSharpObject, where the hash entry
is not yet sharp (because we haven't seen the object twice during depth
first search). This case trivially arises for the outermost object in,
e.g., 'o={}; o.foo=o; uneval(o)'.
- Avoid parenthesizing #n={...} object initializers for uneval, as they are
not ambiguous (whereas {foo:1}, e.g., is ambiguous because it could be a
block statement containing a labeled expression statement, or it could be
an object initializer).
- Death to tabs!
----------------------------
revision 3.78
date: 2001/01/31 01:12:15; author: brendan%mozilla.org; state: Exp; lines: +7 -3
Throw EvalError for indirect eval calls iff strict+werror (38512, r=rogerl, sr=shaver).
----------------------------
revision 3.77
date: 2001/01/20 01:41:54; author: brendan%mozilla.org; state: Exp; lines: +2 -2
2nd attempt: Fix API botch where 'var x=0' vs. 'x=0' could put x in a different object
(65553, r=mccabe, sr=jband).
----------------------------
revision 3.76
date: 2001/01/18 22:10:08; author: kin%netscape.com; state: Exp; lines: +2 -2
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.
[EMAIL PROTECTED] (sheriff)
----------------------------
revision 3.75
date: 2001/01/18 03:00:30; author: brendan%mozilla.org; state: Exp; lines: +2 -2
Fix API botch where 'var x=0' vs. 'x=0' could put x in a different object (65553,
r=mccabe, sr=jband).
----------------------------
revision 3.74
date: 2001/01/11 23:55:30; author: brendan%mozilla.org; state: Exp; lines: +13 -8
Fix ABW impurities under JS_ClearScope on an unmutated obj (64958, r=shaver, sr=jband).
----------------------------
revision 3.73
date: 2000/12/20 22:36:01; author: brendan%mozilla.org; state: Exp; lines: +8 -7
Don't fatten a flyweight lock unnecessarily in JS_SetPrototype; misc. cleanups (63097,
r=mccabe, sr=jband).
----------------------------
revision 3.72
date: 2000/12/06 06:03:29; author: jband%netscape.com; state: Exp; lines: +1 -1
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
----------------------------
revision 3.71
date: 2000/12/05 21:47:21; author: brendan%mozilla.org; state: Exp; lines: +39 -20
JSPROP_SHARED implies no slot to entrain garbage (bug 61482, r=mccabe, sr=jband).
----------------------------
revision 3.70
date: 2000/12/04 02:43:24; author: brendan%mozilla.org; state: Exp; lines: +24 -10
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.
----------------------------
revision 3.69
date: 2000/11/29 02:05:10; author: mccabe%netscape.com; state: Exp; lines: +9 -0
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
----------------------------
revision 3.68
date: 2000/10/29 18:08:40; author: brendan%mozilla.org; state: Exp; lines: +1 -1
Use 0 - i rather than -i to avoid unsigned warning on Windows.
----------------------------
revision 3.67
date: 2000/10/29 01:30:16; author: brendan%mozilla.org; state: Exp; lines: +31 -27
Handle negative-int-fits-in-jsval string literals as property names equivalent to
their int conversions (57043, r=shaver, sr=jband).
----------------------------
revision 3.66
date: 2000/10/25 07:00:31; author: brendan%mozilla.org; state: Exp; lines: +28 -25
Fix obj.toSource to get attributes using the object in which id was found (56482,
r=jband, sr=shaver).
----------------------------
revision 3.65
date: 2000/10/09 14:38:21; author: brendan%mozilla.org; state: Exp; lines: +12 -20
Remove not-found property caching (55624, r=shaver a=jband).
----------------------------
revision 3.64
date: 2000/09/21 01:37:02; author: brendan%mozilla.org; state: Exp; lines: +21 -13
Fix 53268, r=jband.
----------------------------
revision 3.63
date: 2000/09/19 02:24:10; author: brendan%mozilla.org; state: Exp; lines: +48 -6
Add strict warning for undefined property reference (foo.bar where bar names no object
in foo or its prototypes; r=jband).
----------------------------
revision 3.62
date: 2000/09/14 06:14:42; author: brendan%mozilla.org; state: Exp; lines: +6 -4
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
----------------------------
revision 3.61
date: 2000/09/01 18:01:04; author: brendan%mozilla.org; state: Exp; lines: +19 -7
Fix js_EnterSharpObject to clean up sharpObjectMap on error (44009, r=shaver).
----------------------------
revision 3.60
date: 2000/08/26 07:10:31; author: mccabe%netscape.com; state: Exp; lines: +1 -0
Potential fix to 50313
Initialize stack variable to NULL on suspicion that later possibly-unset use of it is
causing crash.
----------------------------
revision 3.59
date: 2000/08/26 02:30:16; author: brendan%mozilla.org; state: Exp; lines: +84 -3
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).
----------------------------
revision 3.58
date: 2000/08/19 19:17:32; author: brendan%mozilla.org; state: Exp; lines: +1 -1
Re-constipate JSClass.name.
----------------------------
revision 3.57
date: 2000/08/19 10:36:44; author: jband%netscape.com; state: Exp; lines: +1 -1
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
----------------------------
revision 3.56
date: 2000/08/19 08:37:05; author: brendan%mozilla.org; state: Exp; lines: +32 -19
Support lazy initialization of standard classes and their associated global
functions/properties (46703, r=jband,rogerl).
----------------------------
revision 3.55
date: 2000/08/09 21:46:02; author: rogerl%netscape.com; state: Exp; lines: +1 -0
r,[EMAIL PROTECTED] Adding missing ECMA3 compliance toLocaleXXX
functions to built-in Array, Date and Object object prototypes.
----------------------------
revision 3.54
date: 2000/07/22 01:03:04; author: brendan%mozilla.org; state: Exp; lines: +7 -5
branches: 3.54.4;
Fix second (prototype-owns-property) setter/shared special case to unlock properly
(45940, r=mccabe).
----------------------------
revision 3.53
date: 2000/07/10 20:21:38; author: rogerl%netscape.com; state: Exp; lines: +16 -2
[EMAIL PROTECTED], Fix for #44013 - enforce security for defineGetter
& defineSetter by calling OBJ_CHECK_ACCESS.
----------------------------
revision 3.52
date: 2000/06/27 02:37:22; author: brendan%mozilla.org; state: Exp; lines: +211 -117
Fix JS_SetPrototype and __proto__ setting to deal with shared scopes; use JSObjectOps
for setProto and setParent operations, and add spare op slots (41126,
[EMAIL PROTECTED],[EMAIL PROTECTED]).
----------------------------
revision 3.51
date: 2000/06/02 00:02:45; author: brendan%mozilla.org; state: Exp; lines: +10 -6
Fix ECMA DontDelete compliance problems, which create getter/setter security holes
(40760, r=shaver).
----------------------------
revision 3.50
date: 2000/05/31 22:10:53; author: brendan%mozilla.org; state: Exp; lines: +16 -26
Use JS_ValueToId to go from user to internal property id, for integer-id optimality
(40731, r=shaver).
----------------------------
revision 3.49
date: 2000/05/15 03:54:50; author: brendan%mozilla.org; state: Exp; lines: +19 -14
Cleanups from [EMAIL PROTECTED], plus fun->call=>native renaming.
----------------------------
revision 3.48
date: 2000/05/01 21:55:52; author: rogerl%netscape.com; state: Exp; lines: +23 -0
[EMAIL PROTECTED]
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.
----------------------------
revision 3.47
date: 2000/04/15 02:01:02; author: brendan%mozilla.org; state: Exp; lines: +7 -7
Always call resolve for each object in a prototype chain (35738, r=shaver).
----------------------------
revision 3.46
date: 2000/04/14 03:14:53; author: norris%netscape.com; state: Exp; lines: +3 -1
Fix
28390, 28866, 34364
[EMAIL PROTECTED]
35701
[EMAIL PROTECTED]
----------------------------
revision 3.45
date: 2000/04/05 02:16:49; author: brendan%mozilla.org; state: Exp; lines: +3 -3
Clean up ugly whitespace, some of which survived my r=brendan comments.
----------------------------
revision 3.44
date: 2000/04/04 08:17:05; author: brendan%mozilla.org; state: Exp; lines: +28 -26
Eliminate unused var warning and clean up other stuff not in the patch I reviewed and
approved!
----------------------------
revision 3.43
date: 2000/04/01 04:23:04; author: brendan%mozilla.org; state: Exp; lines: +5 -0
Don't forget to drop property in getter/setter case (34069, r=jband,a=leaf).
----------------------------
revision 3.42
date: 2000/03/11 06:32:35; author: norris%netscape.com; state: Exp; lines: +1 -1
Files:
caps/idl/nsICertificatePrincipal.idl
caps/idl/nsIPrincipal.idl
caps/src/nsBasePrincipal.cpp
Implement the ability to manipulate multiple capabilties simultaneously.
[EMAIL PROTECTED]
Files:
caps/src/nsCodebasePrincipal.cpp
Codebase equality should be based upon origin, not full path.
[EMAIL PROTECTED]
Files:
caps/src/nsScriptSecurityManager.cpp
Change URI checking to deny based upon scheme rather than allow based upon
scheme for greater flexibility.
[EMAIL PROTECTED]
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
[EMAIL PROTECTED]
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.
[EMAIL PROTECTED]
Files:
layout/html/document/src/nsFrameFrame.cpp
Fix 27387 Circumventing Same Origin security policy using setAttribute
[EMAIL PROTECTED]
----------------------------
revision 3.41
date: 2000/03/02 23:19:45; author: rogerl%netscape.com; state: Exp; lines: +84 -1
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.
----------------------------
revision 3.40
date: 2000/02/26 23:47:28; author: jband%netscape.com; state: Exp; lines: +17 -9
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). [EMAIL PROTECTED] [EMAIL PROTECTED]
----------------------------
revision 3.39
date: 2000/02/08 01:24:52; author: rogerl%netscape.com; state: Exp; lines: +8 -18
branches: 3.39.4;
[EMAIL PROTECTED]
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
----------------------------
revision 3.38
date: 2000/02/04 02:01:43; author: brendan%mozilla.org; state: Exp; lines: +32 -60
- Eliminate ancient, bogus proxying of function object for its call objects (23346,
[EMAIL PROTECTED]).
- Tabs expanded as much as I could stand, without taking too much cvsblame.
----------------------------
revision 3.37
date: 2000/02/02 01:10:23; author: mccabe%netscape.com; state: Exp; lines: +20 -17
Changes to allow Spider Monkey to be compiled under C++.
Courtesy Bill Gibbons <[EMAIL PROTECTED]>
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
----------------------------
revision 3.36
date: 2000/02/02 00:20:32; author: norris%netscape.com; state: Exp; lines: +1 -1
Fix bug #25864 watch() vulnerability
r=vidur,rogerl
----------------------------
revision 3.35
date: 2000/01/18 11:05:59; author: brendan%mozilla.org; state: Exp; lines: +47 -34
JS1.5 fixes (17290, 21618, plus shaver's 22243 fix, [EMAIL PROTECTED]).
----------------------------
revision 3.34
date: 1999/12/01 04:30:03; author: brendan%mozilla.org; state: Exp; lines: +7 -7
branches: 3.34.8;
Fix obscure eval bug and ECMA conformance issue (20256, [EMAIL PROTECTED]).
----------------------------
revision 3.33
date: 1999/11/17 04:32:34; author: brendan%mozilla.org; state: Exp; lines: +5 -4
Whitespace, comment, and bracing diffs.
----------------------------
revision 3.32
date: 1999/11/16 23:53:33; author: rogerl%netscape.com; state: Exp; lines: +4 -1
r=norris
Fix for toString under 1.2 - calls toSource which provides extra '{}' that
doesn't match previous behaviour.
----------------------------
revision 3.31
date: 1999/11/12 06:03:34; author: brendan%mozilla.org; state: Exp; lines: +10 -3
XULDOMJS_19991106_BRANCH landing (15146, 18025, [EMAIL PROTECTED])
----------------------------
revision 3.30
date: 1999/11/11 21:52:28; author: mccabe%netscape.com; state: Exp; lines: +17 -13
Fix most remaining warnings in js/src. Patch courtesy slamm.
r=mccabe.
----------------------------
revision 3.29
date: 1999/11/02 02:23:47; author: brendan%mozilla.org; state: Exp; lines: +20 -18
branches: 3.29.2;
Fixed getter/setters, pave way for brutal sharing (15146,
[EMAIL PROTECTED],[EMAIL PROTECTED])
----------------------------
revision 3.28
date: 1999/10/25 19:24:00; author: brendan%mozilla.org; state: Exp; lines: +9 -0
- Chouck's changes to grow a JSIdArray if necessary in JS_Enumerate, with my
code review and fixes ([EMAIL PROTECTED]). He needs this cuz he has no
knowledge of exact number of properties before new-style enumerating them.
- Patch up jsdbgapi.c a bit -- it needs to use OBJ_GET_ATTRIBUTES and new APIs
to do a better job describing properties to a debugger.
- Add JSMSG_CANT_DESCRIBE_PROPS for bogus non-native error case in jsdbgapi.c.
- Fix "Inappropriate" => "invalid" in JSMSG_BAD_ARRAY_LENGTH message.
----------------------------
revision 3.27
date: 1999/10/22 01:44:47; author: brendan%mozilla.org; state: Exp; lines: +12 -11
Avoid gratuitous initialization and extra sets of ok ([EMAIL PROTECTED]).
----------------------------
revision 3.26
date: 1999/10/15 04:32:46; author: shaver%netscape.com; state: Exp; lines: +11 -10
fix obj_getCount to property destroy state and propagate error (r=jband)
----------------------------
revision 3.25
date: 1999/10/12 22:48:17; author: norris%netscape.com; state: Exp; lines: +0 -5
Fix unix build warning.
Reviewed by [EMAIL PROTECTED]
----------------------------
revision 3.24
date: 1999/10/06 09:09:31; author: brendan%mozilla.org; state: Exp; lines: +13 -8
Fix Object.prototype.toSource so it parenthesizes outermost-toSource literals for eval
roundtrips.
----------------------------
revision 3.23
date: 1999/10/02 03:41:31; author: norris%netscape.com; state: Exp; lines: +10 -9
Fix the following bugs:
14443 "Same origin" security policy may be circumvented using docu
14820 Fixing up the relationship between nsCodeBasePrincipal and n
14919 Crash in JS MM code
Reviewed by mstoltz, approved by scc.
----------------------------
revision 3.22
date: 1999/09/28 23:10:45; author: dmose%mozilla.org; state: Exp; lines: +27 -11
update license boilerplate to NPL-1.1 dual-licensed with the GPL. a=brendan,
r=brendan.
----------------------------
revision 3.21
date: 1999/09/22 05:54:44; author: brendan%mozilla.org; state: Exp; lines: +9 -15
- Enable JS_HAS_NEW_OBJ_METHODS (Object.prototype.hasOwnProperty, isPrototypeOf
and propertyIsEnumerable) for JS1.5.
- Optimize obj_propertyIsEnumerable to avoid extra lookup code bloat, requiring
fix to js_GetAttributes (unset out param on successful early retunr) that it
exposed.
- Use more righteous else-if style in shaver's jsarray.c change.
----------------------------
revision 3.20
date: 1999/09/21 00:13:40; author: brendan%mozilla.org; state: Exp; lines: +224 -83
- Bumped default compile-time JS version from 1.4 to 1.5.
- Add JS1.5 getter/setter support in all its glory:
* getter function SN() {return ++x} at top-level or as a closure binds an SN
property getter than returns the incremented value of x. Likewise for
setter function SN(y) {return y = x}.
* getters and setters may be defined in an object literal:
o = {p getter:function() {return ++this.x},
p setter:function(y){return this.x = y},
x:42};
* getter= and setter= operators (compound tokens) may be used to bind getter
and setter properties dynamically:
o = new Object;
o.p getter= function() {return ++this.x};
o.p setter= function(y){return this.x = y};
o.x = 42;
Waldemar is concerned that this form will collide semantically with JS2, so
I am not committing to keeping it in JS1.5. I'd like to check my code in
ASAP so shaver can use it, and I'd also like to see this form get used (or
not) during Mozilla betas. Caveat emptor, and if you find this "dynamic"
or "imperative" form necessary and hard to substitute, please let me know.
If this proves important to users, then I think JS1.5 should keep it.
- Cleaned up property flags (in a binary-incompatible fashion -- who cares?) by
eliminating JSPROP_ASSIGNHACK and JSPROP_TINYIDHACK.
- Added JS_DONT_PRETTY_PRINT flag to be ORed with the indent argument to the
several JS_Decompile*() API calls. This avoids any newlines or identation in
the decompiled string.
- Improved and extended (for getter/setter non-reservation) scanner lookahead
by using a circular (power-of-2 sized) token buffer.
- Fix ECMA Edition 3 deviation where function f(){function g(){}} bound f.g by
mistake (it should arrange to make a closure named g in activations of f, but
it should not bind a property of function f).
----------------------------
revision 3.19
date: 1999/09/11 05:22:42; author: jband%netscape.com; state: Exp; lines: +1 -1
check resolve op for null before trying to use it
----------------------------
revision 3.18
date: 1999/08/20 13:30:39; author: brade%netscape.com; state: Exp; lines: +5 -0
remove mac compiler warnings
----------------------------
revision 3.17
date: 1999/07/28 06:48:42; author: brendan%mozilla.org; state: Exp; lines: +9 -9
Fix warnings reported at http://tinderbox.mozilla.org/SeaMonkey/warnings.html, mostly
unsigned/signed bothers.
----------------------------
revision 3.16
date: 1999/07/23 08:01:53; author: brendan%mozilla.org; state: Exp; lines: +13 -13
Bugs, bugs bugs:
- js_DecompileValueGenerator had rusted due to bytecode/source-note changes,
or maybe parts of it never worked right. Anyway, it now does not induce a
crashing underflow in the decompiler. As part of this fix, it now takes a
checkStack flag telling whether to look for the jsval v argument on the JS
stack. The calls from ImportProperty, js_SetProperty, and js_DeleteProperty
pass in v a jsval for the property id, which should not be sought after on
the stack (it might happen to be there due to o['p'] = 2, but we want to
decompile o["p"], not "p").
- js_DecompileValueGenerator would load a generating pc even if the value v
did not match the pc's corresponding stack item! Oops. This lead to less
than idea diagnostics.
- js_DecompileValueGenerator was also not mapping JSOP_TRAP to the real op at
a sufficiently early and univeral point in its control flow.
- Fix PopOff to assert and check for stack underflow in the decompiler, and
beef up PushOff too (it asserted, but did not check).
- js_ReportIsNotFunction now avoids JS_InternString by indexing directly into
cx->runtime->atomState.typeAtoms with the result of JS_TypeOfValue.
- Removed unnecessary local GC root reserved by non-zero trailing member of
obj_eval's JSFunctionSpec initializer.
----------------------------
revision 3.15
date: 1999/07/15 02:24:22; author: brendan%mozilla.org; state: Exp; lines: +4 -4
- Fix for..in bug where ECMA 12.6.3 steps 5 and 6 are reversed: the effect was
to define an unbound global variable used to enumerate an empty object, when
the standard says no variable should be defined.
- Clean up minor nits, make comment style match prevailing, tighten up for..in
element-indexing special case comments.
- Fix js_Invoke to take CONSTRUCT and INTERNAL flags arg instead of a construct
boolean arg and the JSStackFrame internalCall mis-located boolean non-arg.
Use these flags correctly in all calls (previous version failed to set the
bogus frame.internalCall around js_Invoke calls from jsfun.c and jsstr.c).
----------------------------
revision 3.14
date: 1999/07/01 02:24:32; author: brendan%mozilla.org; state: Exp; lines: +36 -52
Rip out assign hack, simplify boolean value synthesis, minor cleanups.
----------------------------
revision 3.13
date: 1999/06/26 03:28:47; author: brendan%netscape.com; state: Exp; lines: +7 -7
- Rename js_CallFunctionValue to js_InternalCall to distinguish it from all
"external" calls compiled from scripts, which have stack budget depth slots
under the return value slot for the call expression's generating pc.
- New internalCall packed boolean flag in JSStackFrame to distinguish callers
of js_InternalCall so the generating pc isn't mistakenly stored depth slots
below stack space allocated on-the-fly for internal call args/rval.
- Fixed bugzilla bug 8042, finally by storing the call expression's generating
pc -- but only for external calls.
- Whitespace policing, gratuitous parenthesization reduction, etc.
----------------------------
revision 3.12
date: 1999/06/15 23:44:30; author: rogerl%netscape.com; state: Exp; lines: +2 -2
branches: 3.12.10;
Fixed bug #7635. instanceof now starts the chain walk from the object
prototype.
----------------------------
revision 3.11
date: 1999/04/27 15:18:17; author: fur%netscape.com; state: Exp; lines: +3 -4
Merge changes from SpiderMonkey140_BRANCH. Note: none of the
added files participate in the client build.
----------------------------
revision 3.10
date: 1999/04/27 03:42:28; author: brendan%netscape.com; state: Exp; lines: +2 -2
Cast printf %p args to (void*).
----------------------------
revision 3.9
date: 1999/04/02 23:16:40; author: jband%netscape.com; state: Exp; lines: +4 -1
js_DefaultValue now accepts that it is OK for a request with hint of JSTYPE_OBJECT to
result in an object of type JSTYPE_FUNCTION. This is done so that objects that happen
to have 'call' ops will not fail when being 'converted' to 'Object'. This Fix is going
onto the trunk, SpiderMonkeyDev_BRANCH, and SpiderMonkey140_BRANCH
----------------------------
revision 3.8
date: 1998/11/05 00:07:50; author: mccabe%netscape.com; state: Exp; lines: +118 -23
branches: 3.8.2;
Stable drop of JavaScript interpreter code from SpiderMonkey140_BRANCH
----------------------------
revision 3.7
date: 1998/10/14 10:22:11; author: fur%netscape.com; state: Exp; lines: +262 -225
Checkpoint JS1.4 from JS_STABLE_10131998_BRANCH. Changes include:
+ merging of js/src and js/ref
+ elimination of most dependencies on NSPR
+ JS1.4 feature additions and accumulated bug fixes
More details are in last week's mozilla status report.
----------------------------
revision 3.6
date: 1998/08/26 06:14:55; author: shaver%netscape.com; state: Exp; lines: +22 -4
branches: 3.6.10; 3.6.12;
JS_ConstructObject: fill NULL proto/parent like JSOP_NEW would
----------------------------
revision 3.5
date: 1998/07/31 20:17:02; author: warren%netscape.com; state: Exp; lines: +8 -0
Landing changes in the OJI_19980727_BRANCH since the OJI_19980727_TIP_MERGE tag.
----------------------------
revision 3.4
date: 1998/07/31 00:07:05; author: mccabe%netscape.com; state: Exp; lines: +131 -42
Propagating numerous fixes from js/ref
and development branches, including but
not limited to:
- Preliminary exception handling per
ECMA proposal; try, multiple
catchblocks, and finally. Catchblocks
are of the form catch (v) or
catch(v:<guard>), where guard is an
optional boolean expression that is
evaluated to determine whether the
exception is to be caught by that block.
- ECMA-proposed 'in' operator; "'foo' in
o" or "4 in o" asks if o has property
foo or element 4.
- Added a new set of defines in
jsconfig.h for js 1.4
features-in-progress. (in, instanceof,
exception handling.) Default build
version is now 1.4. Fixed a few
conditional features that had become
broken.
- Progress towards porting to FreeBSD
and Alpha; casts of NaN and friends to
int are a little more localized. Not
there yet...
- New config files to compile on more
OSes; various fixes to improve
portability.
----------------------------
revision 3.3
date: 1998/06/09 23:04:45; author: fur; state: Exp; lines: +67 -8
branches: 3.3.8; 3.3.20;
Propagation of numerous bug fixes from 4.06 (which have been reviewed
and tested in that release):
#114564: Fix JS_Enumerate to return an empty id array instead of null
#115395: Fix JS garbage collection
#115200: Security dialog no longer blows assertion
#123211: Make sure output of sort array function is -1, 0, or 1.
#116195: Fix ImportProperty(), cope with an existing local variable
of the same name as the imported property
Unbusticate JS_invoke() so that closures work again
#115384,#115395: Handle bugs in toSource that strike when
getProperty is non-idempotent. Fix crash during JavaScript
garbage collection after enumerating object properties.
#??????: mjudge - Win16 files to make ptrdiff_t be 32 bits on Win16
----------------------------
revision 3.2
date: 1998/04/24 00:30:04; author: fur; state: Exp; lines: +1424 -717
Initial checkin of JavaScript 1.3, migrated from JSFUN13_BRANCH in /m/src repository
----------------------------
revision 3.1
date: 1998/03/28 03:29:05; author: ltabb; state: Exp; lines: +0 -0
bump rev to 3.1
----------------------------
revision 1.1
date: 1998/03/28 02:33:24; author: ltabb; state: Exp;
Free the lizard
----------------------------
revision 3.3.20.1
date: 1998/07/28 02:09:18; author: warren%netscape.com; state: Exp; lines: +137 -40
Committed from OJI_19980618_TIP_MERGE1.
----------------------------
revision 3.3.8.2
date: 1998/07/06 17:38:52; author: beard; state: Exp; lines: +129 -40
Merged changes from latest js/ref.
----------------------------
revision 3.3.8.1
date: 1998/07/02 00:44:29; author: beard; state: Exp; lines: +8 -0
Added #pragma export to export js_ObjectOps, which is used by the LiveConnect library.
(XP_MAC only change)
----------------------------
revision 3.6.12.24
date: 1999/07/30 00:46:32; author: brendan%mozilla.org; state: Exp; lines: +9 -9
Fix warnings reported at http://tinderbox.mozilla.org/SeaMonkey/warnings.html, mostly
unsigned/signed bothers.
----------------------------
revision 3.6.12.23
date: 1999/07/23 08:14:41; author: brendan%mozilla.org; state: Exp; lines: +13 -13
Bugs, bugs bugs:
- js_DecompileValueGenerator had rusted due to bytecode/source-note changes,
or maybe parts of it never worked right. Anyway, it now does not induce a
crashing underflow in the decompiler. As part of this fix, it now takes a
checkStack flag telling whether to look for the jsval v argument on the JS
stack. The calls from ImportProperty, js_SetProperty, and js_DeleteProperty
pass in v a jsval for the property id, which should not be sought after on
the stack (it might happen to be there due to o['p'] = 2, but we want to
decompile o["p"], not "p").
- js_DecompileValueGenerator would load a generating pc even if the value v
did not match the pc's corresponding stack item! Oops. This lead to less
than idea diagnostics.
- js_DecompileValueGenerator was also not mapping JSOP_TRAP to the real op at
a sufficiently early and univeral point in its control flow.
- Fix PopOff to assert and check for stack underflow in the decompiler, and
beef up PushOff too (it asserted, but did not check).
- js_ReportIsNotFunction now avoids JS_InternString by indexing directly into
cx->runtime->atomState.typeAtoms with the result of JS_TypeOfValue.
- Removed unnecessary local GC root reserved by non-zero trailing member of
obj_eval's JSFunctionSpec initializer.
----------------------------
revision 3.6.12.22
date: 1999/07/15 02:29:31; author: brendan%mozilla.org; state: Exp; lines: +4 -4
- Fix for..in bug where ECMA 12.6.3 steps 5 and 6 are reversed: the effect was
to define an unbound global variable used to enumerate an empty object, when
the standard says no variable should be defined.
- Clean up minor nits, make comment style match prevailing, tighten up for..in
element-indexing special case comments.
- Fix js_Invoke to take CONSTRUCT and INTERNAL flags arg instead of a construct
boolean arg and the JSStackFrame internalCall mis-located boolean non-arg.
Use these flags correctly in all calls (previous version failed to set the
bogus frame.internalCall around js_Invoke calls from jsfun.c and jsstr.c).
----------------------------
revision 3.6.12.21
date: 1999/07/01 02:25:47; author: brendan%mozilla.org; state: Exp; lines: +36 -52
Rip out assign hack, simplify boolean value synthesis, minor cleanups.
----------------------------
revision 3.6.12.20
date: 1999/06/26 03:31:15; author: brendan%netscape.com; state: Exp; lines: +7 -7
- Rename js_CallFunctionValue to js_InternalCall to distinguish it from all
"external" calls compiled from scripts, which have stack budget depth slots
under the return value slot for the call expression's generating pc.
- New internalCall packed boolean flag in JSStackFrame to distinguish callers
of js_InternalCall so the generating pc isn't mistakenly stored depth slots
below stack space allocated on-the-fly for internal call args/rval.
- Fixed bugzilla bug 8042, finally by storing the call expression's generating
pc -- but only for external calls.
- Whitespace policing, gratuitous parenthesization reduction, etc.
----------------------------
revision 3.6.12.19
date: 1999/06/15 23:27:46; author: rogerl%netscape.com; state: Exp; lines: +2 -2
Bug #7635. instanceof chain walk now starts with object prototype.
----------------------------
revision 3.6.12.18
date: 1999/04/06 01:27:59; author: norris%netscape.com; state: Exp; lines: +3 -9
Merge changes from SpiderMonkeyDev_BRANCH. This will obsolete that branch.
----------------------------
revision 3.6.12.17
date: 1999/04/02 23:17:14; author: jband%netscape.com; state: Exp; lines: +4 -1
js_DefaultValue now accepts that it is OK for a request with hint of JSTYPE_OBJECT to
result in an object of type JSTYPE_FUNCTION. This is done so that objects that happen
to have 'call' ops will not fail when being 'converted' to 'Object'. This Fix is going
onto the trunk, SpiderMonkeyDev_BRANCH, and SpiderMonkey140_BRANCH
----------------------------
revision 3.6.12.16
date: 1999/03/23 06:46:06; author: fur%netscape.com; state: Exp; lines: +5 -0
Mac warning fixes from Kathy Brade
----------------------------
revision 3.6.12.15
date: 1998/10/28 06:31:55; author: mccabe%netscape.com; state: Exp; lines: +68 -0
Added proposed methods Object.prototype.hasOwnProperty,
Object.prototype.propertyIsEnumerable,
Object.prototype.isPrototypeOf... all turned off for v140 in
jsconfig.h.
----------------------------
revision 3.6.12.14
date: 1998/10/27 16:53:13; author: shaver%netscape.com; state: Exp; lines: +1 -0
quell (spurious) warnings
----------------------------
revision 3.6.12.13
date: 1998/10/27 04:35:50; author: fur%netscape.com; state: Exp; lines: +17 -11
Eliminated gcc warnings, some spurious, some indicative of real bugs:
Spurious warnings:
jsobj.c: In function `js_EnterSharpObject':
jsobj.c: In function `js_obj_toSource':
jsobj.c:365: warning: `nchars' might be used uninitialized in this function
jsobj.c: In function `obj_eval':
jsobj.c:588: warning: `implicitWith' might be used uninitialized in this function
jsobj.c: In function `js_DefineProperty':
jsobj.c:1323: warning: `_c' might be used uninitialized in this function
jsobj.c: In function `js_LookupProperty':
jsobj.c:1394: warning: `_c' might be used uninitialized in this function
jsobj.c: In function `js_FindProperty':
jsobj.c:1472: warning: `lastobj' might be used uninitialized in this function
jsobj.c: In function `js_GetProperty':
jsobj.c:1599: warning: `_c' might be used uninitialized in this function
jsobj.c: In function `js_SetProperty':
jsobj.c:1645: warning: `protoid' might be used uninitialized in this function
jsobj.c:1646: warning: `protogetter' might be used uninitialized in this function
jsobj.c:1646: warning: `protosetter' might be used uninitialized in this function
jsobj.c:1647: warning: `protoattrs' might be used uninitialized in this function
jsobj.c:1665: warning: `_c' might be used uninitialized in this function
jsobj.c: In function `js_DeleteProperty':
jsobj.c:1939: warning: `_c' might be used uninitialized in this function
Warnings indicating real bugs:
jsobj.c: In function `js_EnterSharpObject':
jsobj.c:252: warning: `sharpid' might be used uninitialized in this function
----------------------------
revision 3.6.12.12
date: 1998/10/23 21:35:56; author: norris%netscape.com; state: Exp; lines: +7 -7
Use %p to print out pointer values: works better on 64 bit machines.
----------------------------
revision 3.6.12.11
date: 1998/10/22 00:01:49; author: rogerl%netscape.com; state: Exp; lines: +5 -5
Bug #324451 - eval was bailing out early if the arg was not a string, and
so skipping the indirect-eval check.
----------------------------
revision 3.6.12.10
date: 1998/10/21 20:19:46; author: norris%netscape.com; state: Exp; lines: +23 -3
Better debugging code for printing objects.
----------------------------
revision 3.6.12.9
date: 1998/10/08 23:50:06; author: rogerl%netscape.com; state: Exp; lines: +7 -0
#324451 - if eval not invoked with CALLSPECIAL, then complain that it was
called indirectly, not allowed for new ECMA.
----------------------------
revision 3.6.12.8
date: 1998/10/07 22:07:36; author: jband%netscape.com; state: Exp; lines: +9 -0
added debug hook for notification of JSObject new and finalize
----------------------------
revision 3.6.12.7
date: 1998/10/05 09:40:57; author: mccabe%netscape.com; state: Exp; lines: +28 -8
Change some engine semantics to propagate exceptions better.
js_DefaultValue and a few other places used js_TryMethod,
js_TryValueOf. The return value of these functions was always ignored
(well, was void) even if they found a method to call and that method
raised an exception. As a result, functions like valueOf which might
have been user-defined to throw an exception didn't end up propagating
the exception.
I changed js_TryMethod, js_TryValueOf, and JS_ConvertStub (which calls
js_TryValueOf) to propagate failure. Note that they'll still succeed
if they fail to find an appropriate method value to call. (so 'Try'
still means something in this context.) js_DefaultValue now uses
these return values to decide how to proceed.
As a result js_DefaultValue and obj->convert now may fail in a few
places where they previously did not. I think that this is best in
terms of making the engine interpret a consistent language, but it
might trip us up on old code. Fingers now crossed.
----------------------------
revision 3.6.12.6
date: 1998/09/24 05:39:58; author: fur%netscape.com; state: Exp; lines: +0 -5
Final changes merged from js/ref
----------------------------
revision 3.6.12.5
date: 1998/09/24 04:16:31; author: fur%netscape.com; state: Exp; lines: +0 -8
+ Make JS1.4 build in Mozilla
+ Get rid of all uses of NSPR20 macro
----------------------------
revision 3.6.12.4
date: 1998/09/23 07:40:45; author: fur%netscape.com; state: Exp; lines: +3 -3
More name substitutions for ref/src merge
----------------------------
revision 3.6.12.3
date: 1998/09/22 01:52:46; author: fur%netscape.com; state: Exp; lines: +3 -3
+ Added missing conversion of PR_*printf functions to JS_*printf.
+ Changed jsopcode.def to jsopcode.tbl
----------------------------
revision 3.6.12.2
date: 1998/09/21 20:04:07; author: fur%netscape.com; state: Exp; lines: +3 -3
Changes to build ref/src merged files on Win32 platform.
----------------------------
revision 3.6.12.1
date: 1998/09/21 17:45:36; author: fur%netscape.com; state: Exp; lines: +226 -212
This check-in is a first attempt at reducing JavaScript's dependency
on NSPR. In fact, the JS C-engine no longer depends on NSPR at all in
a single-threaded environment and the multi-threaded version relies on
NSPR strictly for its threading primitives. This change was made for
several reasons:
+ To merge the js/src and js/ref directories, which differ only in that
the former is designed to link with NSPR2, but the latter makes use of
an NSPR1 subset. The automatic generation of src from ref often led
to confusion and sometimes to merge-related errors.
+ To avoid the requirement to link against multiple versions of NSPR
when delivering JS binaries. (Different internal customers of JS have
standardized upon different NSPR releases.)
+ To shield JS from incompatible changes to NSPR.
Most of the changes involved simple renaming of types, macros,
identifiers and file names, i.e. from pr* to js*. In some cases, this
transformation resulted in name collisions and a different name was
chosen. One place where renaming was *not* performed was in the
definition of simple scalar types, i.e. int32, uint16, etc. The
jsotypes.h header file was specially handled so as to avoid typename
collision with NSPR types of the same name.
----------------------------
revision 3.6.10.1
date: 1998/09/22 20:42:51; author: cyeh%netscape.com; state: Exp; lines: +0 -8
removing MOCHA and NSPR20 #ifdefs.
----------------------------
revision 3.8.2.3
date: 1999/04/02 23:16:58; author: jband%netscape.com; state: Exp; lines: +4 -1
js_DefaultValue now accepts that it is OK for a request with hint of JSTYPE_OBJECT to
result in an object of type JSTYPE_FUNCTION. This is done so that objects that happen
to have 'call' ops will not fail when being 'converted' to 'Object'. This Fix is going
onto the trunk, SpiderMonkeyDev_BRANCH, and SpiderMonkey140_BRANCH
----------------------------
revision 3.8.2.2
date: 1999/03/10 18:46:30; author: shaver%netscape.com; state: Exp; lines: +2 -2
quell printf format warnings
----------------------------
revision 3.8.2.1
date: 1999/01/14 02:33:09; author: brendan%netscape.com; state: Exp; lines: +1 -2
JSOP_EVAL renaming and related JSVERSION_IS_ECMA simplification.
----------------------------
revision 3.12.10.1
date: 1999/08/20 16:09:10; author: cls%seawood.org; state: Exp; lines: +65 -81
Merged with HEAD from 8/18 or so.
----------------------------
revision 3.29.2.1
date: 1999/11/11 21:34:02; author: brendan%mozilla.org; state: Exp; lines: +10 -3
- Support const as alternate declaration keyword to var, with checking to fail on
redeclaration of const as const or var (if strict, var as var also). This work
entailed adding jssrcnote headroom, reducing by 1 bit the domain of the "extended
delta" srcnote, from 6 to 5.
- Add JS option API and strict option to enable compile and runtime checks for
suspicious practices that are legal in traditional JS and in ECMA.
- Fix bad bloat bug observed by kin with editor journaling, which creaets huge JS
files. Eval'ing these led to worst-case O(n**2) growth in tempPool due to collisions
precluding in-place growth of srcnote arrays. Added cx->notePool which is dedicated
to srcnotes.
- Clean up JS shell to avoid extra newlines after error report source excerpts. Also
added 'options' command to query and toggle JS options.
- Cleanup: CompileTokenStream's eofp param is pure out, not in-out.
- Nit/cleanup: use PTRDIFF for consistency (WIN16 compilability is busted cuz of
MSVC1.52 bugs, but...).
- Cleanup: rename JSOP_SETNAME2 to JSOP_SETNAME, now that JSOP_SETNAME becomes
JSOP_SETCONST (old SETNAME was pre-ECMA and has not been generated for a long while,
so no extant bytecode on disk should use it).
- Cleanup: js_NewSrcNote calls AllocSrcNote, never itself recursively, to get more
note bytes for extended delta before the note itself, and for any subsequent immediate
offset operands.
- Cleanup: optimize decompiler to allocate temporary offsets and opcodes stacks from
cx->tempPool, not the malloc heap.
- Cleanup: unify TSF_ERROR and TSF_BADCOMPILE token-scanner flags into former, there's
no need for both. Also removed js_ReportCompileError deadwood.
----------------------------
revision 3.34.8.2
date: 2000/01/17 23:47:52; author: brendan%mozilla.org; state: Exp; lines: +4 -4
Fix inverted sense of 'did warning become error due to werror option' tests.
----------------------------
revision 3.34.8.1
date: 2000/01/12 02:20:44; author: brendan%mozilla.org; state: Exp; lines: +47 -34
Spankage for JS1.5 fixes.
----------------------------
revision 3.39.4.1
date: 2000/02/29 19:54:11; author: shaver%mozilla.org; state: Exp; lines: +17 -9
fix for 28982 from tip (a=leaf)
----------------------------
revision 3.54.4.1
date: 2000/08/04 21:18:35; author: rogerl%netscape.com; state: Exp; lines: +1 -0
Implementation of fixes for bugs #44623 & #34276
----------------------------
revision 3.79.4.1
date: 2001/02/14 09:04:57; author: brendan%mozilla.org; state: Exp; lines: +29 -14
Crash fix for old-style obj.eval in a function (68498, r=bryner, sr=jband).
----------------------------
revision 3.80.4.5
date: 2001/03/30 06:10:32; author: jband%netscape.com; state: Exp; lines: +4 -0
cramming hacks onto this branch
----------------------------
revision 3.80.4.4
date: 2001/03/24 00:20:27; author: jst%netscape.com; state: Exp; lines: +13 -2
More changes from jband's XPConnect flattening branch.
----------------------------
revision 3.80.4.3
date: 2001/03/17 01:39:37; author: jst%netscape.com; state: Exp; lines: +2 -0
Landing code from jbands flattening branch.
----------------------------
revision 3.80.4.2
date: 2001/03/14 20:34:52; author: jst%netscape.com; state: Exp; lines: +1 -23
Landing code off of jband_xpconnect_flattening_BRANCH (a week or so old)
----------------------------
revision 3.80.4.1
date: 2001/02/24 11:12:56; author: jst%netscape.com; state: Exp; lines: +23 -1
Somebody please shoot me if I ever check this in on the trunk, ok?
----------------------------
revision 3.81.2.3
date: 2001/03/30 20:53:04; author: jband%netscape.com; state: Exp; lines: +4 -0
adding the fix for property cache bug 73761. Also checking in the EVIL HACK THAT MUST
BE REMOVED for bug 72354
----------------------------
revision 3.81.2.2
date: 2001/03/27 21:23:10; author: jband%netscape.com; state: Exp; lines: +39 -11
merging trunk into jband_xpconnect_flattening_BRANCH
----------------------------
revision 3.81.2.1
date: 2001/03/17 06:22:39; author: jband%netscape.com; state: Exp; lines: +13 -2
pulling in prototype lookup fix from the tip
----------------------------
revision 3.84.2.3
date: 2001/04/22 11:44:40; author: jst%netscape.com; state: Exp; lines: +172 -61
Merging in changes between XPCDOM_20010329_BASE and XPCDOM_20010420_BASE.
----------------------------
revision 3.84.2.2
date: 2001/04/15 07:20:04; author: jst%netscape.com; state: Exp; lines: +24 -13
Rolling in Brendan's fix for bug 75975 (Use parent, if non-null, as scope chain with
which to find default proto from Class.prototype, in js_{New,Construct}Object), this
gets rid of unwanted references from prototype scripts to the outside world which were
causing huge leaks.
----------------------------
revision 3.84.2.1
date: 2001/03/31 07:17:25; author: jband%netscape.com; state: Exp; lines: +4 -0
Landing code to XPCDOM_20010329_BRANCH that was developed on
jband_xpconnect_flattening_BRANCH. See the logs on that flattening branch for comments
and the trail of changes
----------------------------
revision 3.90.4.1
date: 2001/05/12 10:11:27; author: brendan%mozilla.org; state: Exp; lines: +0 -4
Remove xpcdom landing hack to resolve in js_SetProperty, only on JS_150_RC3a_BRANCH.
=============================================================================