| 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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 213 }; | 213 }; | 
| 214 | 214 | 
| 215 // --- Handles --- | 215 // --- Handles --- | 
| 216 | 216 | 
| 217 #define TYPE_CHECK(T, S)                                       \ | 217 #define TYPE_CHECK(T, S)                                       \ | 
| 218   while (false) {                                              \ | 218   while (false) {                                              \ | 
| 219     *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \ | 219     *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \ | 
| 220   } | 220   } | 
| 221 | 221 | 
| 222 | 222 | 
| 223 #define V8_USE_UNSAFE_HANDLES |  | 
| 224 |  | 
| 225 /** | 223 /** | 
| 226  * An object reference managed by the v8 garbage collector. | 224  * An object reference managed by the v8 garbage collector. | 
| 227  * | 225  * | 
| 228  * All objects returned from v8 have to be tracked by the garbage | 226  * All objects returned from v8 have to be tracked by the garbage | 
| 229  * collector so that it knows that the objects are still alive.  Also, | 227  * collector so that it knows that the objects are still alive.  Also, | 
| 230  * because the garbage collector may move objects, it is unsafe to | 228  * because the garbage collector may move objects, it is unsafe to | 
| 231  * point directly to an object.  Instead, all objects are stored in | 229  * point directly to an object.  Instead, all objects are stored in | 
| 232  * handles which are known by the garbage collector and updated | 230  * handles which are known by the garbage collector and updated | 
| 233  * whenever an object moves.  Handles should always be passed by value | 231  * whenever an object moves.  Handles should always be passed by value | 
| 234  * (except in cases like out-parameters) and they should never be | 232  * (except in cases like out-parameters) and they should never be | 
| (...skipping 6132 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 6367 | 6365 | 
| 6368 | 6366 | 
| 6369 }  // namespace v8 | 6367 }  // namespace v8 | 
| 6370 | 6368 | 
| 6371 | 6369 | 
| 6372 #undef V8EXPORT | 6370 #undef V8EXPORT | 
| 6373 #undef TYPE_CHECK | 6371 #undef TYPE_CHECK | 
| 6374 | 6372 | 
| 6375 | 6373 | 
| 6376 #endif  // V8_H_ | 6374 #endif  // V8_H_ | 
| OLD | NEW | 
|---|