| Index: src/api.cc
|
| ===================================================================
|
| --- src/api.cc (revision 2717)
|
| +++ src/api.cc (working copy)
|
| @@ -75,7 +75,7 @@
|
| i::V8::FatalProcessOutOfMemory(NULL); \
|
| } \
|
| bool call_depth_is_zero = thread_local.CallDepthIsZero(); \
|
| - i::Top::optional_reschedule_exception(call_depth_is_zero); \
|
| + i::Top::OptionalRescheduleException(call_depth_is_zero, false); \
|
| return value; \
|
| } \
|
| } while (false)
|
| @@ -1208,6 +1208,11 @@
|
| }
|
|
|
|
|
| +bool v8::TryCatch::CanContinue() const {
|
| + return can_continue_;
|
| +}
|
| +
|
| +
|
| v8::Local<Value> v8::TryCatch::Exception() const {
|
| if (HasCaught()) {
|
| // Check for out of memory exception.
|
| @@ -3354,6 +3359,34 @@
|
| return 0;
|
| }
|
|
|
| +
|
| +int V8::GetCurrentThreadId() {
|
| + API_ENTRY_CHECK("V8::GetCurrentThreadId()");
|
| + EnsureInitialized("V8::GetCurrentThreadId()");
|
| + return i::Top::thread_id();
|
| +}
|
| +
|
| +
|
| +void V8::TerminateExecution(int thread_id) {
|
| + if (!i::V8::IsRunning()) return;
|
| + API_ENTRY_CHECK("V8::GetCurrentThreadId()");
|
| + // If the thread_id identifies the current thread just terminate
|
| + // execution right away. Otherwise, ask the thread manager to
|
| + // terminate the thread with the given id if any.
|
| + if (thread_id == i::Top::thread_id()) {
|
| + i::StackGuard::TerminateExecution();
|
| + } else {
|
| + i::ThreadManager::TerminateExecution(thread_id);
|
| + }
|
| +}
|
| +
|
| +
|
| +void V8::TerminateExecution() {
|
| + if (!i::V8::IsRunning()) return;
|
| + i::StackGuard::TerminateExecution();
|
| +}
|
| +
|
| +
|
| String::Utf8Value::Utf8Value(v8::Handle<v8::Value> obj) {
|
| EnsureInitialized("v8::String::Utf8Value::Utf8Value()");
|
| if (obj.IsEmpty()) {
|
|
|