Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp

Issue 1928043002: Add drawImage() originClean() getSecurityOrigin() to OffscreenCanvas (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase master and Edited based on haraken's comment Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp
index ce69fab63ceb98622605f14ea5d44a4083d3852a..32dfe15b2f3687555507a319e16932c94a058b19 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp
@@ -2280,7 +2280,8 @@ bool ScriptValueDeserializer::tryGetTransferredSharedArrayBuffer(uint32_t index,
bool ScriptValueDeserializer::tryGetTransferredOffscreenCanvas(uint32_t index, uint32_t width, uint32_t height, uint32_t id, v8::Local<v8::Value>* object)
{
- OffscreenCanvas* offscreenCanvas = OffscreenCanvas::create(width, height);
+ ExecutionContext* executionContext = m_reader.getScriptState()->getExecutionContext();
+ OffscreenCanvas* offscreenCanvas = OffscreenCanvas::create(executionContext, width, height);
offscreenCanvas->setAssociatedCanvasId(id);
*object = toV8(offscreenCanvas, m_reader.getScriptState());
if ((*object).IsEmpty())

Powered by Google App Engine
This is Rietveld 408576698