Cef 3 1750 LoadRequest not working

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Cef 3 1750 LoadRequest not working

Postby mezdej » Fri Jul 11, 2014 6:24 am

Hi,
I have some code used in cef1 that worked fine.... and after moving to cef3 it stopped to work.

Code: Select all
        CefRefPtr< CefRequest > send = CefRequest::Create();
        CefRefPtr< CefPostData > postdata = CefPostData::Create();

        CefRefPtr< CefPostDataElement > entry = CefPostDataElement::Create();
        entry->SetToBytes( data.length(), data.ascii() );

        postdata->AddElement( entry );
   
        if( send )
        {
            CefString destination;
            destination.FromWString( url.ucs2() );
           
            send->SetURL( destination );
            send->SetMethod( "POST" );
            send->SetPostData( postdata );
            browser->GetMainFrame()->LoadRequest( send );
            return true;
        }


Is there something more I just need to set? or it is a known bug - I didn't find any issue related
mezdej
Techie
 
Posts: 31
Joined: Tue Oct 22, 2013 3:56 am

Re: Cef 3 1750 LoadRequest not working

Postby magreenblatt » Fri Jul 11, 2014 9:27 am

Where are you executing this code from?
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Cef 3 1750 LoadRequest not working

Postby mezdej » Mon Jul 28, 2014 12:42 am

It's called only in base proces but not on the cef UI thread - we are using multi_threaded_message_loop = true.
But it depends, when browser is just created with existing request it's called from OnAfterCreated.

Sorry but I was on holidays :)

I double checked this problem and it occurs only in my application... I'm going to check why LoadRequest does nothing here...
mezdej
Techie
 
Posts: 31
Joined: Tue Oct 22, 2013 3:56 am

Re: Cef 3 1750 LoadRequest not working

Postby magreenblatt » Tue Jul 29, 2014 10:31 am

LoadRequest will only work after the render process has been created, so OnAfterCreated won't work consistently. Instead you can use a url like "about:blank" and call LoadRequest from OnLoadEnd. Also watch https://code.google.com/p/chromiumembed ... ail?id=579 for a resolution of this issue.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Cef 3 1750 LoadRequest not working

Postby mezdej » Wed Jul 30, 2014 2:29 am

Thanks! That was the case.
mezdej
Techie
 
Posts: 31
Joined: Tue Oct 22, 2013 3:56 am

Re: Cef 3 1750 LoadRequest not working

Postby mezdej » Thu Jul 31, 2014 4:25 am

I noticed that CreateBrowser with about:blank does not cause OnLoadStart/End
mezdej
Techie
 
Posts: 31
Joined: Tue Oct 22, 2013 3:56 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 53 guests