On 3/30/2014 19:18, Zhenbo Li wrote:
- nsAString_Init(&strColor, NULL);
- nsres = nsIDOMHTMLTableElement_GetBgColor(This->nstable, &strColor);
- nsAString_Finish(&strColor);
- if(NS_SUCCEEDED(nsres)) {
nsAString_GetData(&strColor, &color);
V_VT(p) = VT_BSTR;
hres = nscolor_to_str(color, &V_BSTR(p));
- }else {
ERR("SetBgColor failed: %08x\n", nsres);
hres = E_FAIL;
- }
I think you can't do GetData() after Finish().