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 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 Object* fun_obj = AccessCheckInfo::cast(data_obj)->named_callback(); | 458 Object* fun_obj = AccessCheckInfo::cast(data_obj)->named_callback(); |
459 v8::NamedSecurityCallback callback = | 459 v8::NamedSecurityCallback callback = |
460 v8::ToCData<v8::NamedSecurityCallback>(fun_obj); | 460 v8::ToCData<v8::NamedSecurityCallback>(fun_obj); |
461 | 461 |
462 if (!callback) return false; | 462 if (!callback) return false; |
463 | 463 |
464 HandleScope scope(this); | 464 HandleScope scope(this); |
465 Handle<JSObject> receiver_handle(receiver, this); | 465 Handle<JSObject> receiver_handle(receiver, this); |
466 Handle<Object> key_handle(key, this); | 466 Handle<Object> key_handle(key, this); |
467 Handle<Object> data(AccessCheckInfo::cast(data_obj)->data(), this); | 467 Handle<Object> data(AccessCheckInfo::cast(data_obj)->data(), this); |
468 LOG(ApiNamedSecurityCheck(key)); | 468 LOG(this, ApiNamedSecurityCheck(key)); |
469 bool result = false; | 469 bool result = false; |
470 { | 470 { |
471 // Leaving JavaScript. | 471 // Leaving JavaScript. |
472 VMState state(this, EXTERNAL); | 472 VMState state(this, EXTERNAL); |
473 result = callback(v8::Utils::ToLocal(receiver_handle), | 473 result = callback(v8::Utils::ToLocal(receiver_handle), |
474 v8::Utils::ToLocal(key_handle), | 474 v8::Utils::ToLocal(key_handle), |
475 type, | 475 type, |
476 v8::Utils::ToLocal(data)); | 476 v8::Utils::ToLocal(data)); |
477 } | 477 } |
478 return result; | 478 return result; |
(...skipping 21 matching lines...) Expand all Loading... |
500 | 500 |
501 Object* fun_obj = AccessCheckInfo::cast(data_obj)->indexed_callback(); | 501 Object* fun_obj = AccessCheckInfo::cast(data_obj)->indexed_callback(); |
502 v8::IndexedSecurityCallback callback = | 502 v8::IndexedSecurityCallback callback = |
503 v8::ToCData<v8::IndexedSecurityCallback>(fun_obj); | 503 v8::ToCData<v8::IndexedSecurityCallback>(fun_obj); |
504 | 504 |
505 if (!callback) return false; | 505 if (!callback) return false; |
506 | 506 |
507 HandleScope scope(this); | 507 HandleScope scope(this); |
508 Handle<JSObject> receiver_handle(receiver, this); | 508 Handle<JSObject> receiver_handle(receiver, this); |
509 Handle<Object> data(AccessCheckInfo::cast(data_obj)->data(), this); | 509 Handle<Object> data(AccessCheckInfo::cast(data_obj)->data(), this); |
510 LOG(ApiIndexedSecurityCheck(index)); | 510 LOG(this, ApiIndexedSecurityCheck(index)); |
511 bool result = false; | 511 bool result = false; |
512 { | 512 { |
513 // Leaving JavaScript. | 513 // Leaving JavaScript. |
514 VMState state(this, EXTERNAL); | 514 VMState state(this, EXTERNAL); |
515 result = callback(v8::Utils::ToLocal(receiver_handle), | 515 result = callback(v8::Utils::ToLocal(receiver_handle), |
516 index, | 516 index, |
517 type, | 517 type, |
518 v8::Utils::ToLocal(data)); | 518 v8::Utils::ToLocal(data)); |
519 } | 519 } |
520 return result; | 520 return result; |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
976 thread_local_top()->simulator_ = Simulator::current(this); | 976 thread_local_top()->simulator_ = Simulator::current(this); |
977 #endif | 977 #endif |
978 #endif | 978 #endif |
979 if (RuntimeProfiler::IsEnabled() && current_vm_state() == JS) { | 979 if (RuntimeProfiler::IsEnabled() && current_vm_state() == JS) { |
980 RuntimeProfiler::IsolateEnteredJS(this); | 980 RuntimeProfiler::IsolateEnteredJS(this); |
981 } | 981 } |
982 return from + sizeof(ThreadLocalTop); | 982 return from + sizeof(ThreadLocalTop); |
983 } | 983 } |
984 | 984 |
985 } } // namespace v8::internal | 985 } } // namespace v8::internal |
OLD | NEW |