brendan%mozilla.org
4b0d94c93a
More cleanup/followup: eliminate single-use rt variable in js_SetProperty, move clasp decl and first-def down, fix comments, strip trailing whitespace.
2003-04-14 04:14:57 +00:00
brendan%mozilla.org
3fb113994f
Improve one comment slightly.
2003-04-14 03:32:55 +00:00
brendan%mozilla.org
40334ba064
Quick followup to last checkin, to optimize OBJ_DROP_PROPERTY to JS_UNLOCK_SCOPE in the one place in js_SetProperty that didn't follow the comments and do that.
2003-04-14 03:26:47 +00:00
brendan%mozilla.org
fd011d535b
Fix ancient ECMA violation where proto-property attrs, etc., were inherited when shadowing (90596, r=rogerl).
2003-04-13 23:33:34 +00:00
brendan%mozilla.org
c251d3600f
Fix set-property on sealed object to throw error (94693, r=rogerl).
2003-04-11 21:02:29 +00:00
seawood%netscape.com
42ee530683
Purge XP_PC.
...
Bug #74999 r=mkaply sr=brendan
2003-04-03 19:35:29 +00:00
brendan%mozilla.org
f0404b0df8
Work around OpenVMS compiler bug: it reserves |readonly| (199366, r=me, patch from colin@theblakes.com).
2003-03-27 00:04:51 +00:00
brendan%mozilla.org
c0fc066a01
Don't override a prototype property iff it is JSPROP_SHARED (not also if it's a JSPROP_SETTER; 197940, r=rogerl).
2003-03-19 02:25:39 +00:00
brendan%mozilla.org
f2c8bb3531
Move readonly pre-ECMA error report down to new place peculiar to sealed
...
scopes, and share it via downward goto from the old place (which should go
away when a bug on khanson's list whose # I forget is fixed). This fixes
the hole in sealed scope support mentioned in bug 94693 (r=rogerl/shaver).
2003-03-19 00:53:45 +00:00
brendan%mozilla.org
25b813e602
Implement SCOPE_IS_SEALED, JS_SealObject, JS_UnsealObject, etc. to support
...
sealed standard object graphs, as well as to pave the way for optimizations
to object literals (94693, r=shaver).
2003-03-14 05:24:58 +00:00
brendan%mozilla.org
dd545c2cb9
Fix JS_[GS]etContextThread return type; add JSCLASS_NEW_RESOLVE_GETS_START (196966, r=shaver).
2003-03-12 20:29:16 +00:00
brendan%mozilla.org
6e0c7cdde4
Constipation of (JS|PL)DHashTableOps (195298, r/sr=shaver/alecf).
2003-02-28 07:17:59 +00:00
brendan%mozilla.org
4b0d8710d7
Fix blunder in obj_propertyIsEnumerable from last checkin (156354, r=shaver).
2002-09-16 23:00:03 +00:00
brendan%mozilla.org
d02561c5d2
Restore enumeable, permanent, readonly single-char elements to string objects; fix propertyIsEnumerable to work with shared permanent proto-properties (167910, r=rogerl).
2002-09-12 19:34:59 +00:00
brendan%mozilla.org
873971ec4c
Fix js_NewObject not to share proto's map if proto and obj don't have the same number of reserved slots (112974, r=rogerl, sr=jband).
2002-08-08 21:51:54 +00:00
brendan%mozilla.org
703c294a0e
Null-check prop before dropping it (156354, r=khanson, sr=shaver).
2002-07-09 02:24:51 +00:00
brendan%mozilla.org
1740ef44a7
Respect addProperty failure (148899, r=khanson, sr=shaver).
2002-06-04 18:13:55 +00:00
dbaron%fas.harvard.edu
412d54c9d6
Fix Mac bustage from brendan's checkin.
2002-05-22 00:53:12 +00:00
brendan%mozilla.org
f1f6f1398e
Don't fail to call OBJ_CHECK_ACCESS for o.__proto__ = x, with enough mode bits to say what's happening (143369, r=shaver, sr=jst).
2002-05-22 00:06:40 +00:00
brendan%mozilla.org
bf8e80d0d1
Fix js_SetProtoOrParent to handle non-native and native-but-incompatible-class-change proto-setting scenarios (140164, r=khanson, sr=jband).
2002-05-02 20:59:35 +00:00
timeless%mac.com
dec943eb10
Bug 106386 rid source of misspellings
...
r=db48x sr=blake a=asa
2002-03-19 04:30:17 +00:00
brendan%mozilla.org
1e126a67d9
Restore non-bogus assertion removed in last rev, and fix the case that tripped it in js_ChangeScopeProperty, by not removing [and maybe freeing sprop->slot] before re-adding sprop; also fix all engine-defined getters and setters to have no slot [to be JSPROP_SHARED] (130970, r/sr=shaver&jband, a=asa).
2002-03-16 04:51:29 +00:00
khanson%netscape.com
e67d7ec049
bug #130991 (Out-of-Memory in jsshell causes assertion failure in jsobj.c)
patch by Brendan, sr=jband, r=khanson, a=asa
2002-03-15 06:22:00 +00:00
brendan%mozilla.org
62bc0d659b
No strict warnings without the strict option, and other js1.5/mozilla1.0 tidying (129972, r=shaver, sr=jband, a=asa).
2002-03-14 00:14:48 +00:00
brendan%mozilla.org
5074f6ebd1
Don't forget to lock obj in js_AddNativeProperty and js_ChangeNativePropertyAttrs (130137, r=jband, sr=shaver, a=roc+moz).
2002-03-12 07:17:30 +00:00
brendan%mozilla.org
efe08cd95c
Fix longstanding bug where watchpoints didn't work with JSPROP_SETTER (127243, r=rginda, sr=shaver, a=dbaron).
2002-03-08 22:46:13 +00:00
brendan%mozilla.org
be783ec091
Runaway recursion safety for Exception and js_ErrorToException.
...
The latter no longer calls the former via js_ConstructObject, to
minimize failure opportunities when converting an error into an
exception. Also, the 'stack' property of exception objects
faithfully preserves Unicode in function names and decompiled
actual argument sources.
Also, fun_xdrObject was reversing property order when encoding;
fixed to maximize property tree compression gain.
Also^2, js_ConstructObject was not handling success+not-found
return from FindConstructor.
bug 127136, r=rginda, sr=shaver, a=chofmann
2002-03-03 00:59:16 +00:00
brendan%mozilla.org
57483a3082
Major footprint/perf win: share property state using a tree whose root represents empty scopes, and whose non-root nodes represent scopes with properties added in order from the root to that node; to use double hashing to map these tree-paths for per-scope property lookup; and avoid locking where possible through immutability and mostly-benign&rare race tolerance (62164, r=shaver, sr=jband).
2002-02-23 03:49:27 +00:00
brendan%mozilla.org
aba15fbd2d
Construct error objects to consolidate their default property setting; this entails adding JS_ConstructObjectWithArguments (123177, r=rginda, sr=shaver).
2002-02-14 07:25:34 +00:00
brendan%mozilla.org
2c41247d14
Fix failure to check for JS_InitClass failure, reported by Eric Brueggemann <eric_brueggemann@yahoo.com>, r=shaver, sr=mozbot.
2002-02-06 07:01:37 +00:00
brendan%mozilla.org
8b9fb46499
Avoid ClaimScope (lock-free to -full transition) in JS_GetClass and js_FinalizeObject called from the GC (109183, r=shaver, sr=jband).
2001-11-11 21:25:13 +00:00
brendan%mozilla.org
c220d0c707
Avoid recursive join/toString death (108440, r=shaver, sr=jband).
2001-11-07 00:15:44 +00:00
brendan%mozilla.org
d27c4cb86f
Followup to bug 56940's big patch, tighten GC-mark case analysis, assume atom strings are immutable.
2001-10-28 22:37:25 +00:00
brendan%mozilla.org
894b19f8c3
Add mutable (growable or dependent, two subtypes) strings to solve O(n^2) and O(n^3) growth rates (56940, r=rogerl, sr=jband&shaver).
2001-10-25 00:26:38 +00:00
brendan%mozilla.org
eb9671e246
Add SetAlphaBounds, TABLE_SIZE, and MIN_ALPHA APIs (103990, r=dbaron, sr=waterson).
2001-10-16 05:40:27 +00:00
brendan%mozilla.org
9324b81dee
Fix for bug 99663 (for loop resolves properties of the object being enumerated
...
with JSRESOLVE_ASSIGNING, wrongly), plus a few miscellaneous bugfixes.
- Combine the JSStackFrame members constructing, special, overrides, and
reserved into a uint32 flags member.
- Separate JOF_ASSIGNING from the JOF_SET bytecode format flag, and impute
JSRESOLVE_ASSIGNING from the presence of JOF_ASSIGNING among the current
opcode's format flags. To handle the for-in loop opcodes, which do more
than simply assign -- in particular, they do property lookups whose resolve
hook outcalls should not be flagged with JSRESOLVE_ASSIGNING -- a new frame
flag, JSFRAME_ASSIGNING, has been added.
- Fix interpreter version selection to respect JS_SetVersion, whose effect on
cx->version is "sticky".
- Fix js_DecompileValueGenerator to deal with JSOP_ENUMELEM -- it never had,
as this testcase shows (it crashes without this patch):
version(120);
eval("function fe(s) { for (it[s] in this); }");
try { fe('rdonly'); } catch (e) { print(e); }
2001-10-03 06:39:30 +00:00
gerv%gerv.net
1856815ff1
Oops.
2001-09-20 00:02:59 +00:00
scc%mozilla.org
bc444f528a
bug #98089 : ripped new license
2001-09-19 22:39:41 +00:00
brendan%mozilla.org
cf80f7240c
Fix unsafe JS_DHashTableRawRemove usage; unoverload cx->resolving into a counter and a JSDHashTable pointer (94422, r/sr=jband,waterson with dbaron sanity checks).
2001-09-14 03:37:15 +00:00
brendan%mozilla.org
3efd0e519f
1. Fix jsdhash/pldhash.[ch] so that add/remove cycles for a given k do not
...
create a long chain of removed sentinels. Also, when adding k to a table
where k is not mapped, but where k hashes to a chain that includes removed
sentinels, recycle the first removed sentinel in the chain for k's entry.
2. Cache cx->resolving till js_DestroyContext, to avoid high JSDHashTable
new/destroy overhead in js_LookupProperty.
3. Add NS_TraceStack to nsTraceMalloc.[ch] and clean the .c file up a bit.
2001-09-12 06:39:31 +00:00
jband%netscape.com
23d7dc717d
fix bug 97444. It is not good to patch a different fun into the frame. Let's safely shunt aside the callee frame instead. r=rogerl sr=brendan
2001-09-05 21:25:09 +00:00
brendan%mozilla.org
622522e134
Ignore property found in non-native prototype (12367, sr=jband&shaver, a=asa).
2001-09-03 22:29:12 +00:00
brendan%mozilla.org
f319c1d822
Check keyword version when scanning, not by installing different keywords on version selection (when starting to compile; bug 96562, r=rogerl, sr=shaver&jband, a=dbaron).
2001-08-24 03:32:31 +00:00
brendan%mozilla.org
52f4ef75ac
Fix 3-way deadlock by never nesting rt->gcLock inside rt->setSlotLock (90994, sr=shaver&jband).
2001-07-25 02:43:40 +00:00
jst%netscape.com
030da7b1b9
Fixing bug 86147. Adding code that does security checks on access to getter and setter functions for properties of DOM objects in JS. Also fixing a JS engine bug that caused problems with the real fix for this bug, the JS engine bug was that a jsid was passed as a jsval to the checkAccess() class hook. r=mstolts@netscape.com, sr=brendan@mozilla.org
2001-07-04 09:44:57 +00:00
jband%netscape.com
ea41e651fd
fix bug 78428 by making sure to use the lesser of the freeslot or nslots value when marking slots. This is necessary because objects can now be in an initial state where the freeslots is a larger number than the nslots - and the actual number of slots in the array. sr=brendan r=beard a=drivers
2001-06-05 00:47:56 +00:00
brendan%mozilla.org
769e09a93e
- Add a generation number to JSDHashTable that counts entryStore changes due
...
to grows, shrinks, and compresses. This helps JS_DHashTableOperate callers
who hold returned entry pointers to validate those pointers and avoid having
to re-lookup an entry by its key.
- Balance that addition by removing JSDHashTable.sizeMask, which is induced by
JSDHashTable.sizeLog2 at the cost of two typically single-cycle instructions.
- Use JSDHashTable.generation in jsobj.c to avoid unsafely dereferencing an
entry pointer held across calls to JSClass.resolve from js_LookupProperty,
which may recur and add entries to cx->resolving, growing that table and
invalidating entry pointers held by earlier js_LookupProperty activations.
(bug 78121, r=jst@netscape.com , sr=jband@netscape.com , a=asa@mozilla.org )
2001-05-25 03:05:38 +00:00
brendan%mozilla.org
e46d5f7fc4
Warning abatement (r=polarbear, sr=lumpy).
2001-05-22 23:25:18 +00:00
brendan%mozilla.org
a10d5eb5aa
Unified resolve recursion damping (70358) and resolve-from-js_SetProperty (72354), r/sr=jband,jst,shaver.
2001-05-17 01:43:58 +00:00
jst%netscape.com
ea706038cf
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00