Bug 32975 - [Binding] Bind missing WebKit <-> JavaScriptCore bridge APIs
Summary: [Binding] Bind missing WebKit <-> JavaScriptCore bridge APIs
Status: RESOLVED FIXED
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Library (Xamarin.Mac.dll) ()
Version: Master
Hardware: PC Mac OS
: High normal
Target Milestone: master
Assignee: Chris Hamons
URL:
Depends on:
Blocks:
 
Reported: 2015-08-11 16:06 UTC by Aaron Bockover [MSFT]
Modified: 2016-09-26 17:31 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Aaron Bockover [MSFT] 2015-08-11 16:06:14 UTC
In WebScriptObject.h, JSValue is exposed on the class if JSC_OBJC_API_ENABLED is defined, and at least in 10.10, it is defined. It is available at runtime.

This is a nicer API than having to drop down to getting the C pointer (WebScriptObject.JSObject, which is a JSObjectRef/IntPtr) to the JSC object and then manually bridging it back to the ObjC wrapper.
Comment 1 Aaron Bockover [MSFT] 2015-08-11 17:00:47 UTC
On closer look, it seems like we aren't binding anything that requires JSC_OBJC_API_ENABLED. This should always be available on Mac at least, and so we should audit WebKit for JSC bridge APIs that are currently unbound:

- WebFrameLoadDelegate webView:didCreateJavaScriptContext:contextForFrame:
- WebFrame javaScriptContext
- WebScriptObject JSValue
Comment 3 Chris Hamons 2016-09-23 22:09:17 UTC
https://github.com/xamarin/xamarin-macios/pull/890
Comment 4 Chris Hamons 2016-09-26 17:31:47 UTC
Landed in master.