OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 Object* fun_obj = AccessCheckInfo::cast(data_obj)->named_callback(); | 451 Object* fun_obj = AccessCheckInfo::cast(data_obj)->named_callback(); |
452 v8::NamedSecurityCallback callback = | 452 v8::NamedSecurityCallback callback = |
453 v8::ToCData<v8::NamedSecurityCallback>(fun_obj); | 453 v8::ToCData<v8::NamedSecurityCallback>(fun_obj); |
454 | 454 |
455 if (!callback) return false; | 455 if (!callback) return false; |
456 | 456 |
457 HandleScope scope(this); | 457 HandleScope scope(this); |
458 Handle<JSObject> receiver_handle(receiver, this); | 458 Handle<JSObject> receiver_handle(receiver, this); |
459 Handle<Object> key_handle(key, this); | 459 Handle<Object> key_handle(key, this); |
460 Handle<Object> data(AccessCheckInfo::cast(data_obj)->data(), this); | 460 Handle<Object> data(AccessCheckInfo::cast(data_obj)->data(), this); |
461 LOG(ApiNamedSecurityCheck(key)); | 461 LOG(this,ApiNamedSecurityCheck(key)); |
462 bool result = false; | 462 bool result = false; |
463 { | 463 { |
464 // Leaving JavaScript. | 464 // Leaving JavaScript. |
465 VMState state(this, EXTERNAL); | 465 VMState state(this, EXTERNAL); |
466 result = callback(v8::Utils::ToLocal(receiver_handle), | 466 result = callback(v8::Utils::ToLocal(receiver_handle), |
467 v8::Utils::ToLocal(key_handle), | 467 v8::Utils::ToLocal(key_handle), |
468 type, | 468 type, |
469 v8::Utils::ToLocal(data)); | 469 v8::Utils::ToLocal(data)); |
470 } | 470 } |
471 return result; | 471 return result; |
(...skipping 21 matching lines...) Expand all Loading... |
493 | 493 |
494 Object* fun_obj = AccessCheckInfo::cast(data_obj)->indexed_callback(); | 494 Object* fun_obj = AccessCheckInfo::cast(data_obj)->indexed_callback(); |
495 v8::IndexedSecurityCallback callback = | 495 v8::IndexedSecurityCallback callback = |
496 v8::ToCData<v8::IndexedSecurityCallback>(fun_obj); | 496 v8::ToCData<v8::IndexedSecurityCallback>(fun_obj); |
497 | 497 |
498 if (!callback) return false; | 498 if (!callback) return false; |
499 | 499 |
500 HandleScope scope(this); | 500 HandleScope scope(this); |
501 Handle<JSObject> receiver_handle(receiver, this); | 501 Handle<JSObject> receiver_handle(receiver, this); |
502 Handle<Object> data(AccessCheckInfo::cast(data_obj)->data(), this); | 502 Handle<Object> data(AccessCheckInfo::cast(data_obj)->data(), this); |
503 LOG(ApiIndexedSecurityCheck(index)); | 503 LOG(this,ApiIndexedSecurityCheck(index)); |
504 bool result = false; | 504 bool result = false; |
505 { | 505 { |
506 // Leaving JavaScript. | 506 // Leaving JavaScript. |
507 VMState state(this, EXTERNAL); | 507 VMState state(this, EXTERNAL); |
508 result = callback(v8::Utils::ToLocal(receiver_handle), | 508 result = callback(v8::Utils::ToLocal(receiver_handle), |
509 index, | 509 index, |
510 type, | 510 type, |
511 v8::Utils::ToLocal(data)); | 511 v8::Utils::ToLocal(data)); |
512 } | 512 } |
513 return result; | 513 return result; |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
969 thread_local_top()->simulator_ = Simulator::current(this); | 969 thread_local_top()->simulator_ = Simulator::current(this); |
970 #endif | 970 #endif |
971 #endif | 971 #endif |
972 if (RuntimeProfiler::IsEnabled() && current_vm_state() == JS) { | 972 if (RuntimeProfiler::IsEnabled() && current_vm_state() == JS) { |
973 RuntimeProfiler::IsolateEnteredJS(this); | 973 RuntimeProfiler::IsolateEnteredJS(this); |
974 } | 974 } |
975 return from + sizeof(ThreadLocalTop); | 975 return from + sizeof(ThreadLocalTop); |
976 } | 976 } |
977 | 977 |
978 } } // namespace v8::internal | 978 } } // namespace v8::internal |
OLD | NEW |