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

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

Issue 567063003: bindings: Fixes custom versions of associateWithWrapper. (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
« no previous file with comments | « Source/core/html/ImageData.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/ImageData.cpp
diff --git a/Source/core/html/ImageData.cpp b/Source/core/html/ImageData.cpp
index 025bb4da21240df33af4fd853b5a14b4bcba667b..ceb057ab876f1a34c6ffaa304a353a7cbb28f717 100644
--- a/Source/core/html/ImageData.cpp
+++ b/Source/core/html/ImageData.cpp
@@ -125,23 +125,13 @@ PassRefPtrWillBeRawPtr<ImageData> ImageData::create(Uint8ClampedArray* data, uns
return adoptRefWillBeNoop(new ImageData(IntSize(width, height), data));
}
-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);
+ v8::Handle<v8::Value> pixelArray = toV8(data(), wrapper, isolate);
// Set the "data" property of the ImageData object to
// the created v8 object, eliminating the C++ callback
// when accessing the "data" property.
@@ -164,4 +154,4 @@ ImageData::ImageData(const IntSize& size, PassRefPtr<Uint8ClampedArray> byteArra
ASSERT_WITH_SECURITY_IMPLICATION(static_cast<unsigned>(size.width() * size.height() * 4) <= m_data->length());
}
-}
+} // namespace blink
« no previous file with comments | « Source/core/html/ImageData.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698