Commit 24e1bcbf authored by conradw's avatar conradw Committed by Commit bot

[strong] dot prototypes of strong class literals should be strong objects

BUG=v8:3956
LOG=N

Review URL: https://codereview.chromium.org/1270423003

Cr-Commit-Position: refs/heads/master@{#30032}
parent af800bf6
......@@ -137,6 +137,9 @@ static MaybeHandle<Object> DefineClass(Isolate* isolate, Handle<Object> name,
Handle<Map> map =
isolate->factory()->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize);
if (constructor->map()->is_strong()) {
map->set_is_strong();
}
Map::SetPrototype(map, prototype_parent);
map->SetConstructor(*constructor);
Handle<JSObject> prototype = isolate->factory()->NewJSObjectFromMap(map);
......
......@@ -310,8 +310,8 @@ let GeneratorPrototype = (function*(){}).__proto__;
'use strong';
function assertStrongClass(x) {
assertTrue(%IsStrong(x));
// TODO(rossberg): strongify class prototype and instance
// assertTrue(%IsStrong(x.prototype));
assertTrue(%IsStrong(x.prototype));
// TODO(rossberg): strongify class instance
// assertTrue(%IsStrong(new x));
}
class C {};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment