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

Unified Diff: runtime/include/dart_api.h

Issue 1140263005: Revert "Hide Isolate pointer from embedder" (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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 | « runtime/bin/vmservice_impl.cc ('k') | runtime/include/dart_debugger_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/include/dart_api.h
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index fcd8c2528b4b6e7d7e86857300effcbc092ba30e..7094b4be438cf137201308a8bb68600ad593f5d3 100755
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -65,19 +65,11 @@ typedef unsigned __int64 uint64_t;
#include <assert.h>
-
/*
- * ========
- * Isolates
- * ========
- */
-
-/**
- * A port is used to send or receive inter-isolate messages. It is also used
- * to identify an isolate (see Dart_Isolate).
+ * =======
+ * Handles
+ * =======
*/
-typedef int64_t Dart_Port;
-
/**
* An isolate is the unit of concurrency in Dart. Each isolate has
@@ -86,24 +78,12 @@ typedef int64_t Dart_Port;
*
* Each thread keeps track of its current isolate, which is the
* isolate which is ready to execute on the current thread. The
- * current isolate may be DART_ILLEGAL_ISOLATE, in which case no isolate is
- * ready to execute. Most of the Dart apis require there to be a current
+ * current isolate may be NULL, in which case no isolate is ready to
+ * execute. Most of the Dart apis require there to be a current
* isolate in order to function without error. The current isolate is
* set by any call to Dart_CreateIsolate or Dart_EnterIsolate.
*/
-typedef Dart_Port Dart_Isolate;
-
-/**
- * DART_ILLEGAL_ISOLATE is an isolate id that is guaranteed never to be associated
- * with a valid isolate.
- */
-#define DART_ILLEGAL_ISOLATE ((Dart_Isolate) 0)
-
-/*
- * =======
- * Handles
- * =======
- */
+typedef struct _Dart_Isolate* Dart_Isolate;
/**
* An object reference managed by the Dart VM garbage collector.
@@ -957,8 +937,6 @@ DART_EXPORT void* Dart_CurrentIsolateData();
* was passed to the isolate when it was created.
* The embedder is responsible for ensuring the consistency of this data
* with respect to the lifecycle of an Isolate.
- *
- * \return pointer to data or NULL if the isolate could not be found.
*/
DART_EXPORT void* Dart_IsolateData(Dart_Isolate isolate);
@@ -976,10 +954,8 @@ DART_EXPORT Dart_Handle Dart_DebugName();
*
* Requires there to be no current isolate. Multiple threads may not be in
* the same isolate at once.
- *
- * \return true if isolate was entered, false otherwise.
*/
-DART_EXPORT bool Dart_EnterIsolate(Dart_Isolate isolate);
+DART_EXPORT void Dart_EnterIsolate(Dart_Isolate isolate);
/**
* Notifies the VM that the current isolate is about to make a blocking call.
@@ -1064,10 +1040,8 @@ DART_EXPORT Dart_Handle Dart_CreateScriptSnapshot(uint8_t** buffer,
* Dart_IsolateInterruptCallback).
*
* \param isolate The isolate to be interrupted.
- *
- * \return true if isolate is scheduled to be be interrupted, false otherwise.
*/
-DART_EXPORT bool Dart_InterruptIsolate(Dart_Isolate isolate);
+DART_EXPORT void Dart_InterruptIsolate(Dart_Isolate isolate);
/**
* Make isolate runnable.
@@ -1078,8 +1052,6 @@ DART_EXPORT bool Dart_InterruptIsolate(Dart_Isolate isolate);
* This function does not expect there to be a current isolate.
*
* \param isolate The isolate to be made runnable.
- *
- * \return true if isolate was made runnable, false otherwise.
*/
DART_EXPORT bool Dart_IsolateMakeRunnable(Dart_Isolate isolate);
@@ -1091,10 +1063,15 @@ DART_EXPORT bool Dart_IsolateMakeRunnable(Dart_Isolate isolate);
*/
/**
- * DART_ILLEGAL_PORT is a port number guaranteed never to be associated with a
- * valid port.
+ * A port is used to send or receive inter-isolate messages
+ */
+typedef int64_t Dart_Port;
+
+/**
+ * ILLEGAL_PORT is a port number guaranteed never to be associated with a valid
+ * port.
*/
-#define DART_ILLEGAL_PORT ((Dart_Port) 0)
+#define ILLEGAL_PORT ((Dart_Port) 0)
/**
* A message notification callback.
@@ -2809,8 +2786,8 @@ DART_EXPORT bool Dart_IsServiceIsolate(Dart_Isolate isolate);
/**
* Returns the port that script load requests should be sent on.
*
- * \return Returns the port for load requests or DART_ILLEGAL_PORT if the
- * service isolate failed to startup or does not support load requests.
+ * \return Returns the port for load requests or ILLEGAL_PORT if the service
+ * isolate failed to startup or does not support load requests.
*/
DART_EXPORT Dart_Port Dart_ServiceWaitForLoadPort();
« no previous file with comments | « runtime/bin/vmservice_impl.cc ('k') | runtime/include/dart_debugger_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698