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)
Core
JavaScript: Standard Library
Tracking
()
RESOLVED
FIXED
mozilla37
People
(Reporter: baku, Assigned: bzbarsky)
References
Details
Attachments
(2 files)
|
3.28 KB,
patch
|
jorendorff
:
review+
|
Details | Diff | Splinter Review |
|
11.62 KB,
patch
|
baku
:
review+
|
Details | Diff | Splinter Review |
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.
| Assignee | ||
Comment 1•11 years ago
|
||
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)
| Assignee | ||
Comment 3•11 years ago
|
||
Attachment #8529510 -
Flags: review?(jorendorff)
| Assignee | ||
Updated•11 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
| Assignee | ||
Comment 4•11 years ago
|
||
Attachment #8529511 -
Flags: review?(amarchesini)
| Reporter | ||
Comment 5•11 years ago
|
||
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+
Updated•11 years ago
|
Attachment #8529510 -
Flags: review?(jorendorff) → review+
| Assignee | ||
Comment 6•11 years ago
|
||
> 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-
https://hg.mozilla.org/mozilla-central/rev/f5154e4a4117
https://hg.mozilla.org/mozilla-central/rev/c5ce96161a42
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.
Description
•