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

Unified Diff: Source/core/html/ImageData.cpp

Issue 542113003: bindings: Introduces ScriptWrappable::associateWithWrapper in addition to wrap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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: Source/core/html/ImageData.cpp
diff --git a/Source/core/html/ImageData.cpp b/Source/core/html/ImageData.cpp
index b20e61c12c519ae2f9972798914be2752f8a2549..025bb4da21240df33af4fd853b5a14b4bcba667b 100644
--- a/Source/core/html/ImageData.cpp
+++ b/Source/core/html/ImageData.cpp
@@ -128,6 +128,17 @@ PassRefPtrWillBeRawPtr<ImageData> ImageData::create(Uint8ClampedArray* data, uns
v8::Handle<v8::Object> ImageData::wrap(v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{
v8::Handle<v8::Object> wrapper = ScriptWrappable::wrap(creationContext, isolate);
+ return associateWithWrapperInternal(wrapper, creationContext, isolate);
+}
+
+v8::Handle<v8::Object> ImageData::associateWithWrapper(const WrapperTypeInfo* wrapperType, v8::Handle<v8::Object> wrapper, v8::Isolate* isolate)
+{
+ ScriptWrappable::associateWithWrapper(wrapperType, wrapper, isolate);
+ return associateWithWrapperInternal(wrapper, wrapper, isolate);
+}
+
+v8::Handle<v8::Object> ImageData::associateWithWrapperInternal(v8::Handle<v8::Object> wrapper, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
+{
if (!wrapper.IsEmpty()) {
// Create a V8 Uint8ClampedArray object.
v8::Handle<v8::Value> pixelArray = toV8(data(), creationContext, isolate);

Powered by Google App Engine
This is Rietveld 408576698