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

Unified Diff: content/browser/renderer_host/java/java_bound_object.cc

Issue 11428122: Let content_unittests almost build with the components build on android (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 8 years, 1 month 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 | « content/browser/android/browser_jni_registrar.h ('k') | content/common/android/address_parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/java/java_bound_object.cc
diff --git a/content/browser/renderer_host/java/java_bound_object.cc b/content/browser/renderer_host/java/java_bound_object.cc
index 4ea4878295d69dfb043efe47ef9ded3469801446..3dab6cbef419796e4c7f3f201dcafa70d903cdd6 100644
--- a/content/browser/renderer_host/java/java_bound_object.cc
+++ b/content/browser/renderer_host/java/java_bound_object.cc
@@ -194,6 +194,8 @@ bool CallJNIMethod(jobject object, const JavaType& return_type, jmethodID id,
// Take a copy and pass ownership to the variant. We must allocate using
// NPN_MemAlloc, to match NPN_ReleaseVariant, which uses NPN_MemFree.
size_t length = str.length();
+ // TODO(thakis): This causes linker errors in a components build. Figure
+ // out what to do.
char* buffer = static_cast<char*>(NPN_MemAlloc(length));
str.copy(buffer, length, 0);
STRINGN_TO_NPVARIANT(buffer, length, *result);
« no previous file with comments | « content/browser/android/browser_jni_registrar.h ('k') | content/common/android/address_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698