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

Side by Side Diff: src/api.cc

Issue 21803002: Add size_t length argument to v8::ArrayBuffer::Allocator::Free. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Shared buold fixed Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « include/v8.h ('k') | src/d8.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3053 matching lines...) Expand 10 before | Expand all | Expand 10 after
3064 3064
3065 void v8::ArrayBuffer::CheckCast(Value* that) { 3065 void v8::ArrayBuffer::CheckCast(Value* that) {
3066 if (IsDeadCheck(i::Isolate::Current(), "v8::ArrayBuffer::Cast()")) return; 3066 if (IsDeadCheck(i::Isolate::Current(), "v8::ArrayBuffer::Cast()")) return;
3067 i::Handle<i::Object> obj = Utils::OpenHandle(that); 3067 i::Handle<i::Object> obj = Utils::OpenHandle(that);
3068 ApiCheck(obj->IsJSArrayBuffer(), 3068 ApiCheck(obj->IsJSArrayBuffer(),
3069 "v8::ArrayBuffer::Cast()", 3069 "v8::ArrayBuffer::Cast()",
3070 "Could not convert to ArrayBuffer"); 3070 "Could not convert to ArrayBuffer");
3071 } 3071 }
3072 3072
3073 3073
3074 void v8::ArrayBuffer::Allocator::Free(void* data) {
3075 API_Fatal("v8::ArrayBuffer::Allocator::Free",
3076 "Override Allocator::Free(void*, size_t)");
3077 }
3078
3079
3074 void v8::ArrayBufferView::CheckCast(Value* that) { 3080 void v8::ArrayBufferView::CheckCast(Value* that) {
3075 i::Handle<i::Object> obj = Utils::OpenHandle(that); 3081 i::Handle<i::Object> obj = Utils::OpenHandle(that);
3076 ApiCheck(obj->IsJSArrayBufferView(), 3082 ApiCheck(obj->IsJSArrayBufferView(),
3077 "v8::ArrayBufferView::Cast()", 3083 "v8::ArrayBufferView::Cast()",
3078 "Could not convert to ArrayBufferView"); 3084 "Could not convert to ArrayBufferView");
3079 } 3085 }
3080 3086
3081 3087
3082 void v8::TypedArray::CheckCast(Value* that) { 3088 void v8::TypedArray::CheckCast(Value* that) {
3083 if (IsDeadCheck(i::Isolate::Current(), "v8::TypedArray::Cast()")) return; 3089 if (IsDeadCheck(i::Isolate::Current(), "v8::TypedArray::Cast()")) return;
(...skipping 5034 matching lines...) Expand 10 before | Expand all | Expand 10 after
8118 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 8124 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
8119 Address callback_address = 8125 Address callback_address =
8120 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8126 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8121 VMState<EXTERNAL> state(isolate); 8127 VMState<EXTERNAL> state(isolate);
8122 ExternalCallbackScope call_scope(isolate, callback_address); 8128 ExternalCallbackScope call_scope(isolate, callback_address);
8123 return callback(info); 8129 return callback(info);
8124 } 8130 }
8125 8131
8126 8132
8127 } } // namespace v8::internal 8133 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698