Last Comment Bug 700829 - Thebes gfxPlatform.h file depends on internal api nsString.h
: Thebes gfxPlatform.h file depends on internal api nsString.h
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: x86 Mac OS X
-- normal (vote)
: mozilla11
Assigned To: David Marteau
: Milan Sreckovic [:milan]
Depends on:
  Show dependency treegraph
Reported: 2011-11-08 15:14 PST by David Marteau
Modified: 2011-11-28 05:22 PST (History)
5 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

gfxPlatform.patch (474 bytes, patch)
2011-11-08 15:14 PST, David Marteau
benjamin: review+
Details | Diff | Splinter Review

Description User image David Marteau 2011-11-08 15:14:33 PST
Created attachment 573022 [details] [diff] [review]

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20100101 Firefox/8.0
Build ID: 20111104165243

Steps to reproduce:

Compile external binary xpcom component linking with xul library and using Thebes api

Actual results:

Compilation failed because gfx/thebes/gfxPlatform.h include nsString.h which require MOZILLA_INTERNAL_API (see for change log)

Expected results:

Compilation should have succeeded because Thebes is defined as an exportable api for use in external components.

Attached patch should make the job by including nsStringGlue.h instead of nsString.h which fallback to nsStringAPI.h if  MOZILLA_INTERNAL_API is not defined
Comment 1 User image Masatoshi Kimura [:emk] 2011-11-08 16:50:13 PST
Please request a review of your patch.
Comment 2 User image David Marteau 2011-11-09 01:12:11 PST
gfxPlatform use nsString directly as arguments to method at least at two locations:


In the last one, the nsString could be easily replaced by a nsAString reference and thus preserving string api convention of using reference to abstract type. But in the first case I don't know if there could be a potential issue for passing a reference to nsTArray<nsString>. ( AFAIK the mapping of nsString between external and internal api should be preserved even in that case )
Comment 3 User image David Marteau 2011-11-09 01:37:09 PST
OK, I found that references to nsString in gfxPlatform were there since a long time ago before the inclusion of nsString.h, so the patch should not have any side effects on that preexistent code (note that I currently use that patch).
Comment 5 User image Marco Bonardo [::mak] 2011-11-28 05:22:32 PST

Note You need to log in before you can comment on or make changes to this bug.