Changeset 194115 in webkit


Ignore:
Timestamp:
Dec 15, 2015 2:10:20 PM (8 years ago)
Author:
ddkilzer@apple.com
Message:

REGRESSION (r192375): DumpRenderTree.app exits immediately with no error
<http://webkit.org/b/152314>

Reviewed by Daniel Bates.

The change to DumpRenderTreeMain.mm in r192375 caused the iOS
code path to exit immediately when calling main().
Unfortunately, DumpRenderTreeMain.mm was used for both
DumpRenderTree command-line binary and DumpRenderTree.app, which
meant that the app would exit immediately with no error code
when run!

The workaround is to introduce a separate source file called
DumpRenderTreeAppMain.mm, similar to what WebKitTestRunner
already does.

  • DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Add

DumpRenderTreeAppMain.mm to the project. Make it the only
compiled source for the DumpRenderTree.app target.

  • DumpRenderTree/ios/DumpRenderTreeAppMain.mm: Copied from Tools/DumpRenderTree/mac/DumpRenderTreeMain.mm.

(main): Call DumpRenderTreeMain() on iOS. Assert on OS X in
case someone tries mistakenly to use the app.

  • DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig:

Link to JavaScriptCore.framework on iOS for the assert.

  • DumpRenderTree/mac/Configurations/DumpRenderTreeApp.xcconfig:

Link to JavaScriptCore.framework on OS X for the assert. Remove
unneeded EXCLUDED_SOURCE_FILE_NAMES setting.

  • DumpRenderTree/mac/DumpRenderTreeMain.mm:

(main): Add assert for iOS so that a crash occurs if someone
tries to run the wrong command.

