| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index 0d0bf3f75a6a8d2e01e1d57ac006ff2b7b5cb1c1..0bad54599b981994fd0a9fc80905d34edc18bd11 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -686,6 +686,27 @@ i::Object** EscapableHandleScope::Escape(i::Object** escape_value) {
|
| }
|
|
|
|
|
| +SealHandleScope::SealHandleScope(Isolate* isolate) {
|
| + i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate);
|
| +
|
| + isolate_ = internal_isolate;
|
| + i::HandleScopeData* current = internal_isolate->handle_scope_data();
|
| + prev_limit_ = current->limit;
|
| + current->limit = current->next;
|
| + prev_level_ = current->level;
|
| + current->level = 0;
|
| +}
|
| +
|
| +
|
| +SealHandleScope::~SealHandleScope() {
|
| + i::HandleScopeData* current = isolate_->handle_scope_data();
|
| + DCHECK_EQ(0, current->level);
|
| + current->level = prev_level_;
|
| + DCHECK_EQ(current->next, current->limit);
|
| + current->limit = prev_limit_;
|
| +}
|
| +
|
| +
|
| void Context::Enter() {
|
| i::Handle<i::Context> env = Utils::OpenHandle(this);
|
| i::Isolate* isolate = env->GetIsolate();
|
|
|