Closed
Bug 620445
Opened 15 years ago
Closed 15 years ago
useless null check of prefix in XMLToXMLString
Categories
(Core :: JavaScript Engine, enhancement)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: timeless, Assigned: timeless)
References
(Blocks 1 open bug)
Details
(Keywords: coverity, Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file)
529 bytes,
patch
|
brendan
:
review+
|
Details | Diff | Splinter Review |
2383 XMLToXMLString(JSContext *cx, JSXML *xml, const JSXMLArray *ancestorNSes,
2388 JSString *str, *prefix, *nsuri;
2508 prefix = GetPrefix(ns);
2509 if (!prefix) {
2525 if (!GetPrefix(xml->name)) {
here, prefix is not null:
2526 prefix = cx->runtime->emptyString;
2527 } else {
2528 prefix = GeneratePrefix(cx, nsuri, &ancdecls.array);
here, if prefix is null, we bail:
2529 if (!prefix)
2530 goto out;
here we use prefix:
2549 if (prefix->empty()) {
2566 }
at this point, prefix must not be null.
this null check of prefix is useless:
2572 if (prefix && !prefix->empty()) {
compute
2729 out:
2730 js_LeaveLocalRootScopeWithResult(cx, str);
2731 return str;
Updated•15 years ago
|
Attachment #498931 -
Flags: review?(brendan) → review+
Keywords: checkin-needed
Whiteboard: [push to tm]
Comment 2•15 years ago
|
||
Keywords: checkin-needed
Whiteboard: [push to tm] → fixed-in-tracemonkey
Comment 3•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Blocks: coverity-analysis
You need to log in
before you can comment on or make changes to this bug.
Description
•