OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 *attributes = READ_ONLY; | 224 *attributes = READ_ONLY; |
225 ASSERT(mode == CONST_LEGACY || mode == CONST); | 225 ASSERT(mode == CONST_LEGACY || mode == CONST); |
226 *binding_flags = (mode == CONST_LEGACY) | 226 *binding_flags = (mode == CONST_LEGACY) |
227 ? IMMUTABLE_IS_INITIALIZED : IMMUTABLE_IS_INITIALIZED_HARMONY; | 227 ? IMMUTABLE_IS_INITIALIZED : IMMUTABLE_IS_INITIALIZED_HARMONY; |
228 return context; | 228 return context; |
229 } | 229 } |
230 } | 230 } |
231 | 231 |
232 } else if (context->IsCatchContext()) { | 232 } else if (context->IsCatchContext()) { |
233 // Catch contexts have the variable name in the extension slot. | 233 // Catch contexts have the variable name in the extension slot. |
234 if (name->Equals(String::cast(context->extension()))) { | 234 if (String::Equals(name, handle(String::cast(context->extension())))) { |
235 if (FLAG_trace_contexts) { | 235 if (FLAG_trace_contexts) { |
236 PrintF("=> found in catch context\n"); | 236 PrintF("=> found in catch context\n"); |
237 } | 237 } |
238 *index = Context::THROWN_OBJECT_INDEX; | 238 *index = Context::THROWN_OBJECT_INDEX; |
239 *attributes = NONE; | 239 *attributes = NONE; |
240 *binding_flags = MUTABLE_IS_INITIALIZED; | 240 *binding_flags = MUTABLE_IS_INITIALIZED; |
241 return context; | 241 return context; |
242 } | 242 } |
243 } | 243 } |
244 | 244 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 bool Context::IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object) { | 389 bool Context::IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object) { |
390 // During bootstrapping we allow all objects to pass as global | 390 // During bootstrapping we allow all objects to pass as global |
391 // objects. This is necessary to fix circular dependencies. | 391 // objects. This is necessary to fix circular dependencies. |
392 return isolate->heap()->gc_state() != Heap::NOT_IN_GC || | 392 return isolate->heap()->gc_state() != Heap::NOT_IN_GC || |
393 isolate->bootstrapper()->IsActive() || | 393 isolate->bootstrapper()->IsActive() || |
394 object->IsGlobalObject(); | 394 object->IsGlobalObject(); |
395 } | 395 } |
396 #endif | 396 #endif |
397 | 397 |
398 } } // namespace v8::internal | 398 } } // namespace v8::internal |
OLD | NEW |