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

Unified Diff: src/objects.cc

Issue 1490003003: Don't EnsureHasInitialMap on non-constructors (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/crankshaft/hydrogen.cc ('k') | test/mjsunit/regress/regress-ensure-initial-map.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index f1dd4d7efe96b236d1536c0611969bf3c1fa3de4..21c40aaa59d6854aa5d2de5d2c7609877c5101fb 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -12203,6 +12203,7 @@ bool CanSubclassHaveInobjectProperties(InstanceType instance_type) {
void JSFunction::EnsureHasInitialMap(Handle<JSFunction> function) {
+ DCHECK(function->IsConstructor() || function->shared()->is_generator());
if (function->has_initial_map()) return;
Isolate* isolate = function->GetIsolate();
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | test/mjsunit/regress/regress-ensure-initial-map.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698