The SpiderMonkey support in ELinks now uses JS_GetReservedSlot,
which was added in SpiderMonkey 1.5 RC3a, released on 2001-05-11.
So ELinks no longer supports earlier versions of SpiderMonkey.
However, be careful not to claim that ELinks needs "SpiderMonkey
1.5 RC3a or later", because we haven't tested 1.5 RC3a.
(I guess we didn't test zlib 1.2.0.2 either... oh, well.)
I'm not sure if JS_GetReservedSlot exists in all versions of the SpiderMonkey.
IMHO the configure script should check for JS_GetReservedSlot.
The patch in the attachment.
The previous code cast the integer (long actually) to void * and gave
that to JS_SetPrivate. This did not work because JS_SetPrivate
expects pointers to be aligned and replaces the least significant bit
with a tag. By using JS_SetReservedSlot instead, we get control of
the jsval conversions and can store the integer properly.
Revert part of commit 7215c964e40afe953787d7831b04182fbaba4662,
"Use real types (enum connection_{state,priority})." of 2005-06-14.
connection.pri[] is indexed by enum connection_priority, but its
elements are merely reference counts; they are never assigned from
or compared to enum connection_priority. Defining the elements
as int will result in more readable output from GDB.
Noted in bug 920.
Revert 8f030fcb63, "Hack elinkskeys.5
with sed some more, to please ESR." I asked ESR on 2007-01-06 and
2007-06-09 whether the changes were OK, but he never answered. So I'm
reverting the changes until someone with troff knowledge reviews them.
Add ecmascript_interpreter.backend_nesting, increment it when
beginning to evaluate an expression, and decrement it when evaluation
finishes. Then assert that it is zero in ecmascript_put_interpreter.
This detects bug 957 and similar ones before they corrupt memory.
The history converted from CVS is not in repo.or.cz though, so keep
referring to pasky.or.cz for that. (We don't seem to use
"gitweb.elinks.cz", which is a DNS alias for pasky.or.cz.)
<paakku> Do you think we should maybe point people to gitweb at
repo.or.cz rather than pasky.or.cz?
<pasky> absolutely
<pasky> actually I thought we already are pointing people at
repo.or.cz
<pasky> at least there was some movement to do that already, I believe
:)
And reorder the characters in the string given to strcspn(), to match
their expected order in the URI. This is also how strcspn() is called
elsewhere in uri.c.
It was reported at elinks-dev on 2007-06-03 that Solaris 10 comes with
zlib 1.1.4, which does not include gzclearerr(), which ELinks nowadays
requires. It would be possible to rewrite the decompression support
to use deflate() directly and avoid stdio, in which case gzclearerr()
would not be needed. That will take some time however, so I'm not
attempting it for ELinks 0.12.0. Instead, I'm just disabling gzip
decompression entirely if zlib is too old.
Although <see/object.h> of SEE 2.0.1131 has a comment saying that
SEE_objectclass.enumerator is optional and may be left NULL, SEE
crashes if one tries to enumerate the properties of an object created
from such a class. Conveniently, it provides a suitable stub function.
http://www.adaptive-enterprises.com.au/bugs/show_bug.cgi?id=75
I don't remember why I cleared "returns", but it doesn't work
with www.hypermedia.pl/altkom/ and probably with many more sites.
[ From commit e887efc611 on the witekfl
branch. --KON ]
This is a further precaution against reading a pointer from the wrong
type of object. All of the JS_GetPrivate calls were already protected
with JS_InstanceOf checks if assertions are enabled, and many of them
also if assertions are not enabled.
Remember the index of struct form_state in vs->form_info
instead of the pointer to it. The pointer may change,
the index is persistent.
The field ecmascript_obj of the struct form_state is unused.