Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(340)

Issue 870023002: Don't use SK_ASSERT in header. (Closed)

Created:
5 years, 11 months ago by dshwang
Modified:
5 years, 10 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Don't use SK_ASSERT in header. It can cause link error. For example of chromium debug build, ../../third_party/skia/include/core/SkImageInfo.h:109: error: undefined reference to 'SkDebugf_FileLine(char const*, int, bool, char const*, ...)' collect2: error: ld returned 1 exit status It's because SkDebugf can be overridden by a client.

Patch Set 1 #

Total comments: 2

Patch Set 2 : move function to cpp #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -19 lines) Patch
M include/core/SkImageInfo.h View 1 2 chunks +2 lines, -19 lines 1 comment Download
M src/core/SkImageInfo.cpp View 1 2 chunks +21 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (2 generated)
dshwang
could you review? currently chromium linux debug build using gcc is broken.
5 years, 11 months ago (2015-01-23 15:37:09 UTC) #2
dshwang
https://codereview.chromium.org/870023002/diff/1/include/core/SkImageInfo.h File include/core/SkImageInfo.h (left): https://codereview.chromium.org/870023002/diff/1/include/core/SkImageInfo.h#oldcode109 include/core/SkImageInfo.h:109: SkASSERT((size_t)ct < SK_ARRAY_COUNT(gSize)); I think this ASSERT is covered ...
5 years, 11 months ago (2015-01-23 15:37:49 UTC) #3
dshwang
in more detail, following is the dependency graph causing this bug. src/thirdparty/skia <- src/skia <- ...
5 years, 11 months ago (2015-01-23 15:54:00 UTC) #4
bsalomon
https://codereview.chromium.org/870023002/diff/1/include/core/SkImageInfo.h File include/core/SkImageInfo.h (left): https://codereview.chromium.org/870023002/diff/1/include/core/SkImageInfo.h#oldcode109 include/core/SkImageInfo.h:109: SkASSERT((size_t)ct < SK_ARRAY_COUNT(gSize)); On 2015/01/23 15:37:48, dshwang wrote: > ...
5 years, 11 months ago (2015-01-23 15:55:50 UTC) #5
dshwang
> The client is allowed to override SkDebugf but AFAIK the client is responsible > ...
5 years, 11 months ago (2015-01-23 20:16:37 UTC) #6
reed1
On 2015/01/23 15:54:00, dshwang wrote: > in more detail, following is the dependency graph causing ...
5 years, 11 months ago (2015-01-23 20:45:50 UTC) #7
dshwang
On 2015/01/23 20:45:50, reed1 wrote: > On 2015/01/23 15:54:00, dshwang wrote: > > in more ...
5 years, 11 months ago (2015-01-23 20:57:12 UTC) #8
reed1
On 2015/01/23 20:57:12, dshwang wrote: > On 2015/01/23 20:45:50, reed1 wrote: > > On 2015/01/23 ...
5 years, 11 months ago (2015-01-23 21:07:01 UTC) #9
dshwang
On 2015/01/23 21:07:01, reed1 wrote: > On 2015/01/23 20:57:12, dshwang wrote: > > On 2015/01/23 ...
5 years, 10 months ago (2015-01-30 21:09:07 UTC) #10
reed1
I think any module that includes a skia header has to link against skia. If ...
5 years, 10 months ago (2015-01-30 21:15:11 UTC) #11
dshwang
> My question was motivated by the thought that any client of Skia's headers *has* ...
5 years, 10 months ago (2015-01-30 21:15:17 UTC) #12
dshwang
On 2015/01/30 21:15:11, reed1 wrote: > I think any module that includes a skia header ...
5 years, 10 months ago (2015-01-30 21:18:54 UTC) #13
reed1
alternate CL to export SkImageInfo https://codereview.chromium.org/893603005/
5 years, 10 months ago (2015-01-30 21:23:52 UTC) #15
dshwang
On 2015/01/30 21:15:17, dshwang wrote: > > My question was motivated by the thought that ...
5 years, 10 months ago (2015-01-30 21:26:38 UTC) #16
dshwang
On 2015/01/30 21:23:52, reed1 wrote: > alternate CL to export SkImageInfo > https://codereview.chromium.org/893603005/ yes, it's ...
5 years, 10 months ago (2015-01-30 21:29:37 UTC) #17
mtklein
On 2015/01/30 21:26:38, dshwang wrote: > On 2015/01/30 21:15:17, dshwang wrote: > > > My ...
5 years, 10 months ago (2015-01-30 21:31:14 UTC) #18
dshwang
On 2015/01/30 21:31:14, mtklein wrote: > On 2015/01/30 21:26:38, dshwang wrote: > > On 2015/01/30 ...
5 years, 10 months ago (2015-01-30 21:36:14 UTC) #19
mtklein
> in chromium, lots of top modules (e.g. ui/gfx, ui/gl, blink, cc) include skia > ...
5 years, 10 months ago (2015-01-30 21:39:33 UTC) #20
dshwang
5 years, 10 months ago (2015-01-30 21:42:42 UTC) #21
On 2015/01/30 21:39:33, mtklein wrote:
> > in chromium, lots of top modules (e.g. ui/gfx, ui/gl, blink, cc) include
skia
> > headers.
> > It means that all indirect dependent modules must link to skia if we compile
> > chromium by component build because skia is static_library.
> 
> Yes, and they do.

ok, thx for confirming.

I'll make src/media/blink link to skia in chromium.

I close this CL as WontFix

Powered by Google App Engine
This is Rietveld 408576698