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

Unified Diff: runtime/vm/handles.h

Issue 8528010: Changes to pass the current isolate to all runtime and native calls. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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 | « runtime/vm/dart_api_state.h ('k') | runtime/vm/handles.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/handles.h
===================================================================
--- runtime/vm/handles.h (revision 1496)
+++ runtime/vm/handles.h (working copy)
@@ -25,7 +25,7 @@
// object is destroyed.
// Code that uses scoped handles typically looks as follows:
// {
-// HANDLESCOPE();
+// HANDLESCOPE(isolate);
// const String& str = String::Handle(String::New("abc"));
// .....
// .....
@@ -48,7 +48,7 @@
// raw dart objects directly. We use NOHANDLESCOPE to assert that we do not
// add code that will allocate new handles during this critical area.
// {
-// NOHANDLESCOPE();
+// NOHANDLESCOPE(isolate);
// ....
// ....
// }
@@ -243,7 +243,7 @@
// The class HandleScope is used to start a new handles scope in the code.
// It is used as follows:
// {
-// HANDLESCOPE();
+// HANDLESCOPE(isolate);
// ....
// .....
// code that creates some scoped handles.
@@ -251,7 +251,7 @@
// }
class HandleScope : public StackResource {
public:
- HandleScope();
+ explicit HandleScope(Isolate* isolate);
~HandleScope();
private:
@@ -264,7 +264,8 @@
};
// Macro to start a new Handle scope.
-#define HANDLESCOPE() dart::HandleScope vm_internal_handles_scope_;
+#define HANDLESCOPE(isolate) \
+ dart::HandleScope vm_internal_handles_scope_(isolate);
// The class NoHandleScope is used in critical regions of the virtual machine
@@ -273,7 +274,7 @@
// during this critical area.
// It is used as follows:
// {
-// NOHANDLESCOPE();
+// NOHANDLESCOPE(isolate);
// ....
// .....
// critical code that manipulates dart objects directly.
@@ -282,7 +283,7 @@
#if defined(DEBUG)
class NoHandleScope : public StackResource {
public:
- NoHandleScope();
+ explicit NoHandleScope(Isolate* isolate);
~NoHandleScope();
private:
@@ -291,7 +292,7 @@
#else // defined(DEBUG)
class NoHandleScope : public ValueObject {
public:
- NoHandleScope() { }
+ explicit NoHandleScope(Isolate* isolate) { }
~NoHandleScope() { }
private:
@@ -300,7 +301,8 @@
#endif // defined(DEBUG)
// Macro to start a no handles scope in the code.
-#define NOHANDLESCOPE() dart::NoHandleScope no_vm_internal_handles_scope_;
+#define NOHANDLESCOPE(isolate) \
+ dart::NoHandleScope no_vm_internal_handles_scope_(isolate);
} // namespace dart
« no previous file with comments | « runtime/vm/dart_api_state.h ('k') | runtime/vm/handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698