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 6717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6728 | 6728 |
6729 | 6729 |
6730 void V8::RemoveCallCompletedCallback(CallCompletedCallback callback) { | 6730 void V8::RemoveCallCompletedCallback(CallCompletedCallback callback) { |
6731 i::Isolate::EnsureDefaultIsolate(); | 6731 i::Isolate::EnsureDefaultIsolate(); |
6732 i::Isolate* isolate = i::Isolate::Current(); | 6732 i::Isolate* isolate = i::Isolate::Current(); |
6733 if (IsDeadCheck(isolate, "v8::V8::RemoveLeaveScriptCallback()")) return; | 6733 if (IsDeadCheck(isolate, "v8::V8::RemoveLeaveScriptCallback()")) return; |
6734 i::V8::RemoveCallCompletedCallback(callback); | 6734 i::V8::RemoveCallCompletedCallback(callback); |
6735 } | 6735 } |
6736 | 6736 |
6737 | 6737 |
6738 void V8::PauseProfiler() { | |
6739 i::Isolate* isolate = i::Isolate::Current(); | |
6740 isolate->logger()->PauseProfiler(); | |
6741 } | |
6742 | |
6743 | |
6744 void V8::ResumeProfiler() { | |
6745 i::Isolate* isolate = i::Isolate::Current(); | |
6746 isolate->logger()->ResumeProfiler(); | |
6747 } | |
6748 | |
6749 | |
6750 bool V8::IsProfilerPaused() { | |
6751 i::Isolate* isolate = i::Isolate::Current(); | |
6752 return isolate->logger()->IsProfilerPaused(); | |
6753 } | |
6754 | |
6755 | |
6756 int V8::GetCurrentThreadId() { | 6738 int V8::GetCurrentThreadId() { |
6757 i::Isolate* isolate = i::Isolate::Current(); | 6739 i::Isolate* isolate = i::Isolate::Current(); |
6758 EnsureInitializedForIsolate(isolate, "V8::GetCurrentThreadId()"); | 6740 EnsureInitializedForIsolate(isolate, "V8::GetCurrentThreadId()"); |
6759 return isolate->thread_id().ToInteger(); | 6741 return isolate->thread_id().ToInteger(); |
6760 } | 6742 } |
6761 | 6743 |
6762 | 6744 |
6763 void V8::TerminateExecution(int thread_id) { | 6745 void V8::TerminateExecution(int thread_id) { |
6764 i::Isolate* isolate = i::Isolate::Current(); | 6746 i::Isolate* isolate = i::Isolate::Current(); |
6765 if (!isolate->IsInitialized()) return; | 6747 if (!isolate->IsInitialized()) return; |
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7864 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7846 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
7865 Address callback_address = | 7847 Address callback_address = |
7866 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7848 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
7867 VMState<EXTERNAL> state(isolate); | 7849 VMState<EXTERNAL> state(isolate); |
7868 ExternalCallbackScope call_scope(isolate, callback_address); | 7850 ExternalCallbackScope call_scope(isolate, callback_address); |
7869 return callback(info); | 7851 return callback(info); |
7870 } | 7852 } |
7871 | 7853 |
7872 | 7854 |
7873 } } // namespace v8::internal | 7855 } } // namespace v8::internal |
OLD | NEW |