Index: src/external-reference-table.cc |
diff --git a/src/external-reference-table.cc b/src/external-reference-table.cc |
index 81fce16c64674e988157378f04b677e7f4211796..7e5ef8496e4277c644af71fd9b9728b5bce9f425 100644 |
--- a/src/external-reference-table.cc |
+++ b/src/external-reference-table.cc |
@@ -378,6 +378,15 @@ ExternalReferenceTable::ExternalReferenceTable(Isolate* isolate) { |
Deoptimizer::CALCULATE_ENTRY_ADDRESS); |
Add(address, "lazy_deopt"); |
} |
+ |
+ // Add external references provided by the embedder (a null-terminated array). |
+ intptr_t* api_external_references = isolate->api_external_references(); |
+ if (api_external_references != nullptr) { |
+ while (*api_external_references != 0) { |
+ Add(reinterpret_cast<Address>(*api_external_references), "<embedder>"); |
+ api_external_references++; |
+ } |
+ } |
} |
} // namespace internal |