| OLD | NEW | 
|---|
| 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 7988 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 7999          (first_block_limit_ <= &(blocks_.first())[kHandleBlockSize])); | 7999          (first_block_limit_ <= &(blocks_.first())[kHandleBlockSize])); | 
| 8000 | 8000 | 
| 8001   v->VisitPointers(blocks_.first(), first_block_limit_); | 8001   v->VisitPointers(blocks_.first(), first_block_limit_); | 
| 8002 | 8002 | 
| 8003   for (int i = 1; i < blocks_.length(); i++) { | 8003   for (int i = 1; i < blocks_.length(); i++) { | 
| 8004     v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); | 8004     v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); | 
| 8005   } | 8005   } | 
| 8006 } | 8006 } | 
| 8007 | 8007 | 
| 8008 | 8008 | 
|  | 8009 v8::Handle<v8::Value> InvokeAccessorGetter( | 
|  | 8010     v8::Local<v8::String> property, | 
|  | 8011     const v8::AccessorInfo& info, | 
|  | 8012     v8::AccessorGetter getter) { | 
|  | 8013   Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 
|  | 8014   Address getter_address = reinterpret_cast<Address>(reinterpret_cast<intptr_t>( | 
|  | 8015       getter)); | 
|  | 8016   // Leaving JavaScript. | 
|  | 8017   VMState<EXTERNAL> state(isolate); | 
|  | 8018   ExternalCallbackScope call_scope(isolate, getter_address); | 
|  | 8019   return getter(property, info); | 
|  | 8020 } | 
|  | 8021 | 
|  | 8022 | 
|  | 8023 void InvokeAccessorGetterCallback( | 
|  | 8024     v8::Local<v8::String> property, | 
|  | 8025     const v8::PropertyCallbackInfo<v8::Value>& info, | 
|  | 8026     v8::AccessorGetterCallback getter) { | 
|  | 8027   // Leaving JavaScript. | 
|  | 8028   Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 
|  | 8029   Address getter_address = reinterpret_cast<Address>(reinterpret_cast<intptr_t>( | 
|  | 8030       getter)); | 
|  | 8031   VMState<EXTERNAL> state(isolate); | 
|  | 8032   ExternalCallbackScope call_scope(isolate, getter_address); | 
|  | 8033   return getter(property, info); | 
|  | 8034 } | 
|  | 8035 | 
|  | 8036 | 
|  | 8037 v8::Handle<v8::Value> InvokeInvocationCallback( | 
|  | 8038     const v8::Arguments& args, | 
|  | 8039     v8::InvocationCallback callback) { | 
|  | 8040   Isolate* isolate = reinterpret_cast<Isolate*>(args.GetIsolate()); | 
|  | 8041   Address callback_address = | 
|  | 8042       reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 
|  | 8043   VMState<EXTERNAL> state(isolate); | 
|  | 8044   ExternalCallbackScope call_scope(isolate, callback_address); | 
|  | 8045   return callback(args); | 
|  | 8046 } | 
|  | 8047 | 
|  | 8048 | 
|  | 8049 void InvokeFunctionCallback(const v8::FunctionCallbackInfo<v8::Value>& info, | 
|  | 8050                             v8::FunctionCallback callback) { | 
|  | 8051   Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 
|  | 8052   Address callback_address = | 
|  | 8053       reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 
|  | 8054   VMState<EXTERNAL> state(isolate); | 
|  | 8055   ExternalCallbackScope call_scope(isolate, callback_address); | 
|  | 8056   return callback(info); | 
|  | 8057 } | 
|  | 8058 | 
|  | 8059 | 
| 8009 } }  // namespace v8::internal | 8060 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|