Re: [9] Review request: 8154203: Use StackWalker instead of the now-deprecated sun.reflect.Reflection class

2016-04-14 Thread Mandy Chung

> On Apr 14, 2016, at 3:27 PM, Kevin Rushforth  
> wrote:
> 
> Hi Vadim,
> 
> Please review:
> 
> https://bugs.openjdk.java.net/browse/JDK-8154203
> http://cr.openjdk.java.net/~kcr/8154203/webrev.00/
> 
> It's a straight-forward fix to replace Reflection::getCallerClass with 
> StackWalker::getCallerClass and remove the (no longer needed) CallerSensitive 
> annotation.

+1

It’s good to see this migrate to use StackWalker.

Mandy



[9] Review request: 8154203: Use StackWalker instead of the now-deprecated sun.reflect.Reflection class

2016-04-14 Thread Kevin Rushforth

Hi Vadim,

Please review:

https://bugs.openjdk.java.net/browse/JDK-8154203
http://cr.openjdk.java.net/~kcr/8154203/webrev.00/

It's a straight-forward fix to replace Reflection::getCallerClass with 
StackWalker::getCallerClass and remove the (no longer needed) 
CallerSensitive annotation.


-- Kevin



[9] Review request for 8154161: Webkit: Conversion from string literal loses const qualifier

2016-04-14 Thread Murali Billa

Hi  Kevin, Alexander & Arun, 

Can you please review below fix.

JBS : https://bugs.openjdk.java.net/browse/JDK-8154161

Webrev : http://cr.openjdk.java.net/~mbilla/8154161/webrev.00/


Thanks, 
Murali


Jvm crash: es2 pipeline crashs jvm on macosx vm

2016-04-14 Thread Ali Ebrahimi
When running javafx apps with es2 pipeline on macosx vm I get jvm crash.

The following patch fixes this issue and I can run Ensemple8 application
with es2 pipeline successfully.
The good news is that 3D support is works fine.

diff -r 3f15f2e59063
modules/graphics/src/main/native-prism-es2/macosx/MacOSXWindowSystemInterface.m
---
a/modules/graphics/src/main/native-prism-es2/macosx/MacOSXWindowSystemInterface.m
Wed
Apr 13 12:36:43 2016 -0700
+++
b/modules/graphics/src/main/native-prism-es2/macosx/MacOSXWindowSystemInterface.m
Thu
Apr 14 23:45:18 2016 +0430
@@ -68,7 +68,12 @@
 NSOpenGLPixelFormat *fmt = [[NSOpenGLPixelFormat alloc]
initWithAttributes : attribs];
 if (fmt == nil) {
 // should we fallback to defaults or not?
-fmt = [NSOpenGLView defaultPixelFormat];
+//fmt = [NSOpenGLView defaultPixelFormat];
+NSOpenGLPixelFormatAttribute attributes[] = {
+NSOpenGLPFAAllowOfflineRenderers,
+0
+};
+fmt = [[NSOpenGLPixelFormat alloc] initWithAttributes :
attributes];
 }

 [pool release];

-- 

Best Regards,
Ali Ebrahimi


[9] Review request: 8088916: Replace sun.net.www.ParseUtil#decode with public API

2016-04-14 Thread Alexander Zvegintsev

Hi Kevin,

please review  the fix
http://cr.openjdk.java.net/~azvegint/jdk/9/8088916/00/
for the issue
https://bugs.openjdk.java.net/browse/JDK-8088916

--
--
Thanks,
Alexander.



review: quiet Prism warnings

2016-04-14 Thread David Hill


Kevin, Chien,

would you review this quick fix to quiet some warnings ? Tested on OEL, Ubuntu, 
Mac Windows.

https://bugs.openjdk.java.net/browse/JDK-8154256
http://cr.openjdk.java.net/~ddhill/8154256/

--
David Hill
Java Embedded Development

