Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(442)

Unified Diff: src/external-reference-table.cc

Issue 2066993004: [snapshot] serialize embedder-provided external references. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: address comment Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/api.cc ('k') | src/heap/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « src/api.cc ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698