Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index 0a02a877495b35d543b67b5621ff99f80962913f..c0a3e6f890569e5ed395a2e58cded6130dedc254 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -104,7 +104,6 @@ Handle<PrototypeInfo> Factory::NewPrototypeInfo() { |
Handle<ContextExtension> Factory::NewContextExtension( |
Handle<ScopeInfo> scope_info, Handle<Object> extension) { |
- DCHECK(scope_info->is_declaration_scope()); |
Handle<ContextExtension> result = |
Handle<ContextExtension>::cast(NewStruct(CONTEXT_EXTENSION_TYPE)); |
result->set_scope_info(*scope_info); |
@@ -816,18 +815,19 @@ Handle<Context> Factory::NewFunctionContext(int length, |
return context; |
} |
- |
Handle<Context> Factory::NewCatchContext(Handle<JSFunction> function, |
Handle<Context> previous, |
+ Handle<ScopeInfo> scope_info, |
Handle<String> name, |
Handle<Object> thrown_object) { |
STATIC_ASSERT(Context::MIN_CONTEXT_SLOTS == Context::THROWN_OBJECT_INDEX); |
Handle<FixedArray> array = NewFixedArray(Context::MIN_CONTEXT_SLOTS + 1); |
array->set_map_no_write_barrier(*catch_context_map()); |
Handle<Context> context = Handle<Context>::cast(array); |
+ Handle<ContextExtension> extension = NewContextExtension(scope_info, name); |
Michael Starzinger
2016/09/05 11:35:29
Allocating before fully initializing the context (
jochen (gone - plz use gerrit)
2016/09/05 11:42:44
done
|
context->set_closure(*function); |
context->set_previous(*previous); |
- context->set_extension(*name); |
+ context->set_extension(*extension); |
context->set_native_context(previous->native_context()); |
context->set(Context::THROWN_OBJECT_INDEX, *thrown_object); |
return context; |