Attila,

redefining Object.prototype works, this is not the problem but this
trick could be see from the scripts, what is in our case not 100% correct.

I'll propose a patch.

Cheers,
Marc.
-- 
Blog: http://mguillem.wordpress.com


Attila Szegedi wrote:
> I'm not 100% certain I understand why would that belong in the JS engine
> core, but I'd have easier time evaluating actual code, so if you could
> provide a patch, I could look at it and hopefully understand better.
> Customizing protoype chains isn't in itself a particularly special
> exercise within JS. I believe you could even do it in JS itself,
> something to the effect of:
> 
> var oldObjectPrototype = Object.prototype;
> Object.prototype = myNewPrototype;
> 
> and so on (excuse me, but I've been working on some aspects of the
> engine itself, and admittedly never had to wrangle with very complex
> scripts myself, so the example might be both incomplete and
> inaccurate...). Someone with a stronger JS-fu could chime in.
> 
> Attila.
> 
> On 2008.01.25., at 21:14, Marc Guillemot wrote:
> 
>> Hi,
>>
>> in HtmlUnit we have put a custom object without any property as
>> prototype of the Object prototype. This custom root prototype is able to
>> call a "fallbackGetter" on the start object (if this one can handle it).
>> This allow us to use an other strategy to get properties first when the
>> whole prototype chain has been searched.
>>
>> Do you think that such a feature could be interesting for Rhino? If yes,
>> I can provide a patch.
>>
>> Cheers,
>> Marc.
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to