Changeset 74288 in webkit


Ignore:
Timestamp:
Dec 17, 2010 1:24:43 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2010-12-17 Shimeng (Simon) Wang <swang@google.com>

Reviewed by Steve Block.

Fix V8 JNI binding.
https://bugs.webkit.org/show_bug.cgi?id=51156

There're LayoutTests in:
http://trac.webkit.org/browser/trunk/LayoutTests/java/lc3/JSNumber
to exercise these code paths.
Though Chromium don't run them.
Tested on Android fast/events/touch tests.

  • bridge/jni/v8/JNIUtilityPrivate.cpp: (JSC::Bindings::convertNPVariantToJValue):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r74287 r74288  
     12010-12-17  Shimeng (Simon) Wang  <swang@google.com>
     2
     3        Reviewed by Steve Block.
     4
     5        Fix V8 JNI binding.
     6        https://bugs.webkit.org/show_bug.cgi?id=51156
     7
     8        There're LayoutTests in:
     9        http://trac.webkit.org/browser/trunk/LayoutTests/java/lc3/JSNumber
     10        to exercise these code paths.
     11        Though Chromium don't run them.
     12        Tested on Android fast/events/touch tests.
     13
     14        * bridge/jni/v8/JNIUtilityPrivate.cpp:
     15        (JSC::Bindings::convertNPVariantToJValue):
     16
    1172010-12-17  Simon Fraser  <simon.fraser@apple.com>
    218
  • trunk/WebCore/bridge/jni/v8/JNIUtilityPrivate.cpp

    r56105 r74288  
    8888        {
    8989            if (type == NPVariantType_Int32)
    90                 result.b = static_cast<char>(NPVARIANT_TO_INT32(value));
     90                result.b = static_cast<jbyte>(NPVARIANT_TO_INT32(value));
     91            else if (type == NPVariantType_Double)
     92                result.b = static_cast<jbyte>(NPVARIANT_TO_DOUBLE(value));
    9193            else
    9294                memset(&result, 0, sizeof(jvalue));
     
    107109            if (type == NPVariantType_Int32)
    108110                result.s = static_cast<jshort>(NPVARIANT_TO_INT32(value));
     111            else if (type == NPVariantType_Double)
     112                result.s = static_cast<jshort>(NPVARIANT_TO_DOUBLE(value));
    109113            else
    110114                memset(&result, 0, sizeof(jvalue));
     
    116120            if (type == NPVariantType_Int32)
    117121                result.i = static_cast<jint>(NPVARIANT_TO_INT32(value));
     122            else if (type == NPVariantType_Double)
     123                result.i = static_cast<jint>(NPVARIANT_TO_DOUBLE(value));
    118124            else
    119125                memset(&result, 0, sizeof(jvalue));
Note: See TracChangeset for help on using the changeset viewer.