The default bug view has changed. See this FAQ.

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

RESOLVED FIXED in mozilla8

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Waldo, Assigned: Waldo)

Tracking

unspecified
mozilla8
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [inbound])

Attachments

(2 attachments)

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.
Created attachment 553184 [details] [diff] [review]
1 - Make the localName slot store an atom
Attachment #553184 - Flags: review?(luke)
Created attachment 553185 [details] [diff] [review]
2 - Rename js_IsFunctionQName and make it infallible
Attachment #553185 - Flags: review?(luke)

Comment 3

6 years ago
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 4

6 years ago
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 :)

Updated

6 years ago
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
http://hg.mozilla.org/mozilla-central/rev/c6a3b64dcac0
http://hg.mozilla.org/mozilla-central/rev/c36563ee6447
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.