| Index: src/snapshot/serializer-common.cc
|
| diff --git a/src/snapshot/serializer-common.cc b/src/snapshot/serializer-common.cc
|
| index ca4db7523984c3ea6c96ccb6befce79596237825..865ea7f5355450d1cd5292fd0ac527004d0f81f3 100644
|
| --- a/src/snapshot/serializer-common.cc
|
| +++ b/src/snapshot/serializer-common.cc
|
| @@ -21,6 +21,8 @@ ExternalReferenceEncoder::ExternalReferenceEncoder(Isolate* isolate) {
|
| ExternalReferenceTable* table = ExternalReferenceTable::instance(isolate);
|
| for (uint32_t i = 0; i < table->size(); ++i) {
|
| Address addr = table->address(i);
|
| + // Ignore duplicate API references.
|
| + if (table->is_api_reference(i) && !map_->Get(addr).IsNothing()) continue;
|
| DCHECK(map_->Get(addr).IsNothing());
|
| map_->Set(addr, i);
|
| DCHECK(map_->Get(addr).IsJust());
|
|
|