1. 23 Feb, 2008 1 commit
  2. 22 Feb, 2008 2 commits
    • ggaren@apple.com's avatar
      JavaScriptCore: · 5ffdb7b1
      ggaren@apple.com authored
              Reviewed by Sam Weinig.
              
              Partial fix for <rdar://problem/5744037> Gmail out of memory (17455)
              
              I'm removing KJS_MEM_LIMIT for the following reasons:
              
              - We have a few reports of KJS_MEM_LIMIT breaking important web
              applications, like GMail and Google Reader. (For example, if you
              simply open 12 GMail tabs, tab #12 will hit the limit.)
      
              - Firefox has no discernable JS object count limit, so any limit, even
              a large one, is a potential compatibility problem.
              
              - KJS_MEM_LIMIT does not protect against malicious memory allocation,
              since there are many ways to maliciously allocate memory without
              increasing the JS object count.
              
              - KJS_MEM_LIMIT is already mostly broken, since it only aborts the
              script that breaches the limit, not any subsequent scripts.
              
              - We've never gotten bug reports about websites that would have
              benefited from an unbroken KJS_MEM_LIMIT. The initial check-in of
              KJS_MEM_LIMIT (KJS revision 80061) doesn't mention a website that
              needed it.
              
              - Any website that brings you anywhere close to crashing due to the
              number of live JS objects will almost certainly put up the "slow
              script" dialog at least 20 times beforehand.
      
              * kjs/collector.cpp:
              (KJS::Collector::collect):
              * kjs/collector.h:
              * kjs/nodes.cpp:
              (KJS::TryNode::execute):
      
      LayoutTests:
      
              Reviewed by Sam Weinig.
              
              Removing the test for KJS_MEM_LIMIT, since I removed KJS_MEM_LIMIT.
      
              * fast/js/out-of-memory-expected.txt: Removed.
              * fast/js/out-of-memory.html: Removed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30492 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5ffdb7b1
    • oliver@apple.com's avatar
      <rdar://problem/5759327> REGRESSION: while(NaN) acts like while(true) · 9c3b3ab0
      oliver@apple.com authored
      Reviewed by Alexey P.
      
      Fix yet another case where we incorrectly relied on implicit double
      to bool coercion.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9c3b3ab0
  3. 20 Feb, 2008 1 commit
    • weinig@apple.com's avatar
      JavaScriptCore: · 5944a36e
      weinig@apple.com authored
              Reviewed by Darin.
      
              Fix for Bug 16753: date set methods with no args should result in NaN (Acid3 bug)
              The set values result in NaN now when called with no args, NaN or +/- inf values.
              The setYear, setFullYear and setUTCFullYear methods used on NaN dates work as 
              descripted in the standard.
      
              * kjs/date_object.cpp:
              (KJS::fillStructuresUsingTimeArgs):
              (KJS::fillStructuresUsingDateArgs):
              (KJS::setNewValueFromTimeArgs):
              (KJS::setNewValueFromDateArgs):
              (KJS::dateProtoFuncSetYear):
      
      LayoutTests:
      
              Reviewed by Darin.
      
              - test for Bug 16753: date set methods with no args should result in NaN (Acid3 bug)
      
              * fast/js/date-set-to-nan-expected.txt: Added.
              * fast/js/date-set-to-nan.html: Added.
              * fast/js/resources/date-set-to-nan.js: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30453 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5944a36e
  4. 19 Feb, 2008 3 commits
    • andersca@apple.com's avatar
      Reviewed by Darin. · a292f5de
      andersca@apple.com authored
              Change OpaqueJSClass and RootObject to start with a ref count of 1.
              
              * API/JSClassRef.cpp:
              (OpaqueJSClass::OpaqueJSClass):
              (OpaqueJSClass::createNoAutomaticPrototype):
              (OpaqueJSClass::create):
              * API/JSClassRef.h:
              * API/JSObjectRef.cpp:
              (JSClassCreate):
              * bindings/runtime_root.cpp:
              (KJS::Bindings::RootObject::create):
              (KJS::Bindings::RootObject::RootObject):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a292f5de
    • darin@apple.com's avatar
      JavaScriptCore: · f2d6d947
      darin@apple.com authored
              Rubber stamped by Anders.
      
              - removed explicit initialization to 1 for RefCounted; that's now the default
      
              * kjs/regexp.cpp:
              (KJS::RegExp::RegExp): Removed RefCounted initializer.
      
      WebCore:
      
              Rubber stamped by Anders.
      
              - removed explicit initialization to 1 for RefCounted; that's now the default
      
              * loader/ResourceLoader.cpp:
              (WebCore::ResourceLoader::ResourceLoader): Removed RefCounted initializer.
              * platform/network/ResourceHandle.cpp:
              (WebCore::ResourceHandle::ResourceHandle): Ditto.
              * platform/text/StringImpl.cpp:
              (WebCore::StringImpl::StringImpl): Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30408 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f2d6d947
    • darin@apple.com's avatar
      Reviewed by Anders. · 650ffecd
      darin@apple.com authored
              - next step for http://bugs.webkit.org/show_bug.cgi?id=17257
                start ref counts at 1 instead of 0 for speed
      
              * wtf/RefCounted.h:
              (WTF::RefCounted::RefCounted): Have refcounts default to 1. This allows us to start
              removing the explicit initialization of RefCounted from classes and eventually we
              can remove the ability to have the initial count of 0 entirely.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30406 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      650ffecd
  5. 18 Feb, 2008 2 commits
  6. 17 Feb, 2008 1 commit
  7. 15 Feb, 2008 1 commit
    • aroben@apple.com's avatar
      Mac build fix · 451e1ed0
      aroben@apple.com authored
       JavaScriptCore:
      
               Make JavaScriptCore's FEATURE_DEFINES match WebCore's
      
               Reviewed by Mark.
      
               * Configurations/JavaScriptCore.xcconfig:
      
       WebKit/mac:
      
               Make WebKit's FEATURE_DEFINES match WebCore's
      
               Reviewed by Mark.
      
               * Configurations/WebKit.xcconfig:
      
       WebKitTools:
      
               Fix a typo that broke the Mac build
      
               Reviewed by Mark.
      
               * Scripts/build-webkit:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30276 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      451e1ed0
  8. 14 Feb, 2008 2 commits
  9. 13 Feb, 2008 3 commits
  10. 12 Feb, 2008 1 commit
  11. 11 Feb, 2008 2 commits
  12. 10 Feb, 2008 2 commits
    • darin@apple.com's avatar
      JavaScriptCore: · 384a0d02
      darin@apple.com authored
              Reviewed by Eric.
      
              - http://bugs.webkit.org/show_bug.cgi?id=17256
                eliminate default ref. count of 0 in RefCounted class
      
              * wtf/RefCounted.h:
              (WTF::RefCounted::RefCounted): Remove default of 0.
      
      WebKit/wx:
      
              Reviewed by Eric.
      
              - http://bugs.webkit.org/show_bug.cgi?id=17256
                eliminate default ref. count of 0 in RefCounted class
      
              * WebKitSupport/FrameLoaderClientWx.cpp:
              (WebCore::FrameLoaderClientWx::FrameLoaderClientWx):
              Set the count to 0 explicitly (one stray client I missed in my last pass).
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30133 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      384a0d02
    • darin@apple.com's avatar
      JavaScriptCore: · 734fbf64
      darin@apple.com authored
              Reviewed by Eric.
      
              - http://bugs.webkit.org/show_bug.cgi?id=17256
                Make clients of RefCounted explicitly set the count to 0.
      
              * API/JSClassRef.cpp:
              (OpaqueJSClass::OpaqueJSClass):
              * bindings/runtime_root.cpp:
              (KJS::Bindings::RootObject::RootObject):
      
      WebCore:
      
              Reviewed by Eric.
      
              - http://bugs.webkit.org/show_bug.cgi?id=17256
                Make clients of RefCounted explicitly set the count to 0.
      
              * bindings/js/JSSVGPODTypeWrapper.h:
              (WebCore::JSSVGPODTypeWrapper::JSSVGPODTypeWrapper):
              * css/CSSFontFace.h:
              (WebCore::CSSFontFace::CSSFontFace):
              * css/CSSRuleList.cpp:
              (WebCore::CSSRuleList::CSSRuleList):
              * css/CSSSegmentedFontFace.cpp:
              (WebCore::CSSSegmentedFontFace::CSSSegmentedFontFace):
              * css/Counter.h:
              (WebCore::Counter::Counter):
              * css/Pair.h:
              (WebCore::Pair::Pair):
              * css/Rect.h:
              (WebCore::Rect::Rect):
              * css/StyleBase.h:
              (WebCore::StyleBase::StyleBase):
              * css/StyleSheetList.cpp:
              (WebCore::StyleSheetList::StyleSheetList):
              * dom/Attr.cpp:
              (WebCore::Attr::Attr):
              * dom/Attr.h:
              * dom/Attribute.h:
              (WebCore::Attribute::Attribute):
              * dom/Clipboard.cpp:
              (WebCore::Clipboard::Clipboard):
              * dom/DOMImplementation.h:
              (WebCore::DOMImplementation::DOMImplementation):
              * dom/Event.cpp:
              (WebCore::Event::Event):
              * dom/EventListener.h:
              (WebCore::EventListener::EventListener):
              * dom/ExceptionBase.cpp:
              (WebCore::ExceptionBase::ExceptionBase):
              * dom/NamedAttrMap.h:
              (WebCore::NamedAttrMap::insertAttribute):
              * dom/NamedNodeMap.h:
              (WebCore::NamedNodeMap::NamedNodeMap):
              * dom/NodeFilter.h:
              (WebCore::NodeFilter::NodeFilter):
              * dom/NodeFilterCondition.h:
              (WebCore::NodeFilterCondition::NodeFilterCondition):
              * dom/NodeList.h:
              (WebCore::NodeList::NodeList):
              * dom/QualifiedName.h:
              (WebCore::QualifiedName::QualifiedNameImpl::QualifiedNameImpl):
              (WebCore::QualifiedName::ref):
              * dom/Range.cpp:
              (WebCore::Range::Range):
              * dom/RegisteredEventListener.cpp:
              (WebCore::RegisteredEventListener::RegisteredEventListener):
              * dom/StyledElement.h:
              * dom/Traversal.cpp:
              (WebCore::Traversal::Traversal):
              * editing/EditCommand.cpp:
              (WebCore::EditCommand::EditCommand):
              * history/BackForwardList.cpp:
              (WebCore::BackForwardList::BackForwardList):
              * history/CachedPage.cpp:
              (WebCore::CachedPage::CachedPage):
              * history/HistoryItem.cpp:
              (WebCore::HistoryItem::HistoryItem):
              * html/CanvasGradient.cpp:
              (WebCore::CanvasGradient::CanvasGradient):
              * html/CanvasPattern.cpp:
              (WebCore::CanvasPattern::CanvasPattern):
              * html/CanvasRenderingContext2D.cpp:
              (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
              * html/CanvasStyle.cpp:
              (WebCore::CanvasStyle::CanvasStyle):
              * html/HTMLCollection.cpp:
              (WebCore::HTMLCollection::HTMLCollection):
              * html/MediaError.h:
              (WebCore::MediaError::MediaError):
              * html/TimeRanges.cpp:
              (TimeRanges::TimeRanges):
              * html/TimeRanges.h:
              (WebCore::TimeRanges::TimeRanges):
              * html/VoidCallback.h:
              (WebCore::VoidCallback::VoidCallback):
              * loader/DocumentLoader.cpp:
              (WebCore::DocumentLoader::DocumentLoader):
              * loader/FormState.cpp:
              (WebCore::FormState::FormState):
              * loader/ResourceLoader.cpp:
              (WebCore::ResourceLoader::ResourceLoader):
              * loader/TextResourceDecoder.cpp:
              (WebCore::TextResourceDecoder::TextResourceDecoder):
              * loader/icon/IconRecord.cpp:
              (WebCore::IconRecord::IconRecord):
              * page/BarInfo.cpp:
              (WebCore::BarInfo::BarInfo):
              * page/Console.cpp:
              (WebCore::Console::Console):
              * page/DOMSelection.cpp:
              (WebCore::DOMSelection::DOMSelection):
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::DOMWindow):
              * page/Frame.cpp:
              (WebCore::Frame::Frame):
              * page/History.cpp:
              (WebCore::History::History):
              * page/InspectorController.cpp:
              (WebCore::InspectorResource::InspectorResource):
              (WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
              * page/Plugin.h:
              (WebCore::Plugin::Plugin):
              * page/Screen.cpp:
              (WebCore::Screen::Screen):
              * platform/ArrayImpl.cpp:
              (WebCore::ArrayImpl::ArrayPrivate::ArrayPrivate):
              * platform/DeprecatedValueListImpl.cpp:
              (WebCore::DeprecatedValueListImpl::Private::Private):
              * platform/ScrollBar.cpp:
              (WebCore::Scrollbar::Scrollbar):
              * platform/SharedBuffer.cpp:
              (WebCore::SharedBuffer::SharedBuffer):
              * platform/graphics/FontFallbackList.cpp:
              (WebCore::FontFallbackList::FontFallbackList):
              * platform/graphics/FontFamily.cpp:
              (WebCore::FontFamily::FontFamily):
              * platform/graphics/FontFamily.h:
              (WebCore::FontFamily::FontFamily):
              * platform/graphics/FontSelector.h:
              (WebCore::FontSelector::FontSelector):
              (WebCore::FontSelector::~FontSelector):
              * platform/graphics/GlyphPageTreeNode.h:
              (WebCore::GlyphPage::GlyphPage):
              * platform/graphics/mac/IconMac.mm:
              (WebCore::Icon::Icon):
              * platform/mac/FileChooserMac.mm:
              (WebCore::FileChooser::FileChooser):
              * platform/mac/PopupMenuMac.mm:
              (WebCore::PopupMenu::PopupMenu):
              * platform/mac/SharedBufferMac.mm:
              (WebCore::SharedBuffer::SharedBuffer):
              * platform/network/FormData.cpp:
              (WebCore::FormData::FormData):
              * platform/network/FormData.h:
              (WebCore::FormData::FormData):
              * platform/network/ResourceHandle.cpp:
              (WebCore::ResourceHandle::ResourceHandle):
              * platform/text/CString.h:
              (WebCore::CStringBuffer::CStringBuffer):
              * platform/text/RegularExpression.cpp:
              (WebCore::RegularExpression::Private::Private):
              * rendering/RenderStyle.cpp:
              (WebCore::StyleSurroundData::StyleSurroundData):
              (WebCore::StyleBoxData::StyleBoxData):
              (WebCore::StyleVisualData::StyleVisualData):
              (WebCore::StyleBackgroundData::StyleBackgroundData):
              (WebCore::StyleMarqueeData::StyleMarqueeData):
              (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
              (WebCore::StyleMultiColData::StyleMultiColData):
              (WebCore::StyleTransformData::StyleTransformData):
              (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
              (WebCore::StyleRareInheritedData::StyleRareInheritedData):
              (WebCore::StyleInheritedData::StyleInheritedData):
              * rendering/RenderStyle.h:
              (WebCore::TransformOperation::TransformOperation):
              (WebCore::CursorList::CursorList):
              * rendering/SVGCharacterLayoutInfo.h:
              (WebCore::SVGCharOnPath::SVGCharOnPath):
              * rendering/SVGRenderStyle.cpp:
              (WebCore::SVGRenderStyle::SVGRenderStyle):
              * rendering/SVGRenderStyle.h:
              (WebCore::SVGRenderStyle::SVGRenderStyle):
              * rendering/SVGRenderStyleDefs.cpp:
              (StyleFillData::StyleFillData):
              (StyleStrokeData::StyleStrokeData):
              (StyleStopData::StyleStopData):
              (StyleTextData::StyleTextData):
              (StyleClipData::StyleClipData):
              (StyleMaskData::StyleMaskData):
              (StyleMarkerData::StyleMarkerData):
              (StyleMiscData::StyleMiscData):
              * storage/SQLResultSetRowList.h:
              (WebCore::SQLResultSetRowList::SQLResultSetRowList):
              * svg/SVGAngle.cpp:
              (WebCore::SVGAngle::SVGAngle):
              * svg/SVGAnimatedTemplate.h:
              (WebCore::SVGAnimatedTemplate::SVGAnimatedTemplate):
              * svg/SVGElementInstanceList.cpp:
              (WebCore::SVGElementInstanceList::SVGElementInstanceList):
              * svg/SVGList.h:
              (WebCore::SVGList::SVGList):
              (WebCore::SVGPODListItem::SVGPODListItem):
              * svg/SVGPathSeg.h:
              (WebCore::SVGPathSeg::SVGPathSeg):
              * svg/SVGPreserveAspectRatio.cpp:
              (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio):
              * svg/SVGRenderingIntent.h:
              (WebCore::SVGRenderingIntent::SVGRenderingIntent):
              * svg/SVGUnitTypes.h:
              (WebCore::SVGUnitTypes::SVGUnitTypes):
              * svg/graphics/SVGPaintServerGradient.h:
              (WebCore::SVGPaintServerGradient::SharedStopCache::SharedStopCache):
              * svg/graphics/SVGResource.cpp:
              (WebCore::SVGResource::SVGResource):
              * xml/DOMParser.h:
              (WebCore::DOMParser::DOMParser):
              * xml/XMLHttpRequest.cpp:
              (WebCore::XMLHttpRequest::XMLHttpRequest):
              * xml/XMLSerializer.h:
              (WebCore::XMLSerializer::XMLSerializer):
              * xml/XPathEvaluator.h:
              (WebCore::XPathEvaluator::XPathEvaluator):
              * xml/XPathExpression.h:
              (WebCore::XPathExpression::XPathExpression):
              * xml/XPathNSResolver.h:
              (WebCore::XPathNSResolver::XPathNSResolver):
              * xml/XPathResult.cpp:
              (WebCore::XPathResult::XPathResult):
              * xml/XPathValue.h:
              (WebCore::XPath::ValueData::ValueData):
              * xml/XSLTProcessor.h:
              (WebCore::XSLTProcessor::XSLTProcessor):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      734fbf64
  13. 09 Feb, 2008 1 commit
    • darin@apple.com's avatar
      Reviewed by Mitz. · e4ba8cf5
      darin@apple.com authored
              - http://bugs.webkit.org/show_bug.cgi?id=17256
                Change RegExp to start its ref count at 1, not 0
      
              We'll want to do this to every RefCounted class, one at a time.
      
              * kjs/nodes.h:
              (KJS::RegExpNode::RegExpNode): Use RegExp::create instead of new RegExp.
              * kjs/regexp.cpp:
              (KJS::RegExp::RegExp): Marked inline, set initial ref count to 1.
              (KJS::RegExp::create): Added. Calls new RegExp then adopts the initial ref.
              * kjs/regexp.h: Reformatted. Made the constructors private. Added static
              create functions that return objects already wrapped in PassRefPtr.
              * kjs/regexp_object.cpp:
              (KJS::regExpProtoFuncCompile): Use RegExp::create instead of new RegExp.
              (KJS::RegExpObjectImp::construct): Ditto.
              * kjs/string_object.cpp:
              (KJS::stringProtoFuncMatch): Ditto.
              (KJS::stringProtoFuncSearch): Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30109 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e4ba8cf5
  14. 08 Feb, 2008 3 commits
  15. 06 Feb, 2008 4 commits
    • ggaren@apple.com's avatar
      Reviewed by Oliver Hunt. · 4d4a1b82
      ggaren@apple.com authored
              
              Added an ASSERT to catch refCount underflow, since it caused a leak in
              my last check-in.
      
              * wtf/RefCounted.h:
              (WTF::RefCounted::deref):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30051 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4d4a1b82
    • ggaren@apple.com's avatar
      Reviewed by Darin Adler. · 3bed3bdb
      ggaren@apple.com authored
              PLT speedup related to <rdar://problem/5659272> REGRESSION: PLT .4%
              slower due to r28884 (global variable symbol table optimization)
              
              Tweaked RefCounted::deref() to be a little more efficient.
      
              1% - 1.5% speedup on my machine. .7% speedup on Stephanie's machine.
              
              * wtf/RefCounted.h:
              (WTF::RefCounted::deref): Don't modify m_refCount if we're just going
              to delete the object anyway. Also, use a simple == test, which might be
              faster than <= on some hardware.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30042 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3bed3bdb
    • darin@apple.com's avatar
      JavaScriptCore: · c8f9531a
      darin@apple.com authored
              Reviewed by Sam.
      
              - fix http://bugs.webkit.org/show_bug.cgi?id=17094
                Array.prototype functions create length properties with DontEnum/DontDelete
      
              Test results match Gecko with very few obscure exceptions that seem to be
              bugs in Gecko.
      
              Test: fast/js/array-functions-non-arrays.html
      
              * kjs/array_object.cpp:
              (KJS::arrayProtoFuncConcat):  Removed DontEnum and DontDelete from the call
              to set length.
              (KJS::arrayProtoFuncPop): Ditto. Also added missing call to deleteProperty,
              which is not needed for real arrays, but is needed for non-arrays.
              (KJS::arrayProtoFuncPush): Ditto.
              (KJS::arrayProtoFuncShift): Ditto.
              (KJS::arrayProtoFuncSlice): Ditto.
              (KJS::arrayProtoFuncSort): Removed incorrect call to set length when
              the array has no elements.
              (KJS::arrayProtoFuncSplice): Removed DontEnum and DontDelete from the call
              to set length.
              (KJS::arrayProtoFuncUnShift): Ditto. Also added a check for 0 arguments to
              make behavior match the specification in that case.
              * kjs/nodes.cpp:
              (KJS::ArrayNode::evaluate): Removed DontEnum and DontDelete from the call
              to set length.
      
      LayoutTests:
      
              Reviewed by Sam.
      
              - tests for http://bugs.webkit.org/show_bug.cgi?id=17094
                Array.prototype functions create length attributes with DontEnum/DontDelete
      
              * fast/js/array-functions-non-arrays-expected.txt: Added.
              * fast/js/array-functions-non-arrays.html: Added.
              * fast/js/resources/array-functions-non-arrays.js: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30041 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c8f9531a
    • darin@apple.com's avatar
      JavaScriptCore: · 8e21ef11
      darin@apple.com authored
              Reviewed by Sam.
      
              - replace calls to put to set up properties with calls to putDirect, to
                prepare for a future change where put won't take attributes any more,
                and for a slight performance boost
      
              * API/JSObjectRef.cpp:
              (JSObjectMakeConstructor): Use putDirect instead of put.
              * kjs/CommonIdentifiers.h: Removed lastIndex.
              * kjs/JSGlobalObject.cpp:
              (KJS::JSGlobalObject::reset): Use putDirect instead of put.
              * kjs/array_object.cpp:
              (KJS::arrayProtoFuncConcat): Took out extra call to get length (unused).
              (KJS::ArrayObjectImp::ArrayObjectImp): Use putDirect instead of put.
              * kjs/error_object.cpp:
              (KJS::ErrorPrototype::ErrorPrototype): Use putDirect instead of put.
              * kjs/function.cpp:
              (KJS::Arguments::Arguments): Use putDirect instead of put.
              (KJS::PrototypeFunction::PrototypeFunction): Use putDirect instead of put.
              * kjs/function_object.cpp:
              (KJS::FunctionObjectImp::construct): Use putDirect instead of put.
              * kjs/nodes.cpp:
              (KJS::FuncDeclNode::makeFunction): Use putDirect instead of put.
              (KJS::FuncExprNode::evaluate): Use putDirect instead of put.
              * kjs/regexp_object.cpp:
              (KJS::regExpProtoFuncCompile): Use setLastIndex instead of put(lastIndex).
              (KJS::RegExpImp::match): Get and set lastIndex by using m_lastIndex instead of
              calling get and put.
              * kjs/regexp_object.h:
              (KJS::RegExpImp::setLastIndex): Added.
              * kjs/string_object.cpp:
              (KJS::stringProtoFuncMatch): Use setLastIndex instead of put(lastIndex).
      
      WebCore:
      
              Reviewed by Sam.
      
              - replace calls to put to set up properties with calls to putDirect, to
                prepare for a future change where put won't take attributes any more,
                and for a slight performance boost
      
              * bindings/js/JSAudioConstructor.cpp:
              (WebCore::JSAudioConstructor::JSAudioConstructor): Use putDirect instead of put.
              * bindings/js/JSEventTargetBase.h:
              (WebCore::JSEventTargetPrototype::self): Ditto.
              * bindings/js/JSHTMLOptionElementConstructor.cpp:
              (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor): Ditto.
              * bindings/js/JSSQLResultSetRowListCustom.cpp:
              (WebCore::JSSQLResultSetRowList::item): Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30040 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8e21ef11
  16. 05 Feb, 2008 3 commits
  17. 04 Feb, 2008 3 commits
  18. 02 Feb, 2008 2 commits
    • ggaren@apple.com's avatar
      JavaScriptCore: · ed76413f
      ggaren@apple.com authored
              Reviewed by Geoff Garen.
      
              PLT speedup related to <rdar://problem/5659272> REGRESSION: PLT .4%
              slower due to r28884 (global variable symbol table optimization)
      
              Geoff's theory is that the slowdown was due to copying hash tables when
              putting things into the back/forward cache. If that's true, then this
              should fix the problem.
              
              (According to Geoff's measurements, in a PLT that exaggerates the
              importance of symbol table saving during cached page creation, this
              patch is a ~3X speedup in cached page creation, and a 9% speedup overall.)
      
              * JavaScriptCore.exp: Updated.
      
              * kjs/JSVariableObject.cpp:
              (KJS::JSVariableObject::saveLocalStorage): Updated for changes to SavedProperty,
              which has been revised to avoid initializing each SavedProperty twice when building
              the array. Store the property names too, so we don't have to store the symbol table
              separately. Do this by iterating the symbol table instead of the local storage vector.
              (KJS::JSVariableObject::restoreLocalStorage): Ditto. Restore the symbol table as
              well as the local storage vector.
      
              * kjs/JSVariableObject.h: Removed save/restoreSymbolTable and do that work inside
              save/restoreLocalStorage instead. Made restoreLocalStorage a non-const member function
              that takes a const reference to a SavedProperties object.
      
              * kjs/LocalStorage.h: Changed attributes to be unsigned instead of int to match
              other declarations of attributes elsewhere.
      
              * kjs/property_map.cpp:
              (KJS::SavedProperties::SavedProperties): Updated for data member name change.
              (KJS::PropertyMap::save): Updated for data member name change and to use the new
              inline init function instead of setting the fields directly. This allows us to
              skip initializing the SavedProperty objects when first allocating the array, and
              just do it when we're actually setting up the individual elements.
              (KJS::PropertyMap::restore): Updated for SavedProperty changes.
      
              * kjs/property_map.h: Changed SavedProperty from a struct to a class. Set it up so
              it does not get initialized at construction time to avoid initializing twice when
              creating an array of SavedProperty. Removed the m_ prefixes from the members of
              the SavedProperties struct. Generally we use m_ for class members and not struct.
      
      WebCore:
      
              Reviewed by Geoff Garen.
      
              PLT speedup related to <rdar://problem/5659272> REGRESSION: PLT .4%
              slower due to r28884 (global variable symbol table optimization)
      
              * history/CachedPage.cpp:
              (WebCore::CachedPage::CachedPage): Removed saveSymbolTable call.
              (WebCore::CachedPage::restore): Removed restoreSymbolTable call.
              (WebCore::CachedPage::clear): Removed clear of m_windowSymbolTable.
      
              * history/CachedPage.h: Removed m_windowSymbolTable, since save/restoreLocalStorage
              now takes care of the symbol table. Also removed many unnecessary includes.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29943 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ed76413f
    • eric@webkit.org's avatar
      Reviewed by darin. Landed by eseidel. · cf4cb667
      eric@webkit.org authored
              Add #define guards for WIN32_LEAN_AND_MEAN and _CRT_RAND_S.
      
              * kjs/config.h:
              * wtf/FastMalloc.cpp:
              * wtf/TCSpinLock.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29941 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cf4cb667
  19. 01 Feb, 2008 1 commit
  20. 28 Jan, 2008 1 commit
  21. 27 Jan, 2008 1 commit