gecko-dev/image
Christian Holler 8e72e4cc2f Bug 1431090 - Prepare tools/fuzzing/ to be used with JS_STANDALONE. r=froydnj
This patch adjusts tools/fuzzing/ in such a way that the relevant parts can be
reused in the JS engine. Changes in detail include:

* Various JS_STANDALONE checks to exclude parts that cannot be included in
  those builds.

* Turn LibFuzzerRegistry and LibFuzzerRunner into generic FuzzerRegistry and
  FuzzerRunner classes and use them for AFL as well. Previously, AFL was
  piggy-backing on gtests which was kind of an ugly solution anyway (besides
  that it can't work in JS). Now more code like registry and harness is
  shared between the two and they follow almost the same call paths and entry
  points. AFL macros in FuzzingInterface have been rewritten accordingly.
  This also required name changes in various places. Furthermore, this unifies
  the way, the fuzzing target is selected, using the FUZZER environment
  variable rather than LIBFUZZER (using LIBFUZZER in browser builds will give
  you a deprecation warning because I know some people are using this already
  and need time to switch). Previously, AFL target had to be selected using
  GTEST_FILTER, so this is also much better now.

* I had to split up FuzzingInterface* such that the STREAM parts are in a
  separate set of files FuzzingInterfaceStream* because they use nsStringStream
  which is not allowed to be included into the JS engine even in a full browser
  build (error: "Using XPCOM strings is limited to code linked into libxul.").
  I also had to pull FuzzingInterface.cpp (the RAW part only) into the header
  and make it static because otherwise, would have to make not only separate
  files but also separate libraries to statically link to the JS engine, which
  seemed overkill for a single small function. The streaming equivalent of the
  function is still in a cpp file.

* LibFuzzerRegister functions are now unique by appending the module name to
  avoid redefinition errors.

MozReview-Commit-ID: 44zWCdglnHr

--HG--
extra : rebase_source : fe07c557032fd33257eb701190becfaf85ab79d0
2018-01-17 15:20:35 +01:00
..
build Bug 1388332 - Fix a shutdown crash when destroying image decoders before initializing its SurfacePipe. r=tnikkel 2017-08-09 06:54:55 -04:00
decoders Bug 1431204 - Make nsIURI.spec readonly r=mayhemer 2018-01-19 15:26:07 +01:00
encoders Bug 1372426 - More detailed names for nsInputStreamReadyEvent (r=erahm) 2017-06-14 14:44:04 -07:00
test Bug 1431090 - Prepare tools/fuzzing/ to be used with JS_STANDALONE. r=froydnj 2018-01-17 15:20:35 +01:00
AnimationSurfaceProvider.cpp Bug 1389479 - Part 3. AnimationSurfaceProvider no longer needs to always dispatch to free its RasterImage. r=tnikkel 2017-08-15 15:02:14 -04:00
AnimationSurfaceProvider.h
BMPHeaders.h
ClippedImage.cpp Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj 2017-11-05 19:37:28 -08:00
ClippedImage.h Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r+tnikkel r=tnikkel 2017-12-11 15:37:59 +00:00
CopyOnWrite.h
DecodedSurfaceProvider.cpp Bug 1370412 - Part 8b. Add ImageSurfaceCache::Prune to discard surfaces which are not needed in factor of 2 mode. r=tnikkel 2017-09-05 07:58:46 -04:00
DecodedSurfaceProvider.h
DecodePool.cpp Bug 1405541 (attempt 2) - Split AUTO_PROFILER_LABEL_DYNAMIC into three macros. r=mstange. 2017-10-13 16:12:57 +11:00
DecodePool.h Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange. 2017-06-22 17:08:53 +10:00
Decoder.cpp Bug 1417021 - Fix various non-unified build errors in imagelib. r=aosmond 2017-10-24 23:22:55 +01:00
Decoder.h Bug 1315554 - Part 3. Expose Decoder::IsValidICOResource for all decoders. r=tnikkel 2017-07-22 07:50:31 -04:00
DecoderFactory.cpp Bug 1417021 - Fix various non-unified build errors in imagelib. r=aosmond 2017-10-24 23:22:55 +01:00
DecoderFactory.h Bug 1315554 - Part 8. Allow DecoderFactory::CreateDecoderForICOResource to create metadata decoders. r=tnikkel 2017-07-22 07:50:32 -04:00
DecoderFlags.h Bug 1370412 - Part 8a. Add "substitutable" flag to ISurfaceProvider state to indicate when the caller won't accept substitutes. r=tnikkel 2017-09-05 07:58:45 -04:00
Downscaler.cpp Bug 1423567: Use BaseRect access methods instead of member variables in image/ r=aosmond 2017-12-20 16:46:28 -05:00
Downscaler.h Bug 1423567: Use BaseRect access methods instead of member variables in image/ r=aosmond 2017-12-20 16:46:28 -05:00
DownscalingFilter.h Bug 1375842 - increase SIMD padding for convolution filter to 31 bytes. r=jrmuizel 2017-07-07 13:32:05 -04:00
DynamicImage.cpp Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r+tnikkel r=tnikkel 2017-12-11 15:37:59 +00:00
DynamicImage.h Bug 1370412 - Part 0. Add imgIContainer::GetNativeSizesLength to determine a ceiling on the maximum number of expected, unique surfaces. r=tnikkel 2017-09-05 07:58:44 -04:00
FrameAnimator.cpp Bug 1423567: Use BaseRect access methods instead of member variables in image/ r=aosmond 2017-12-20 16:46:28 -05:00
FrameAnimator.h Bug 1388733 - Ensure animations resume when the image surfaces are discarded while still decoding. r=tnikkel 2017-08-09 22:26:55 -04:00
FrameTimeout.h Backed out changeset 619b5b27ce87 (bug 1343499) for CLOSED TREE build bustage r=backout 2017-03-22 11:04:30 -04:00
FrozenImage.cpp Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r+tnikkel r=tnikkel 2017-12-11 15:37:59 +00:00
FrozenImage.h Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r+tnikkel r=tnikkel 2017-12-11 15:37:59 +00:00
ICOFileHeaders.h
IDecodingTask.cpp Bug 1359833 - Part 2. IDecodingTask should use the event target from ProgressTracker for main thread runnables. r=tnikkel 2017-07-19 14:15:11 -04:00
IDecodingTask.h Bug 1417021 - Fix various non-unified build errors in imagelib. r=aosmond 2017-10-24 23:22:55 +01:00
Image.cpp Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r+tnikkel r=tnikkel 2017-12-11 15:37:59 +00:00
Image.h Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r+tnikkel r=tnikkel 2017-12-11 15:37:59 +00:00
ImageCacheKey.cpp Bug 1426253 P3 Use the window/document GetController() method. r=asuth 2017-12-20 10:53:18 -05:00
ImageCacheKey.h Bug 1417021 - Fix various non-unified build errors in imagelib. r=aosmond 2017-10-24 23:22:55 +01:00
ImageFactory.cpp Bug 1382783 - Retarget non-HTTP image URIs (chrome, blob) to the image IO thread if not an SVG. r=tnikkel 2017-09-25 11:44:49 -04:00
ImageFactory.h Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj 2017-08-16 16:48:52 -07:00
ImageLogging.h
ImageMetadata.h Bug 1417021 - Fix various non-unified build errors in imagelib. r=aosmond 2017-10-24 23:22:55 +01:00
ImageOps.cpp Bug 1409327 - NS_NewBufferedInputStream should take the ownership of the inputStream, r=smaug 2017-10-19 11:39:30 +02:00
ImageOps.h Bug 1409327 - NS_NewBufferedInputStream should take the ownership of the inputStream, r=smaug 2017-10-19 11:39:30 +02:00
ImageRegion.h Bug 1377169 - Turn gfxRect into a typedef. r=jrmuizel 2017-07-05 11:22:00 -04:00
ImageURL.h Bug 1378046 - Make ImageCacheKey::Hash() return PLDHashNumber; r=aosmond 2017-07-04 11:09:03 -04:00
ImageWrapper.cpp Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r+tnikkel r=tnikkel 2017-12-11 15:37:59 +00:00
ImageWrapper.h Bug 1370412 - Part 0. Add imgIContainer::GetNativeSizesLength to determine a ceiling on the maximum number of expected, unique surfaces. r=tnikkel 2017-09-05 07:58:44 -04:00
ImgDrawResult.h Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r+tnikkel r=tnikkel 2017-12-11 15:37:59 +00:00
imgFrame.cpp Bug 1423567: Use BaseRect access methods instead of member variables in image/ r=aosmond 2017-12-20 16:46:28 -05:00
imgFrame.h Backed out changeset 619b5b27ce87 (bug 1343499) for CLOSED TREE build bustage r=backout 2017-03-22 11:04:30 -04:00
imgICache.idl Bug 1352408. Restore imgICache::RemoveEntry. r=ehsan 2017-04-11 03:14:09 -05:00
imgIContainer.idl Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r+tnikkel r=tnikkel 2017-12-11 15:37:59 +00:00
imgIContainerDebug.idl
imgIEncoder.idl
imgILoader.idl
imgINotificationObserver.idl
imgIRequest.idl Bug 1406253 - Part 1: Rename imgIRequest.currentURI to finalURI to prevent confusion. r=bz 2017-11-13 16:31:24 +08:00
imgIScriptedNotificationObserver.idl
imgITools.idl Bug 1421655 - Renaming imgITools::decodeImageBuffer to imgITools::decodeImageFromBuffer, r=aosmond 2017-11-30 14:48:47 +01:00
imgLoader.cpp Bug 1424917 - Remove support for HSTS Priming. r=mayhemer, r=ckerschb 2018-01-10 11:07:00 -05:00
imgLoader.h Bug 1419889 - Don't force the image cache to validate if it hasn't started yet. r=tnikkel 2017-12-07 08:28:28 -05:00
imgRequest.cpp Bug 1419889 - Don't force the image cache to validate if it hasn't started yet. r=tnikkel 2017-12-07 08:28:28 -05:00
imgRequest.h Bug 1423773 - Part 1: Remove usage of nsStringGlue.h. r=glandium 2017-12-06 16:52:51 -08:00
imgRequestProxy.cpp Bug 1406253 - Part 1: Rename imgIRequest.currentURI to finalURI to prevent confusion. r=bz 2017-11-13 16:31:24 +08:00
imgRequestProxy.h Bug 1404422 - Part 4. Remove imgIOnloadBlocker and related from tree as redundant. r=tnikkel 2017-11-01 06:59:10 -04:00
imgTools.cpp Bug 1421655 - Renaming imgITools::decodeImageBuffer to imgITools::decodeImageFromBuffer, r=aosmond 2017-11-30 14:48:47 +01:00
imgTools.h
IProgressObserver.h Bug 1404422 - Part 4. Remove imgIOnloadBlocker and related from tree as redundant. r=tnikkel 2017-11-01 06:59:10 -04:00
ISurfaceProvider.h
LookupResult.h Bug 1368776 - Part 16. Ensure we more consistently pass the suggested size from SurfaceCache::LookupBestMatch. r=tnikkel 2017-11-17 06:45:28 -05:00
moz.build Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r+tnikkel r=tnikkel 2017-12-11 15:37:59 +00:00
MultipartImage.cpp Bug 1404422 - Part 4. Remove imgIOnloadBlocker and related from tree as redundant. r=tnikkel 2017-11-01 06:59:10 -04:00
MultipartImage.h Bug 1404422 - Part 4. Remove imgIOnloadBlocker and related from tree as redundant. r=tnikkel 2017-11-01 06:59:10 -04:00
nsIIconURI.idl Bug 1415205 - Add nsIURIMutator impls for all objects implementing nsIURI r=bagder 2017-11-20 17:11:30 +01:00
Orientation.h
OrientedImage.cpp Bug 1423567: Use BaseRect access methods instead of member variables in image/ r=aosmond 2017-12-20 16:46:28 -05:00
OrientedImage.h Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r+tnikkel r=tnikkel 2017-12-11 15:37:59 +00:00
PlaybackType.h
ProgressTracker.cpp Bug 1423567: Use BaseRect access methods instead of member variables in image/ r=aosmond 2017-12-20 16:46:28 -05:00
ProgressTracker.h Bug 1404422 - Part 4. Remove imgIOnloadBlocker and related from tree as redundant. r=tnikkel 2017-11-01 06:59:10 -04:00
RasterImage.cpp Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r+tnikkel r=tnikkel 2017-12-11 15:37:59 +00:00
RasterImage.h Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj 2017-11-05 19:37:28 -08:00
ScriptedNotificationObserver.cpp Bug 1359833 - Part 8. ScriptedNotificationObserver should use nsAutoScriptBlocker when issuing notifications. r=tnikkel 2017-07-19 14:15:12 -04:00
ScriptedNotificationObserver.h
ShutdownTracker.cpp
ShutdownTracker.h
SourceBuffer.cpp Bug 1411506 - SourceBuffer::AppendFromInputStream must check if the stream has been already closed, r=aosmond 2017-10-25 16:58:45 +02:00
SourceBuffer.h Bug 1383404 - Part 3. SourceBuffer::mChunks should be an AutoTArray instead of FallibleTArray. r=tnikkel 2017-08-01 06:59:11 -04:00
StreamingLexer.h Bug 1417021 - Fix various non-unified build errors in imagelib. r=aosmond 2017-10-24 23:22:55 +01:00
SurfaceCache.cpp Bug 1368776 - Part 16. Ensure we more consistently pass the suggested size from SurfaceCache::LookupBestMatch. r=tnikkel 2017-11-17 06:45:28 -05:00
SurfaceCache.h Bug 1419608. Make SurfaceKey::SVGContext return a reference instead of a copy. r=decoder 2017-11-22 01:41:35 +01:00
SurfaceCacheUtils.cpp
SurfaceCacheUtils.h
SurfaceFilters.h Bug 1423567: Use BaseRect access methods instead of member variables in image/ r=aosmond 2017-12-20 16:46:28 -05:00
SurfaceFlags.h
SurfacePipe.cpp Bug 1387514: Upgrade BaseRect (derived classes) width and height direct member variable use to instead use Width()/SetWidth() and Height()/SetHeight() in image/*. r=aosmond 2017-08-14 08:29:56 -04:00
SurfacePipe.h Bug 1388332 - Fix a shutdown crash when destroying image decoders before initializing its SurfacePipe. r=tnikkel 2017-08-09 06:54:55 -04:00
SurfacePipeFactory.h
SVGDocumentWrapper.cpp Bug 1401356, part 2 - Rename nsSVGEffects to SVGObserverUtils. r=longsonr 2017-08-30 15:58:31 +01:00
SVGDocumentWrapper.h
SVGDrawingParameters.h Bug 1360511 - Move SVGDrawingParameters to a header file to allow it to be shared. r=longsonr 2017-04-18 12:46:19 +01:00
VectorImage.cpp Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj 2017-11-05 19:37:28 -08:00
VectorImage.h Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r+tnikkel r=tnikkel 2017-12-11 15:37:59 +00:00