| OLD | NEW |
| 1 // Copyright 2007-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2009 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 2925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2936 * continue the propagation of the termination exception if needed. | 2936 * continue the propagation of the termination exception if needed. |
| 2937 * | 2937 * |
| 2938 * The thread id passed to TerminateExecution must have been | 2938 * The thread id passed to TerminateExecution must have been |
| 2939 * obtained by calling GetCurrentThreadId on the thread in question. | 2939 * obtained by calling GetCurrentThreadId on the thread in question. |
| 2940 * | 2940 * |
| 2941 * \param thread_id The thread id of the thread to terminate. | 2941 * \param thread_id The thread id of the thread to terminate. |
| 2942 */ | 2942 */ |
| 2943 static void TerminateExecution(int thread_id); | 2943 static void TerminateExecution(int thread_id); |
| 2944 | 2944 |
| 2945 /** | 2945 /** |
| 2946 * Forcefully terminate the current thread of JavaScript execution. | 2946 * Forcefully terminate the current thread of JavaScript execution |
| 2947 * in the given isolate. If no isolate is provided, the default |
| 2948 * isolate is used. |
| 2947 * | 2949 * |
| 2948 * This method can be used by any thread even if that thread has not | 2950 * This method can be used by any thread even if that thread has not |
| 2949 * acquired the V8 lock with a Locker object. | 2951 * acquired the V8 lock with a Locker object. |
| 2952 * |
| 2953 * \param isolate The isolate in which to terminate the current JS execution. |
| 2950 */ | 2954 */ |
| 2951 static void TerminateExecution(); | 2955 static void TerminateExecution(Isolate* isolate = NULL); |
| 2952 | 2956 |
| 2953 /** | 2957 /** |
| 2954 * Is V8 terminating JavaScript execution. | 2958 * Is V8 terminating JavaScript execution. |
| 2955 * | 2959 * |
| 2956 * Returns true if JavaScript execution is currently terminating | 2960 * Returns true if JavaScript execution is currently terminating |
| 2957 * because of a call to TerminateExecution. In that case there are | 2961 * because of a call to TerminateExecution. In that case there are |
| 2958 * still JavaScript frames on the stack and the termination | 2962 * still JavaScript frames on the stack and the termination |
| 2959 * exception is still active. | 2963 * exception is still active. |
| 2960 */ | 2964 */ |
| 2961 static bool IsExecutionTerminating(); | 2965 static bool IsExecutionTerminating(); |
| (...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3966 | 3970 |
| 3967 | 3971 |
| 3968 } // namespace v8 | 3972 } // namespace v8 |
| 3969 | 3973 |
| 3970 | 3974 |
| 3971 #undef V8EXPORT | 3975 #undef V8EXPORT |
| 3972 #undef TYPE_CHECK | 3976 #undef TYPE_CHECK |
| 3973 | 3977 |
| 3974 | 3978 |
| 3975 #endif // V8_H_ | 3979 #endif // V8_H_ |
| OLD | NEW |