Last Comment Bug 699705 - Getting a property off an array that lives on a non-native on the proto chain and has a getter that uses |this| fails
: Getting a property off an array that lives on a non-native on the proto chain...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: All All
: P2 normal (vote)
: mozilla10
Assigned To: Boris Zbarsky [:bz]
:
Mentors:
Depends on: 698495 743425
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-03 21:06 PDT by Boris Zbarsky [:bz]
Modified: 2012-04-07 01:14 PDT (History)
3 users (show)
bzbarsky: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
When forwarding property gets to the proto for arrays, send along the right receiver even if the property lives on a non-native object. (8.46 KB, patch)
2011-11-03 22:01 PDT, Boris Zbarsky [:bz]
jwalden+bmo: review+
Details | Diff | Splinter Review

Description Boris Zbarsky [:bz] 2011-11-03 21:06:21 PDT
The problem is that we use js_NativeGet and hence have to stick to native objects.  This is a remaining unfixed case from bug 434837.  At the time we had no way to fix, but now we do.
Comment 1 Boris Zbarsky [:bz] 2011-11-03 22:01:57 PDT
Created attachment 571883 [details] [diff] [review]
When forwarding property gets to the proto for arrays, send along the right receiver even if the property lives on a non-native object.
Comment 2 Jeff Walden [:Waldo] (remove +bmo to email) 2011-11-03 22:16:05 PDT
As I noted on IRC, this patch demonstrates one reason why we should make getOwnProperty, in some form, the fundamental property-get operation.  Every one of these methods has to hard-code the property-delegation lookup process, and every one has to be fixed if a bug is found, as here.  I started this in bug 637378 half a year ago and hit a nontrivial XBL-based snag.  Perhaps we should go back and beat XBL into submission so we could move further in that direction...
Comment 4 Marco Bonardo [::mak] 2011-11-05 02:48:46 PDT
https://hg.mozilla.org/mozilla-central/rev/bdd8a7d0d45a

Note You need to log in before you can comment on or make changes to this bug.