###!!! ASSERTION: Can't use |Truncate()| to make a string longer.: 'aNewLength <= this->Length()', file ../../dist/include/string/nsAString.h, line 506

RESOLVED FIXED

Status

()

Core
XBL
--
major
RESOLVED FIXED
16 years ago
16 years ago

People

(Reporter: timeless, Assigned: David Hyatt)

Tracking

({assertion})

Trunk
x86
FreeBSD
assertion
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

1.34 KB, patch
Mike Pinkerton (not reading bugmail)
: review+
Alec Flett
: superreview+
Details | Diff | Splinter Review
(Reporter)

Description

16 years ago
#6  0x282ce615 in nsACString::Truncate (this=0xbfbfd69c, aNewLength=4294967295) at ../../dist/include/string/nsAString.h:506
#7  0x292f1a31 in nsXBLService::GetBindingInternal (this=0x81e0b80, aBoundElement=0x880bbc0, aURLStr=@0xbfbfd914, aPeekOnly=0, aIsReady=0xbfbfd73c, aResult=0xbfbfd980)
    at /home/timeless/mozilla/content/xbl/src/nsXBLService.cpp:938

Tingley pointed out that aNewLength is -1.

#7  0x292f1a31 in nsXBLService::GetBindingInternal (this=0x81e0b80, aBoundElement=0x880bbc0, aURLStr=@0xbfbfd914, aPeekOnly=0, aIsReady=0xbfbfd73c, aResult=0xbfbfd980)
    at /home/timeless/mozilla/content/xbl/src/nsXBLService.cpp:938
938       uri.Truncate(indx);
(gdb) list
933       // XXX Obtain the # marker and remove it from the URL.
934       nsCAutoString uri(aURLStr);
935       PRInt32 indx = uri.RFindChar('#');
936       nsCAutoString ref;
937       uri.Right(ref, uri.Length() - (indx + 1));
938       uri.Truncate(indx);
939
940       nsCOMPtr<nsIDocument> boundDocument;
941       aBoundElement->GetDocument(*getter_AddRefs(boundDocument));
942
uri doesn't contain '#'
(Reporter)

Comment 1

16 years ago
Created attachment 61624 [details] [diff] [review]
if # isn't found, return error
(Reporter)

Comment 2

16 years ago
Comment on attachment 61624 [details] [diff] [review]
if # isn't found, return error

please ignore the second block. i've been typoing near xbl a bit so the number
of outstanding patches to it is growing.
(Reporter)

Updated

16 years ago
Keywords: assertion
Comment on attachment 61624 [details] [diff] [review]
if # isn't found, return error

r=pink
Attachment #61624 - Flags: review+

Comment 4

16 years ago
Comment on attachment 61624 [details] [diff] [review]
if # isn't found, return error

sr=alecf
Attachment #61624 - Flags: superreview+
Comment on attachment 61624 [details] [diff] [review]
if # isn't found, return error

spaces around operators, please (as the prevailing style does, and as Mozilla
style almost always does).

Fix that, and a=brendan@mozilla.org

Updated

16 years ago
Keywords: mozilla0.9.7
(Reporter)

Comment 6

16 years ago
fix checked in with spaces
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.