Closed Bug 678998 Opened 13 years ago Closed 13 years ago

Make js_IsFunctionQName infallible, so that determining the nature of a property lookup is clearer

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla8

People

(Reporter: Waldo, Assigned: Waldo)

Details

(Whiteboard: [inbound])

Attachments

(2 files)

Property storage splitting will be clearer if a property lookup can be determined to be non-elemental (that is, obj[2]) and non-property (that is, obj["prop"]) without potential for failure. It's fairly easy to do this -- just make sure that QName objects store an atom, not merely a string, in their localName slots.
Attachment #553184 - Flags: review?(luke)
Comment on attachment 553184 [details] [diff] [review] 1 - Make the localName slot store an atom Review of attachment 553184 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/jsxml.cpp @@ +2815,2 @@ > static JSBool > IsFunctionQName(JSContext *cx, JSObject *qn, jsid *funidp) You can unfallible-ize this function now, if you so choose.
Attachment #553184 - Flags: review?(luke) → review+
Comment on attachment 553184 [details] [diff] [review] 1 - Make the localName slot store an atom Review of attachment 553184 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/jsxml.cpp @@ +2815,2 @@ > static JSBool > IsFunctionQName(JSContext *cx, JSObject *qn, jsid *funidp) Err, so you have :)
Attachment #553185 - Flags: review?(luke) → review+
http://hg.mozilla.org/integration/mozilla-inbound/rev/c6a3b64dcac0 http://hg.mozilla.org/integration/mozilla-inbound/rev/c36563ee6447 I should probably get in the habit of beginning patch sequences like this with an overview/prognosticating comment. I did the same thing to Blake in the typed-array-initialization bug -- he made a comment on an earlier patch, I had it resolved in a later one. :-)
Whiteboard: [inbound]
Target Milestone: --- → mozilla8
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: