Skip to content
  • slewis@apple.com's avatar
    Source/WebKit2: https://bugs.webkit.org/show_bug.cgi?id=81065 · 490c4db8
    slewis@apple.com authored
    <rdar://problem/10944309> CrashTracer: [USER] 111 crashes in WebProcess at WebKitTestRunnerInjectedBundle: WTR::InjectedBundle::done + 142
    Add some string function exports to Windows so the WebKitTestRunner can use them.
    
    Reviewed by Geoff Garen.
    
    * win/WebKit2.def:
    
    Tools: https://bugs.webkit.org/show_bug.cgi?id=81065
    <rdar://problem/10944309> CrashTracer: [USER] 111 crashes in WebProcess at WebKitTestRunnerInjectedBundle: WTR::InjectedBundle::done + 142
    Fix crash preventing WebKitTestRunner from working in Release.  
    WebKitTestRunner used ostringstream to collect output from the test.  ostringstream is incompatible with our
    FastMalloc overrides.  When copying strings out ostringstream a new string is allocated with FastMalloc because
    the allocation is inlined.  When that string is freed is uses the system malloc because that call is not inlined.
    
    I removed ostringstream in favor of StringBuilder.  
    
    Properly set NDEBUG on Release builds so we don't crash when when we free the strings StringBuilder created.
    
    Reviewed by Geoff Garen.
    
    Add DEBUG_DEFINES to set NDEBUG on release builds.
    * WebKitTestRunner/Configurations/Base.xcconfig:
    * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
    
    Remove ostringstream member in favor of StringBuilder.
    * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
    (WTR::InjectedBundle::initialize):
    (WTR::InjectedBundle::beginTesting):
    (WTR::InjectedBundle::done):
    * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
    (WTF):
    (WTR::InjectedBundle::stringBuilder):
    (InjectedBundle):
    
    Append output to StringBuilder.
    * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
    (WTR::hasPrefix):
    (WTR::dumpPath):
    (WTR::rangeToStr):
    (WTR::styleDecToStr):
    (WTR::frameToStr):
    (WTR::dumpFrameScrollPosition):
    (WTR::dumpFrameText):
    (WTR::dumpDescendantFramesText):
    (WTR::InjectedBundlePage::dump):
    (WTR::InjectedBundlePage::didReceiveTitleForFrame):
    (WTR::InjectedBundlePage::didFinishDocumentLoadForFrame):
    (WTR::InjectedBundlePage::willSendRequestForFrame):
    (WTR::InjectedBundlePage::decidePolicyForNavigationAction):
    (WTR::lastFileURLPathComponent):
    (WTR::InjectedBundlePage::willAddMessageToConsole):
    (WTR::InjectedBundlePage::willSetStatusbarText):
    (WTR::InjectedBundlePage::willRunJavaScriptAlert):
    (WTR::InjectedBundlePage::willRunJavaScriptConfirm):
    (WTR::InjectedBundlePage::willRunJavaScriptPrompt):
    (WTR::InjectedBundlePage::shouldBeginEditing):
    (WTR::InjectedBundlePage::shouldEndEditing):
    (WTR::InjectedBundlePage::shouldInsertNode):
    (WTR::InjectedBundlePage::shouldInsertText):
    (WTR::InjectedBundlePage::shouldDeleteRange):
    (WTR::InjectedBundlePage::shouldChangeSelectedRange):
    (WTR::InjectedBundlePage::shouldApplyStyle):
    (WTR::InjectedBundlePage::didBeginEditing):
    (WTR::InjectedBundlePage::didEndEditing):
    (WTR::InjectedBundlePage::didChange):
    (WTR::InjectedBundlePage::didChangeSelection):
    (WTR::InjectedBundlePage::supportsFullScreen):
    (WTR::InjectedBundlePage::enterFullScreenForElement):
    (WTR::InjectedBundlePage::exitFullScreenForElement):
    (WTR::InjectedBundlePage::beganEnterFullScreen):
    (WTR::InjectedBundlePage::beganExitFullScreen):
    (WTR::dumpBackForwardListItem):
    (WTR::InjectedBundlePage::dumpBackForwardList):
    * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
    (WTR::LayoutTestController::waitToDumpWatchdogTimerFired):
    (WTR::LayoutTestController::dumpConfigurationForViewport):
            
    Convert between WTF::String and WKStringRef.
    * WebKitTestRunner/StringFunctions.h:
    (WTR::toWTFString):
    (WTR):
    * WebKitTestRunner/TestInvocation.cpp:
    (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    490c4db8