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

Unified Diff: runtime/bin/dartutils.cc

Issue 17261011: Replace uses of Dart_GetClass with Dart_GetType and Dart_InstanceGetClass with Dart_InstanceGetType… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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/dartutils.h ('k') | runtime/bin/directory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/dartutils.cc
===================================================================
--- runtime/bin/dartutils.cc (revision 24207)
+++ runtime/bin/dartutils.cc (working copy)
@@ -761,10 +761,10 @@
}
-Dart_Handle DartUtils::GetDartClass(const char* library_url,
- const char* class_name) {
- return Dart_GetClass(Dart_LookupLibrary(NewString(library_url)),
- NewString(class_name));
+Dart_Handle DartUtils::GetDartType(const char* library_url,
+ const char* class_name) {
+ return Dart_GetType(Dart_LookupLibrary(NewString(library_url)),
+ NewString(class_name), 0, NULL);
}
@@ -777,22 +777,22 @@
Dart_Handle DartUtils::NewDartOSError(OSError* os_error) {
// Create a dart:io OSError object with the information retrieved from the OS.
- Dart_Handle clazz = GetDartClass(kIOLibURL, "OSError");
+ Dart_Handle type = GetDartType(kIOLibURL, "OSError");
Dart_Handle args[2];
args[0] = NewString(os_error->message());
args[1] = Dart_NewInteger(os_error->code());
- return Dart_New(clazz, Dart_Null(), 2, args);
+ return Dart_New(type, Dart_Null(), 2, args);
}
Dart_Handle DartUtils::NewDartSocketException(const char* message,
Dart_Handle os_error) {
// Create a dart:io SocketException object.
- Dart_Handle clazz = GetDartClass(kIOLibURL, "SocketException");
+ Dart_Handle type = GetDartType(kIOLibURL, "SocketException");
Dart_Handle args[2];
args[0] = NewString(message);
args[1] = os_error;
- return Dart_New(clazz, Dart_Null(), 2, args);
+ return Dart_New(type, Dart_Null(), 2, args);
}
@@ -800,13 +800,13 @@
const char* exception_name,
const char* message) {
// Create a Dart Exception object with a message.
- Dart_Handle clazz = GetDartClass(library_url, exception_name);
+ Dart_Handle type = GetDartType(library_url, exception_name);
if (message != NULL) {
Dart_Handle args[1];
args[0] = NewString(message);
- return Dart_New(clazz, Dart_Null(), 1, args);
+ return Dart_New(type, Dart_Null(), 1, args);
} else {
- return Dart_New(clazz, Dart_Null(), 0, NULL);
+ return Dart_New(type, Dart_Null(), 0, NULL);
}
}
« no previous file with comments | « runtime/bin/dartutils.h ('k') | runtime/bin/directory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698