Closed
Bug 298286
Opened 20 years ago
Closed 20 years ago
Clean up js_ReportCompileErrorNumber to deal with jschar *
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.8beta4
People
(Reporter: mrbkap, Assigned: mrbkap)
Details
Attachments
(1 file, 1 obsolete file)
|
18.89 KB,
patch
|
brendan
:
review+
brendan
:
approval1.8b4+
|
Details | Diff | Splinter Review |
Currently, js_ReportCompileErrorNumber() unconditionally calls
js_ExpandErrorArguments with its charArgs parameter set to PR_TRUE, which causes
problems for jsregexp.c which consistently calls it with jschar* arguments. This
breaks because interpreting the jschar* as a char* results in one-character-only
strings.
I'm volunteering to fix this in a sane way.
| Assignee | ||
Updated•20 years ago
|
Status: NEW → ASSIGNED
| Assignee | ||
Comment 1•20 years ago
|
||
This adds an argument to js_ReportCompileErrorNumber, which bloats the patch
somewhat. The alternative patch (which would probably be a bit cleaner) would
be to add a function js_ReportCompileErrorNumberUC [akin to
JS_ReportErrorNumber(UC)] and split the common code into another function. I
think I actually like the alternate better. Brendan, what do you think?
Attachment #187682 -
Flags: review?(brendan)
Comment 2•20 years ago
|
||
Comment on attachment 187682 [details] [diff] [review]
patch v1
Yeah, let's do the UC thing (per office discussion). Law of least effort has
not been repealed. ;-)
/be
Attachment #187682 -
Flags: review?(brendan)
| Assignee | ||
Comment 3•20 years ago
|
||
Using report as a pointer inflated this patch some, but I think this is as
close as I can get to combining the two functions.
Attachment #187682 -
Attachment is obsolete: true
Attachment #187847 -
Flags: review?(brendan)
Comment 4•20 years ago
|
||
Comment on attachment 187847 [details] [diff] [review]
patch v2
Looks good to me -- if it all tests well, go for 1.8b4 approval -- I'll help
approve. Thanks,
/be
Attachment #187847 -
Flags: review?(brendan) → review+
| Assignee | ||
Updated•20 years ago
|
Attachment #187847 -
Flags: approval1.8b4?
Comment 5•20 years ago
|
||
Comment on attachment 187847 [details] [diff] [review]
patch v2
This is safe for 1.8b4.
/be
Attachment #187847 -
Flags: approval1.8b4? → approval1.8b4+
| Assignee | ||
Comment 6•20 years ago
|
||
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.8beta4
Updated•20 years ago
|
Flags: testcase?
You need to log in
before you can comment on or make changes to this bug.
Description
•