Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index ceadd4ed8b62776d355a0ea96f8efe2702cd444c..7f1000af5f7bc4ac35e936e65742836f223db99a 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -22,6 +22,7 @@ |
#include "src/bootstrapper.h" |
#include "src/code-stubs.h" |
#include "src/compiler.h" |
+#include "src/context-measure.h" |
#include "src/contexts.h" |
#include "src/conversions-inl.h" |
#include "src/counters.h" |
@@ -5577,6 +5578,12 @@ void Context::SetErrorMessageForCodeGenerationFromStrings(Local<String> error) { |
} |
+size_t Context::EstimatedSize() { |
+ return static_cast<size_t>( |
+ i::ContextMeasure(*Utils::OpenHandle(this)).Size()); |
+} |
+ |
+ |
MaybeLocal<v8::Object> ObjectTemplate::NewInstance(Local<Context> context) { |
PREPARE_FOR_EXECUTION(context, "v8::ObjectTemplate::NewInstance()", Object); |
auto self = Utils::OpenHandle(this); |