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

Unified Diff: Source/WebCore/bindings/v8/custom/V8ArrayBufferViewCustom.h

Issue 9186030: Merge 104736 - [v8] Int16Array.set(array, offset) fails on first execution (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 8 years, 11 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/WebCore/bindings/v8/custom/V8ArrayBufferViewCustom.h
===================================================================
--- Source/WebCore/bindings/v8/custom/V8ArrayBufferViewCustom.h (revision 104771)
+++ Source/WebCore/bindings/v8/custom/V8ArrayBufferViewCustom.h (working copy)
@@ -51,7 +51,7 @@
// Copy the elements from the source array to the typed destination array by
// invoking the 'set' method of the destination array in JS.
-void copyElements(v8::Handle<v8::Object> destArray, v8::Handle<v8::Object> srcArray);
+void copyElements(v8::Handle<v8::Object> destArray, v8::Handle<v8::Object> srcArray, uint32_t offset);
// Template function used by the ArrayBufferView*Constructor callbacks.
@@ -171,7 +171,7 @@
args.Holder()->SetIndexedPropertiesToExternalArrayData(array.get()->baseAddress(), arrayType, array.get()->length());
if (!srcArray.IsEmpty())
- copyElements(args.Holder(), srcArray);
+ copyElements(args.Holder(), srcArray, 0);
return toV8(array.release(), args.Holder(), MarkIndependent);
}
@@ -212,7 +212,7 @@
else {
if (!fastSetInstalled(args.Holder())) {
installFastSet(args.Holder());
- copyElements(args.Holder(), array);
+ copyElements(args.Holder(), array, offset);
} else {
for (uint32_t i = 0; i < length; i++)
impl->set(offset + i, array->Get(i)->NumberValue());

Powered by Google App Engine
This is Rietveld 408576698