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

Side by Side Diff: src/isolate.cc

Issue 1467973002: Inline Isolate::UncheckedCurrent into isolate.cc (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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 | « src/isolate.h ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/isolate.h" 5 #include "src/isolate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <fstream> // NOLINT(readability/streams) 9 #include <fstream> // NOLINT(readability/streams)
10 #include <sstream> 10 #include <sstream>
(...skipping 1829 matching lines...) Expand 10 before | Expand all | Expand 10 after
1840 1840
1841 1841
1842 void Isolate::TearDown() { 1842 void Isolate::TearDown() {
1843 TRACE_ISOLATE(tear_down); 1843 TRACE_ISOLATE(tear_down);
1844 1844
1845 // Temporarily set this isolate as current so that various parts of 1845 // Temporarily set this isolate as current so that various parts of
1846 // the isolate can access it in their destructors without having a 1846 // the isolate can access it in their destructors without having a
1847 // direct pointer. We don't use Enter/Exit here to avoid 1847 // direct pointer. We don't use Enter/Exit here to avoid
1848 // initializing the thread data. 1848 // initializing the thread data.
1849 PerIsolateThreadData* saved_data = CurrentPerIsolateThreadData(); 1849 PerIsolateThreadData* saved_data = CurrentPerIsolateThreadData();
1850 Isolate* saved_isolate = UncheckedCurrent(); 1850 DCHECK(base::NoBarrier_Load(&isolate_key_created_) == 1);
1851 Isolate* saved_isolate =
1852 reinterpret_cast<Isolate*>(base::Thread::GetThreadLocal(isolate_key_));
1851 SetIsolateThreadLocals(this, NULL); 1853 SetIsolateThreadLocals(this, NULL);
1852 1854
1853 Deinit(); 1855 Deinit();
1854 1856
1855 { 1857 {
1856 base::LockGuard<base::Mutex> lock_guard(thread_data_table_mutex_.Pointer()); 1858 base::LockGuard<base::Mutex> lock_guard(thread_data_table_mutex_.Pointer());
1857 thread_data_table_->RemoveAllThreads(this); 1859 thread_data_table_->RemoveAllThreads(this);
1858 } 1860 }
1859 1861
1860 delete this; 1862 delete this;
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
2840 // Then check whether this scope intercepts. 2842 // Then check whether this scope intercepts.
2841 if ((flag & intercept_mask_)) { 2843 if ((flag & intercept_mask_)) {
2842 intercepted_flags_ |= flag; 2844 intercepted_flags_ |= flag;
2843 return true; 2845 return true;
2844 } 2846 }
2845 return false; 2847 return false;
2846 } 2848 }
2847 2849
2848 } // namespace internal 2850 } // namespace internal
2849 } // namespace v8 2851 } // namespace v8
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698