[Webkit-unassigned] [Bug 106522] [JSC] Author script cannot override HTMLCollection’s methods

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 11 20:47:29 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=106522





--- Comment #2 from Ryosuke Niwa <rniwa at webkit.org>  2013-01-11 20:49:19 PST ---
Turned out this isn't as trivial as I had hoped it to be.

The trickiness comes from the fact JSHTMLCollection's subclasses have their own name getter implementations. Because of this, we can't call Base::getOwnPropertySlot in JSHTMLCollection's subclasses because that'll end up invoking JSHTMLCollection's name getter implementation.

Discussing the issue with Gavin and Filip, we came up a solution like this:
1. Add a virtual method like postGetOwnPropertySlot, which deals with name getters and remove the name getter code from getOwnPropertySlot.

2. get() will, in addition to going through getOwnPropertySlot, will call postGetOwnPropertySlot at the very end if earlier calls to getOwnPropertySlot had not returned a value.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list