blink: Remove kV8PrototypeTypeIndex.
The value is never read, and storing it makes context snapshot writing nondeterministic. A comment claims that the mere presence of the field is needed to identify prototypes, with a link to https://bugs.webkit.org/show_bug.cgi?id=110436 The code in that patch does indeed use v8PrototypeInternalFieldcount to identify prototypes (see CustomElementHelpers::findWrapperType in that patch), but the corresponding code in modern blink is V0CustomElementConstructorBuilder::HasValidPrototypeChainFor which instead uses a pointer comparison with script_state_->PerContextData()->PrototypeForType(type). However, V0CustomElementConstructorBuilder::PrototypeIsValid() does check `prototype_->InternalFieldCount()` to check if a prototype is already registered -- so keep kV8PrototypeInternalFieldcount around and just keep the uninitialized default value (the code only cares about the number of fields being > 0, not about the value of the field). TBR=peria (who lg'd this, but Gerrit lost the LG) Bug: 870584 Change-Id: If5474f37499121047c4b0232a85435f139e5cbc0 Reviewed-on: https://chromium-review.googlesource.com/c/1292385 Commit-Queue: Nico Weber <thakis@chromium.org> Reviewed-by:Nico Weber <thakis@chromium.org> Cr-Commit-Position: refs/heads/master@{#601464}
Showing
Please register or sign in to comment