| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
| 9 #include "src/ast/scopeinfo.h" | 9 #include "src/ast/scopeinfo.h" |
| 10 #include "src/ast/scopes.h" | 10 #include "src/ast/scopes.h" |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 | 287 |
| 288 object = Handle<JSObject>::cast(holder); | 288 object = Handle<JSObject>::cast(holder); |
| 289 | 289 |
| 290 } else if (context->has_extension()) { | 290 } else if (context->has_extension()) { |
| 291 // Sloppy varblock contexts might not have an extension object yet, | 291 // Sloppy varblock contexts might not have an extension object yet, |
| 292 // in which case their extension is a ScopeInfo. | 292 // in which case their extension is a ScopeInfo. |
| 293 if (context->extension()->IsScopeInfo()) { | 293 if (context->extension()->IsScopeInfo()) { |
| 294 DCHECK(context->IsBlockContext()); | 294 DCHECK(context->IsBlockContext()); |
| 295 object = isolate->factory()->NewJSObject( | 295 object = isolate->factory()->NewJSObject( |
| 296 isolate->context_extension_function()); | 296 isolate->context_extension_function()); |
| 297 Handle<Object> extension = | 297 Handle<HeapObject> extension = |
| 298 isolate->factory()->NewSloppyBlockWithEvalContextExtension( | 298 isolate->factory()->NewSloppyBlockWithEvalContextExtension( |
| 299 handle(context->scope_info()), object); | 299 handle(context->scope_info()), object); |
| 300 context->set_extension(*extension); | 300 context->set_extension(*extension); |
| 301 } else { | 301 } else { |
| 302 object = handle(context->extension_object(), isolate); | 302 object = handle(context->extension_object(), isolate); |
| 303 } | 303 } |
| 304 DCHECK(object->IsJSContextExtensionObject() || object->IsJSGlobalObject()); | 304 DCHECK(object->IsJSContextExtensionObject() || object->IsJSGlobalObject()); |
| 305 } else { | 305 } else { |
| 306 DCHECK(context->IsFunctionContext()); | 306 DCHECK(context->IsFunctionContext()); |
| 307 object = | 307 object = |
| (...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1128 | 1128 |
| 1129 // Lookup in the initial Object.prototype object. | 1129 // Lookup in the initial Object.prototype object. |
| 1130 Handle<Object> result; | 1130 Handle<Object> result; |
| 1131 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 1131 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
| 1132 isolate, result, | 1132 isolate, result, |
| 1133 Object::GetProperty(isolate->initial_object_prototype(), key)); | 1133 Object::GetProperty(isolate->initial_object_prototype(), key)); |
| 1134 return *result; | 1134 return *result; |
| 1135 } | 1135 } |
| 1136 } // namespace internal | 1136 } // namespace internal |
| 1137 } // namespace v8 | 1137 } // namespace v8 |
| OLD | NEW |