Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1068)

Side by Side Diff: src/isolate-inl.h

Issue 1977943002: Version 5.1.281.36 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@5.1
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/isolate.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef V8_ISOLATE_INL_H_ 5 #ifndef V8_ISOLATE_INL_H_
6 #define V8_ISOLATE_INL_H_ 6 #define V8_ISOLATE_INL_H_
7 7
8 #include "src/isolate.h" 8 #include "src/isolate.h"
9 #include "src/objects-inl.h" 9 #include "src/objects-inl.h"
10 10
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 #define NATIVE_CONTEXT_FIELD_ACCESSOR(index, type, name) \ 90 #define NATIVE_CONTEXT_FIELD_ACCESSOR(index, type, name) \
91 Handle<type> Isolate::name() { \ 91 Handle<type> Isolate::name() { \
92 return Handle<type>(native_context()->name(), this); \ 92 return Handle<type>(native_context()->name(), this); \
93 } \ 93 } \
94 bool Isolate::is_##name(type* value) { \ 94 bool Isolate::is_##name(type* value) { \
95 return native_context()->is_##name(value); \ 95 return native_context()->is_##name(value); \
96 } 96 }
97 NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSOR) 97 NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSOR)
98 #undef NATIVE_CONTEXT_FIELD_ACCESSOR 98 #undef NATIVE_CONTEXT_FIELD_ACCESSOR
99 99
100 bool Isolate::IsArraySpeciesLookupChainIntact() {
101 if (!FLAG_harmony_species) return true;
102 // Note: It would be nice to have debug checks to make sure that the
103 // species protector is accurate, but this would be hard to do for most of
104 // what the protector stands for:
105 // - You'd need to traverse the heap to check that no Array instance has
106 // a constructor property
107 // - To check that Array[Symbol.species] == Array, JS code has to execute,
108 // but JS cannot be invoked in callstack overflow situations
109 // All that could be checked reliably is that
110 // Array.prototype.constructor == Array. Given that limitation, no check is
111 // done here. In place, there are mjsunit tests harmony/array-species* which
112 // ensure that behavior is correct in various invalid protector cases.
113
114 PropertyCell* species_cell = heap()->species_protector();
115 return species_cell->value()->IsSmi() &&
116 Smi::cast(species_cell->value())->value() == kArrayProtectorValid;
117 }
100 118
101 } // namespace internal 119 } // namespace internal
102 } // namespace v8 120 } // namespace v8
103 121
104 #endif // V8_ISOLATE_INL_H_ 122 #endif // V8_ISOLATE_INL_H_
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698