Location:
trunk/Tools
Files:
5 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r194060 r194115  
     12015-12-15  David Kilzer  <ddkilzer@apple.com>
     2
     3        REGRESSION (r192375): DumpRenderTree.app exits immediately with no error
     4        <http://webkit.org/b/152314>
     5
     6        Reviewed by Daniel Bates.
     7
     8        The change to DumpRenderTreeMain.mm in r192375 caused the iOS
     9        code path to exit immediately when calling main().
     10        Unfortunately, DumpRenderTreeMain.mm was used for both
     11        DumpRenderTree command-line binary and DumpRenderTree.app, which
     12        meant that the app would exit immediately with no error code
     13        when run!
     14
     15        The workaround is to introduce a separate source file called
     16        DumpRenderTreeAppMain.mm, similar to what WebKitTestRunner
     17        already does.
     18
     19        * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Add
     20        DumpRenderTreeAppMain.mm to the project.  Make it the only
     21        compiled source for the DumpRenderTree.app target.
     22        * DumpRenderTree/ios/DumpRenderTreeAppMain.mm: Copied from Tools/DumpRenderTree/mac/DumpRenderTreeMain.mm.
     23        (main): Call DumpRenderTreeMain() on iOS.  Assert on OS X in
     24        case someone tries mistakenly to use the app.
     25        * DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig:
     26        Link to JavaScriptCore.framework on iOS for the assert.
     27        * DumpRenderTree/mac/Configurations/DumpRenderTreeApp.xcconfig:
     28        Link to JavaScriptCore.framework on OS X for the assert.  Remove
     29        unneeded EXCLUDED_SOURCE_FILE_NAMES setting.
     30        * DumpRenderTree/mac/DumpRenderTreeMain.mm:
     31        (main): Add assert for iOS so that a crash occurs if someone
     32        tries to run the wrong command.
     33
    1342015-12-14  Tim Horton  <timothy_horton@apple.com>
    235
  • trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj

    r192375 r194115  
    6464                440590711268453800CFD48D /* WebArchiveDumpSupportMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 440590701268453800CFD48D /* WebArchiveDumpSupportMac.mm */; };
    6565                4437730E125CBC3600AAE02C /* WebArchiveDumpSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 44A997830FCDE86400580F10 /* WebArchiveDumpSupport.cpp */; };
     66                4464CABE1C20A08B00E5BB55 /* DumpRenderTreeAppMain.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4464CABD1C20A07000E5BB55 /* DumpRenderTreeAppMain.mm */; };
    6667                4AD6A11413C8124000EA9737 /* FormValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4AD6A11313C8124000EA9737 /* FormValue.cpp */; };
    6768                5106803E15CC7B10001A8A23 /* SlowNPPNew.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5106803D15CC7B10001A8A23 /* SlowNPPNew.cpp */; };
     
    9192                A134E531188FC27000901D06 /* DumpRenderTreeMain.mm in Sources */ = {isa = PBXBuildFile; fileRef = A134E52F188FC27000901D06 /* DumpRenderTreeMain.mm */; };
    9293                A134E53618905EFF00901D06 /* AccessibilityCommonMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC0E26140E2DA4C6001B6BC3 /* AccessibilityCommonMac.mm */; };
    93                 A19318001892886B001C52B1 /* DumpRenderTreeMain.mm in Sources */ = {isa = PBXBuildFile; fileRef = A134E52F188FC27000901D06 /* DumpRenderTreeMain.mm */; };
    9494                A8B91ADA0CF3B32F008F91FF /* DumpRenderTreePasteboard.m in Sources */ = {isa = PBXBuildFile; fileRef = A8B91AD70CF3B32F008F91FF /* DumpRenderTreePasteboard.m */; };
    9595                A8B91ADC0CF3B32F008F91FF /* DumpRenderTreeWindow.mm in Sources */ = {isa = PBXBuildFile; fileRef = A8B91AD90CF3B32F008F91FF /* DumpRenderTreeWindow.mm */; };
     
    264264                417DAA1C137B3E24007C57FB /* WebCoreTestSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebCoreTestSupport.h; path = WebCoreTestSupport/WebCoreTestSupport.h; sourceTree = BUILT_PRODUCTS_DIR; };
    265265                440590701268453800CFD48D /* WebArchiveDumpSupportMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebArchiveDumpSupportMac.mm; path = mac/WebArchiveDumpSupportMac.mm; sourceTree = "<group>"; };
     266                4464CABD1C20A07000E5BB55 /* DumpRenderTreeAppMain.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = DumpRenderTreeAppMain.mm; path = ios/DumpRenderTreeAppMain.mm; sourceTree = "<group>"; };
    266267                44A997820FCDE86400580F10 /* WebArchiveDumpSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebArchiveDumpSupport.h; path = cf/WebArchiveDumpSupport.h; sourceTree = "<group>"; };
    267268                44A997830FCDE86400580F10 /* WebArchiveDumpSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebArchiveDumpSupport.cpp; path = cf/WebArchiveDumpSupport.cpp; sourceTree = "<group>"; };
     
    642643                        isa = PBXGroup;
    643644                        children = (
     645                                4464CABD1C20A07000E5BB55 /* DumpRenderTreeAppMain.mm */,
    644646                                A1158D55189273EB0088C17B /* DumpRenderTreeBrowserView.h */,
    645647                                A1158D56189273EB0088C17B /* DumpRenderTreeBrowserView.mm */,
     
    10111013                        buildActionMask = 2147483647;
    10121014                        files = (
    1013                                 A19318001892886B001C52B1 /* DumpRenderTreeMain.mm in Sources */,
     1015                                4464CABE1C20A08B00E5BB55 /* DumpRenderTreeAppMain.mm in Sources */,
    10141016                        );
    10151017                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/Tools/DumpRenderTree/ios/DumpRenderTreeAppMain.mm

    r194114 r194115  
    11/*
    2  * Copyright (C) 2014 Apple Inc. All rights reserved.
     2 * Copyright (C) 2014-2015 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2424 */
    2525
    26 #if PLATFORM(MAC)
     26#if PLATFORM(IOS)
    2727
    2828#include "DumpRenderTreeMac.h"
     
    3535#else
    3636
     37#include <wtf/Assertions.h>
     38
    3739int main(int, const char*[])
    3840{
     41    RELEASE_ASSERT_WITH_MESSAGE(false, "DumpRenderTree.app is not supported on OS X; use DumpRenderTree command.");
    3942    return 0;
    4043}
  • trunk/Tools/DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig

    r192375 r194115  
    2424#include "BaseTarget.xcconfig"
    2525
    26 OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_$(PLATFORM_NAME)) $(ASAN_OTHER_LDFLAGS);
    27 OTHER_LDFLAGS_macosx = -l$(WEBKIT_SYSTEM_INTERFACE_LIBRARY) -lWebCoreTestSupport -force_load $(BUILT_PRODUCTS_DIR)/libDumpRenderTree.a -framework Carbon -framework Cocoa -framework JavaScriptCore -framework OpenGL -framework QuartzCore -framework WebKit;
     26OTHER_LDFLAGS = $(inherited) $(PLATFORM_OTHER_LDFLAGS) $(ASAN_OTHER_LDFLAGS);
     27PLATFORM_OTHER_LDFLAGS[sdk=iphone*] = -framework JavaScriptCore;
     28PLATFORM_OTHER_LDFLAGS[sdk=macosx*] = -l$(WEBKIT_SYSTEM_INTERFACE_LIBRARY) -lWebCoreTestSupport -force_load $(BUILT_PRODUCTS_DIR)/libDumpRenderTree.a -framework Carbon -framework Cocoa -framework JavaScriptCore -framework OpenGL -framework QuartzCore -framework WebKit;
    2829LD_RUNPATH_SEARCH_PATHS = "@loader_path/.";
    2930PRODUCT_NAME = DumpRenderTree;
  • trunk/Tools/DumpRenderTree/mac/Configurations/DumpRenderTreeApp.xcconfig

    r191032 r194115  
    3030OTHER_LDFLAGS = $(PLATFORM_OTHER_LDFLAGS) $(ASAN_OTHER_LDFLAGS);
    3131PLATFORM_OTHER_LDFLAGS[sdk=iphone*] = -l$(WEBKIT_SYSTEM_INTERFACE_LIBRARY) -lWebCoreTestSupport -force_load $(BUILT_PRODUCTS_DIR)/libDumpRenderTree.a -framework QuartzCore -framework CFNetwork -framework CoreFoundation -framework CoreGraphics -framework Foundation -framework GraphicsServices -framework ImageIO -framework MobileCoreServices -framework UIKit -framework WebCore -framework JavaScriptCore -framework WebKit $(OTHER_LDFLAGS_FONTS);
     32PLATFORM_OTHER_LDFLAGS[sdk=macosx*] = -framework JavaScriptCore;
    3233LD_RUNPATH_SEARCH_PATHS = "@loader_path/.";
    3334PRODUCT_NAME = DumpRenderTree;
    34 EXCLUDED_SOURCE_FILE_NAMES[sdk=macosx*] = DumpRenderTreeMain.mm;
  • trunk/Tools/DumpRenderTree/mac/DumpRenderTreeMain.mm

    r192375 r194115  
    3535#else
    3636
     37#include <wtf/Assertions.h>
     38
    3739int main(int, const char*[])
    3840{
     41    RELEASE_ASSERT_WITH_MESSAGE(false, "DumpRenderTree command is not supported on iOS; use DumpRenderTree.app.");
    3942    return 0;
    4043}
Note: See TracChangeset for help on using the changeset viewer.