Commit 6c815975 authored by Yuki Shiino's avatar Yuki Shiino Committed by Commit Bot

Remove a wrong DCHECK from JSObject::SetImmutableProto

JSObject::SetImmutableProto is called from InstantiateObject
in api/api-natives.cc:
https://source.chromium.org/chromium/chromium/src/+/master:v8/src/api/api-natives.cc;drc=98497572964c764de5dc32a54a62c66943ed8499;l=369
https://source.chromium.org/chromium/chromium/src/+/master:v8/src/api/api-natives.cc;drc=98497572964c764de5dc32a54a62c66943ed8499;l=423
So, non JS code will hit the DCHECK being removed in this patch.

Actually, Blink hits this DCHECK when implementing Location
object's [[SetPrototypeOf]] as SetImmutablePrototype.
c.f. https://crrev.com/c/2145516

Change-Id: I88b2715d645f5ea792ef33cb67a6990c762ad338
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2143982Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67171}
parent daf59562
...@@ -4550,7 +4550,6 @@ Maybe<bool> JSObject::SetPrototype(Handle<JSObject> object, ...@@ -4550,7 +4550,6 @@ Maybe<bool> JSObject::SetPrototype(Handle<JSObject> object,
// static // static
void JSObject::SetImmutableProto(Handle<JSObject> object) { void JSObject::SetImmutableProto(Handle<JSObject> object) {
DCHECK(!object->IsAccessCheckNeeded()); // Never called from JS
Handle<Map> map(object->map(), object->GetIsolate()); Handle<Map> map(object->map(), object->GetIsolate());
// Nothing to do if prototype is already set. // Nothing to do if prototype is already set.
......
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