summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/bridge
Commit message (Collapse)AuthorAgeFilesLines
* Control access to inherited methods of jsinterface objectsSelim Gurun2012-09-106-9/+120
| | | | | | | | | | Bug: 7073422 Use a flag and annotation for allowing access to inherited methods of jsinterface objects. When flag is false, no annotation is needed. When flag is true, annotation is needed for allowing access to inherited methods. Change-Id: I610119dc5410d8df1962fa9dbea09866f81d374c
* Handle uncaught exceptions from methods called through the Java BridgeSteve Block2012-04-264-4/+28
| | | | | | | | | | | If a method called on a Java object through the Java Bridge throws an uncaught exception, handle it native-side by clearing the exception to prevent a crash, and throwing a JavaScript exception. See tests in https://android-git.corp.google.com/g/184260 Bug: 6386557 Change-Id: Ida96e9be7dba714cc8332682615c896120c50ab1
* Remove JSC-specific code and V8 guards from Android-specific codeSteve Block2012-02-161-4/+4
| | | | | | | Also removes such code from downstream edits to non-Android-specific code. Bug: 5495373 Change-Id: I478824af2e6ff0eff9a43a9534c2a5ee0e99e9f8
* Fix JavaBridge to handle overflow of array lengthSteve Block2011-11-211-5/+10
| | | | | | | | | | When converting to a Java array type, if the length property of a Java Object is outside the bounds for a Java array, convert to null. Also convert to null if the length property is not a number. Bug: 5626284 Change-Id: Ic4029d58cebe2cab9a37d52af09456c3cab6e5cd
* Fix Java Bridge when coercing JavaScript string to Java char in arraysSteve Block2011-11-151-18/+10
| | | | | | | | | | | | | | | Currently, when converting coercing a JavaScript string to a method parameter of type Java char, we always use a value of 0. However, when coercing a JavaScript object to method parameter of type Java char array, we behave differently. In this case, if the element is a JavaScript string, we use the first character of the string for the char value. This change modifies the behaviour in the array case to match that in the non-array case. Bug: 5619677 Change-Id: Ifeee8940af0bb01df58eeff6c9dd7e1b40688790
* Initialize properties of JavaValueSteve Block2011-11-021-1/+12
| | | | | | | | | | | When converting from NPVariant to JavaValue, there are cases where we don't do an explicit conversion, but instead rely on the default value of the JavaValue for the corresponding type. We need to make sure that the default values are correctly set. This bug was introduced in http://trac.webkit.org/changeset/82194. Change-Id: I681a305e57a706d54e26c1e0d00ccc2d657bedd9
* Merge "Fix the Java bridge to correctly handle null strings"Steve Block2011-09-021-0/+15
|\
| * Fix the Java bridge to correctly handle null stringsSteve Block2011-09-021-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Passing null to methods expecting java/lang/String ... - Previously null was converted to the empty string but should be converted to Java null. - convertNPVariantToJavaValue() already converts a null NPVariant to a null WTF::String. - Fixed javaValueToJvalue() to convert a null WTF::String to a null jvalue. Returning null from a method with return type java/lang/String ... - Previously this would crash when trying to get the characters from the null jstring, but should return JavaScript undefined. - Fixed jvalueToJavaValue() to convert a null jvalue to a null WTF::String. - Fixed convertJavaValueToNPVariant() to convert a null WTF::String to a void NPVariant. Both of these are regressions from HC due to http://trac.webkit.org/changeset/82194. Added tests in https://android-git.corp.google.com/g/#/c/132580 Bug: 5222742 Change-Id: Id08bc7b40a51426fa7638ad0ed5260d09f3e28bb
* | Fix some leaked JNI local references in the Java BridgeSteve Block2011-09-014-11/+25
|/ | | | | | | This includes a cherry-pick of http://trac.webkit.org/changeset/92689 Bug: 5244518 Change-Id: I38704f2307ab667ee6019fb096265609e27618cc
* Merge "Fix property access in the Java bridge"Steve Block2011-08-101-1/+22
|\
| * Fix property access in the Java bridgeSteve Block2011-08-101-1/+22
| | | | | | | | | | | | | | | | | | This patch fixes JavaInstanceJobject::getField() to use getJNIField() correctly. Bug: 5140493 Change-Id: Ib29fe0a010535f3a8dc2b9084c4e4440169971b2
* | Add missing calls to JavaInstance::end() in JavaNPObjectInvoke() and ↵Steve Block2011-08-081-2/+6
|/ | | | | | | JavaNPObjectGetProperty() Bug: 5006441 Change-Id: I2da7a6f626560416cf5cac0cde3193a9074fab0f
* Merge "Update JavaMethodJobject with upstreamed version of fix"Steve Block2011-07-201-12/+8
|\
| * Update JavaMethodJobject with upstreamed version of fixSteve Block2011-07-201-12/+8
| | | | | | | | | | | | | | See https://bugs.webkit.org/show_bug.cgi?id=62389 Bug: 4585284 Change-Id: Ib99f9ff5d3b552fb7a40b00324f3e96ffc7e3e23
* | Cherry-pick WebKit change 91260 to fix JNI string null-terminationSteve Block2011-07-191-3/+3
|/ | | | | | | See http://trac.webkit.org/changeset/91260 Bug: 4727789 Change-Id: I2f01bde12463a3c19659340cdb85b69eaecbd0f7
* Merge WebKit at r84325: Fix uses of JavaInstance.Ben Murdoch2011-06-102-1/+5
| | | | | | | | | The JavaInstance class is now an interface, so use the provided JavaInstanceJobject implementation instead. See http://trac.webkit.org/changeset/82950 Change-Id: I782e3887e4f059733fbc054ca1d9d97d94e817ef
* Merge WebKit at r84325: Initial merge by git.Ben Murdoch2011-06-1032-123/+277
| | | | Change-Id: Ic1a909300ecc0a13ddc6b4e784371d2ac6e3d59b
* Fix build break for emulatorKristian Monsen2011-06-091-2/+2
| | | | | | JavaTypeString is only available for V8. Change-Id: I53a1d36b61268496486264cbc6c96fe1e0a5fbd3
* Fix a bug in the V8 JNI bindings when creating JNI method signaturesSteve Block2011-06-091-0/+12
| | | | | | | | | | | | This was introduced by the latest merge to WebKit r82507. WebKit now uses a new JavaTypeString, distinct from JavaTypeObject, for representing strings in the JNI bridge. We need to account for this when building the JNI method signature. See https://bugs.webkit.org/show_bug.cgi?id=62389 for details. Bug: 4585284 Change-Id: I6a54679b954c32bf03d715da3c958c61baa5fecc
* Merge WebKit at r82507: Fix conflicts due to JNI refactoringSteve Block2011-06-082-57/+30
| | | | | | | | | | | | | | | | | | | | | | | | | - JavaNPObjectV8.cpp Due to new JavaInstance::getField() http://trac.webkit.org/changeset/80653 - JNIUtilityPrivate.cpp - Android has a number of local modifications to convert numeric NPVariant values to a JNI jstring, using toString() via JNI. However, after the upstream refactoring, we no longer convert NPVariant directly to jvalue. Instead, we go via a new JavaValue type, which represents strings as JavaTypeString using WTF::String. This patch updates the Android modifications to set the JavaValue using WTF::String methods, without using JNI. Note that the spec for these conversions - http://jdk6.java.net/plugin2/liveconnect - does not require the use of toString(), so this is OK. - Android also adds handling for converting arrays from NPVariant to jvalue. However, the intermediate JavaValue type does not yet have support for arrays. We get around this with an ugly hack, where we continue to create a jarray and set this as the object field of the JavaValue. When converting from a JavaValue to a jvalue, we add handling for arrays. http://trac.webkit.org/changeset/82194
* Merge WebKit at r82507: Initial merge by gitSteve Block2011-06-0840-525/+784
| | | | Change-Id: I60ce9d780725b58b45e54165733a8ffee23b683e
* Remove a FIXME from JavaNPObjectV8 that was forking us from upstreamSteve Block2011-06-081-3/+0
| | | | | | | | | Filed https://bugs.webkit.org/show_bug.cgi?id=62275 to track this issue upstream. This will reduce future merge conflicts. Change-Id: I22c0826c218bb81f58fb60609849b41b456e6e4c
* Fix a whitespace diff with upstream to avoid a future merge conflictSteve Block2011-06-081-1/+0
| | | | Change-Id: Ia6d9bd8b0a8cd99a569599034b6138e29d89b24d
* Remove Android guard EMULATE_JSC_BINDINGSSteve Block2011-06-023-72/+30
| | | | | | | | | This flag is always set to true and will not be upstreamed, so should be removed, along with code for the 'else' case. Also clean up Android modifications to minimise diff and add guards. Change-Id: I7d3b7bab2fef772bffdf3a402cc318dbea5f5865
* Merge WebKit at r80534: Fix JavaMethod.cppBen Murdoch2011-06-021-0/+4
| | | | | | | | | Partial cherry pick of http://trac.webkit.org/changeset/81040 Need to add the JSC guard (it was added unguraded in http://trac.webkit.org/changeset/79904) Change-Id: I880e241e2369ee4ffc616286d195989655e18cc2
* Merge WebKit at r80534: Fix Java Bridge.Ben Murdoch2011-06-023-20/+9
| | | | | | | | | | Fix conflicts and reflect the upstream changes made in http://trac.webkit.org/changeset/80467. Note that our JNIUtilityPrivate.cpp is significantly forked from upstream. Change-Id: I390f1089d861fa29b6c15118638d029dea4356d8
* Merge WebKit at r80534: Fix conflicts.Ben Murdoch2011-06-021-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Android.jscbindings.mk 79223 Conflict due to http://trac.webkit.org/changeset/79223 Android.mk Conflicts due to http://trac.webkit.org/changeset/79825 and http://trac.webkit.org/changeset/79978 Android.v8bindings.mk 80367 Conflicts due to http://trac.webkit.org/changeset/80103 and http://trac.webkit.org/changeset/80367 HTMLMediaElement.cpp Conflicts due to http://trac.webkit.org/changeset/80030 and local TOUCH_EVENTS modifications. HTMLDocumentParser.cpp Conflict due to http://trac.webkit.org/changeset/79772 and local ANDROID_INSTRUMENT modifications. CachedResourceLoader.cpp|h Conflicts due to http://trac.webkit.org/changeset/78602 and ANDROID_BLOCK_NETWORK_IMAGE. MemoryCache.h Conflicts due to http://trac.webkit.org/changeset/78848 and ANDROID_INSTRUMENT. FrameView.cpp Conflict due to http://trac.webkit.org/changeset/78928 and locally added updatePositionedObjects function. NetworkStateNotifier JobjectWrapper.cpp Git seems to have got confused with a rename here in JobjectWrapper.cpp, keep ours. Conflicts due to http://trac.webkit.org/changeset/79563 and local Android additions. PluginViewNone.cpp 79904 Conflicts due to http://trac.webkit.org/changeset/79904 and local cherry pick of http://trac.webkit.org/changeset/79988 RenderBox.cpp Conflicts due to http://trac.webkit.org/changeset/79467 and local android modifications. Change-Id: I98bd80de86b5169212da137ad3df42c1c35e8931
* Merge WebKit at r80534: Intial merge by GitBen Murdoch2011-06-0261-703/+899
| | | | Change-Id: Ia7a83357124c9e1cdb1debf55d9661ec0bd09a61
* Merge WebKit at r78450: Initial merge by git.Steve Block2011-05-248-44/+47
| | | | Change-Id: I6d3e5f1f868ec266a0aafdef66182ddc3f265dc1
* Merge WebKit at r76408: Fix Bridge.hBen Murdoch2011-05-2319-18/+20
| | | | | | | | Cherry pick of upstream http://trac.webkit.org/changeset/79988 Needed now due to FastAllocBase and Noncopyable changes in this merge. Change-Id: I26c91f7940b106db21e26c37507490acd1546cff
* Merge WebKit at r76408: Initial merge by git.Ben Murdoch2011-05-233-5/+10
| | | | Change-Id: I5b91decbd693ccbf5c1b8354b37cd68cc9a1ea53
* Merge WebKit at r75993: Initial merge by git.Ben Murdoch2011-05-161-2/+2
| | | | Change-Id: I602bbdc3974787a3b0450456a30a7868286921c3
* Merge WebKit at r75315: Initial merge by git.Steve Block2011-05-1289-0/+16351
Change-Id: I570314b346ce101c935ed22a626b48c2af266b84