Commit cefc6555 authored by dslomov@chromium.org's avatar dslomov@chromium.org

Release buold fix

TBR=rossberg@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14092 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 944c577c
......@@ -883,13 +883,12 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_ArrayBufferSliceImpl) {
CONVERT_ARG_HANDLE_CHECKED(JSArrayBuffer, target, 1);
CONVERT_DOUBLE_ARG_CHECKED(first, 2);
size_t start = static_cast<size_t>(first);
size_t source_length = ArrayBufferAllocatedLength(isolate, *source);
size_t target_length = ArrayBufferAllocatedLength(isolate, *target);
if (target_length == 0)
return isolate->heap()->undefined_value();
ASSERT(source_length - target_length >= start);
ASSERT(ArrayBufferAllocatedLength(isolate, *source) - target_length >= start);
uint8_t* source_data = reinterpret_cast<uint8_t*>(source->backing_store());
uint8_t* target_data = reinterpret_cast<uint8_t*>(target->backing_store());
CopyBytes(target_data, source_data + start, target_length);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment