Changeset 122564 in webkit
- Timestamp:
- Jul 13, 2012 4:43:43 AM (12 years ago)
- Location:
- trunk/Source/WebKit/efl
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/efl/ChangeLog
r122563 r122564 1 2012-07-13 Kihong Kwon <kihong.kwon@samsung.com> 2 3 [EFL] Add const to the parameter of getters in ewk_security_origin 4 https://bugs.webkit.org/show_bug.cgi?id=90954 5 6 Reviewed by Kentaro Hara. 7 8 Move initialization of strings for protocol and host to the ewk_security_origin_new method, 9 which allows to add const qualifier for ewk_security_origin_protocol_get and ewk_security_origin_host_get. 10 In addition, add null checks to the getters. 11 12 * ewk/ewk_security_origin.cpp: 13 (ewk_security_origin_protocol_get): 14 (ewk_security_origin_host_get): 15 (ewk_security_origin_new): 16 * ewk/ewk_security_origin.h: 17 1 18 2012-07-13 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 19 -
trunk/Source/WebKit/efl/ewk/ewk_security_origin.cpp
r119115 r122564 40 40 }; 41 41 42 const char* ewk_security_origin_protocol_get( Ewk_Security_Origin* origin)42 const char* ewk_security_origin_protocol_get(const Ewk_Security_Origin* origin) 43 43 { 44 if (!origin->protocol) 45 origin->protocol = eina_stringshare_add(origin->securityOrigin->protocol().utf8().data()); 46 44 EINA_SAFETY_ON_NULL_RETURN_VAL(origin, 0); 47 45 return origin->protocol; 48 46 } 49 47 50 const char* ewk_security_origin_host_get( Ewk_Security_Origin* origin)48 const char* ewk_security_origin_host_get(const Ewk_Security_Origin* origin) 51 49 { 52 if (!origin->host) 53 origin->host = eina_stringshare_add(origin->securityOrigin->host().utf8().data()); 54 50 EINA_SAFETY_ON_NULL_RETURN_VAL(origin, 0); 55 51 return origin->host; 56 52 } … … 143 139 144 140 origin->securityOrigin = coreOrigin; 145 origin-> host = 0;146 origin-> protocol = 0;141 origin->protocol = eina_stringshare_add(coreOrigin->protocol().utf8().data()); 142 origin->host = eina_stringshare_add(coreOrigin->host().utf8().data()); 147 143 148 144 return origin; -
trunk/Source/WebKit/efl/ewk/ewk_security_origin.h
r119115 r122564 50 50 * be modified. The string is guaranteed to be stringshared. 51 51 * 52 * @return the protocol scheme 52 * @return the protocol scheme or @c 0 if there is not a protocol scheme 53 53 */ 54 EAPI const char *ewk_security_origin_protocol_get( Ewk_Security_Origin *o);54 EAPI const char *ewk_security_origin_protocol_get(const Ewk_Security_Origin *o); 55 55 56 56 /** … … 62 62 * @param o security origin object 63 63 * 64 * @return the host domain 64 * @return the host domain or @c 0 if there is not a host scheme 65 65 */ 66 EAPI const char *ewk_security_origin_host_get( Ewk_Security_Origin *o);66 EAPI const char *ewk_security_origin_host_get(const Ewk_Security_Origin *o); 67 67 68 68 /**
Note: See TracChangeset
for help on using the changeset viewer.