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

Unified Diff: vm/native_arguments.h

Issue 10874072: Use the return value of vm native methods to set the return value, (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 4 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
Index: vm/native_arguments.h
===================================================================
--- vm/native_arguments.h (revision 11528)
+++ vm/native_arguments.h (working copy)
@@ -12,6 +12,7 @@
namespace dart {
// Forward declarations.
+class BootstrapNatives;
class Isolate;
class Object;
class RawObject;
@@ -76,6 +77,14 @@
}
private:
+ friend class BootstrapNatives;
+
+ // Since this function is passed a RawObject directly, we need to be
+ // exceedingly careful when we use it. If there are any other side
+ // effects in the statement that may cause GC, it could lead to
+ // bugs.
+ void SetReturnUnsafe(RawObject* value) const;
+
Isolate* isolate_; // Current isolate pointer.
int argc_; // Number of arguments passed to the runtime call.
RawObject*(*argv_)[]; // Pointer to an array of arguments to runtime call.

Powered by Google App Engine
This is Rietveld 408576698