Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix errors when calling GetPyBrowserByCefBrowser() in client handler callbacks #31

Closed
GoogleCodeExporter opened this issue Aug 28, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

This function is not reliable in handlers, many callbacks may be called before 
a browser is created, then this function returns None when it is the first 
browser, later it causes error when calling pyBrowser.GetHandler().

There seems to be appearing new cases every week, just a moment ago I had an 
error in DisplayHandler_OnStatusMessage() when running wxpython example.

Maybe we should make the second parameter "ignoreError" to be True by default? 
Or change the way it works completely, so we are able to get PyBrowser even 
during initialization of a browser.

In wiki documentation there are comments about this behavior in some of the 
handlers, for example LifeSpanHandler::OnAfterCreated():

    This function does not get called during creation of a browser initiated 
    through a call to cefpython.CreateBrowser(), it is a temporary limitation in 
    current implementation of cefpython. When a browser is created through 
    javascript "window.open" then this callback gets called.

Original issue reported on code.google.com by czarek.t...@gmail.com on 28 Nov 2012 at 2:38

@GoogleCodeExporter
Copy link
Author

When pyBrowser is empty in a callback print the message to the console when 
g_debug is True.

Original comment by czarek.t...@gmail.com on 28 Nov 2012 at 1:20

@GoogleCodeExporter
Copy link
Author

Fixed in revision 94627675489e. All client handler callbacks are passing 
ignoreError=True as second parameter, also if the pyBrowser cannot be get then 
a debug message is logged.

Original comment by czarek.t...@gmail.com on 30 Nov 2012 at 10:29

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

The function for getting PyBrowser by CefBrowser has been redesigned, there are 
no more limits for events happening during browser creation, the documentation 
in the wiki should be updated.

Original comment by czarek.t...@gmail.com on 7 Dec 2012 at 4:25

@GoogleCodeExporter
Copy link
Author

Project will move to Github. Find this issue at the new address (soon): 
https://github.com/cztomczak/cefpython/issues/31

Original comment by czarek.t...@gmail.com on 24 Aug 2015 at 6:26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant