Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE)

前端 未结 1 1685
野的像风
野的像风 2020-12-16 17:42

My problem :

uncaught exception: [Exception... \"Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDOMCanvasRenderingContext2D.drawIma         


        
相关标签:
1条回答
  • 2020-12-16 18:12

    You get this kind of unhelpful error message from Firefox when a DOM API call throws a Javascript exception that isn't caught. The code implementing drawImage -- http://mxr.mozilla.org/mozilla-central/source/content/canvas/src/nsCanvasRenderingContext2D.cpp#3212 -- appears to return the error code NS_ERROR_NOT_AVAILABLE (which is translated to a JS exception at the C++/JS boundary) when, for some reason, all of the data it needs to draw the image is not currently available. It appears that this can happen even when the image is considered to be fully loaded; I am not familiar enough with this part of the code to know why that might be.

    It is my opinion as an occasional Firefox internals hacker that you have found a bug in the browser: the specification for drawImage does not license the production of an exception with this error code under any circumstances. (Note the comment on line 3243, which seems to have misunderstood what the spec says.) Please construct a complete, self-contained test case that demonstrates the problem, and I will then be happy to help you file a bug report.

    0 讨论(0)
提交回复
热议问题