"A man's feet should be planted in his country, but his eyes should survey the 
world."
-- George Santayana (1863 - 1952)



Glass: CGLCreateContext error: 10002: empty window on MacOSX VM

2016-04-14 Thread Ali Ebrahimi
On macosx vm:

We running with software pipeline user get CGLCreateContext error: 10002 in
glass native code so this error causes empty window without any controls in
app window.

The following patch fixes this issue and I can run Ensemple8 application
successfully.

diff -r 3f15f2e59063
modules/graphics/src/main/native-glass/mac/GlassView3D.m
--- a/modules/graphics/src/main/native-glass/mac/GlassView3D.m Wed Apr 13
12:36:43 2016 -0700
+++ b/modules/graphics/src/main/native-glass/mac/GlassView3D.m Thu Apr 14
23:08:16 2016 +0430
@@ -93,9 +93,18 @@
 };
 GLint npix = 0;
 CGLError err = CGLChoosePixelFormat(attributes, , );
-if (err != kCGLNoError)
+if (pix == NULL)
 {
-NSLog(@"CGLChoosePixelFormat error: %d", err);
+const CGLPixelFormatAttribute attributes2[] =
+{
+kCGLPFAAllowOfflineRenderers,
+(CGLPixelFormatAttribute)0
+};
+err = CGLChoosePixelFormat(attributes2, , );
+if (err != kCGLNoError)
+{
+NSLog(@"CGLChoosePixelFormat error: %d", err);
+}
 }
 }
 return pix;
-- 

Best Regards,
Ali Ebrahimi


Re: status behind JDK-8149738

2016-04-14 Thread Matthieu BROUILLARD
Many thanks to you and all the OpenJDK commiters for the great work &
support that you provide.

Matthieu

On Wed, Apr 13, 2016 at 7:49 PM, Guru Hb  wrote:

