| Index: Source/core/html/canvas/WebGLRenderingContext.cpp
|
| diff --git a/Source/core/html/canvas/WebGLRenderingContext.cpp b/Source/core/html/canvas/WebGLRenderingContext.cpp
|
| index 190ad7665c36387dcef80c6a83105d05ed2cca59..b0f5542b7474a719a86b938f0546fda843465889 100644
|
| --- a/Source/core/html/canvas/WebGLRenderingContext.cpp
|
| +++ b/Source/core/html/canvas/WebGLRenderingContext.cpp
|
| @@ -62,8 +62,10 @@ PassOwnPtr<WebGLRenderingContext> WebGLRenderingContext::create(HTMLCanvasElemen
|
| {
|
| Document& document = canvas->document();
|
| LocalFrame* frame = document.frame();
|
| - if (!frame)
|
| + if (!frame) {
|
| + canvas->dispatchEvent(WebGLContextEvent::create(EventTypeNames::webglcontextcreationerror, false, true, "Web page was not allowed to create a WebGL context."));
|
| return nullptr;
|
| + }
|
| Settings* settings = frame->settings();
|
|
|
| // The FrameLoaderClient might block creation of a new WebGL context despite the page settings; in
|
|
|