Closed
Bug 1032238
Opened 10 years ago
Closed 10 years ago
Make some API functions work with Latin1 strings
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla33
People
(Reporter: jandem, Assigned: jandem)
References
Details
Attachments
(1 file)
(deleted),
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
Just some things on the JS side that I ran into last week.
Attachment #8448031 -
Flags: review?(luke)
Comment 1•10 years ago
|
||
Comment on attachment 8448031 [details] [diff] [review]
Patch
Review of attachment 8448031 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/jsapi.cpp
@@ -5645,5 @@
> if (!js_Stringify(cx, vp, replacer, space, sb))
> return false;
> - if (sb.empty()) {
> - HandlePropertyName null = cx->names().null;
> - return callback(null->chars(), null->length(), data);
I'm confused by this change; it seems unrelated to latin1.
Assignee | ||
Comment 2•10 years ago
|
||
(In reply to Luke Wagner [:luke] from comment #1)
> I'm confused by this change; it seems unrelated to latin1.
The problem is that cx->names().null is a Latin1 string ("null"), so we can't call chars() on it and we have to inflate to pass it to the callback. There are a number of ways to fix this; the patch just appends it to the StringBuffer so that there's only one call to the callback function.
Updated•10 years ago
|
Attachment #8448031 -
Flags: review?(luke) → review+
Assignee | ||
Comment 3•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in
before you can comment on or make changes to this bug.
Description
•