| Index: third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.cpp
|
| diff --git a/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.cpp b/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.cpp
|
| index 435ba369368b3d0818c20fdaa42659c5d45bef5d..0aedca56e420feed6780983a749a355e6a8f3cd2 100644
|
| --- a/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.cpp
|
| +++ b/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.cpp
|
| @@ -35,21 +35,8 @@
|
| m_size.setHeight(clampTo<int>(height));
|
| }
|
|
|
| -void OffscreenCanvas::setNeutered()
|
| +OffscreenCanvasRenderingContext2D* OffscreenCanvas::getContext(const String& id, const CanvasContextCreationAttributes& attributes)
|
| {
|
| - ASSERT(!m_context);
|
| - m_isNeutered = true;
|
| - m_size.setWidth(0);
|
| - m_size.setHeight(0);
|
| -}
|
| -
|
| -OffscreenCanvasRenderingContext2D* OffscreenCanvas::getContext(const String& id, const CanvasContextCreationAttributes& attributes, ExceptionState& exceptionState)
|
| -{
|
| - if (m_isNeutered) {
|
| - exceptionState.throwDOMException(InvalidStateError, "Cannot get context of a neutered OffscreenCanvas");
|
| - return nullptr;
|
| - }
|
| -
|
| OffscreenCanvasRenderingContext::ContextType contextType = OffscreenCanvasRenderingContext::contextTypeFromId(id);
|
|
|
| // Unknown type.
|
| @@ -77,10 +64,6 @@
|
|
|
| ImageBitmap* OffscreenCanvas::transferToImageBitmap(ExceptionState& exceptionState)
|
| {
|
| - if (m_isNeutered) {
|
| - exceptionState.throwDOMException(InvalidStateError, "Cannot transfer an ImageBitmap from a neutered OffscreenCanvas");
|
| - return nullptr;
|
| - }
|
| if (!m_context) {
|
| exceptionState.throwDOMException(InvalidStateError, "Cannot transfer an ImageBitmap from an OffscreenCanvas with no context");
|
| return nullptr;
|
| @@ -95,7 +78,6 @@
|
|
|
| OffscreenCanvasRenderingContext2D* OffscreenCanvas::renderingContext() const
|
| {
|
| - ASSERT(!m_isNeutered);
|
| // TODO: When there're more than one context type implemented in the future,
|
| // the return type here should be changed to base class of all Offscreen
|
| // context types.
|
| @@ -125,6 +107,7 @@
|
| DEFINE_TRACE(OffscreenCanvas)
|
| {
|
| visitor->trace(m_context);
|
| + visitor->trace(m_canvas);
|
| }
|
|
|
| } // namespace blink
|
|
|