| Index: third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
|
| diff --git a/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp b/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
|
| index 9edb535defc4a6739f1ea51fe171b6be192435b0..86a6c823694c740660f7502c252ddd10c768c8d3 100644
|
| --- a/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
|
| +++ b/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
|
| @@ -26,6 +26,7 @@ OffscreenCanvasRenderingContext2D::OffscreenCanvasRenderingContext2D(OffscreenCa
|
|
|
| DEFINE_TRACE(OffscreenCanvasRenderingContext2D)
|
| {
|
| + visitor->trace(m_executionContext);
|
| OffscreenCanvasRenderingContext::trace(visitor);
|
| BaseRenderingContext2D::trace(visitor);
|
| }
|
| @@ -87,6 +88,14 @@ RawPtr<ImageBitmap> OffscreenCanvasRenderingContext2D::transferToImageBitmap(Exc
|
|
|
| bool OffscreenCanvasRenderingContext2D::parseColorOrCurrentColor(Color& color, const String& colorString) const
|
| {
|
| + if (!m_executionContext)
|
| + const_cast<OffscreenCanvasRenderingContext2D*>(this)->m_executionContext = ScriptState::current(v8::Isolate::GetCurrent())->getExecutionContext();
|
| +
|
| + DCHECK(m_executionContext);
|
| + if (m_executionContext->isWorkerGlobalScope()) {
|
| + return ::blink::parseColorOrCurrentColor(color, colorString, nullptr, m_executionContext->localCssValuePool());
|
| + }
|
| +
|
| return ::blink::parseColorOrCurrentColor(color, colorString, nullptr);
|
| }
|
|
|
|
|