Closed Bug 990484 Opened 11 years ago Closed 11 years ago

Expose a JS_IsIdentifier that takes chars+length

Categories

(Core :: JavaScript: Standard Library, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla37

People

(Reporter: baku, Assigned: bzbarsky)

References

Details

Attachments

(2 files)

Read bug 957086 comment 47: 1) Can you file a followup bug to get JSAPI to expose a version of JS_IsIdentifier that takes chars+length and then nix the need for a cx in IDB's CreateObjectStore and CreateIndex code? That seems all the cx is used for there.
Basically, out situation is that we have an XPCOM string that we want to check for being a JS identifier. Right now we have to go and create a JSString from it to do that, which seems a bit silly. Jason, if you're OK with the basic idea, I'll just do this.
Flags: needinfo?(jorendorff)
Yes, of course!
Flags: needinfo?(jorendorff)
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Blocks: 1105615
Comment on attachment 8529511 [details] [diff] [review] part 2. Remove a bunch of now-unnecessary JSContext bits in indexedDB code Review of attachment 8529511 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/datastore/DataStoreDB.cpp @@ +271,5 @@ > } > } > > { > RootedDictionary<IDBIndexParameters> params(cx); Do we still need to root the dictionary in this case? ::: dom/indexedDB/KeyPath.cpp @@ +29,5 @@ > } > > typedef nsCharSeparatedTokenizerTemplate<IgnoreWhitespace> KeyPathTokenizer; > > +static bool This doesn't need to be static because it's included in an anonymous namespace.
Attachment #8529511 - Flags: review?(amarchesini) → review+
Attachment #8529510 - Flags: review?(jorendorff) → review+
> Do we still need to root the dictionary in this case? Yes, until bug 1105615 is fixed. > This doesn't need to be static because it's included in an anonymous namespace. OK, fixed. https://hg.mozilla.org/integration/mozilla-inbound/rev/f5154e4a4117 https://hg.mozilla.org/integration/mozilla-inbound/rev/c5ce96161a42
Flags: in-testsuite-
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: