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

Side by Side Diff: src/isolate-inl.h

Issue 2206773003: [api] Clean up scopes and precheck instantiations cache (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixing omitted serial_number check Created 4 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 | « src/isolate.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 #ifndef V8_ISOLATE_INL_H_ 5 #ifndef V8_ISOLATE_INL_H_
6 #define V8_ISOLATE_INL_H_ 6 #define V8_ISOLATE_INL_H_
7 7
8 #include "src/isolate.h" 8 #include "src/isolate.h"
9 #include "src/objects-inl.h" 9 #include "src/objects-inl.h"
10 10
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 Isolate::ExceptionScope::ExceptionScope(Isolate* isolate) 94 Isolate::ExceptionScope::ExceptionScope(Isolate* isolate)
95 : isolate_(isolate), 95 : isolate_(isolate),
96 pending_exception_(isolate_->pending_exception(), isolate_) {} 96 pending_exception_(isolate_->pending_exception(), isolate_) {}
97 97
98 98
99 Isolate::ExceptionScope::~ExceptionScope() { 99 Isolate::ExceptionScope::~ExceptionScope() {
100 isolate_->set_pending_exception(*pending_exception_); 100 isolate_->set_pending_exception(*pending_exception_);
101 } 101 }
102 102
103 SaveContext::SaveContext(Isolate* isolate)
104 : isolate_(isolate), prev_(isolate->save_context()) {
105 if (isolate->context() != NULL) {
106 context_ = Handle<Context>(isolate->context());
107 }
108 isolate->set_save_context(this);
109 c_entry_fp_ = isolate->c_entry_fp(isolate->thread_local_top());
110 }
111
112 SaveContext::~SaveContext() {
113 isolate_->set_context(context_.is_null() ? NULL : *context_);
114 isolate_->set_save_context(prev_);
115 }
116
103 #define NATIVE_CONTEXT_FIELD_ACCESSOR(index, type, name) \ 117 #define NATIVE_CONTEXT_FIELD_ACCESSOR(index, type, name) \
104 Handle<type> Isolate::name() { \ 118 Handle<type> Isolate::name() { \
105 return Handle<type>(raw_native_context()->name(), this); \ 119 return Handle<type>(raw_native_context()->name(), this); \
106 } \ 120 } \
107 bool Isolate::is_##name(type* value) { \ 121 bool Isolate::is_##name(type* value) { \
108 return raw_native_context()->is_##name(value); \ 122 return raw_native_context()->is_##name(value); \
109 } 123 }
110 NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSOR) 124 NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSOR)
111 #undef NATIVE_CONTEXT_FIELD_ACCESSOR 125 #undef NATIVE_CONTEXT_FIELD_ACCESSOR
112 126
(...skipping 17 matching lines...) Expand all
130 144
131 bool Isolate::IsHasInstanceLookupChainIntact() { 145 bool Isolate::IsHasInstanceLookupChainIntact() {
132 PropertyCell* has_instance_cell = heap()->has_instance_protector(); 146 PropertyCell* has_instance_cell = heap()->has_instance_protector();
133 return has_instance_cell->value() == Smi::FromInt(kArrayProtectorValid); 147 return has_instance_cell->value() == Smi::FromInt(kArrayProtectorValid);
134 } 148 }
135 149
136 } // namespace internal 150 } // namespace internal
137 } // namespace v8 151 } // namespace v8
138 152
139 #endif // V8_ISOLATE_INL_H_ 153 #endif // V8_ISOLATE_INL_H_
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698