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

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: also serialize next_serial_number 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
« include/v8.h ('K') | « 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 09746678179b7a44f1023ef24361bc592de09db5..3dfc5fcb3e643fcfacf7b4d8ad8640a29e492684 100644
--- a/src/external-reference-table.cc
+++ b/src/external-reference-table.cc
@@ -368,6 +368,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
« include/v8.h ('K') | « src/api.cc ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698