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

Unified Diff: third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp

Issue 2707243006: [SharedArrayBuffer] Prevent SharedArrayBuffer being used in Web APIs (Closed)
Patch Set: update comment, add TODO Created 3 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/modules/canvas2d/BaseRenderingContext2D.cpp
diff --git a/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp b/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp
index 9653160eccf6da95850252b47b4b17683b287e83..ccc37beb6c94aff6a8f6b76a39693d9444826d36 100644
--- a/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp
+++ b/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp
@@ -9,6 +9,7 @@
#include "bindings/core/v8/ScriptState.h"
#include "core/css/cssom/CSSURLImageValue.h"
#include "core/css/parser/CSSParser.h"
+#include "core/dom/NotShared.h"
#include "core/frame/ImageBitmap.h"
#include "core/html/HTMLCanvasElement.h"
#include "core/html/HTMLImageElement.h"
@@ -1612,9 +1613,10 @@ ImageData* BaseRenderingContext2D::getImageData(
NeedsFinalizeFrame();
DOMArrayBuffer* array_buffer = DOMArrayBuffer::Create(contents);
- return ImageData::Create(image_data_rect.size(),
- DOMUint8ClampedArray::Create(
- array_buffer, 0, array_buffer->ByteLength()));
+ return ImageData::Create(
+ image_data_rect.size(),
+ NotShared<DOMUint8ClampedArray>(DOMUint8ClampedArray::Create(
+ array_buffer, 0, array_buffer->ByteLength())));
}
void BaseRenderingContext2D::putImageData(ImageData* data,
« no previous file with comments | « third_party/WebKit/Source/modules/beacon/NavigatorBeacon.cpp ('k') | third_party/WebKit/Source/modules/crypto/Crypto.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698