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

Unified Diff: runtime/vm/dart_api_impl_test.cc

Issue 117723002: Allow the native resolver to setup whether it needs the Dart API scope to (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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_impl.cc ('k') | runtime/vm/debugger_api_impl_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl_test.cc
===================================================================
--- runtime/vm/dart_api_impl_test.cc (revision 31283)
+++ runtime/vm/dart_api_impl_test.cc (working copy)
@@ -370,7 +370,9 @@
static Dart_NativeFunction CurrentStackTraceNativeLookup(
- Dart_Handle name, int argument_count) {
+ Dart_Handle name, int argument_count, bool* auto_setup_scope) {
+ ASSERT(auto_setup_scope != NULL);
+ *auto_setup_scope = false;
return reinterpret_cast<Dart_NativeFunction>(&CurrentStackTraceNative);
}
@@ -458,7 +460,9 @@
static Dart_NativeFunction PropagateError_native_lookup(
- Dart_Handle name, int argument_count) {
+ Dart_Handle name, int argument_count, bool* auto_setup_scope) {
+ ASSERT(auto_setup_scope != NULL);
+ *auto_setup_scope = false;
return reinterpret_cast<Dart_NativeFunction>(&PropagateErrorNative);
}
@@ -1266,7 +1270,10 @@
static Dart_NativeFunction ByteDataNativeResolver(Dart_Handle name,
- int arg_count) {
+ int arg_count,
+ bool* auto_setup_scope) {
+ ASSERT(auto_setup_scope != NULL);
+ *auto_setup_scope = false;
return &ByteDataNativeFunction;
}
@@ -1324,8 +1331,10 @@
}
-static Dart_NativeFunction ExternalByteDataNativeResolver(Dart_Handle name,
- int arg_count) {
+static Dart_NativeFunction ExternalByteDataNativeResolver(
+ Dart_Handle name, int arg_count, bool* auto_setup_scope) {
+ ASSERT(auto_setup_scope != NULL);
+ *auto_setup_scope = false;
return &ExternalByteDataNativeFunction;
}
@@ -3580,7 +3589,10 @@
static Dart_NativeFunction native_field_lookup(Dart_Handle name,
- int argument_count) {
+ int argument_count,
+ bool* auto_setup_scope) {
+ ASSERT(auto_setup_scope != NULL);
+ *auto_setup_scope = false;
return reinterpret_cast<Dart_NativeFunction>(&NativeFieldLookup);
}
@@ -4744,7 +4756,11 @@
}
-static Dart_NativeFunction native_lookup(Dart_Handle name, int argument_count) {
+static Dart_NativeFunction native_lookup(Dart_Handle name,
+ int argument_count,
+ bool* auto_setup_scope) {
+ ASSERT(auto_setup_scope != NULL);
+ *auto_setup_scope = false;
return reinterpret_cast<Dart_NativeFunction>(&ExceptionNative);
}
@@ -4788,7 +4804,11 @@
}
-static Dart_NativeFunction gnac_lookup(Dart_Handle name, int argument_count) {
+static Dart_NativeFunction gnac_lookup(Dart_Handle name,
+ int argument_count,
+ bool* auto_setup_scope) {
+ ASSERT(auto_setup_scope != NULL);
+ *auto_setup_scope = false;
return reinterpret_cast<Dart_NativeFunction>(&NativeArgumentCounter);
}
@@ -5682,7 +5702,10 @@
static Dart_NativeFunction PatchNativeResolver(Dart_Handle name,
- int arg_count) {
+ int arg_count,
+ bool* auto_setup_scope) {
+ ASSERT(auto_setup_scope != NULL);
+ *auto_setup_scope = false;
return &PatchNativeFunction;
}
@@ -5876,13 +5899,19 @@
static Dart_NativeFunction MyNativeResolver1(Dart_Handle name,
- int arg_count) {
+ int arg_count,
+ bool* auto_setup_scope) {
+ ASSERT(auto_setup_scope != NULL);
+ *auto_setup_scope = false;
return &MyNativeFunction1;
}
static Dart_NativeFunction MyNativeResolver2(Dart_Handle name,
- int arg_count) {
+ int arg_count,
+ bool* auto_setup_scope) {
+ ASSERT(auto_setup_scope != NULL);
+ *auto_setup_scope = false;
return &MyNativeFunction2;
}
@@ -6343,7 +6372,9 @@
static Dart_NativeFunction IsolateInterruptTestNativeLookup(
- Dart_Handle name, int argument_count) {
+ Dart_Handle name, int argument_count, bool* auto_setup_scope) {
+ ASSERT(auto_setup_scope != NULL);
+ *auto_setup_scope = false;
return reinterpret_cast<Dart_NativeFunction>(&MarkMainEntered);
}
@@ -6648,7 +6679,10 @@
static Dart_NativeFunction MyNativeClosureResolver(Dart_Handle name,
- int arg_count) {
+ int arg_count,
+ bool* auto_setup_scope) {
+ ASSERT(auto_setup_scope != NULL);
+ *auto_setup_scope = false;
const Object& obj = Object::Handle(Api::UnwrapHandle(name));
if (!obj.IsString()) {
return NULL;
@@ -6791,8 +6825,10 @@
}
-static Dart_NativeFunction MyStaticNativeClosureResolver(Dart_Handle name,
- int arg_count) {
+static Dart_NativeFunction MyStaticNativeClosureResolver(
+ Dart_Handle name, int arg_count, bool* auto_setup_scope) {
+ ASSERT(auto_setup_scope != NULL);
+ *auto_setup_scope = false;
const Object& obj = Object::Handle(Api::UnwrapHandle(name));
if (!obj.IsString()) {
return NULL;
@@ -7598,7 +7634,9 @@
static Dart_NativeFunction ExternalStringDeoptimize_native_lookup(
- Dart_Handle name, int argument_count) {
+ Dart_Handle name, int argument_count, bool* auto_setup_scope) {
+ ASSERT(auto_setup_scope != NULL);
+ *auto_setup_scope = false;
return reinterpret_cast<Dart_NativeFunction>(&A_change_str_native);
}
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/debugger_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698