Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 0418506773314fb4fc81116963bd52e50f0edd5e..16eebf06d89434dfdeaae5cfc5801453f3e4aeda 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -6514,6 +6514,32 @@ void Isolate::Exit() { |
} |
+Isolate::DisallowJavascriptExecutionScope::DisallowJavascriptExecutionScope( |
+ Isolate* isolate) { |
+ i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); |
+ internal_ = reinterpret_cast<void*>( |
+ new i::DisallowJavascriptExecution(i_isolate)); |
+} |
+ |
+ |
+Isolate::DisallowJavascriptExecutionScope::~DisallowJavascriptExecutionScope() { |
+ delete reinterpret_cast<i::DisallowJavascriptExecution*>(internal_); |
+} |
+ |
+ |
+Isolate::AllowJavascriptExecutionScope::AllowJavascriptExecutionScope( |
+ Isolate* isolate) { |
+ i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); |
+ internal_ = reinterpret_cast<void*>( |
+ new i::AllowJavascriptExecution(i_isolate)); |
+} |
+ |
+ |
+Isolate::AllowJavascriptExecutionScope::~AllowJavascriptExecutionScope() { |
+ delete reinterpret_cast<i::AllowJavascriptExecution*>(internal_); |
+} |
+ |
+ |
void Isolate::GetHeapStatistics(HeapStatistics* heap_statistics) { |
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
if (!isolate->IsInitialized()) { |