oilpan-reviews, is |*c| kept alive, or should we add Persistent<StyleSheetResourceClient> protect = c ? - |c| points to StyleSheetResourceClient, an on-heap subclass of ResourceClient. - |c| appears on the C++ stack as an argument of didAddClient() here, but as ResourceClient*, not as StyleSheetResourceClient*. - ResourceClient is not on-heap.
On 2016/07/26 09:57:10, hiroshige wrote: > |*c| must not be destructed during didAppendFirstData() (to prevent similar > issues to crbug.com/612132 (restricted)). > > oilpan-reviews, is |*c| kept alive, or should we add > Persistent<StyleSheetResourceClient> protect = c > ? > - |c| points to StyleSheetResourceClient, an on-heap subclass of ResourceClient. > - |c| appears on the C++ stack as an argument of didAddClient() here, but as > ResourceClient*, not as StyleSheetResourceClient*. > - ResourceClient is not on-heap.
You won't need Persistent<StyleSheetResourceClient>. Oilpan will keep alive |*c| on the stack since Oilpan keeps alive all on-stack pointers that exist in the heap region.
> |c| might be removed as client in didAppendFirstData() in general. > So please check that |c| is still an client, i.e. > if (hasClient(c) && !isLoading())