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

Side by Side Diff: src/isolate.cc

Issue 365153002: Remove a bunch of Isolate::UncheckedCurrent calls (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 5 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
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 <stdlib.h> 5 #include <stdlib.h>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/ast.h" 9 #include "src/ast.h"
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
(...skipping 2035 matching lines...) Expand 10 before | Expand all | Expand 10 after
2046 ASSERT(entry_stack_ != NULL); 2046 ASSERT(entry_stack_ != NULL);
2047 ASSERT(entry_stack_->previous_thread_data == NULL || 2047 ASSERT(entry_stack_->previous_thread_data == NULL ||
2048 entry_stack_->previous_thread_data->thread_id().Equals( 2048 entry_stack_->previous_thread_data->thread_id().Equals(
2049 ThreadId::Current())); 2049 ThreadId::Current()));
2050 // Same thread re-enters the isolate, no need to re-init anything. 2050 // Same thread re-enters the isolate, no need to re-init anything.
2051 entry_stack_->entry_count++; 2051 entry_stack_->entry_count++;
2052 return; 2052 return;
2053 } 2053 }
2054 } 2054 }
2055 2055
2056 // Threads can have default isolate set into TLS as Current but not yet have
2057 // PerIsolateThreadData for it, as it requires more advanced phase of the
2058 // initialization. For example, a thread might be the one that system used for
2059 // static initializers - in this case the default isolate is set in TLS but
2060 // the thread did not yet Enter the isolate. If PerisolateThreadData is not
2061 // there, use the isolate set in TLS.
2062 if (current_isolate == NULL) {
2063 current_isolate = Isolate::UncheckedCurrent();
2064 }
2065
2066 PerIsolateThreadData* data = FindOrAllocatePerThreadDataForThisThread(); 2056 PerIsolateThreadData* data = FindOrAllocatePerThreadDataForThisThread();
2067 ASSERT(data != NULL); 2057 ASSERT(data != NULL);
2068 ASSERT(data->isolate_ == this); 2058 ASSERT(data->isolate_ == this);
2069 2059
2070 EntryStackItem* item = new EntryStackItem(current_data, 2060 EntryStackItem* item = new EntryStackItem(current_data,
2071 current_isolate, 2061 current_isolate,
2072 entry_stack_); 2062 entry_stack_);
2073 entry_stack_ = item; 2063 entry_stack_ = item;
2074 2064
2075 SetIsolateThreadLocals(this, data); 2065 SetIsolateThreadLocals(this, data);
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
2379 if (prev_ && prev_->Intercept(flag)) return true; 2369 if (prev_ && prev_->Intercept(flag)) return true;
2380 // Then check whether this scope intercepts. 2370 // Then check whether this scope intercepts.
2381 if ((flag & intercept_mask_)) { 2371 if ((flag & intercept_mask_)) {
2382 intercepted_flags_ |= flag; 2372 intercepted_flags_ |= flag;
2383 return true; 2373 return true;
2384 } 2374 }
2385 return false; 2375 return false;
2386 } 2376 }
2387 2377
2388 } } // namespace v8::internal 2378 } } // namespace v8::internal
OLDNEW
« include/v8.h ('K') | « src/d8.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698