Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Side by Side Diff: src/platform-linux.cc

Issue 3121009: [Isolates] Fix Linux build in Isolates branch. (Closed)
Patch Set: Fixed the crash due to incorrect usage of API in test. Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/v8threads.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 // If there are multiple threads that use VM, they must have a thread id 741 // If there are multiple threads that use VM, they must have a thread id
742 // stored in TLS. To verify that the thread is really executing VM, 742 // stored in TLS. To verify that the thread is really executing VM,
743 // we check Top's data. Having that ThreadManager::RestoreThread first 743 // we check Top's data. Having that ThreadManager::RestoreThread first
744 // restores ThreadLocalTop from TLS, and only then erases the TLS value, 744 // restores ThreadLocalTop from TLS, and only then erases the TLS value,
745 // reading Isolate::thread_id() should not be affected by races. 745 // reading Isolate::thread_id() should not be affected by races.
746 746
747 Isolate* isolate = Isolate::UncheckedCurrent(); 747 Isolate* isolate = Isolate::UncheckedCurrent();
748 if (isolate == NULL) return false; 748 if (isolate == NULL) return false;
749 749
750 ThreadManager* thread_manager = isolate->thread_manager(); 750 ThreadManager* thread_manager = isolate->thread_manager();
751 if (thread_manager->HasId() && !thread_manager->IsArchived() && 751 if (!thread_manager->IsArchived() &&
752 thread_manager->CurrentId() == isolate->thread_id()) { 752 thread_manager->CurrentId() == isolate->thread_id()) {
753 return true; 753 return true;
754 } 754 }
755 return false; 755 return false;
756 } 756 }
757 757
758 758
759 static void ProfilerSignalHandler(int signal, siginfo_t* info, void* context) { 759 static void ProfilerSignalHandler(int signal, siginfo_t* info, void* context) {
760 #ifndef V8_HOST_ARCH_MIPS 760 #ifndef V8_HOST_ARCH_MIPS
761 USE(info); 761 USE(info);
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 871
872 // This sampler is no longer the active sampler. 872 // This sampler is no longer the active sampler.
873 active_sampler_ = NULL; 873 active_sampler_ = NULL;
874 active_ = false; 874 active_ = false;
875 } 875 }
876 876
877 877
878 #endif // ENABLE_LOGGING_AND_PROFILING 878 #endif // ENABLE_LOGGING_AND_PROFILING
879 879
880 } } // namespace v8::internal 880 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/v8threads.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698