| Index: third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp
|
| diff --git a/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp b/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp
|
| index 4c30861ef7c573338193634985326ede43e9da06..29baee4a7f7ad88d864b5d997bfea841915e91e3 100644
|
| --- a/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp
|
| +++ b/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp
|
| @@ -37,6 +37,13 @@ void HTMLCanvasElementModule::getContext(
|
| OffscreenCanvas* HTMLCanvasElementModule::transferControlToOffscreen(
|
| HTMLCanvasElement& canvas,
|
| ExceptionState& exceptionState) {
|
| + if (canvas.surfaceLayerBridge()) {
|
| + exceptionState.throwDOMException(
|
| + InvalidStateError,
|
| + "Cannot transfer control from a canvas for more than one time.");
|
| + return nullptr;
|
| + }
|
| +
|
| if (!canvas.createSurfaceLayer()) {
|
| exceptionState.throwDOMException(
|
| V8Error,
|
|
|