Bug 62389 - [V8] JavaMethodJobject::signature() incorrectly encodes arguments of type JavaTypeString
Summary: [V8] JavaMethodJobject::signature() incorrectly encodes arguments of type Jav...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Steve Block
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-09 11:57 PDT by Steve Block
Modified: 2011-07-20 08:58 PDT (History)
7 users (show)

See Also:


Attachments
Patch (2.09 KB, patch)
2011-06-10 04:01 PDT, Steve Block
no flags Details | Formatted Diff | Diff
Patch (2.13 KB, patch)
2011-07-20 07:40 PDT, Steve Block
tonyg: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Block 2011-06-09 11:57:54 PDT
On V8, JavaTypeString is now distinct from JavaTypeObject, but both need to represented by a JNI class description when forming a JNI method signature.
Comment 1 Steve Block 2011-06-09 12:15:02 PDT
It looks like the culprit is http://trac.webkit.org/changeset/82194, which introduced JavaTypeString, but didn't update JavaMethodJobject::signature() to account for this.
Comment 2 Steve Block 2011-06-10 04:01:32 PDT
Created attachment 96728 [details]
Patch
Comment 3 Tony Gentilcore 2011-07-20 07:01:02 PDT
Comment on attachment 96728 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=96728&action=review

> Source/WebCore/ChangeLog:8
> +        Covered by existing tests.

I don't understand. Then, should this patch be changing expectations to pass an existing failing test?

> Source/WebCore/bridge/jni/JavaMethodJobject.cpp:135
> +                requiresClassName |= (type == JavaTypeString);

Is this code perf sensitive? Unless the compiler is smarter than I think it is, it seems like we lost a shortcut for JavaTypeObject.
Comment 4 Steve Block 2011-07-20 07:40:52 PDT
Created attachment 101469 [details]
Patch
Comment 5 Steve Block 2011-07-20 07:44:13 PDT
Committed r91362: <http://trac.webkit.org/changeset/91362>
Comment 7 Steve Block 2011-07-20 08:49:47 PDT
I think that actually the break was due to http://trac.webkit.org/changeset/91355
Comment 8 Ryosuke Niwa 2011-07-20 08:58:46 PDT
(In reply to comment #7)
> I think that actually the break was due to http://trac.webkit.org/changeset/91355

You're right.  Commented on the right bug :(