зеркало из https://github.com/mozilla/gecko-dev.git
Bug 755070 - Move WrappedJavaObject comment to the class it refers to. rs=snorp DONTBUILD NPOTB
This commit is contained in:
Родитель
f6b06040ea
Коммит
becb75667e
|
@ -36,15 +36,6 @@ class AutoLocalJNIFrame;
|
|||
|
||||
void InitAndroidJavaWrappers(JNIEnv *jEnv);
|
||||
|
||||
/*
|
||||
* Note: do not store global refs to any WrappedJavaObject;
|
||||
* these are live only during a particular JNI method, as
|
||||
* NewGlobalRef is -not- called on the jobject.
|
||||
*
|
||||
* If this is needed, WrappedJavaObject can be extended to
|
||||
* handle it.
|
||||
*/
|
||||
|
||||
class RefCountedJavaObject {
|
||||
public:
|
||||
RefCountedJavaObject(JNIEnv* env, jobject obj) : mRefCnt(0), mObject(env->NewGlobalRef(obj)) {}
|
||||
|
@ -66,6 +57,14 @@ private:
|
|||
jobject mObject;
|
||||
};
|
||||
|
||||
/*
|
||||
* Note: do not store global refs to any WrappedJavaObject;
|
||||
* these are live only during a particular JNI method, as
|
||||
* NewGlobalRef is -not- called on the jobject.
|
||||
*
|
||||
* If this is needed, WrappedJavaObject can be extended to
|
||||
* handle it.
|
||||
*/
|
||||
class WrappedJavaObject {
|
||||
public:
|
||||
WrappedJavaObject() :
|
||||
|
|
Загрузка…
Ссылка в новой задаче