12 Commits

Author SHA1 Message Date
WarWithinMe 1542fa3cfc Serialize Dictionary type to V8 object (#2303)
* Serialize Dictionary type to V8 object

Handle Dictionary type, otherwise it will be treated as class/structs and cause exception.

* Make the testcase covert IDictionary interface & ensure consistent bracket style.
2018-03-23 15:02:38 +10:00
amaitland e47dd3e8a6 Fix Async JSB unable to return class
Added note about memory leak
Added Test case to validate fix
2018-03-05 12:24:09 +10:00
João Neves eacffebb68 Dont discard null Values from arrays (#2218)
* Don't discard arrays that contain null values
* Revert unintended change in this branch
* Added qunit test
* Code review and added new tests
2018-01-22 11:32:27 +10:00
amaitland afa3998e65 JSB - Add support for async methods to return classes
Structs and classes can now be returned from an async method
Properties and fields are supported now. The returned class/struct is readonly effectively, no updates will be sent to the bound object.

Just to clarify this is only for objects bound using RegisterAsyncJsObject
2018-01-22 11:32:20 +10:00
amaitland 7a0b06ad0b JSB Add support for dynamic keyword (using ExpandoObject)
As ExpandoObject implements IDictionary we can use it interchangeable with only minor breaking changes.
Those expecting Dictionary<string, object> should change to IDictionary<string, object> or ExpandoObject for their param types
This will also impact anyone who has implemented their own custom IBinder
I'd suggest changing the type checking from explicitly checking Dictionary<string, object> to use Type.IsAssignableFrom or another method of comparison
DefaultBinder binder has been updated to accommodate ExpandoObject (now being returned by ObjectsSerialization.cpp)
Add new async binding for testing new assignment method
Rewrite some of the async bound object tests to use await and let - modernize them
2017-12-21 13:00:36 +10:00
ieremyashev f029a22f45 Fix return value serialization for async JS bindings (#2167) 2017-10-24 09:48:58 +11:00
João Neves bc83d6c247 Allow calling managed methods from objects bound with RegisterAsyncJsObject that return arrays of structs (#1981)
* Fixed problem when calling CefV8Value::CreateArray. Needs prior call to V8 context enter
* Call callback dispose in case of failure
* Support serialization of struct arrays to JS side
* Fixed formatting
2017-03-13 21:37:55 +10:00
Chris cd934267c6 Updated copyright year and made sure it used same format everywhere (#1966) 2017-03-06 08:44:37 +10:00
amaitland bae3c28e92 Update copyright to 2016 2016-01-11 14:11:30 +10:00
amaitland 25be7265f2 Add DebuggerHidden attribute so VS doesn't break when Break on User-Unhandled Exceptions is checked 2015-08-03 11:37:49 +10:00
amaitland 7498c65741 Add copyright to CefSharp.Example 2015-08-03 10:41:29 +10:00
cefsharp-ms f74b245e9b added examples for async bindings 2015-07-31 17:17:48 +02:00