> Hi Matthieu,
>
> I could re-produce the crash as you have mentioned. Thanks for helping out
> to for the html test content.
>
> Please keep an eye on JI-9035239 for further updates.
>
> Thanks,
> Guru
>
>
> On 13/4/16 9:13 PM, Matthieu BROUILLARD wrote:
>
> Hi Guru,
>
> I have filled an issue in http://bugreport.java.com/ ; denominated for
> the moment JI-9035239.
>
> I have a simple reproducer test app that I also put in the bug report:
> 
> https://gist.github.com/McFoggy/e6166349b8ea012c925665fcf9625501
>
> The problem occures when colgroups>col width are reset/recomputed only. If
> in the webapp you uncheck the "Clear col sizes" combobox then the app
> should work correctly.
> If at startup you uncheck it ; it will normally work. What is weird is
> that if then you re-check it ; it will continue to work and will not fail
> anymore.
>
> Notice that with this simple reproducer test case I now reproduce the
> problem not only on 32bits versions but also on 64bits 8u74 & 8u77.
>
> Thanks
>
> Matthieu
>
>
> On Wed, Apr 13, 2016 at 5:07 AM, Guru Hb  wrote:
>
>> Hi Matthieu,
>>
>> If you could update the re-producer html/js in the JBS would be very help
>> full.
>>
>> I could reproduce with
>> http://advanced-gwt.sourceforge.net/demo/index.html --> "Click Heading
>> (Caption)" --> Crash. There are multiple Table listed in the left panel,
>> where i can re-produce the crash which originates from
>> "com.sun.webkit.WebPage.twkProcessMouseEvent".
>>
>> Thanks,
>> Guru
>>
>> On 12/4/16 10:00 PM, Matthieu BROUILLARD wrote:
>>
>> Hi Guru,
>>
>> I think I have isolated the problem ; it relates to GWT FlexTable (with
>> fixed column & row size) that is cleaned and refilled.
>> Tomorrow I'll build a clean GWT reproducer app and will send it to you.
>> I'll also do the exact same in pure html/js without GWT being involved.
>>
>> Matthieu
>>
>>
>> On Tue, Apr 12, 2016 at 11:18 AM, Guru Hb < 
>> guru...@oracle.com> wrote:
>>
>>> Thank you Matthieu,
>>>
>>> Let me create a sample GWT web  application with tabs along with the use
>>> case mentioned below. Will update the status in the JBS.
>>>
>>> Thanks,
>>> Guru
>>>
>>>
>>> On 12/4/16 2:26 PM, Matthieu BROUILLARD wrote:
>>>
>>> Hi,
>>>
>>> let me try to give more insights
>>>
>>> *>>> 0. resume of running and crashing JVMs*
>>> 64 bits: all tested work (at least issue not reproduced)
>>> 32 bits:
>>>- 8u74-i586, 8u60-i586: fail
>>>- 8u45-i586: OK
>>>
>>> *>>> 00. Application under test*
>>> We have simplified the reproducer JavaFX app as "just" a simple webview
>>> opening our GWT webapplication.
>>> There's no magic here, just a call to load() method on the WebEngine of
>>> a WebView.
>>>
>>> *>>> 1. What Content is loaded to WebEngine. (Live webpage or custom
>>> content)*
>>> It is a dynamic GWT webapplication.
>>> When launched, the application loads correctly: dynamic content
>>> (multiple dynamic parts in the app) is created/loaded/shown.
>>> The loaded page shows several tabs, when clicking on a tab the JVM
>>> crashes.
>>>
>>> *>>> 2. which mouse event lead to crash (Right / left click, Double
>>> click, Scroll)*
>>> single left click.
>>>
>>> *>>> 3. W.r.t 2nd point, is there a pop-up dialog exist ? or what was
>>> the html element under which mouse event triggered (Input element, Editable
>>> div, Form elements, Image , upload dialog, table,etc).*
>>> it is a simple div element that is CSS styled.
>>>
>>> *>>> 4. Any Modal Dialog used in the application under test , which will
>>> be used as a call back to an event from WebEngine ?*
>>> No in this case our JavaFX reproducer app, is nothing more than:
>>> ...
>>> WebView wv = new WebView();
>>> wv.getEngine().load(" http://ourwebapp;);
>>> ...
>>>
>>> In our global product we have indeed interaction between the host JVM &
>>> the webapp ; but here we reproduce the crash with a simple app consisting
>>> of the 2 lines above.
>>>
>>>
>>> On Tue, Apr 12, 2016 at 9:41 AM, Guru Hb < 
>>> guru...@oracle.com> wrote:
>>>
 Hi Matthieu,

 Crash is due to Mouse event is not handled correctly from WebView
 context.

 Could you please provide these details.

 1. What Content is loaded to WebEngine. (Live webpage or custom content)
 2. which mouse event lead to crash (Right / left click, Double click,
 Scroll)
 3. W.r.t 2nd point, is there a pop-up dialog exist ? or what was the
 html element under which mouse event triggered (Input element, Editable
 div, Form elements, Image , upload dialog, table,etc).
 4. Any Modal Dialog used in the application under test , which will be
 used as a call back to an event from WebEngine ?

Re: Webkit: Conversion from string literal loses const qualifier

2016-04-14 Thread Ali Ebrahimi
Hi,

On Thu, Apr 14, 2016 at 11:30 AM, Murali Billa 
wrote:

> Hi Ali,
>
> Are you getting error due to 2nd OR 3rd parameter?As per your error,
> you are getting error for 3rd parameter right? As you already know, we
> fixed the issue for 3rd parameter.
>
> ..\..\..\..\src\main\native\Source\WebCore\platform\java\api\BackFo
>  rwardListJava.cpp(46)
>  : error C2664: 'jmethodID initMethod(JNIEnv *,jclass,char *,const
>  char *)' : cannot convert argument 3 from 'const char [7]' to 'char *'
>   Conversion from string literal loses const qualifier (see
>  /Zc:strictStrings)
>
> I tried to reproduce the error for 2nd parameter with VS 2013 professional
> + update 5 on windows 7 64 bit. But Im not able to get the error for 2nd
> parameter and code is building successfully.
>

