| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1229 */ | 1229 */ |
| 1230 V8EXPORT bool MakeExternal(ExternalStringResource* resource); | 1230 V8EXPORT bool MakeExternal(ExternalStringResource* resource); |
| 1231 | 1231 |
| 1232 /** | 1232 /** |
| 1233 * Creates a new external string using the ASCII data defined in the given | 1233 * Creates a new external string using the ASCII data defined in the given |
| 1234 * resource. When the external string is no longer live on V8's heap the | 1234 * resource. When the external string is no longer live on V8's heap the |
| 1235 * resource will be disposed by calling its Dispose method. The caller of | 1235 * resource will be disposed by calling its Dispose method. The caller of |
| 1236 * this function should not otherwise delete or modify the resource. Neither | 1236 * this function should not otherwise delete or modify the resource. Neither |
| 1237 * should the underlying buffer be deallocated or modified except through the | 1237 * should the underlying buffer be deallocated or modified except through the |
| 1238 * destructor of the external string resource. | 1238 * destructor of the external string resource. |
| 1239 */ | 1239 */ V8EXPORT static Local<String> NewExternal( |
| 1240 V8EXPORT static Local<String> NewExternal( | |
| 1241 ExternalAsciiStringResource* resource); | 1240 ExternalAsciiStringResource* resource); |
| 1242 | 1241 |
| 1243 /** | 1242 /** |
| 1244 * Associate an external string resource with this string by transforming it | 1243 * Associate an external string resource with this string by transforming it |
| 1245 * in place so that existing references to this string in the JavaScript heap | 1244 * in place so that existing references to this string in the JavaScript heap |
| 1246 * will use the external string resource. The external string resource's | 1245 * will use the external string resource. The external string resource's |
| 1247 * character contents need to be equivalent to this string. | 1246 * character contents need to be equivalent to this string. |
| 1248 * Returns true if the string has been changed to be an external string. | 1247 * Returns true if the string has been changed to be an external string. |
| 1249 * The string is not modified if the operation fails. See NewExternal for | 1248 * The string is not modified if the operation fails. See NewExternal for |
| 1250 * information on the lifetime of the resource. | 1249 * information on the lifetime of the resource. |
| (...skipping 1895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3146 * when to perform global garbage collections. Registering | 3145 * when to perform global garbage collections. Registering |
| 3147 * externally allocated memory will trigger global garbage | 3146 * externally allocated memory will trigger global garbage |
| 3148 * collections more often than otherwise in an attempt to garbage | 3147 * collections more often than otherwise in an attempt to garbage |
| 3149 * collect the JavaScript objects keeping the externally allocated | 3148 * collect the JavaScript objects keeping the externally allocated |
| 3150 * memory alive. | 3149 * memory alive. |
| 3151 * | 3150 * |
| 3152 * \param change_in_bytes the change in externally allocated memory | 3151 * \param change_in_bytes the change in externally allocated memory |
| 3153 * that is kept alive by JavaScript objects. | 3152 * that is kept alive by JavaScript objects. |
| 3154 * \returns the adjusted value. | 3153 * \returns the adjusted value. |
| 3155 */ | 3154 */ |
| 3156 static int AdjustAmountOfExternalAllocatedMemory(int change_in_bytes); | 3155 static intptr_t AdjustAmountOfExternalAllocatedMemory( |
| 3156 intptr_t change_in_bytes); |
| 3157 | 3157 |
| 3158 /** | 3158 /** |
| 3159 * Suspends recording of tick samples in the profiler. | 3159 * Suspends recording of tick samples in the profiler. |
| 3160 * When the V8 profiling mode is enabled (usually via command line | 3160 * When the V8 profiling mode is enabled (usually via command line |
| 3161 * switches) this function suspends recording of tick samples. | 3161 * switches) this function suspends recording of tick samples. |
| 3162 * Profiling ticks are discarded until ResumeProfiler() is called. | 3162 * Profiling ticks are discarded until ResumeProfiler() is called. |
| 3163 * | 3163 * |
| 3164 * See also the --prof and --prof_auto command line switches to | 3164 * See also the --prof and --prof_auto command line switches to |
| 3165 * enable V8 profiling. | 3165 * enable V8 profiling. |
| 3166 */ | 3166 */ |
| (...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4311 | 4311 |
| 4312 | 4312 |
| 4313 } // namespace v8 | 4313 } // namespace v8 |
| 4314 | 4314 |
| 4315 | 4315 |
| 4316 #undef V8EXPORT | 4316 #undef V8EXPORT |
| 4317 #undef TYPE_CHECK | 4317 #undef TYPE_CHECK |
| 4318 | 4318 |
| 4319 | 4319 |
| 4320 #endif // V8_H_ | 4320 #endif // V8_H_ |
| OLD | NEW |