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

Unified Diff: include/v8.h

Issue 1079713002: api: introduce SealHandleScope (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix typo in a test Created 5 years, 8 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 | « no previous file | src/api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index 8019a4522b4bafb811263bc39bb53e516fbeb2b6..d94e9b32b854826ba221abb3948f057fb74a9a26 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -1018,6 +1018,24 @@ class V8_EXPORT EscapableHandleScope : public HandleScope {
internal::Object** escape_slot_;
};
+class V8_EXPORT SealHandleScope {
+ public:
+ SealHandleScope(Isolate* isolate);
+ ~SealHandleScope();
+
+ private:
+ // Make it hard to create heap-allocated or illegal handle scopes by
+ // disallowing certain operations.
+ SealHandleScope(const SealHandleScope&);
+ void operator=(const SealHandleScope&);
+ void* operator new(size_t size);
+ void operator delete(void*, size_t);
+
+ internal::Isolate* isolate_;
+ int prev_level_;
+ internal::Object** prev_limit_;
+};
+
// --- Special objects ---
« no previous file with comments | « no previous file | src/api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698