Latin1 strings: Fix remaining issues

RESOLVED FIXED in mozilla33

Status

()

defect
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: jandem, Assigned: jandem)

Tracking

unspecified
mozilla33
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Posted patch PatchSplinter Review
This patch removes the old JSString methods like chars/getChars and fixes the few remaining callers of these functions. It also removes some now-unused APIs. Some others are also unused but may be nice to keep for some embedders so I fixed them by adding an AutoCheckCannotGC argument and added separate Latin1/TwoByte versions.

Most of this is removing code:

 14 files changed, 97 insertions(+), 198 deletions(-)
Attachment #8454919 - Flags: review?(terrence)
(Assignee)

Updated

5 years ago
Blocks: 1037871
Comment on attachment 8454919 [details] [diff] [review]
Patch

Review of attachment 8454919 [details] [diff] [review]:
-----------------------------------------------------------------

\o/ Wow, done already?

::: dom/bindings/BindingUtils.cpp
@@ +364,5 @@
>                                                TOSTRING_CLASS_RESERVED_SLOT);
>    const JSClass* clasp = static_cast<const JSClass*>(v.toPrivate());
>  
>    v = js::GetFunctionNativeReserved(callee, TOSTRING_NAME_RESERVED_SLOT);
>    JSString* jsname = static_cast<JSString*>(v.toString());

That static cast looks really funky, please remove it while you're here.

::: js/src/jsapi.h
@@ -4148,5 @@
>   * fallible context by JS_FlattenString. To catch errors, a separate opaque
>   * JSFlatString type is returned by JS_FlattenString and expected by
>   * JS_GetFlatStringChars. Note, though, that this is purely a syntactic
>   * distinction: the input and output of JS_FlattenString are the same actual
> - * GC-thing so only one needs to be rooted. If a JSString is known to be flat,

D-:

Thanks for fixing this comment!
Attachment #8454919 - Flags: review?(terrence) → review+

Updated

5 years ago
Depends on: 1029422
https://hg.mozilla.org/mozilla-central/rev/0f25f3ccb7b3
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
(Assignee)

Updated

5 years ago
Depends on: 1039611

Updated

5 years ago
Duplicate of this bug: 1076811
Depends on: 1115986
Duplicate of this bug: 564884
You need to log in before you can comment on or make changes to this bug.