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

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 47210e9334dfc11919cc6f91dbc233b93d299402..43ec37bfb7e40a579b217ebb91d4b5cd9924f759 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);
haraken 2014/09/05 16:41:39 Ditto. I guess associateWithWrapperInternal should
Yuki 2014/09/08 07:56:05 Done.
+}
+
+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