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

Unified Diff: src/objects-inl.h

Issue 1590873002: Make generators non-constructable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Adapt test262.status Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index fea916b03292676f5f088249f161b424ceb22b95..652044ed25cc91cc9e4c10de4eff6a7cdfa2c3cc 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -4470,8 +4470,12 @@ bool Map::has_non_instance_prototype() {
}
-void Map::set_is_constructor() {
- set_bit_field(bit_field() | (1 << kIsConstructor));
+void Map::set_is_constructor(bool value) {
+ if (value) {
+ set_bit_field(bit_field() | (1 << kIsConstructor));
+ } else {
+ set_bit_field(bit_field() & ~(1 << kIsConstructor));
+ }
}
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698