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

Unified Diff: runtime/embedders/android/vm_glue.cc

Issue 11467028: Migrate files to embedder. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review fixes Created 7 years, 11 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/embedders/android/vm_glue.h ('k') | samples/android_sample/android_sample.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/embedders/android/vm_glue.cc
diff --git a/samples/android_sample/jni/vm_glue.cc b/runtime/embedders/android/vm_glue.cc
similarity index 94%
rename from samples/android_sample/jni/vm_glue.cc
rename to runtime/embedders/android/vm_glue.cc
index 7ab19d0e862aec4e13fb0e413276650c6cdcf5fe..99130a8666bd58da42c44d53f5d91785a417498f 100644
--- a/samples/android_sample/jni/vm_glue.cc
+++ b/runtime/embedders/android/vm_glue.cc
@@ -8,9 +8,9 @@
#include <sys/stat.h>
#include "include/dart_api.h"
-#include "jni/android_extension.h"
-#include "jni/log.h"
-#include "jni/vm_glue.h"
+#include "embedders/android/android_extension.h"
+#include "embedders/android/log.h"
+#include "embedders/android/vm_glue.h"
// snapshot_buffer points to a snapshot if we link in a snapshot otherwise
// it is initialized to NULL.
@@ -52,8 +52,8 @@ Dart_Handle VMGlue::CheckError(Dart_Handle handle) {
}
Dart_Handle VMGlue::LibraryTagHandler(Dart_LibraryTag tag,
- Dart_Handle library,
- Dart_Handle urlHandle) {
+ Dart_Handle library,
+ Dart_Handle urlHandle) {
const char* url;
Dart_StringToCString(urlHandle, &url);
if (tag == kCanonicalizeUrl) {
@@ -63,7 +63,8 @@ Dart_Handle VMGlue::LibraryTagHandler(Dart_LibraryTag tag,
// Touch, Audio, etc. All builtin libraries should be handled here
// (or moved into a snapshot).
if (strcmp(url, "android_extension.dart") == 0) {
- Dart_Handle source = VMGlue::LoadSourceFromFile("/data/data/com.google.dartndk/app_dart/android_extension.dart");
+ Dart_Handle source =
+ VMGlue::LoadSourceFromFile("/data/data/com.google.dartndk/app_dart/android_extension.dart");
Dart_Handle library = CheckError(Dart_LoadLibrary(urlHandle, source));
CheckError(Dart_SetNativeResolver(library, ResolveName));
return library;
@@ -81,7 +82,7 @@ bool VMGlue::CreateIsolateAndSetupHelper(const char* script_uri,
Dart_Isolate isolate =
Dart_CreateIsolate(script_uri, main, NULL, data, error);
if (isolate == NULL) {
- LOGE("Couldn't create isolate: %s", error);
+ LOGE("Couldn't create isolate: %s", *error);
return false;
}
@@ -276,7 +277,8 @@ int VMGlue::Invoke(const char* function, int argc, Dart_Handle* args) {
// Lookup and invoke the appropriate function.
LOGI("invoking %s", function);
- result = Dart_Invoke(library, Dart_NewStringFromCString(function), argc, args);
+ result =
+ Dart_Invoke(library, Dart_NewStringFromCString(function), argc, args);
if (Dart_IsError(result)) {
return ErrorExit("%s\n", Dart_GetError(result));
« no previous file with comments | « runtime/embedders/android/vm_glue.h ('k') | samples/android_sample/android_sample.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698