chore: remove blink_fix_prototype_assert (#29194)

This commit is contained in:
Jeremy Rose 2021-05-18 15:44:11 -07:00 committed by GitHub
parent dcbabcb23c
commit 9b164e5e16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 30 deletions

View file

@ -18,7 +18,6 @@ v8_context_snapshot_generator.patch
boringssl_build_gn.patch
pepper_plugin_support.patch
no_cache_storage_check.patch
blink_fix_prototype_assert.patch
gtk_visibility.patch
sysroot.patch
mas_blink_no_private_api.patch

View file

@ -1,29 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Cheng Zhao <zcbenz@gmail.com>
Date: Thu, 20 Sep 2018 17:48:19 -0700
Subject: blink_fix_prototype_assert.patch
A recent Chromium change has accidentally added assertion for the case when
a new window object may not have a prototype attached. In Electron it may
happen when preventDefault for a native new-window event.
https://chromium.googlesource.com/chromium/src/+/f47b361887a31cccf42a6e21a82bccf28372bdaa%5E%21
In the long term we should investigate why it happened, and take a more
formal fix. But for now I'm just make this assertion silently pass away.
diff --git a/third_party/blink/renderer/platform/bindings/v8_object_constructor.cc b/third_party/blink/renderer/platform/bindings/v8_object_constructor.cc
index 196548f9b1a817348df05c889b315a8124e1692d..359165f1c52b8afb0d91d4a363da0429cf5372ef 100644
--- a/third_party/blink/renderer/platform/bindings/v8_object_constructor.cc
+++ b/third_party/blink/renderer/platform/bindings/v8_object_constructor.cc
@@ -95,8 +95,10 @@ v8::Local<v8::Function> V8ObjectConstructor::CreateInterfaceObject(
bool get_prototype_value =
interface_object->Get(context, V8AtomicString(isolate, "prototype"))
.ToLocal(&prototype_value);
- CHECK(get_prototype_value);
- CHECK(prototype_value->IsObject());
+ // CHECK(get_prototype_value);
+ // CHECK(prototype_value->IsObject());
+ if (!get_prototype_value || !prototype_value->IsObject())
+ return v8::Local<v8::Function>();
prototype_object = prototype_value.As<v8::Object>();
}