* Move LegacyBindingEnabled / JavascriptBindingPropertyName to per browser settings
* Stricter test
---------
Co-authored-by: Alex Maitland <amaitland@users.noreply.github.com>
* Allow JavaScript binding when browser wrapper cannot be found
* Store JavascriptBindingSettings per Browser and never remove them
This avoids the issue that sometimes browsers are destroyed but then referenced again without them beeing created
* Use dict->Values
* Javascript Binding - Add Ability to limit origins
* Move JS binding settings to CefBrowserWrapper and optimize origin validation
* Initialize origins to null
* Normalize allowed origins
* Optimize origin validation
* Add null check for origin compare
* Fix JavaScript Binding API settings for popups
Move the JS binding API configuration block out of the !browser->IsPopup() scope
in OnBrowserCreated. This ensures that IsJavascriptBindingApiAllowed() enforces
configured restrictions for popups as well.
* Fix possible null deref for JavascriptBindingApiAllowOrigins
In IsJavascriptBindingApiAllowed, added a null check for JavascriptBindingApiAllowOrigins
to prevent a potential null dereference if JavascriptBindingApiHasAllowOrigins is true
but the allowOrigins list itself was null.
* Simplify origin normalization and add null check
* Add more test cases
* Refactor IsJavascriptBindingApiAllowed signature
Refactored IsJavascriptBindingApiAllowed to accept a CefBrowserWrapper^ parameter directly, eliminating redundant lookups and improving clarity. Updated all call sites to pass the browser wrapper explicitly.
* Clarify summary for HasJavascriptBindingApiAllowOrigins
Clarify documentation for HasJavascriptBindingApiAllowOrigins method to specify zero or more origins
* Simplify origin comparison logic in CefAppUnmanagedWrapper
Refactored code to directly compare wide string origins using
_wcsicmp, removing unnecessary pointer casts and null checks.
This streamlines the logic and improves readability.
* Add tests for JavaScript binding API behavior across cross-origin navigation
---------
Co-authored-by: amaitland <307872+amaitland@users.noreply.github.com>
Co-authored-by: Luca Sonntag <luca.sonntag@cgm.com>
- JavascriptCallbackRegistry - Get BrowserId From V8Context
- Render Process - Rewrite to store root object wrapper by frame instead of per browser
- Don't store JavascriptRootObjectWrapper in the browserWrapper as CEF is calling destroyed more than it should.
- Revert "Tests - Simplify ShouldFailWhenIsObjectCachedCalledWithInvalidObjectName"
This reverts commit f8a81acf7a.
---------
Co-authored-by: amaitland <307872+amaitland@users.noreply.github.com>
* NetCore - Upgrade minimum version to 5.0
* Update platform target
* Change to windows 10 specific TFM for top level packages
* Upgrade to .Net 6
* Nuget - Update packages
* Net Core - Fix dotnet test path
* Add Test Sdk and update Runner
---------
Co-authored-by: amaitland <307872+amaitland@users.noreply.github.com>