Closed Bug 615994 Opened 9 years ago Closed 9 years ago

CanvasRenderingContextWebGL classinfo should avoid name check

Categories

(Core :: Canvas: WebGL, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: jdm, Assigned: vlad)

References

Details

Attachments

(1 file, 2 obsolete files)

From bug 615800, this assertion popped up in the log:

###!!! ASSERTION: Class name and proto chain interface name mismatch!:
'nsCRT::strcmp(CutPrefix(name), mData->mName) == 0', file
/builds/slave/mozilla-central-macosx64-debug/build/dom/base/nsDOMClassInfo.cpp,
line 4688

because of this:

>  DOM_CLASSINFO_MAP_BEGIN(CanvasRenderingContextWebGL, nsIDOMWebGLRenderingContext)
>    DOM_CLASSINFO_MAP_ENTRY(nsIDOMWebGLRenderingContext)
>  DOM_CLASSINFO_MAP_END

There's a check that "CanvasRenderingContextWebGL" == "nsIDOMWebGLRenderingContext"[3:], which is obviously incorrect.  The attached patch quiets the assertion.
Attached patch Quiet classinfo name assertion. (obsolete) — Splinter Review
Attachment #494515 - Attachment is obsolete: true
Attached patch Quiet classinfo name assertion. (obsolete) — Splinter Review
Attachment #494516 - Flags: review?(bjacob)
Comment on attachment 494516 [details] [diff] [review]
Quiet classinfo name assertion.

Letting Vlad review this.
Attachment #494516 - Flags: review?(bjacob) → review?(vladimir)
Comment on attachment 494516 [details] [diff] [review]
Quiet classinfo name assertion.

mm, I'm a little confused -- what about the CLASSINFO_MAP_BEGIN just before that does:

   DOM_CLASSINFO_MAP_BEGIN(ChromeWorker, nsIWorker)

Wouldn't that also be triggering an assertion?  I renamed the interface for this a little while ago, it's entirely possible that I missed some renaming?
I suspect you are correct; it would trigger an assertion.
Fix -- the classinfo object was misnamed.
Assignee: nobody → vladimir
Attachment #494516 - Attachment is obsolete: true
Attachment #495764 - Flags: review?(bzbarsky)
Attachment #494516 - Flags: review?(vladimir)
Comment on attachment 495764 [details] [diff] [review]
fix dom classinfo name

r=me
Attachment #495764 - Flags: review?(bzbarsky) → review+
http://hg.mozilla.org/mozilla-central/rev/87b5643a2689
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Depends on: 621809
You need to log in before you can comment on or make changes to this bug.