1. 05 Feb, 2010 8 commits
    • barraclough@apple.com's avatar
      Add a JSStringBuilder class (similar-to, and derived-from StringBuilder) to · d40d1172
      barraclough@apple.com authored
      construct JSStrings, throwing a JS exception should we run out of memory whilst
      allocating storage for the string.
      
      Reviewed by Oliver Hunt.
      
      Similarly, add jsMakeNontrivialString methods to use in cases where previously
      we were calling makeString & passing the result to jsNontrivialString.  Again,
      these new methods throw if we hit an out of memory condition.
      
      Move throwOutOfMemoryError into ExceptionHelpers, to make it more widely available.
      
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * runtime/ArrayPrototype.cpp:
      (JSC::arrayProtoFuncToString):
      (JSC::arrayProtoFuncToLocaleString):
      (JSC::arrayProtoFuncJoin):
      * runtime/DateConstructor.cpp:
      (JSC::callDate):
      * runtime/DatePrototype.cpp:
      (JSC::dateProtoFuncToString):
      (JSC::dateProtoFuncToUTCString):
      (JSC::dateProtoFuncToGMTString):
      * runtime/ErrorPrototype.cpp:
      (JSC::errorProtoFuncToString):
      * runtime/ExceptionHelpers.cpp:
      (JSC::throwOutOfMemoryError):
      * runtime/ExceptionHelpers.h:
      * runtime/JSStringBuilder.h: Added.
      (JSC::JSStringBuilder::releaseJSString):
      (JSC::jsMakeNontrivialString):
      * runtime/NumberPrototype.cpp:
      (JSC::numberProtoFuncToPrecision):
      * runtime/ObjectPrototype.cpp:
      (JSC::objectProtoFuncToString):
      * runtime/Operations.cpp:
      * runtime/Operations.h:
      * runtime/RegExpPrototype.cpp:
      (JSC::regExpProtoFuncToString):
      * runtime/StringBuilder.h:
      (JSC::StringBuilder::append):
      * runtime/StringPrototype.cpp:
      (JSC::stringProtoFuncBig):
      (JSC::stringProtoFuncSmall):
      (JSC::stringProtoFuncBlink):
      (JSC::stringProtoFuncBold):
      (JSC::stringProtoFuncFixed):
      (JSC::stringProtoFuncItalics):
      (JSC::stringProtoFuncStrike):
      (JSC::stringProtoFuncSub):
      (JSC::stringProtoFuncSup):
      (JSC::stringProtoFuncFontcolor):
      (JSC::stringProtoFuncFontsize):
      (JSC::stringProtoFuncAnchor):
      
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@54394 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      d40d1172
    • dumi@chromium.org's avatar
      WebCore: 1. Fix a bug in SQLiteTransaction: do not assume that COMMIT always · 71fb8a94
      dumi@chromium.org authored
      succeeds.
      2. Jump straight to the transaction error callback when a
      statement fails in a way that makes sqlite automatically rollback
      the transaction.
      3. Fix the code that handles the "quota reached" failure, as it is
      one of the failures that lead to an automatic transaction
      rollback.
      
      Reviewed by Eric Seidel.
      
      https://bugs.webkit.org/show_bug.cgi?id=34280
      
      * platform/sql/SQLiteDatabase.cpp:
      (WebCore::SQLiteDatabase::isAutoCommitOn):
      * platform/sql/SQLiteDatabase.h:
      * platform/sql/SQLiteTransaction.cpp:
      (WebCore::SQLiteTransaction::begin):
      (WebCore::SQLiteTransaction::commit):
      (WebCore::SQLiteTransaction::rollback):
      (WebCore::SQLiteTransaction::transactionWasRolledBackBySqlite):
      * platform/sql/SQLiteTransaction.h:
      * storage/SQLTransaction.cpp:
      (WebCore::SQLTransaction::SQLTransaction):
      (WebCore::SQLTransaction::runStatements):
      (WebCore::SQLTransaction::runCurrentStatement):
      (WebCore::SQLTransaction::handleCurrentStatementError):
      (WebCore::SQLTransaction::deliverQuotaIncreaseCallback):
      
      LayoutTests: 1. Enhance quota-tracking.html: if sqlite automatically rolls back
      a transaction because of a statement failure, make sure the rest
      of the statements in the transaction are not executed.
      2. Fix the expectations for quota-tracking.html. Sqlite cannot
      recover from reaching a DB's max size.
      
      Reviewed by Eric Seidel.
      
      * storage/quota-tracking-expected.txt:
      * storage/quota-tracking.html:
      
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@54393 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      71fb8a94
    • pkasting@chromium.org's avatar
      Not reviewed, rollback. · 1b20de7f
      pkasting@chromium.org authored
      Rollback r54387, it doesn't fix builds and Chromium doesn't want this behavior.
      
      * platform/chromium/ScrollbarThemeChromiumMac.h:
      
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@54392 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      1b20de7f
    • sfalken@apple.com's avatar
      Windows build fix. · 42246ae6
      sfalken@apple.com authored
      * wtf/MathExtras.h:
      
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@54391 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      42246ae6
    • darin@apple.com's avatar
      2010-02-04 Darin Adler <darin@apple.com> · 7391ffae
      darin@apple.com authored
              Reviewed by David Levin.
      
              Make MathExtras.h compatible with <cmath>
              https://bugs.webkit.org/show_bug.cgi?id=34618
      
              * wtf/MathExtras.h: Include <cmath> instead of <math.h>.
              Use "using" as we do elsewhere in WTF for the four functions from <cmath>
              we want to use without the prefix. Later we could consider making the std
              explicit at call sites instead.
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@54388 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      7391ffae
    • senorblanco@chromium.org's avatar
      2010-02-04 Stephen White <senorblanco@chromium.org> · 8d116c80
      senorblanco@chromium.org authored
              Unreviewed, build fix.
      
              Fix for Chromium/Mac after palindromic scrollbar change (54345).
      
              Covered by many layout tests.
      
              * platform/chromium/ScrollbarThemeChromiumMac.h:
              (WebCore::ScrollbarThemeChromiumMac::maxOverlapBetweenPages):
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@54387 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      8d116c80
    • eric@webkit.org's avatar
      2010-02-04 Clemmitt Sigler <cmsigler@gmail.com> · 395d39fd
      eric@webkit.org authored
              Reviewed by David Levin.
      
              WebKitGTK doesn't build GtkLauncher when --enable-mathml is specified.
              Updated WebCore/GNUmakefile.am to include needed files in build.
      
              https://bugs.webkit.org/show_bug.cgi?id=34387
      
              No new tests.
      
              * GNUmakefile.am:
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@54386 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      395d39fd
    • eric@webkit.org's avatar
      2010-02-04 Stephan Aßmus <superstippi@gmx.de> · 65e047e5
      eric@webkit.org authored
              Reviewed by David Levin.
      
              Misc coding style fixes in Haiku port code.
              https://bugs.webkit.org/show_bug.cgi?id=34527
      
              No tests needed.
      
              * platform/haiku/ContextMenuItemHaiku.cpp: Trailing white space, NULL -> 0
              * platform/haiku/DragImageHaiku.cpp: Trailing white space.
              * platform/haiku/FileChooserHaiku.cpp: Sorted headers.
              * platform/haiku/LocalizedStringsHaiku.cpp: Needed to include NotImplemented.h
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@54383 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      65e047e5
  2. 04 Feb, 2010 32 commits