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

Side by Side Diff: src/api.cc

Issue 13540003: Remove code duplication in JSObject::HasRealNamedProperty (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Pass Isolate through Created 7 years, 8 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/objects.h » ('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 3334 matching lines...) Expand 10 before | Expand all | Expand 10 after
3345 return Utils::OpenHandle(this)->HasLocalProperty( 3345 return Utils::OpenHandle(this)->HasLocalProperty(
3346 *Utils::OpenHandle(*key)); 3346 *Utils::OpenHandle(*key));
3347 } 3347 }
3348 3348
3349 3349
3350 bool v8::Object::HasRealNamedProperty(Handle<String> key) { 3350 bool v8::Object::HasRealNamedProperty(Handle<String> key) {
3351 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); 3351 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
3352 ON_BAILOUT(isolate, "v8::Object::HasRealNamedProperty()", 3352 ON_BAILOUT(isolate, "v8::Object::HasRealNamedProperty()",
3353 return false); 3353 return false);
3354 return Utils::OpenHandle(this)->HasRealNamedProperty( 3354 return Utils::OpenHandle(this)->HasRealNamedProperty(
3355 isolate,
3355 *Utils::OpenHandle(*key)); 3356 *Utils::OpenHandle(*key));
3356 } 3357 }
3357 3358
3358 3359
3359 bool v8::Object::HasRealIndexedProperty(uint32_t index) { 3360 bool v8::Object::HasRealIndexedProperty(uint32_t index) {
3360 ON_BAILOUT(Utils::OpenHandle(this)->GetIsolate(), 3361 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
3361 "v8::Object::HasRealIndexedProperty()", 3362 ON_BAILOUT(isolate, "v8::Object::HasRealIndexedProperty()",
3362 return false); 3363 return false);
3363 return Utils::OpenHandle(this)->HasRealElementProperty(index); 3364 return Utils::OpenHandle(this)->HasRealElementProperty(isolate, index);
3364 } 3365 }
3365 3366
3366 3367
3367 bool v8::Object::HasRealNamedCallbackProperty(Handle<String> key) { 3368 bool v8::Object::HasRealNamedCallbackProperty(Handle<String> key) {
3368 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); 3369 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
3369 ON_BAILOUT(isolate, 3370 ON_BAILOUT(isolate,
3370 "v8::Object::HasRealNamedCallbackProperty()", 3371 "v8::Object::HasRealNamedCallbackProperty()",
3371 return false); 3372 return false);
3372 ENTER_V8(isolate); 3373 ENTER_V8(isolate);
3373 return Utils::OpenHandle(this)->HasRealNamedCallbackProperty( 3374 return Utils::OpenHandle(this)->HasRealNamedCallbackProperty(
3375 isolate,
3374 *Utils::OpenHandle(*key)); 3376 *Utils::OpenHandle(*key));
3375 } 3377 }
3376 3378
3377 3379
3378 bool v8::Object::HasNamedLookupInterceptor() { 3380 bool v8::Object::HasNamedLookupInterceptor() {
3379 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); 3381 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
3380 ON_BAILOUT(isolate, "v8::Object::HasNamedLookupInterceptor()", 3382 ON_BAILOUT(isolate, "v8::Object::HasNamedLookupInterceptor()",
3381 return false); 3383 return false);
3382 return Utils::OpenHandle(this)->HasNamedInterceptor(); 3384 return Utils::OpenHandle(this)->HasNamedInterceptor();
3383 } 3385 }
(...skipping 3829 matching lines...) Expand 10 before | Expand all | Expand 10 after
7213 7215
7214 v->VisitPointers(blocks_.first(), first_block_limit_); 7216 v->VisitPointers(blocks_.first(), first_block_limit_);
7215 7217
7216 for (int i = 1; i < blocks_.length(); i++) { 7218 for (int i = 1; i < blocks_.length(); i++) {
7217 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); 7219 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]);
7218 } 7220 }
7219 } 7221 }
7220 7222
7221 7223
7222 } } // namespace v8::internal 7224 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698