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

Side by Side Diff: src/v8threads.cc

Issue 7586001: Fixed a known issue in D8 (read file), enabled D8 shared library build on Windows. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed the mess where d8 was getting the BUILDING_V8_SHARED compile flag. Created 9 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 | Annotate | Revision Log
« no previous file with comments | « src/d8.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2008 the V8 project authors. All rights reserved. 1 // Copyright 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 bool Locker::IsLocked(v8::Isolate* isolate) { 88 bool Locker::IsLocked(v8::Isolate* isolate) {
89 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); 89 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate);
90 if (internal_isolate == NULL) { 90 if (internal_isolate == NULL) {
91 internal_isolate = i::Isolate::GetDefaultIsolateForLocking(); 91 internal_isolate = i::Isolate::GetDefaultIsolateForLocking();
92 } 92 }
93 return internal_isolate->thread_manager()->IsLockedByCurrentThread(); 93 return internal_isolate->thread_manager()->IsLockedByCurrentThread();
94 } 94 }
95 95
96 96
97 bool Locker::IsActive() {
98 return active_;
99 }
100
101
97 Locker::~Locker() { 102 Locker::~Locker() {
98 ASSERT(isolate_->thread_manager()->IsLockedByCurrentThread()); 103 ASSERT(isolate_->thread_manager()->IsLockedByCurrentThread());
99 if (has_lock_) { 104 if (has_lock_) {
100 if (isolate_->IsDefaultIsolate()) { 105 if (isolate_->IsDefaultIsolate()) {
101 isolate_->Exit(); 106 isolate_->Exit();
102 } 107 }
103 if (top_level_) { 108 if (top_level_) {
104 isolate_->thread_manager()->FreeThreadResources(); 109 isolate_->thread_manager()->FreeThreadResources();
105 } else { 110 } else {
106 isolate_->thread_manager()->ArchiveThread(); 111 isolate_->thread_manager()->ArchiveThread();
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 // Acknowledge the preemption by the receiving thread. 461 // Acknowledge the preemption by the receiving thread.
457 void ContextSwitcher::PreemptionReceived() { 462 void ContextSwitcher::PreemptionReceived() {
458 ASSERT(Locker::IsLocked()); 463 ASSERT(Locker::IsLocked());
459 // There is currently no accounting being done for this. But could be in the 464 // There is currently no accounting being done for this. But could be in the
460 // future, which is why we leave this in. 465 // future, which is why we leave this in.
461 } 466 }
462 467
463 468
464 } // namespace internal 469 } // namespace internal
465 } // namespace v8 470 } // namespace v8
OLDNEW
« no previous file with comments | « src/d8.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698