Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 368290

Summary: [Browser] passing of JS booleans to java is failing
Product: [Eclipse Project] Platform Reporter: Grant Gayed <grant_gayed>
Component: SWTAssignee: Grant Gayed <grant_gayed>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: gheorghe
Version: 3.7Flags: gheorghe: review+
Target Milestone: 3.7.2   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Grant Gayed CLA 2012-01-10 14:53:25 EST
A change (bug?) has been introduced in the JavascriptCore component that accompanies WebKitGTK.  As of WebKitGTK 1.4 the JSValueToBoolean() API now fails to resolve a boolean JSValueRef to 0 or 1, and as a result the Browser is interpreting all passed booleans as true since their values != 0.  This is a regression relative to WebKitGTK 1.2, where passed boolean values are being resolved fine.
Comment 1 Grant Gayed CLA 2012-01-10 15:36:45 EST
Fixed in the 3.8 stream, patch is at http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=c9bd1fa15de6e698115cdc36e7f63af25f01eda4 .

This should go into the 3.7.2 stream as well.  It affects users of BrowserFunction, which includes the Browser itself (eg.- its close() API).  BG added for a review.
Comment 2 Grant Gayed CLA 2012-01-10 16:02:59 EST
Same fix released to 3.7.2 stream > 20120110, closing report.