On Mon, 21 May 2012 11:17:32 -0300 Gustavo Lima Chaves <gl...@profusion.mobi>
said:

> * Enlightenment SVN <no-re...@enlightenment.org> [2012-05-20 21:17:11 -0700]:
> 
> > Log:
> > due to use obj structure if sd->api is null.. we have crashes - eg if
> >   webkit not supported. fix this. (no no changelog as ita part of the
> >   whole new structure changes)
> 
> I wonder how is this code path where sd->api does not exist... Could
> you explain better or show me backtrace, please?

sd->api was NULL. the code assumed it was never null. how? elm_web widget was
created and played with in the documentation test apps that we screenshot for
the docs. since my elm built without webkit support... the elm_web widget was
only partly filled in. :)

> BR,
> 
> Glima.
> 
> >   
> >   
> > 
> > Author:       raster
> > Date:         2012-05-20 21:17:11 -0700 (Sun, 20 May 2012)
> > New Revision: 71263
> > Trac:         http://trac.enlightenment.org/e/changeset/71263
> > 
> > Modified:
> >   trunk/elementary/src/lib/elm_widget.c 
> > 
> > Modified: trunk/elementary/src/lib/elm_widget.c
> > ===================================================================
> > --- trunk/elementary/src/lib/elm_widget.c   2012-05-21 01:43:44 UTC
> > (rev 71262) +++ trunk/elementary/src/lib/elm_widget.c       2012-05-21
> > 04:17:11 UTC (rev 71263) @@ -594,6 +594,7 @@
> >     API_ENTRY return EINA_FALSE;
> >  
> >     if (_elm_legacy_is(obj)) return !!COMPAT_SMART_DATA(sd)->focus_next;
> > +   if (!sd->api) return EINA_FALSE;
> >     return sd->api->focus_next &&
> >            (sd->api->focus_next !=
> > _elm_widget_focus_next_func_unimplemented); }
> > @@ -604,6 +605,7 @@
> >     API_ENTRY return EINA_FALSE;
> >  
> >     if (_elm_legacy_is(obj)) return !!COMPAT_SMART_DATA
> > (sd)->focus_direction;
> > +   if (!sd->api) return EINA_FALSE;
> >     return sd->api->focus_direction &&
> >            (sd->api->focus_direction !=
> >             _elm_widget_focus_direction_func_unimplemented);
> > @@ -813,6 +815,7 @@
> >  
> >     focus_order++;
> >     sd->focus_order = focus_order;
> > +   if (!sd->api) return;
> >     if (sd->top_win_focused)
> >       {
> >          sd->focused = EINA_TRUE;
> > @@ -1183,6 +1186,8 @@
> >     EINA_LIST_FOREACH(sd->tooltips, l, tt) elm_tooltip_theme(tt);
> >     EINA_LIST_FOREACH(sd->cursors, l, cur) elm_cursor_theme(cur);
> >  
> > +   if (!sd->api) return EINA_FALSE;
> > +   
> >     ret &= sd->api->theme(obj);
> >  
> >     return ret;
> > @@ -1226,6 +1231,7 @@
> >     if (sd->hover_obj) elm_widget_theme(sd->hover_obj);
> >     EINA_LIST_FOREACH(sd->tooltips, l, tt) elm_tooltip_theme(tt);
> >     EINA_LIST_FOREACH(sd->cursors, l, cur) elm_cursor_theme(cur);
> > +   if (!sd->api) return;
> >     sd->api->theme(obj);
> >  }
> >  
> > @@ -1480,6 +1486,7 @@
> >     API_ENTRY return EINA_FALSE;
> >     EINA_SAFETY_ON_TRUE_RETURN_VAL(obj == sobj, EINA_FALSE);
> >  
> > +   if (!sd->api) return EINA_FALSE;
> >     if (!_elm_legacy_is(obj)) return sd->api->sub_object_add(obj, sobj);
> >  
> >     /* this part will go away once all widgets are migrated to the new
> > schema */ @@ -1543,6 +1550,7 @@
> >  
> >     if (!sobj) return EINA_FALSE;
> >  
> > +   if (!sd->api) return EINA_FALSE;
> >     if (!_elm_legacy_is(obj)) return sd->api->sub_object_del(obj, sobj);
> >  
> >     /* this part will go away once all widgets are migrated to the new
> > schema */ @@ -1996,6 +2004,7 @@
> >          sd = evas_object_smart_data_get(parent);
> >          if ((!sd) || (!_elm_widget_is(obj)))
> >            return EINA_FALSE; //Not Elm Widget
> > +        if (!sd->api) return EINA_FALSE;
> >  
> >          if (sd->api->event(parent, obj, type, event_info))
> >            return EINA_TRUE;
> > @@ -2260,6 +2269,8 @@
> >         || (elm_widget_tree_unfocusable_get(obj)))
> >       return EINA_FALSE;
> >  
> > +   if (!sd->api) return EINA_FALSE;
> > +   
> >     /* Try use hook */
> >     if (_elm_widget_focus_direction_manager_is(obj))
> >       return sd->api->focus_direction(obj, base, degree, direction, weight);
> > @@ -2373,6 +2384,8 @@
> >         || (elm_widget_tree_unfocusable_get(obj)))
> >       return EINA_FALSE;
> >  
> > +   if (!sd->api) return EINA_FALSE;
> > +   
> >     /* Try use hook */
> >     if (_elm_widget_focus_chain_manager_is(obj))
> >       return sd->api->focus_next(obj, dir, next);
> > @@ -2598,6 +2611,8 @@
> >  {
> >     API_ENTRY return;
> >  
> > +   if (!sd->api) return;
> > +   
> >     if (!sd->focused)
> >       {
> >          focus_order++;
> > @@ -2672,6 +2687,8 @@
> >  {
> >     API_ENTRY return;
> >  
> > +   if (!sd->api) return;
> > +   
> >     if (!sd->focused) return;
> >     if (sd->resize_obj && elm_widget_focus_get(sd->resize_obj))
> >       elm_widget_focused_object_clear(sd->resize_obj);
> > @@ -2815,6 +2832,7 @@
> >     if (sd->disabled == disabled) return;
> >     sd->disabled = !!disabled;
> >     elm_widget_focus_disabled_handle(obj);
> > +   if (!sd->api) return;
> >     sd->api->disable(obj);
> >  }
> >  
> > @@ -3145,6 +3163,7 @@
> >     EINA_LIST_FOREACH(sd->subobjs, l, child) elm_widget_translate(child);
> >     if (sd->resize_obj) elm_widget_translate(sd->resize_obj);
> >     if (sd->hover_obj) elm_widget_translate(sd->hover_obj);
> > +   if (!sd->api) return;
> >     sd->api->translate(obj);
> >  
> >  #ifdef HAVE_GETTEXT
> > @@ -3161,6 +3180,7 @@
> >  {
> >     API_ENTRY return;
> >  
> > +   if (!sd->api) return;
> >     if (_elm_legacy_is(obj) && COMPAT_SMART_DATA(sd)->content_set)
> >       COMPAT_SMART_DATA(sd)->content_set(obj, part, content);
> >     else if (evas_object_smart_type_check(obj, "elm_container"))
> > @@ -3172,6 +3192,8 @@
> >  {
> >     API_ENTRY return NULL;
> >  
> > +   if (!sd->api) return NULL;
> > +   
> >     if (_elm_legacy_is(obj) && COMPAT_SMART_DATA(sd)->content_get)
> >       return COMPAT_SMART_DATA(sd)->content_get(obj, part);
> >     else if (evas_object_smart_type_check(obj, "elm_container"))
> > @@ -3185,6 +3207,7 @@
> >  {
> >     API_ENTRY return NULL;
> >  
> > +   if (!sd->api) return NULL;
> >     if (_elm_legacy_is(obj) && COMPAT_SMART_DATA(sd)->content_unset)
> >       return COMPAT_SMART_DATA(sd)->content_unset(obj, part);
> >     else if (evas_object_smart_type_check(obj, "elm_container"))
> > 
> > 
> > ------------------------------------------------------------------------------
> > Live Security Virtual Conference
> > Exclusive live event will cover all the ways today's security and 
> > threat landscape has changed and how IT managers can respond. Discussions 
> > will include endpoint security, mobile security and the latest in malware 
> > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> > _______________________________________________
> > enlightenment-svn mailing list
> > enlightenment-...@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
> 
> -- 
> Gustavo Lima Chaves
> Computer Engineer @ ProFUSION Embedded Systems
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to