OLD | NEW |
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 #include "src/objects.h" | 5 #include "src/objects.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <iomanip> | 8 #include <iomanip> |
9 #include <memory> | 9 #include <memory> |
10 #include <sstream> | 10 #include <sstream> |
(...skipping 7369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7380 if (ctxobj->ReferencesObject(obj)) { | 7380 if (ctxobj->ReferencesObject(obj)) { |
7381 return true; | 7381 return true; |
7382 } | 7382 } |
7383 } else if (ctxobj == obj) { | 7383 } else if (ctxobj == obj) { |
7384 return true; | 7384 return true; |
7385 } | 7385 } |
7386 } | 7386 } |
7387 } | 7387 } |
7388 | 7388 |
7389 // Check the context extension (if any) if it can have references. | 7389 // Check the context extension (if any) if it can have references. |
7390 if (context->has_extension() && !context->IsCatchContext()) { | 7390 if (context->has_extension() && !context->IsCatchContext() && |
| 7391 !context->IsModuleContext()) { |
7391 // With harmony scoping, a JSFunction may have a script context. | 7392 // With harmony scoping, a JSFunction may have a script context. |
7392 // TODO(mvstanton): walk into the ScopeInfo. | 7393 // TODO(mvstanton): walk into the ScopeInfo. |
7393 if (context->IsScriptContext()) { | 7394 if (context->IsScriptContext()) { |
7394 return false; | 7395 return false; |
7395 } | 7396 } |
7396 | 7397 |
7397 return context->extension_object()->ReferencesObject(obj); | 7398 return context->extension_object()->ReferencesObject(obj); |
7398 } | 7399 } |
7399 } | 7400 } |
7400 | 7401 |
(...skipping 13146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20547 // not | 20548 // not |
20548 // depend on this. | 20549 // depend on this. |
20549 return DICTIONARY_ELEMENTS; | 20550 return DICTIONARY_ELEMENTS; |
20550 } | 20551 } |
20551 DCHECK_LE(kind, LAST_ELEMENTS_KIND); | 20552 DCHECK_LE(kind, LAST_ELEMENTS_KIND); |
20552 return kind; | 20553 return kind; |
20553 } | 20554 } |
20554 } | 20555 } |
20555 } // namespace internal | 20556 } // namespace internal |
20556 } // namespace v8 | 20557 } // namespace v8 |
OLD | NEW |