Closed
Bug 840260
Opened 12 years ago
Closed 12 years ago
AudioChannelManager remnant in nsDOMClassInfoClasses.h
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla21
People
(Reporter: bjacob, Assigned: bjacob)
References
Details
Attachments
(4 files, 1 obsolete file)
4.97 KB,
text/plain
|
Details | |
4.91 KB,
text/plain
|
Details | |
473 bytes,
patch
|
Details | Diff | Splinter Review | |
2.66 KB,
patch
|
peterv
:
review+
|
Details | Diff | Splinter Review |
B2G + mozilla-central debug build asserts here with the assertion at nsDOMClassInfo.cpp:3647,
MOZ_NOT_REACHED("The number of items in sClassInfoData doesn't match the "
"number of nsIDOMClassInfo ID's, this is bad! Fix it!");
To debug this, I dumped sClassInfoData and the stuff in nsDOMClassInfoClasses (by redefining DOMCI_CLASS) and get multiple differences. The dumps are attached to this bug. The diff is:
--- DOMClassInfoClasses 2013-02-11 16:44:07.121159202 -0500
+++ sClassInfoData 2013-02-11 16:44:11.101159297 -0500
@@ -1,9 +1,9 @@
+
AnimationEvent
ArchiveReader
ArchiveRequest
AsyncScrollEventDetail
Attr
-AudioChannelManager
BarProp
BeforeUnloadEvent
Blob
@@ -31,7 +31,6 @@
Comment
CompositionEvent
ContentFrameMessageManager
-ContentList
CRMFObject
Crypto
CSSCharsetRule
@@ -68,7 +67,6 @@
DOMConstructor
DOMError
DOMException
-DOMFileHandle
DOMPrototype
DOMRequest
DOMStringList
@@ -78,6 +76,7 @@
Event
EventListenerInfo
File
+FileHandle
FileList
FileReader
FileRequest
@@ -159,7 +158,6 @@
IDBCursorWithValue
IDBDatabase
IDBFactory
-IDBFileHandle
IDBIndex
IDBKeyRange
IDBObjectStore
@@ -172,7 +170,6 @@
LocalMediaStream
Location
LockedFile
-MathMLElement
MediaError
MediaList
MediaQueryList
@@ -247,6 +244,7 @@
SVGAnimatedRect
SVGAnimatedString
SVGDocument
+SVGElement
SVGEvent
SVGFEBlendElement
SVGFEColorMatrixElement
@@ -281,7 +279,6 @@
SVGRect
SVGStringList
SVGTitleElement
-SVGUnknownElement
SVGZoomEvent
Telephony
TelephonyCall
Assignee | ||
Comment 1•12 years ago
|
||
Assignee | ||
Comment 2•12 years ago
|
||
We should make these crash opt builds if they don't already.
Assignee | ||
Comment 4•12 years ago
|
||
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #3)
> We should make these crash opt builds if they don't already.
They don't already due to the #ifdef DEBUG at nsDOMClassInfo.cpp:3642.
FWIW here is the code used to dump this (at that same location):
#ifdef DEBUG
{
uint32_t i = ArrayLength(sClassInfoData);
if (i != eDOMClassInfoIDCount) {
for (uint32_t x = 0; x < i; x++) {
printf_stderr("sClassInfoData %s\n", sClassInfoData[x].mName);
}
#define DOMCI_CLASS(X) printf_stderr("domciclass %s\n", #X);
#include "nsDOMClassInfoClasses.h"
#undef DOMCI_CLASS
MOZ_NOT_REACHED("The number of items in sClassInfoData doesn't match the "
"number of nsIDOMClassInfo ID's, this is bad! Fix it!");
return NS_ERROR_NOT_INITIALIZED;
}
Assignee | ||
Comment 5•12 years ago
|
||
So, most of the differences were just my dumping being fooled by special cases. The only real difference is that AudioChannelManager is not listed on the sClassInfoData side.
Summary: DOMClassInfoClasses and sClassInfoData have multiple differences (B2G) → AudioChannelManager not listed in sClassInfoData
Assignee | ||
Updated•12 years ago
|
Summary: AudioChannelManager not listed in sClassInfoData → AudioChannelManager remnant in nsDOMClassInfoClasses.h
Assignee | ||
Comment 7•12 years ago
|
||
This fixes the assertion reported above.
Attachment #712651 -
Flags: review?(peterv)
Assignee | ||
Comment 8•12 years ago
|
||
This implemented Kyle's suggestion in comment 3. I just only applied this to the first assertion here (which was hit above), not to the for loops below, so that we can at least land that without worrying about performance.
We have 320 classes here on B2G, two for loops, so if we enabled them in release builds, that would cost us 640 (cache friendly) memory derefs + comparisons. I have no idea what the perf requirements on this code are.
Attachment #712654 -
Flags: review?(peterv)
Comment 9•12 years ago
|
||
(In reply to Benoit Jacob [:bjacob] from comment #8)
> Created attachment 712654 [details] [diff] [review]
> assert even in non-DEBUG builds
>
> This implemented Kyle's suggestion in comment 3. I just only applied this to
> the first assertion here (which was hit above), not to the for loops below,
> so that we can at least land that without worrying about performance.
Is it impossible to make the first assertion static assert?
Assignee | ||
Comment 11•12 years ago
|
||
(In reply to Masatoshi Kimura [:emk] from comment #9)
> Is it impossible to make the first assertion static assert?
It is very much possible as it's comparing the size of a static array to an enum value; patch coming.
Assignee | ||
Comment 12•12 years ago
|
||
build fix landed without review:
https://hg.mozilla.org/integration/mozilla-inbound/rev/06090cb1dc1f
Assignee: nobody → bjacob
Target Milestone: --- → mozilla21
Assignee | ||
Updated•12 years ago
|
Attachment #712651 -
Flags: review?(peterv)
Assignee | ||
Comment 13•12 years ago
|
||
also some code simplification around there, removed a now-useless {...} scope, and use size_t instead of uint32_t for a generic array index variable.
Attachment #712654 -
Attachment is obsolete: true
Attachment #712654 -
Flags: review?(peterv)
Attachment #712897 -
Flags: review?(peterv)
Comment 14•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 15•12 years ago
|
||
Should have been tagged with [leave open]
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Whiteboard: [leave open]
Assignee | ||
Comment 16•12 years ago
|
||
As you wish, but FWIW I intentionally didn't --- the first patch here fixes the bug at hand, the second one is just a follow-up to make sure that this doesn't happen again.
Comment 17•12 years ago
|
||
Then I think the second patch should have been a separate bug.
Comment 19•12 years ago
|
||
We're running debug tests on the cedar branch and we noticed this assertion. The patch fixed it but now we just hit a new assertion:
F/MOZ_Assert( 642): Assertion failure: size_t(data) % sizeof(Value) == 0, at /builds/slave/ced-ics_a7_g-d-000000000000000/build/js/src/jsscript.cpp:1751
Could this be related? Or do you think this is a separate issue?
Full log: https://tbpl.mozilla.org/php/getParsedLog.php?id=19742043&tree=Cedar&full=1
Assignee | ||
Comment 20•12 years ago
|
||
This doesn't seem related, from just this log.
Updated•12 years ago
|
Attachment #712897 -
Flags: review?(peterv) → review+
Assignee | ||
Comment 21•12 years ago
|
||
Whiteboard: [leave open]
Comment 22•12 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•