Bug 14648 - REGRESSION: JSObject.getWindow(this).call(...) only works for a brief period after applet started.
Summary: REGRESSION: JSObject.getWindow(this).call(...) only works for a brief period ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Java (show other bugs)
Version: 523.x (Safari 3)
Hardware: Macintosh OS X 10.4
: P1 Major
Assignee: Nobody
URL:
Keywords: InRadar, Regression
Depends on:
Blocks:
 
Reported: 2007-07-17 13:11 PDT by Glenn Brauen
Modified: 2007-08-31 12:05 PDT (History)
4 users (show)

See Also:


Attachments
Test case applet source code (1.91 KB, text/plain)
2007-07-17 13:14 PDT, Glenn Brauen
no flags Details
Test case HTML with embedded javascript. (2.12 KB, text/plain)
2007-07-17 13:17 PDT, Glenn Brauen
no flags Details
Ant build file for test case applet (1.02 KB, text/plain)
2007-07-17 13:18 PDT, Glenn Brauen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Glenn Brauen 2007-07-17 13:11:36 PDT
I have created a test case that reproduces this problem in Webkit nightly builds (r24285) and will attach the source for a java applet and an HTML page to this report.

LiveConnectTestApplet spawns a thread which invokes JSObject.getWindow(this).call(...) once every second.  The invoked javascript function counts the number of times it has been invoked and displays this information.  The applet meanwhile counts and displays the number of times it attempts to invoke the javascript function and the number of failures it detects (via the win.call() return code).

On Firefox and Safari2, this runs seemingly forever without failure.  On Webkit nightlys and Safari 3 beta, this works for about the first 15 seconds without failure and then starts to fail consistently for as long as I leave the applet run.  I have tested this on both a PowerBook G4 and on an iMac (Intel Duo), both running Mac OS X 10.4.10.
Comment 1 Glenn Brauen 2007-07-17 13:14:52 PDT
Created attachment 15550 [details]
Test case applet source code

You need to have plugin.jar (for JSObject) in your class path to compile this applet.
Comment 2 Glenn Brauen 2007-07-17 13:17:20 PDT
Created attachment 15551 [details]
Test case HTML with embedded javascript.

Invoke this to run testcase once LiveConnectTestApplet.java has been compiled into a jar and is in the same folder as this HTML.
Comment 3 Glenn Brauen 2007-07-17 13:18:20 PDT
Created attachment 15552 [details]
Ant build file for test case applet
Comment 4 Glenn Brauen 2007-07-18 08:01:18 PDT
(In reply to comment #0)

My java runtime is 1.5:

Java Plug-in 1.5.0
Using JRE version 1.5.0_07 Java HotSpot(TM) Client VM
Comment 5 David Kilzer (:ddkilzer) 2007-07-18 22:47:11 PDT
Quick steps to build:

1. Download all three attachments into one directory.
2. Open Terminal and 'cd' to that directory.
3. ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/plugin.jar .
4. ant build
Comment 6 David Kilzer (:ddkilzer) 2007-07-18 22:57:12 PDT
Confirmed with a local debug build of WebKit r24439 with Safari 3.0 (522.12) on Mac OS X 10.4.10 (8R218) with Java 1.5.0_07 on a PowerBook G4.

$ java -version
java version "1.5.0_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-164)
Java HotSpot(TM) Client VM (build 1.5.0_07-87, mixed mode, sharing)

Comment 7 David Kilzer (:ddkilzer) 2007-07-18 22:58:27 PDT
<rdar://problem/5346330>
Comment 8 Alexey Proskuryakov 2007-07-19 01:53:40 PDT
Per the description, this is a regression; marking accordingly.
Comment 9 Alexey Proskuryakov 2007-08-31 11:23:50 PDT
This seems to have been fixed at some point between r24513 and r24594. <http://trac.webkit.org/projects/webkit/changeset/24559> is the most likely candidate.
Comment 10 Glenn Brauen 2007-08-31 12:05:29 PDT
(In reply to comment #9)
> This seems to have been fixed at some point between r24513 and r24594.
> <http://trac.webkit.org/projects/webkit/changeset/24559> is the most likely
> candidate.
> 
 I just retested on both r25168 and r25328.  Test works properly on both.

Thanks,
Glenn