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

Unified Diff: mojo/dart/embedder/common.h

Issue 1786473004: Rolls Dart runtime forward. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: whitespace Created 4 years, 9 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 | « DEPS ('k') | mojo/dart/embedder/common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/dart/embedder/common.h
diff --git a/mojo/dart/embedder/common.h b/mojo/dart/embedder/common.h
index 136708dac0b423dd3aca7f551afca572d6bdaffb..ea73b01f2f60e8d41e2e24b71deb180944adcb97 100644
--- a/mojo/dart/embedder/common.h
+++ b/mojo/dart/embedder/common.h
@@ -24,29 +24,36 @@ class DartEmbedder {
// Returns the integer value of a Dart object. If the object is not
// an integer value an API error is propagated.
static int64_t GetIntegerValue(Dart_Handle value_obj);
+
// Returns the integer value of a Dart object. If the object is not
- // an integer value or outside the requested range an API error is
+ // an integer value or outside the requested range, an API error is
// propagated.
static int64_t GetInt64ValueCheckRange(
Dart_Handle value_obj, int64_t lower, int64_t upper);
+
// Returns the intptr_t value of a Dart object. If the object is not
- // an integer value or the value is outside the intptr_t range an
+ // an integer value or the value is outside the intptr_t range, an
// API error is propagated.
static intptr_t GetIntptrValue(Dart_Handle value_obj);
+
// Returns the string value of a Dart object. If the object is not
- // a string value an API error is propagated.
+ // a string value, an API error is propagated.
static const char* GetStringValue(Dart_Handle str_obj);
+
// Returns the boolean value of a Dart object. If the object is not
- // a boolean value an API error is propagated.
+ // a boolean value, an API error is propagated.
static bool GetBooleanValue(Dart_Handle bool_obj);
+
// Sets the field "name" in handle to val. Any error is propagated.
static void SetIntegerField(Dart_Handle handle,
const char* name,
int64_t val);
+
// Sets the field "name" in handle to val. Any error is propagated.
static void SetStringField(Dart_Handle handle,
const char* name,
const char* val);
+
// Returns a new Dart string. Any error is propagated.
static Dart_Handle NewCString(const char* str);
@@ -56,6 +63,15 @@ class DartEmbedder {
// Sets the return value in arguments to a string created from |str|.
static void SetCStringReturn(Dart_NativeArguments arguments, const char* str);
+ // Returns the boolean value from native arguments. If the object is not
+ // a boolean value, an API error is propagated.
+ static bool GetBooleanArgument(Dart_NativeArguments args, intptr_t index);
+
+ // Returns the integer value from native arguments. If the object is not
+ // an integer value, an API error is propagated.
+ static int64_t GetIntegerArgument(Dart_NativeArguments args, intptr_t index);
+ static intptr_t GetIntptrArgument(Dart_NativeArguments args, intptr_t index);
+
// Gets the string argument at index and returns a C string.
// Any error is propagated.
static const char* GetStringArgument(Dart_NativeArguments arguments,
« no previous file with comments | « DEPS ('k') | mojo/dart/embedder/common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698