As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact
Last Comment Bug 637245 - "ASSERTION: Default canvas font is invalid" working with fonts on a canvas that has no presshell
: "ASSERTION: Default canvas font is invalid" working with fonts on a canvas th...
: assertion, testcase
Product: Core
Classification: Components
Component: Canvas: 2D (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla5
Assigned To: Mats Palmgren (:mats)
: Milan Sreckovic [:milan]
Depends on: 647480
Blocks: 326633 594645
  Show dependency treegraph
Reported: 2011-02-27 22:30 PST by Jesse Ruderman
Modified: 2011-05-15 17:17 PDT (History)
4 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

testcase (413 bytes, text/html)
2011-02-27 22:30 PST, Jesse Ruderman
no flags Details
stack trace (mac) (2.97 KB, text/plain)
2011-02-27 22:32 PST, Jesse Ruderman
no flags Details
wip1 (3.09 KB, patch)
2011-04-03 12:17 PDT, Mats Palmgren (:mats)
no flags Details | Diff | Splinter Review

Description User image Jesse Ruderman 2011-02-27 22:30:40 PST
Created attachment 515566 [details]

###!!! ASSERTION: Default canvas font is invalid: 'res == NS_OK', 
file content/canvas/src/nsCanvasRenderingContext2D.cpp, line 2885
Comment 1 User image Jesse Ruderman 2011-02-27 22:32:40 PST
Created attachment 515567 [details]
stack trace (mac)
Comment 2 User image Boris Zbarsky [:bz] (still a bit busy) 2011-02-28 08:45:15 PST
This has nothing to do with moving between frames.  This assert will fire any time you use a <canvas> that's inside a document with no presshell (as in this case).

I personally think the assert is bogus (and that the behavior is possibly semi-bogus too).
Comment 3 User image Mats Palmgren (:mats) 2011-04-03 06:51:55 PDT
Bug 647480 fixes this by muting the assert if there is no pres shell.
Comment 4 User image Jonathan Kew (:jfkthame) 2011-04-03 10:06:44 PDT
It doesn't seem right to simply mute the assert, if the real problem is that we don't know how to deal with the font of a canvas in this situation - shouldn't we be fixing _that_ issue?
Comment 5 User image Mats Palmgren (:mats) 2011-04-03 12:17:28 PDT
Created attachment 523905 [details] [diff] [review]

I guess we could try harder to create something, also in the
absence of a pres shell...  is that what you're suggesting?
Comment 6 User image Mats Palmgren (:mats) 2011-04-03 12:46:13 PDT
Comment on attachment 523905 [details] [diff] [review]

I merged this into the patch in bug 647480...
Comment 7 User image Jesse Ruderman 2011-05-15 17:17:39 PDT
Seems to have been fixed by the patch in bug 647480.

Note You need to log in before you can comment on or make changes to this bug.