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

Side by Side Diff: src/api.cc

Issue 10911333: Merged r12495 into 3.12 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.12
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/version.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 3383 matching lines...) Expand 10 before | Expand all | Expand 10 after
3394 } 3394 }
3395 3395
3396 } // namespace 3396 } // namespace
3397 3397
3398 3398
3399 void v8::Object::SetIndexedPropertiesToPixelData(uint8_t* data, int length) { 3399 void v8::Object::SetIndexedPropertiesToPixelData(uint8_t* data, int length) {
3400 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); 3400 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
3401 ON_BAILOUT(isolate, "v8::SetElementsToPixelData()", return); 3401 ON_BAILOUT(isolate, "v8::SetElementsToPixelData()", return);
3402 ENTER_V8(isolate); 3402 ENTER_V8(isolate);
3403 i::HandleScope scope(isolate); 3403 i::HandleScope scope(isolate);
3404 if (!ApiCheck(length <= i::ExternalPixelArray::kMaxLength, 3404 if (!ApiCheck(length >= 0 && length <= i::ExternalPixelArray::kMaxLength,
3405 "v8::Object::SetIndexedPropertiesToPixelData()", 3405 "v8::Object::SetIndexedPropertiesToPixelData()",
3406 "length exceeds max acceptable value")) { 3406 "length exceeds max acceptable value")) {
3407 return; 3407 return;
3408 } 3408 }
3409 i::Handle<i::JSObject> self = Utils::OpenHandle(this); 3409 i::Handle<i::JSObject> self = Utils::OpenHandle(this);
3410 if (!ApiCheck(!self->IsJSArray(), 3410 if (!ApiCheck(!self->IsJSArray(),
3411 "v8::Object::SetIndexedPropertiesToPixelData()", 3411 "v8::Object::SetIndexedPropertiesToPixelData()",
3412 "JSArray is not supported")) { 3412 "JSArray is not supported")) {
3413 return; 3413 return;
3414 } 3414 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
3450 3450
3451 3451
3452 void v8::Object::SetIndexedPropertiesToExternalArrayData( 3452 void v8::Object::SetIndexedPropertiesToExternalArrayData(
3453 void* data, 3453 void* data,
3454 ExternalArrayType array_type, 3454 ExternalArrayType array_type,
3455 int length) { 3455 int length) {
3456 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); 3456 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
3457 ON_BAILOUT(isolate, "v8::SetIndexedPropertiesToExternalArrayData()", return); 3457 ON_BAILOUT(isolate, "v8::SetIndexedPropertiesToExternalArrayData()", return);
3458 ENTER_V8(isolate); 3458 ENTER_V8(isolate);
3459 i::HandleScope scope(isolate); 3459 i::HandleScope scope(isolate);
3460 if (!ApiCheck(length <= i::ExternalArray::kMaxLength, 3460 if (!ApiCheck(length >= 0 && length <= i::ExternalArray::kMaxLength,
3461 "v8::Object::SetIndexedPropertiesToExternalArrayData()", 3461 "v8::Object::SetIndexedPropertiesToExternalArrayData()",
3462 "length exceeds max acceptable value")) { 3462 "length exceeds max acceptable value")) {
3463 return; 3463 return;
3464 } 3464 }
3465 i::Handle<i::JSObject> self = Utils::OpenHandle(this); 3465 i::Handle<i::JSObject> self = Utils::OpenHandle(this);
3466 if (!ApiCheck(!self->IsJSArray(), 3466 if (!ApiCheck(!self->IsJSArray(),
3467 "v8::Object::SetIndexedPropertiesToExternalArrayData()", 3467 "v8::Object::SetIndexedPropertiesToExternalArrayData()",
3468 "JSArray is not supported")) { 3468 "JSArray is not supported")) {
3469 return; 3469 return;
3470 } 3470 }
(...skipping 3053 matching lines...) Expand 10 before | Expand all | Expand 10 after
6524 6524
6525 v->VisitPointers(blocks_.first(), first_block_limit_); 6525 v->VisitPointers(blocks_.first(), first_block_limit_);
6526 6526
6527 for (int i = 1; i < blocks_.length(); i++) { 6527 for (int i = 1; i < blocks_.length(); i++) {
6528 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); 6528 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]);
6529 } 6529 }
6530 } 6530 }
6531 6531
6532 6532
6533 } } // namespace v8::internal 6533 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698