diff options
author | yfriedman@chromium.org <yfriedman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-24 01:34:41 +0000 |
---|---|---|
committer | yfriedman@chromium.org <yfriedman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-24 01:34:41 +0000 |
commit | b47feba236493f2e541d27e728f8978841353733 (patch) | |
tree | f6717d00ec3d9d598562fa46febe234e9f8e7321 /base/android/java | |
parent | 774d5f4c12771c3e5c439f74560be308e2e3fc34 (diff) | |
download | chromium_src-b47feba236493f2e541d27e728f8978841353733.zip chromium_src-b47feba236493f2e541d27e728f8978841353733.tar.gz chromium_src-b47feba236493f2e541d27e728f8978841353733.tar.bz2 |
Update net/android/network_library.cc with fresher code.
Also adds it to the build to ensure it doesn't suffer bit-rot again, and
include Java-side component.
Review URL: http://codereview.chromium.org/10171009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133591 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/android/java')
-rw-r--r-- | base/android/java/org/chromium/base/CalledByNativeUnchecked.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/base/android/java/org/chromium/base/CalledByNativeUnchecked.java b/base/android/java/org/chromium/base/CalledByNativeUnchecked.java new file mode 100644 index 0000000..8b6fdf4 --- /dev/null +++ b/base/android/java/org/chromium/base/CalledByNativeUnchecked.java @@ -0,0 +1,22 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package org.chromium.base; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +// It only makes sense to use this annotation on methods that declare a throws... spec. +// However, note that the exception received native side maybe an 'unchecked' (RuntimeExpception) +// such as NullPointerException, so the native code should differentiate these cases. +// Usage of this should be very rare; where possible handle exceptions in the Java side and use a +// return value to indicate success / failure. + +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +public @interface CalledByNativeUnchecked { + public String value() default ""; +} |