| OLD | NEW | 
|---|
| 1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 50     ASSERT(length > 0); | 50     ASSERT(length > 0); | 
| 51     ObjectGroup* group = reinterpret_cast<ObjectGroup*>( | 51     ObjectGroup* group = reinterpret_cast<ObjectGroup*>( | 
| 52         malloc(OFFSET_OF(ObjectGroup, objects_[length]))); | 52         malloc(OFFSET_OF(ObjectGroup, objects_[length]))); | 
| 53     group->length_ = length; | 53     group->length_ = length; | 
| 54     group->info_ = info; | 54     group->info_ = info; | 
| 55     CopyWords(group->objects_, handles, static_cast<int>(length)); | 55     CopyWords(group->objects_, handles, static_cast<int>(length)); | 
| 56     return group; | 56     return group; | 
| 57   } | 57   } | 
| 58 | 58 | 
| 59   void Dispose() { | 59   void Dispose() { | 
|  | 60     if (info_ != NULL) info_->Dispose(); | 
| 60     free(this); | 61     free(this); | 
| 61   } | 62   } | 
| 62 | 63 | 
| 63   size_t length_; | 64   size_t length_; | 
| 64   v8::RetainedObjectInfo* info_; | 65   v8::RetainedObjectInfo* info_; | 
| 65   Object** objects_[1];  // Variable sized array. | 66   Object** objects_[1];  // Variable sized array. | 
| 66 | 67 | 
| 67  private: | 68  private: | 
| 68   void* operator new(size_t size); | 69   void* operator new(size_t size); | 
| 69   void operator delete(void* p); | 70   void operator delete(void* p); | 
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 259 | 260 | 
| 260   friend class Isolate; | 261   friend class Isolate; | 
| 261 | 262 | 
| 262   DISALLOW_COPY_AND_ASSIGN(GlobalHandles); | 263   DISALLOW_COPY_AND_ASSIGN(GlobalHandles); | 
| 263 }; | 264 }; | 
| 264 | 265 | 
| 265 | 266 | 
| 266 } }  // namespace v8::internal | 267 } }  // namespace v8::internal | 
| 267 | 268 | 
| 268 #endif  // V8_GLOBAL_HANDLES_H_ | 269 #endif  // V8_GLOBAL_HANDLES_H_ | 
| OLD | NEW | 
|---|