I build with VS2013 utimate update 5 on win 8.1 64 bit with WinSDK 8.1 and
get compile error. So I can not say anything here.


> Can you please confirm about which parameter(2nd/3rd) is causing the error
> for you?
>

I think indexing start from 1 in error msgs. argument 1, argument 2, ...
The error relates to parameter *name *in initMethod.

Please follow error msgs more precisely:

..\..\..\..\src\main\native\Source\WebCore\platform\java\api\BackForwardListJava
.cpp(46) : error C2664: 'jmethodID initMethod(JNIEnv *,jclass,char *,const
char*)' : cannot convert argument 3 from 'const char [7]' to 'char *'
Conversion from string literal loses const qualifier (see
/Zc:strictStrings)
Line 46:

*return initMethod(env, cls, "", signature);*

Here, argument 3 is *""* (*const char [7]*) and its target type is *"char
*"* in initMethod signature. So here code implicitly tries to convert const
string to non-const string. If you want compiler not complain here you
should explicitly cast string literal to "char *".
return initMethod(env, cls, *(char*)*"", signature);


..\..\..\..\src\main\native\Source\WebCore\platform\java\api\BackForwardListJava
.cpp(87) : error C2664: 'jmethodID initMethod(JNIEnv *,jclass,char *,const
char*)' : cannot convert argument 3 from *'const char [18]'* to 'char *'
Conversion from string literal loses const qualifier (see
/Zc:strictStrings)

Line 87:

static jmethodID notifyItemChangedMID = initMethod(env,
getJEntryClass(), "notifyItemChanged", "()V");

Here, argument 3 is *"notifyItemChanged" *with type  *'const char [18]' *and
its target type is *"char *"* in initMethod signature.
Above error reason and workaround applies here.

static jmethodID notifyItemChangedMID = initMethod(env,
getJEntryClass(), (*char**)"notifyItemChanged", "()V");

..\..\..\..\src\main\native\Source\WebCore\platform\java\api\BackForwardListJava
.cpp(98) : error C2664: 'jmethodID initMethod(JNIEnv *,jclass,char *,const
char*)' : cannot convert argument 3 from *'const char [20]' *to 'char *'
Conversion from string literal loses const qualifier (see
/Zc:strictStrings)
Line 98:

initMethod(env, getJEntryClass(), "notifyItemDestroyed", "()V");

Here, argument 3 is "notifyItemDestroyed" with compiler type *'const char
[20]' *and target type is *"char *"* in initMethod signature.

Again all same.
workaound:

initMethod(env, getJEntryClass(), (*char**)"notifyItemDestroyed",
"()V");

..\..\..\..\src\main\native\Source\WebCore\platform\java\api\BackForwardListJava
.cpp(311) : error C2664: 'jmethodID initMethod(JNIEnv *,jclass,char *,const
char *)' : cannot convert argument 3 from 'const char [14]' to 'char *'
Conversion from string literal loses const qualifier (see
/Zc:strictStrings)

Line 311:

static jmethodID notifyChangedMID = initMethod(
env,
getJBFLClass(),
"notifyChanged",
"()V");

Finally, here argument 3 is "notifyChanged" with compiler type *'const char
[14]' *and target type is *"char *"* in initMethod signature.

So, same error and workaound:
static jmethodID notifyChangedMID = initMethod(
env,
getJBFLClass(),
(*char**)"notifyChanged",
"()V");

So we have two way,
1: add all above casts
2: change initMethod signature:
static jmethodID initMethod(JNIEnv* env, jclass cls, *const *char* name,
const char* signature)


Both works for me, but I vote for option 2.

What do you think?

-- 

Best Regards,
Ali Ebrahimi