Chromium Code Reviews| Index: src/objects.cc |
| diff --git a/src/objects.cc b/src/objects.cc |
| index dab7aa194b01a850fe9d3b2d9ed3873aceaea7c2..7462398587f714ed229cec1e1f3b83b7a515ee03 100644 |
| --- a/src/objects.cc |
| +++ b/src/objects.cc |
| @@ -11948,7 +11948,8 @@ bool CanSubclassHaveInobjectProperties(InstanceType instance_type) { |
| void JSFunction::EnsureHasInitialMap(Handle<JSFunction> function) { |
| - DCHECK(function->IsConstructor() || function->shared()->is_generator()); |
| + DCHECK(function->IsConstructor() || function->shared()->is_generator() || |
| + function->shared()->is_async()); |
|
Dan Ehrenberg
2016/05/16 23:01:16
Nit: use is_resumable()
caitp (gmail)
2016/05/16 23:08:30
Done.
|
| if (function->has_initial_map()) return; |
| Isolate* isolate = function->GetIsolate(); |
| @@ -11959,7 +11960,7 @@ void JSFunction::EnsureHasInitialMap(Handle<JSFunction> function) { |
| // First create a new map with the size and number of in-object properties |
| // suggested by the function. |
| InstanceType instance_type; |
| - if (function->shared()->is_generator()) { |
| + if (function->shared()->is_generator() || function->shared()->is_async()) { |
|
Dan Ehrenberg
2016/05/16 23:01:16
Nit: use is_resumable()
caitp (gmail)
2016/05/16 23:08:30
Done.
|
| instance_type = JS_GENERATOR_OBJECT_TYPE; |
| } else { |
| instance_type = JS_OBJECT_TYPE; |