| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
JNIBridge.cpp is now used by both JSC and V8
This removes the last file from V8Bindings
$ diff WebCore/bridge/jni/JNIBridge.cpp V8Binding/jni/jni_runtime.cpp
2d1
< * Copyright (C) 2003, 2004, 2005, 2007, 2009 Apple Inc. All rights reserved.
28c27
< #include "JNIBridge.h"
---
> #include "jni_runtime.h"
30,32c29
< #if ENABLE(MAC_JAVA_BRIDGE)
<
< #include "CString.h"
---
> #include "JNIUtility.h"
35,45d31
<
< #ifdef NDEBUG
< #define JS_LOG(formatAndArgs...) ((void)0)
< #else
< #define JS_LOG(formatAndArgs...) { \
< fprintf(stderr, "%s:%d -- %s: ", __FILE__, __LINE__, __FUNCTION__); \
< fprintf(stderr, formatAndArgs); \
< }
< #endif
<
< using namespace JSC;
49d34
<
106,109d90
< #if USE(JSC)
< ASSERT(JSLock::lockCount() > 0);
< #endif
<
127,130d107
< #if USE(JSC)
< JSLock lock(SilenceAssertionsOnly);
< #endif
<
177,178d153
<
< #endif // ENABLE(MAC_JAVA_BRIDGE)
Change-Id: I3f0aabc5af56083aa950eca1609b2fe9b46726c9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
JNIBridge.h is now used by both JSC and V8
$ diff WebCore/bridge/jni/JNIBridge.h V8Binding/jni/jni_runtime.h
2d1
< * Copyright (C) 2003, 2004, 2005, 2007, 2009, 2010 Apple Inc. All rights reserved.
27,30c26,27
< #ifndef JNIBridge_h
< #define JNIBridge_h
<
< #if ENABLE(MAC_JAVA_BRIDGE)
---
> #ifndef jni_runtime_h
> #define jni_runtime_h
31a29
> #include "Bridge.h"
34,35c32,33
< #if USE(JSC)
< #include "JavaStringJSC.h"
---
> #if USE(V8)
> #include "JavaStringV8.h"
64,66d61
< #if USE(JSC)
< operator UString() const { return m_impl.uString(); }
< #endif
118,120c113
< #endif // ENABLE(MAC_JAVA_BRIDGE)
<
< #endif // JNIBridge_h
---
> #endif // jni_runtime_h
Change-Id: I59c7dafb295aa7c81e79283333266c3f9f5a9a52
|
|
|
|
|
|
|
|
|
| |
V8 versions of JavaMethod and JavaParameter are provided by jni_runtime.
This change updates those classes to match the JSC versions in JNIBridge.
The changes are syntactic only and do not affect behavior.
This will allow jni_runtime to be merged with JNIBridge.
Change-Id: I2fceed94e1b57d133a068f51a2a40797447b7b58
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
JavaField is script-engine specific. The JSC version of JavaField was moved out
of the script-independent file JNIBridge (previosuly named jni_runtime) in
http://trac.webkit.org/changeset/53849
This change makes the equivalent move for V8.
This will make V8's version of jni_runtime script-independent, allowing it to be
merged with JNIBridge in WebCore in the future.
This change is being upstreamed to webkit.org in
https://bugs.webkit.org/show_bug.cgi?id=34166
Change-Id: I7b35bfe4e8e7820623a824028eb64d06421bdb6b
|
|
|
|
|
|
| |
The JSC version was made script-engine-independent in http://trac.webkit.org/changeset/53193
Change-Id: Ie4d3a6afc146cc18a3b6a65eed16ff7bcdb8d447
|
|
|
|
|
|
|
| |
This change makes it far easier to compare these files with WebCore/bridge/jni/Bridge.[cpp|h],
with which these files will eventually be merged.
Change-Id: I1b4ba9843f61c909568f85c65a0872a36d727fb3
|
|
|
|
|
|
|
|
|
| |
WebKit change http://trac.webkit.org/changeset/53449 moved the JSC-specific implementation
of JavaString to JavaStringJSC.h. This is the V8 equivalent of that change.
This is being upstreamed to webkit.org in https://bugs.webkit.org/show_bug.cgi?id=33953
Change-Id: I6cadc4f4f941aab900aeaf3251a5cad77d050b9b
|
|
|
|
| |
Change-Id: Icf99c709929ef14551de61e55780b97767575f01
|
|
|
|
|
|
|
| |
This is the V8 equivalent of http://trac.webkit.org/changeset/53412
It is being upstreamed to webkit.org in https://bugs.webkit.org/show_bug.cgi?id=33951
Change-Id: Id22d59b7a5e0be72d594d454bb41c58760d824ff
|
|
|
|
|
|
|
| |
This is the V8 equivalent of http://trac.webkit.org/changeset/51756
It is being upstreamed to webkit.org in https://bugs.webkit.org/show_bug.cgi?id=33901
Change-Id: I336687e546748a7823f5e2d18f1ac1112a30a60c
|
|
|
|
|
|
|
| |
This is the V8 equivalent of http://trac.webkit.org/changeset/53443
It is being upstreamed to webkit.org in https://bugs.webkit.org/show_bug.cgi?id=33898
Change-Id: I27dcf73cc7d8c0303243ea632361f2210819cbc4
|
|
|
|
|
|
|
|
|
|
|
| |
jni_utility_private to JNIUtility and JNIUtilityPrivate
See http://trac.webkit.org/changeset/53497
This is required to sync the Android tree with webkit.org to allow unforking in WebCore/bridge.
This change required updating headers in Android-specific files in WebCore and WebKit.
Change-Id: I4b80eb3eadcff66cbd261aa6ccef0f37927250b1
|
|
|
|
|
|
|
|
|
|
|
|
| |
See http://trac.webkit.org/changeset/53436
This is required to sync the Android tree with webkit.org to allow unforking in WebCore/bridge.
Note that changes to the following were required as a result of this cherry-pick.
- WebCoreFrameBridge.cpp - updated to use JavaInstance::m_instance
- V8Binding/jni/jni_instance - Updated to rename the V8 version of JavaInstance::_instance to JavaInstance::m_instance
to allow the same code path to be used in WebCoreFrameBridge.
Change-Id: I6884f7424c8a0917095f828bda4ca62452e527b5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, V8 uses weak references to the Java object owned by JObjectWrapper.
This is in contrast to JSC, which uses strong references in JObjectWrapper.
However, for the special-case where JObjectWrapper is used in JavaInstance in
WebCoreFrameBridge, JSC uses WeakJavaInstance to swap the strong references for
weak references.
This change updates the V8 version of JObjectWrapper to use strong references
to match the JSC version. To maintain the weak reference behavior where
JObjectWrapper is used in JavaInstance in WebCoreFrameBridge, V8 now make use of
WeakJavaInstance too. This requires changes to jni_npobject to call the
necessary methods on JavaInstance to swap the references when the object is
accessed.
Change-Id: I3724d7e6437588feb0268a2670b02a93b52e54f0
|
|
|
|
|
|
| |
implementing custom ref and deref methods.
Change-Id: I9cc775224edcda65884461eaf0f4ff7efb5922be
|
|
|
|
| |
Change-Id: I640d5ca9e38d78fd662550fa389cf8b463dc78b6
|
|
|
|
|
|
|
|
| |
The files in question are npapi.h and npruntime.h. The Android versions at
V8Bindings/npapi/ are identical to the WebKit versions, other than a couple of
trivial changes, which are accounted for in this patch.
Change-Id: I998a5863181283aa6153c84a745b1923d9b5721b
|
| |
|
| |
|
|
|
|
| |
This allows JavaScript call a Java function and returns a string back to JavaScript. This patch is needed by the current Gmail app.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
WebCoreFrameBridge.cpp needs to release NPObject to get proper ref count
because the way V8 binding works.
JObjectWraper holds a weak reference to the Java object to break cycles.
Also fix ScriptController::haveWindowShell to match KJS build, this should be
upstreamed to Chrome project (I am going to do it).
The binding does not use weak reference to hold Java objects, currently
it does not create cycles between Java and JavaScript objects. I didn't see
it is an issue here. A future work is to add logging/debugging code to
make sure global Java references are dropped.
|
|
|
|
|
|
|
|
|
|
| |
Implemented invoke Java methods and fecth Java fields from JavaScript.
Java-side access native-JS objects is not supported. JavaScript-side
modification of JS objects is not supported.
The implementation uses NPAPI, which is simple, but less efficient.
Java abstraction is very much copied from original WebCore/bridge/jni,
except all JSC bindings are replaced by NPAPI.
|
|
Not compiling yet, and not enabled in the build script. Get it checked it, and
will merge the branch back to master and work there.
|