Commit Graph

68 Commits

Author SHA1 Message Date
amaitland 17b7f0ced1 BindingTest - Braces on new lines
Fix CefAppUnmanagedWrapper code formatting
Slightly more descriptive error message when frame not found
2015-10-19 13:24:24 +10:00
Greg Martin a64f25193f This should fix #1336 (IJavascriptCallback.ExecuteAsync never returns when callback no longer exists) and likely fixes as-of-yet undiscovered related callback problems.
The code previously in CefAppUnmanagedWrapper.cpp's OnProcessMessageReceived method did not check for a nullptr callbackWrapper resulting in an exception.
Also note that previously the success and reponse variables were not initialized by default which I believe to have been a mistake after following all of the if..else code paths (most importantly some error conditions would never be returned back).
I added a new test to BindingTest.html entitled "Test Disposed Callback" which makes the same 1.5 second delayed callback that "Test Callback" does, but then immediately navigate the page to www.google.com.  Without the fix in CefAppUnmanagedWrapper.cpp the browser's renderer process will die in about 10 seconds.
2015-10-19 13:24:24 +10:00
illfang 91976cddba create a root object even if no objects have been registered but only bind the root object if objects are available 2015-10-15 11:35:41 +09:00
amaitland 4ba7e95012 Formatting - else if on new line
Minor change to message of callback registry is not available
2015-10-13 18:55:04 +10:00
illfang e9675a2c3e ensure destroyed root objects are not accessed in cef app unmanaged warpper message handling 2015-10-13 13:00:39 +09:00
amaitland 2f3d9f868f Make js callbacks and async methods Frame aware - add FrameId so they can be executed on a specific frame
Resolves a problem where multiple contexts are created and only the first one is dealt with properly (each frame has it's own V8 context)
2015-10-11 20:41:17 +10:00
amaitland 5869b20068 Change CefBrowserWrapper Dictionary to ConcurrentDictionary 2015-10-11 19:50:55 +10:00
amaitland b9ee476e8e Fix up some of the vc++ include mess that we had going
Cleanup using namespace statements as well
2015-09-29 16:26:06 +10:00
amaitland b236d7711c Restructure code so JavascriptRootObject's are stored and can be used across multiple CefBrowserWrapper instances (popups in this context)
Code is now very much dependant on using --process-per-tab for this structure to work
2015-09-24 18:44:30 +10:00
amaitland e492c0d21e Fixes #1263
Pass in CefCustomScheme as command line argument, as they're registered correctly in all processes
2015-09-15 15:15:26 +10:00
David Serfozo 437cf20160 normal bound objects transfered with cef ipc as well 2015-08-06 10:25:33 +02:00
amaitland 22fa4c3b10 Register custom schemes in render process
Fixes #1014
2015-08-03 12:30:58 +10:00
amaitland bec6fe4618 Formatting and naming fixups 2015-08-03 12:16:20 +10:00
amaitland 5a09a5ef35 Merge branch 'cefextensions' of https://github.com/arsher/CefSharp 2015-08-03 12:12:51 +10:00
David Serfozo 4fdca242d0 CefExtension modified to null-check JavascriptCode in constructor 2015-08-02 16:07:43 +02:00
David Serfozo c8c100025a whitespace diffs redone 2015-08-01 20:37:55 +02:00
David Serfozo c9b7366786 Extensions transmitted in OnRenderThreadCreated and registered after webkit initialization 2015-08-01 20:25:12 +02:00
cefsharp-ms 0b300d5dda Merged master 2015-07-31 17:41:00 +02:00
cefsharp-ms 0333437917 fixed tabs again 2015-07-31 17:30:07 +02:00
cefsharp-ms c395f03ba2 jscallbackregistry lifecycle is managed by javascriptrootobjectwrapper, async methods too bound by javascriptrootobjectwrapper 2015-07-31 17:26:59 +02:00
cefsharp-ms dbf5e94293 updated kPromisCreatorScript field to be static const 2015-07-31 17:17:55 +02:00
cefsharp-ms 561c2de020 RootObject message renamed to include async 2015-07-31 17:17:35 +02:00
cefsharp-ms 43acbbe3fc CefAppUnmanagedWrapper wrapped up a little bit 2015-07-31 17:17:22 +02:00
cefsharp-ms 4523ddfaab method call message names include Async now 2015-07-31 17:17:16 +02:00
amaitland 3d19b3a587 Cleanup Binding, rather than keep references to the V8 objects, just use them and then let them be released
Code should be a little easier to debug now.
2015-07-28 22:22:30 +10:00
cefsharp-ms fc85d90877 added callback capability for async bound method with promises 2015-07-23 15:12:50 +02:00
cefsharp-ms a8db666642 added async bound method result callback on browser process side 2015-07-23 15:12:28 +02:00
cefsharp-ms 4ec6d1ca6e async method bindings added 2015-07-23 15:11:27 +02:00
cefsharp-ms 0e073bcd0a added message to transmit async bound jsrootobject to render process 2015-07-23 15:10:52 +02:00
amaitland 18c19edc86 kJavascriptCallbackDestroyRequest jscallbackId is located at Index 0 2015-07-10 10:35:51 +10:00
amaitland c74dc29b57 Add TODO about throwing exception in CefAppUnmanagedWrapper 2015-07-10 10:26:21 +10:00
amaitland a945e3f4dc Always create response message so that errors can be returned 2015-07-10 10:24:48 +10:00
amaitland 4784a0122e Return error message when unable to enter context or find matching frame 2015-07-10 10:22:12 +10:00
amaitland ca836c50af Reapply change to move try finally block inside context->Enter() - otherwise we could potentially Exit a context we never entered 2015-07-10 10:18:01 +10:00
amaitland d0f316379c Add more detail to NOTE
Call GetIdentifier() directly rather than allocating browserId
2015-07-10 10:15:27 +10:00
David Serfozo e0d5dcd283 added error handling when browser id has no match in render process 2015-07-09 23:36:31 +02:00
David Serfozo 6f53c61b88 readded try-finally for renderprocess side messaging handling 2015-07-08 18:46:28 +02:00
David Serfozo c7db48ae7a created new implementation of ijavascriptcallback to handle cef ipc solution 2015-07-07 19:30:33 +02:00
David Serfozo 5f573c8563 message handling added for js callback execution through cef ipc 2015-07-07 19:28:49 +02:00
amaitland 81a2202753 Throw exception if browser Id's don't match
Use the provided browser object rather than get the wrapped one - should be the same
2015-06-29 15:35:30 +10:00
amaitland 7090ac9cda For now simplify message handing - remove delegates
Will look at implementing a managed class to handle/route messages later
2015-06-29 15:24:40 +10:00
amaitland ccbc97ffc4 Minor code formatting 2015-06-29 12:03:01 +10:00
amaitland a40590405a Remove AddProcessMessageDelegate method from CefAppUnmanagedWrapper - not required 2015-06-29 12:01:41 +10:00
amaitland af39be37bb Remove FindBrowserWrapper overload - not really required 2015-06-29 12:00:33 +10:00
David Serfozo cc8a07c21f added evaluatescriptasync message handlers and rerouted evalscript to cef ipc 2015-06-27 19:01:21 +02:00
David Serfozo 7588259964 added process message handlers and code to call them on both sides 2015-06-27 17:20:09 +02:00
rassilon 7128e40fd1 It's time for copyright updates again. Yay!
Throw in a couple of tab containing files for good measure.
Evil tabs, evil I say.
2015-04-25 02:45:21 -04:00
BinSys 5af020afcc change c++ file copyright symbol (©) from 0xa9(cp1252) to 0xc2 0xa9(cp65001 with bom) ,
now work on non-english system().
2015-01-10 02:40:23 +08:00
BinSys 3f954dfb0b Revert "change c++ file copyright symbol (©) from 0xa9(cp1252) to 0xc2 0xa9(cp65001 without bom) ,"
This reverts commit defd040dcc.
2015-01-10 02:22:19 +08:00
BinSys defd040dcc change c++ file copyright symbol (©) from 0xa9(cp1252) to 0xc2 0xa9(cp65001 without bom) ,
now work on non-english system().
2015-01-06 22:23:30 +08:00