App crashed if result of JavascriptObject is to large. What can I do? #4819
Unanswered
javadevil1982
asked this question in
Q&A
Replies: 1 comment 2 replies
-
You can always run the browser in a separate process so you can use a 64bit browser. There's an example at https://github.com/cefsharp/CefSharp.OutOfProcess There are other browsers that run out of process by default that might better suite your purposes.
Without knowing exactly where it's crashing it's impossible to say. It might be possible to add some additional error handling. You are welcome to submit a PR with proposed improvements. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I use CefSharp (CefSharp.WinForms 123.0.60) in a dotnet 4.8 Framework WinForms application. For resons it must be x86.
I run the CefBrowser with:
JavascriptObjectRepository.Settings.LegacyBindingEnabled = true;
JavascriptObjectRepository.Register("MyClass", MyClassInstance, true, BindingOptions.DefaultBinder);
If I now address MyClass in Javascript and call a method whose result is apparently too large, the whole application crashes. So up to the end of the dotnet method everything works, after the return of the result the crash occurs. Even though I will try to avoid such a large result in the future, I would still like to know if there is a way to catch and handle such errors in the CefSharp CefBrowser instead of crashing the whole application?
Beta Was this translation helpful? Give feedback.
All reactions